Browsing posts in: electronics

Flash memory reliability

During my trip to China a few weeks ago I met Ernst Fuld again. Ernst is CEO of the NGN, the dutch IT-professional platform. He told me that he has tried to test some usb-sticks and see if they could be written and erased so many times that they break. As you probably know, flash memory can only be written a limited number of times. Each time you erase (rewrite) the memory cell, there is a slight chance that it breaks. Normally, the memory is guaranteed to last for 100000 rewrites, but has anybody tested this on a regular usb stick?

There is a problem however. The sticks are known to use a technique called “wear levelling”. The data you write to the stick is remapped to memory area’s where the number of rewrites is the lowest. This means that you cannot test 1 cell by re-writing a small file over and over. You have to fill the WHOLE stick in order to rewrite all cells. And even if you manage to break a cell, there is also error-correction logic and bad-block remapping that will correct the error without notice. So the flash memories seem to be unbreakable.. or not!?

That’s why I wrote this simple app: Flashkiller. It’s a free download so you can test the reliability of your memory stick yourself. If you broke a usb-stick or memory card with it, please respond to this post!

May 2 update: the kingston 512mb is now @19000 rewrites and still without an error..

june 13 update: The kingston is DEAD. After 65000 writes it becomes a read-only stick. Nothing can be written any more, and when i try to write it gives an error!!!!


Adding an AUX input to a Mini Cooper or BMW car stereo

I recently bought a mini cooper, because it’s such a great car. (yes, it’s the cooper-S convertible, model 2005, so the only thing it needs is the “cooper works” upgrade)

But even nowadays, a simple aux-input on the radio is not a standard option. And who listens to music without an mp3 player/ipod?

I have bought an Archos mp3 player with 20Gb disk a couple of years ago, and although it’s large and old, and it has a slow USB 1.0 port, it still functions as my music take-away. But without an input on the car radio, it’s useless.

But no worries, a bit of googling suggested a solution.

unfortunately, this did not work for me, as other people in the article suggest, it works only for *some* radio models.

So I started some experiments. First, get the radio out. The plastic cover under the steering wheel is locked by some “clicking” pins, so a hard pull will tear it down. This makes room to unscrew both torx screws on the left and right side of the radio compartment.

My radio turns out to be BMW radio, probably from Alpine.

The back reveals a few connectors:

The pin layout is described in this picture, that can be googled for:

So connecting the audio output to pin 3,4 and pin 10 was the first tryout. Cutting an old PC-USB port connecter in pieces was sufficient to get everything connected: (green=pin3 pink=pin4 white=pin10)

But no success. The problem is that the radio does not “recognise” the aux input, and the MODE key doesn’t include AUX in its options. So what is the trick?

I noticed that turning the volume up and clicking on the mode key very rapidly sometimes DID give the AUX menu for a second or so. So I guessed it should be some kind of impedance/resistor pull up or pull down. So after some experiments I came up with this little thingy:

Basically, it connects the left and right channel with a resistor. To uncouple the audio lines, a small capacitor is used (220n). This seemed to work at first, but some music passages made the AUX menu go away. So I made the resistor smaller and smaller. I also tried to connect it to pin 9 and/or pin 10 as well:

Finally, the best solution for me was this schematic:

Note: Because the output impedance of the MP3 player is low (speaker output, typically 1-50 ohms) the 1k2 resistor does not have a large impact on stereo separation.