Can't write to SD card - files are corrupted

Hi Friends,

I tried Arduino Uno and Mega2560. I use Card Reader module as shown on the attachment.
I’ve configured with: MOSI:11, MISO:12, SCK:13, and CS: 10 (also set as OUTPUT). (for Mega:51,50,52,53)

When I try to write files, even with the examples, it creates the file, but the content is CORRUPTED or UNREADABLE. So I can not open it afterwards or read from it.
Do you have the same problem? Have you already solved it?
Please give me some advice.

Best regards.

SD-Card-Reader-Module-for-Arduino-ARM-Read-and-Write.jpg

The LC Studio module is very poorly designed. There are many posts in this forum about problems with this module.

The LC Studio module applies 5V SPI signals to the SD card's 3.3V inputs. This causes the SD card's input pins to draw excessive current. Some SD cards are able to tolerate this current but many SD cards become unreliable or totally fail.

Choose a module that has a level shifting IC to convert the 5V SPI signals to 3.3V.

You can get more info by searching the forum for "LC Studio".

Thank you for your advice.

I’ve found a solution. I use the schematics in the attachment (SD card only) and IT WORKED for 16GB SD (30MB/s, 10SDHC).
However my previous 4GB SanDisk (4SDHC) cannot be initialized. I might have it burned.

*the diodes D1, D2 and D3 are “1N4148”

this is the sourcepage: http://apcmag.com/arduino-project-5-digital-audio-player.htm

However my previous 4GB SanDisk (4SDHC) cannot be initialized. I might have it burned.

It may still be OK if it works with a PC or Mac.

Your solution is better but a diode drop is still not too good. Some SD cards need a true IC level shifter or a resistor voltage divider with fairly low value resistors.

An IC level shifter like a 74AHCT125 or 74HC4050 produces the best result for 5V to 3.3V SPI signals.