Issue with SD Card

I am experiencing a strange issue with SD cards.

I tried one 2GB SD and a two 8GB SDHC with different SD adapters and SD readers and the result is always the same:

I can use all functions of the SD library: create files, navigate into folders, get info from the card...

But I can't write anything into a file.

Any idea what's going on?

Thank you so much

Vasco F.

After spending money in newer cards and adapters I found out the problem.

I know that interfacing SD cards is tricky because they need a steady power supply.

So, first I put my power supply in parallel with the 5Volt supplied by the USB port. No success.

Then, I reassemble the whole circuit in a new breadboard, new Arduino, new SD card, new SD adapter,
new SD interface module, new wires... No success.

I was aware about the 3.3V which the SD cards use. But as the SD card module as a 3.3V voltage regulator I though I was OK by powering up the SD with 5V in the input of the 3.3V voltage regulator.

My last idea was to power up the SD card directly with 3.3 Volt.

Voila... It is now working.

I believe that 5V in the input of the voltage regulator is not enough to produce 3.3 Volt and that's why I can create and remove files but not writing into it. Because writing needs more current.

It depends what kind of voltage regulator you are using. Except a low-drop-out ones (which needs 0.5-1V more at the input side) the others may need 2-2.5V volt over the output. Also the modern sdcards may consume 100-200mA peak current during write, a good decoupling is a must..

pito:
It depends what kind of voltage regulator you are using. Except a low-drop-out ones (which needs 0.5-1V more at the input side) the others may need 2-2.5V volt over the output. Also the modern sdcards may consume 100-200mA peak current during write, a good decoupling is a must..

Yah. I Understand what you're saying but the voltage regulator is on the SD adapter.

So, I have to assume it is well dimensioned. But apparently it is not.

The AMS1117 requires 1.35V+3.3V min at the intput (or 4.75V with full current load).

BTW, you need a 3.3V powered arduino in order to run the sdcards with the above adapter.. :wink:

With 5V arduino you need to adjust the sdcard's signals to 3.3V with that adapter, otherwise you'll kill your cards..

pito:
The AMS1117 requires 1.35V+3.3V min at the intput (or 4.75V with full current load).

BTW, you need a 3.3V powered arduino in order to run the sdcards with the above adapter.. :wink:

With 5V arduino you need to adjust the sdcard's signals to 3.3V with that adapter, otherwise you'll kill your cards..

That does not make any sense.

If the adapter as the correct voltage regulator, meaning that if 5V in its input is enough to get 3.3V at its output I won't the kill the SD card.

It makes perfect sense. That SD board does not have a 5 volt to 3.3 volt logic level converter. If you put 5 volts into the SS, MOSI and SCK pins on the SD card. it will damage the SD card. Maybe not today, but sometime soon.

SurferTim:
It makes perfect sense. That SD board does not have a 5 volt to 3.3 volt logic level converter. If you put 5 volts into the SS, MOSI and SCK pins on the SD card. it will damage the SD card. Maybe not today, but sometime soon.

I completely forgot the data lines. Thanks.

Mine is exactly like yours and it works on write too. I did this test right wow.

The module is marginal but some cards work. Cards that work draw lots of current due to input protection circuits. This drops the input voltage. Probably not best for the card or Arduino.