Pages: [1]   Go Down
Author Topic: My SD card is being corrupted.  (Read 886 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Greetings,

I'm using WaveShare's Micro SD storage board, and the SD library, and something appears to be corrupting my SD card.

After formatting the card on my laptop, and running the CardInfo sketch, I get:


Initializing SD card...Wiring is correct and a card is present.

Card type: SD2

Volume type is FAT32

Volume size (bytes): 1967448064
Volume size (Kbytes): 1921336
Volume size (Mbytes): 1876

Files found on the card (name, date and size in bytes):


Then I run the ReadWrite sketch and get:


Initializing SD card...initialization done.
Writing to test.txt...done.
test.txt:


which appears to have written nothing to test.txt

But if I run CardInfo again I get:



Initializing SD card...Wiring is correct and a card is present.

Card type: SD2

Volume type is FAT32

Volume size (bytes): 1967448064
Volume size (Kbytes): 1921336
Volume size (Mbytes): 1876

Files found on the card (name, date and size in bytes):
TEST.TXT      1998-02-02 16:00:00 66052
€@.


The @. above is actually followed by a great deal of gobbeldygook that I am unable to cut and paste here.

Has anyone experienced anything similar?

Peter.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 152
Posts: 6175
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How are you powering the card? If you are using the 3.3v pin on the Arduino, that may not provide enough current for a read/write. According to the hardware datasheet, that pin is limited to 50ma, and the card could use more than that when writing. That could take 60-100ma, depending on the card.

edit: If you do not have a 3.3v regulated power supply, try powering the SD card with 2 new AA batteries in series. Keep the ground connected to the Arduino. That should provide enough voltage and current to test the theory about the power supply.
« Last Edit: November 21, 2012, 09:29:10 am by SurferTim » Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Make sure to keep it connected to ground. Secure your connections, too.
Logged

Pages: [1]   Go Up
Jump to: