Go Down

Topic: Interfacing SD card's to the Arduino and stability - a few tips..... (Read 23 times) previous topic - next topic


I wanted to interface the arduino to a SD card. My method was to solder directly the wires to a micro sd connector for which any microsd card can be plugged. However i found that it was highly unstable with frequent SD errors. I corrected it by adding a 100uf and 0.1uf supply decoupling capacitors across pin's 3 and 4 of the sd connector. Now everything is stable at the maximum 8Mhz SPI bus speed using resistor voltage shifters. Even the SD card manufacturers recommend using capacitors, however few people use this which i think is the cause for many people commenting about unstable SD's. Keeping the wires short also helps as long wires act as stray capacitors ruining stability.

You can read more information about this at my blog post at http://kalum.posterous.com/sd-cards-and-arduino
I hope this information will help people trying to interface SD card's to the arduino.


thanks kalem,   I have been having some fun and games with an intermittent  SD card,   I halved its speed to solve my problem but I will I put another 100nF across 3&4 of the holder to make sure.
With my mobile phone I can call people and talk to them -  how smart can you get ?


Caps often help and short wires are important.  Even with these precautions many people have problems with resistor level shifters.

I have done a study using cards with resistor level shifters.  I find that most older cards work at 8 MHz and almost all older cards work at half speed, 4 MHz.

Many newer cards fail at all speeds with resistor level shifters.  These cards expect very fast SPI signal rise times.  The SD spec requires a rise time of less than 10 ns for all clock speeds under 25 MHz.  It is just not possible to get sharp edges at 8 MHz into the typical capacitance with resistor level shifters.

New cards appear to use edge detectors.  New cards expect 5 ns rise times for 25 - 50 MHz clock.


Can you or someone else post a scheme with 100uf and 0.1uf capacitors included?

Great article.


Can you or someone else post a scheme with 100uf and 0.1uf capacitors included?

Put them (at least the 0.1uF) between VCC & ground (pins 3&4 of the SD card). If you also use the 100uF be sure to check the polarity right. (short leg is ground, pin 3)

Go Up