Go Down

Topic: Cannot Read SD card (Read 1 time) previous topic - next topic

tioluwa

Hello,
i'm trying out an SD card project with the Arduino Mega 2560 and a microSD

just to get a hang of it , i'm trying out the example project DumpFile, However, i keep getting the "Card failed, or not present" message, meaining that the SD.begin function failed.

Code: [Select]
  if (!SD.begin(chipSelect)) {
    Serial.println("Card failed, or not present");
    // don't do anything more:
    return;
  }


I've connected the SD card pin 50-53 accordingly, powered it with 3.3Volts, and pulled up the lines to 3.3also using 4.7k resistors.

I'm i doing anything wrong?


MarkT

I'm wondering where you get your 3V3 from?  The built-in regulator is rated at 50mA, but some SD cards might use more like 100mA on write/erase in theory (I've not seen this be a problem but cards _are_ allowed to be that power hungry).  I'd do a quick check that the 3V3 line is holding up.  And double check all the connections too.  There's no need to pull up any but the chip select line, but you do need to level-shift it and the SCK/MOSI lines from 5V down to 3V3 - SD cards must no see anything above 3V3.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

tioluwa

I have an external Regulator supplying 3.3Volts to the smartcard.
I know the SD card must not see anything othe than 3v3, that's why i had the lines pulled up to 3v3.

CrossRoads

Are there any electronics between 50-53 and the card socket? Like a level translator chip?
If not,  the ATMega will put out 5V and a resistor to 3.3V is not going to help much.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

tioluwa

Okay, i don't have the level shifting on my circuit, i'll put that in and try again, thanks.

MarkT

Hope the cards survived...
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

tioluwa

good for me, the card survived.

Go Up