I recently purchased 3 Adafruit Data Logger Shields and I have encountered problems initiating the SD card on the two to which I have attached headers.
I have followed these instructions Overview | Adafruit Data Logger Shield | Adafruit Learning System (sourced from the Core Electronics website) and I’ve been able to set the RTC on each of the two shields and in attempting to initialise the SD cards on both, I have done the following:
carefully soldered headers to each shield;
uploaded Arduino File/Examples/SD/CardInfo, set the CS as pin 10 and the baud rate at 9600 and received the error message in both cases;
- checked the SD card and it is working fine in another microSD card module, as is another SD card;
- tried another UNO board, with the same result; and
- checked, with a good quality multimeter, the connectivity between the header pins as shown in the attachment.
Adafruit data logging shield conductivity.pdf (93.4 KB)
In essence, the attachment (in my view) demonstrates that each pin is independent of its ‘neighbour’ (i.e. when I test between them, they’re shown as open circuits), apart from the labelled SCL and SDA pins, 5v and ground and the ground pins. The hole adjacent to each pin indicates good conductivity with that adjacent neighbour: in the range 1.3-1.5 ohms resistance.
I hope this is sufficient information for someone to provide some guidance, as the data logging shields aren’t much use to me if I can’t save data to the SD card.
Please let me know if I’ve omitted any vital information.
Thank you, in anticipation.
(My apologies for the section captured as code. I don’t know how that came about, nor how to rectify the formatting error. It should be ordinary text!)
Good idea to test the continuity between pins so methodically. Are you able to show us some close-ups of your soldering? I’m almost certain your soldering is fine, but I can’t see any easy fixes so it’s on to the little things.
Once you’ve sent that through, we’ll set one of these up on the bench and see if we can replicate your issue.
If it looks like they are faulty, we’ll handle an RMA for you via email.
Keen to get to the bottom of this one!
Thank you, James.
During my research on the sketch Jeff is helping with, I found a Forum discussion on SD card libraries to use/not use with the Adafruit Data Logger Shield, but I’m afraid I’ve lost track of it now - and I think it was some years old, so may not be relevant. However, I do wonder if it’s a software issue of some sort.
In any event, I attach photos of one of my Data Loggers. Hopefully, the images are satisfactory for you.
Did I miss what actual error you are experiencing? Is there a message that is printed or some such that might indicate the issue?
I don’t have that particular shield, but I know I always have headaches with SD cards. It’s definitely worth trying some different libraries and their example sketches. I use the SD library (in Library Manager, literally just SD by Adafruit, Sparkfun) with my Adafruit TFT Shield (Adafruit 1.8 Color TFT Shield w/microSD and Joystick [v 2] : ID 802 : $34.95 : Adafruit Industries, Unique & fun DIY electronics and kits). This is different to the built-in SD.h, I believe. Also, even though you tried your SD cards in a different unit, it’s worth trying a different card. I’ve had good experiences with the 32GB Sandisk Ultras.
DThirteen, this is the error message I get:
Initializing SD card initialization failed. Things to check:
- is a card is inserted?
- Is your wiring correct?
- did you change the chipSelect pin to match your shield or module?
Apparently it’s very common.
I shall do as you suggest and keep trying different example sketches and SD cards, as (a) a card is inserted - correctly; (b) it’s a shield, so there’s no wiring flexibility; and (c) I have changed the CS pin to 10, as instructed. A variation on the wiring question: I am 99% sure my header connections are OK.
In my early Arduino days I connected a SD card module to an UNO. It took me some time to get the code working, mainly because not all SD libraries are created equal. I went through a few libraries before I found one that finally worked.
I think the library was SdFat by Bill Greiman.
I learnt a lot about SD cards, how they work and how to get a UNO to communicate with one.
This may not help in your situation but you would think a library by Adafruit for an Adafruit product should work.
Thank you, Jim.
I’ve tried a whole lot of SD card-related sketches with the two Adafruit Data Logger Shields to which I’ve soldered headers - both of which return similar results with my simple continuity checks - but still the same (‘failed to initialize’) error message each time.
Also on my desk, I have a breadboard with a microSD card module (with formatted card) and DS1307RTC module attached to my UNO with a messy set of jumpers and that system works without any problem.
I purchased the Adafruit shields on the assumption that they would deliver the benefits of simplicity, compactness and reliability, but my failure (so far) to initialize the SD cards on the shields is frustrating to say the least!
As you have followed the Adafruit Tutorial on installing the shield and software it might be time to contact Adafruit for help.
I don’t think there would be a problem with the headers as they are just pass through, your pics of the solder joints looks ok. Being able to setup the RTC gives confidence in this area understanding the RTC uses the I2C interface and the SD card SPI.
Unless it something to do with the ICSP header on the shield and the way it is wired. Your pics show the ICSP header not soldered. Assume you have soldered the jumper pads for MISO MOSI & SCK signals to connect them to the digital pins. The circuit board looks like these are not normally connected to the headers but through the ICSP connector.
Anyway, hope you get it sorted.
EDIT: The Adafruit Tutorial shows the ICSP header soldered and connected to the UNO.
Thank you for pointing out my fundamental error so kindly, Jim.
6-pin header now properly installed on both Adafruit Data Logger Shields and both test correctly. I’ve also written to the SD card on one of them and that also worked as anticipated.
Such a simple oversight! Thank you, again.