Not able to make any of my SD cards to be read by my Arduino Shields

Hi All,

I have two new Arduino boards and I am trying to read SD cards from two Shields that I connect on them.
I have the Ethernet Shield and SD card Shield ver 1.

And

I have been trying very hard to make each one of them to read the SD card BUT I am getting init failure in each time I try.
I changed ChipSelect to 4,8,10 and nothing - on each one I get Init Error.
I tried different SD cards - Nothing changed.
On the Ethernet Shield, I use a microSD and Still nothing - I know that it needs CS no. 4 But neither one works.
Also on the SD Card Shield Ver 1 - I am getting the same Error.
Does anyone know what I am doing wrong?
What are the CORRECT Chip Select pins numbers on each of these boards? I would be happy to know.

Please assist I am not able to create the datalogger that I am trying hard to get.
Thank You!!

Have your cards been formatted in the proper manner?

Hi
Does the Sd card work without the shields?

Your SD card must be formatted with the FAT or FAT32 filesystem formats.
If that is already done, then just make sure that your SD card pinout is as shown below:

On arduino UNO

digital 13 (SCK)
digital 12 (MISO)
digital 11 (MOSI)
digital 10 (CS) you could actually use any pin. Just make sure you set the pinMode to OUTPUT.

on Arduino Mega
digital 52 (SCK)
digital 50 (MISO)
digital 51 (MOSI)
digital 53 (CS) again, you could actually use any pin. Just make sure you set the pinMode to OUTPUT.

and of course connect the 5V and ground pins.

nkemcels:
Your SD card must be formatted with the FAT or FAT32 filesystem formats.

And do not use the OS utilities for that, use SD Card Formatter instead.

Thank you all for your replies.

Nick_Pyner: Yes I did - I have formatted the SD card (4GB) with SD Formatter - twice (not Quick format) and it gave me a summary that the size is correct and it is FAT32.

lenny227: Yes, Both my SD cards work with my PC normally.

nkemcels: I am using Ready made Shields as shown in my images I uploaded. How can I make sure that the pinouts are correct if I don't know where to look? I have already mentioned that I chose the pin 10 for ChipSelect on the Red Shield and on the Ethernet card I tested also pin 4.

Lucario448: used SD formatter - FAT 32.

I have done everything mentioned and STILL does not work on both.
Any ideas why?
Would be happy to get help on that.
Thank You.

It sounds like you know what you are doing with the formatting, and the pins, you have tried several cards and, while I recognise that the shields use different cards, having two of them duds seems a bit of a stretch. So I have to suspect something else is going on - something you think is unrelated but is, in fact, a deal-breaker. So how about the power supply? Are you using a battery?

Did you also tried the CardInfo example? In there you can get a bit more detailed reason why initialization fails (even by looking the info retrieved from the card itself).

Thanks All.

Nick_Pyner - I am using the USB from my PC that is the ONLY power the boards gets. It is a 30 cm long USB cable that is sold with Arduino boards. I have also added a Buttery power, Afer you mentioned it, and the same result - No SD Cards recognition.

Lucario448 - I am using this example exactly and I am not moving forward from the init part.

Are there any specifications to the cards that I need to use? anyone that can assist with the correct Pin Select for the Red Shield I would be happy to know.

Thanks,

aryeduino:
I am using this example exactly and I am not moving forward from the init part.

This may mean three things:

  • Card is dead.
  • Conectivity problems.
  • Wrong CS pin.

Since you're using a shield, maybe you have the wrong pin number for CS in the code; or somehow a trace or a pin in the board is broken.
If non of these are the case, either the slot or the card is bad; there is no other possibility.

It really is too much of a stretch to get failures everywhere and with all that variety, hence my suggestion that that one thing has failed, the power supply, and it is common to both Arduinos. PC's USB should be OK for just a Uno or Mega and a card shield, but now is not a good time to completely trust it. .
A 9v 1A wall wart is really the way to go.

The only other thing that might be common to both, and thus perhaps a problem, is the code. I assume this is a standard item, lifted from the IDE examples and does not include anything else that you have not told us about.

You seem to be doing everything right, and that includes the CS pins. The last (ahem!) card in the pack is the cards themselves. You mention cards, plural, but there are two types used. Do you mean one of each type, or plural of each type?

This is not really a solution: I'm not familiar with the red shield, but I assume it does not require a solder bridge to activate the card. What does that group of four points near the slot do?

I have a shield that looks exactly like the red one you've posted. On this shield the CS line from the SD card socket isn't actually connected to any of the Arduino pins. You can see the connection point for the CS line in this lovely MSPaint:

There one of the three solder pads there is labelled 'CS'. I had to solder a piece of wire from there to one of the Arduino pins. If you have a DMM it might be worth checking this out on your board.

BJHenry:
I have a shield that looks exactly like the red one you've posted. On this shield the CS line from the SD card socket isn't actually connected to any of the Arduino pins.

Well looks like one mystery is down.

About the Ethernet shield... then there has to be something broken on it; because I've read that shield has wired the Ethernet chip's CS on pin 4, and the SD card's one on pin 10. Maybe it's the other way around, but I'm pretty sure those pins are occupied for chip selecting.

Lucario448:
About the Ethernet shield... then there has to be something broken on it; because I've read that shield has wired the Ethernet chip's CS on pin 4, and the SD card's one on pin 10. Maybe it's the other way around, but I'm pretty sure those pins are occupied for chip selecting.

The SD card CS is on pin 4, but you're right in saying that it should be connected. It might be worth noting that the Ethernet shield that the OP posted isn't genuine so we don't know for sure.