Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

SD card...error: Card failed, or not present
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

SD card...error: Card failed, or not present

by spyropdd on Thu Feb 20, 2020 8:07 pm

I have a new Adafruit data logging shield (https://www.adafruit.com/product/1141) attached to an Arduino Uno R3. When i put the SD card into my brand new Adafruit Data logging shield and run the CardInfo sketch, it won't find/recognize the card:
"Initializing SD card...error: Card failed, or not present"
I’ve tried several SD cards and used SDFormatter to properly reformat them (FAT32).
I assigned chipSelect CS to pin 10 (with the Datalogging shield; the Ethernet shield used pin 4)
- red SD LED on pin 10 works fine - Lights up when I power up the board and run the CardInfo sketch. Otherwise it's off.
- wiring/soldering is good (zero resistance) on the Datalogging shield between pin 10 and the top right pin of the Shifter chip (other pins fine too).
- RTC (DS1307) works.

What else should i check? Programming error or code update needed?

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Fri Feb 21, 2020 2:56 pm

Someone mentioned that installing the 2x3 header socket got their SD card working, but mine has the 2x3 header socket installed, so that is not the issue.
Also, I assigned chipSelect CS to a bunch of different pins, but none worked.

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by adafruit_support_carter on Thu Feb 27, 2020 1:01 pm

Let's check the hardware. Please post a photo of your setup showing how everything is connected.

adafruit_support_carter
 
Posts: 16938
Joined: Tue Nov 29, 2016 2:45 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Thu Feb 27, 2020 3:14 pm

Adafruit_DataloggingShield_IMG_7982.jpg
Adafruit_DataloggingShield_6pin link
Adafruit_DataloggingShield_IMG_7982.jpg (992.84 KiB) Viewed 99 times

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Thu Feb 27, 2020 3:26 pm

Adafruit_DataloggingShield_IMG_7983.jpg
SD card port Adafruit_DataloggingShield
Adafruit_DataloggingShield_IMG_7983.jpg (869.24 KiB) Viewed 98 times

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by adafruit_support_carter on Fri Feb 28, 2020 3:51 pm

What are all the other wires attached to? Did you verify the shield worked before attaching all those wires? Are you attaching to and possibly conflicting with any of pins 13, 12, 11, or 10?

adafruit_support_carter
 
Posts: 16938
Joined: Tue Nov 29, 2016 2:45 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Fri Feb 28, 2020 4:18 pm

Pin 10 is my LED, which i verified works by changing LED settings.
Pins 11 and 12 are in use (as with pins 2-9), meaning they are attached to wires that will be (but not yet) connected to different reed switches.
And i did not run the CardInfo sketch before connecting the wires because it was easier to solder the wires before i soldered the pins.
(Please see my first post for more checks run.)

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by adafruit_support_carter on Fri Feb 28, 2020 4:24 pm

Pins 11 and 12 are in use

It may be a conflict here. For the UNO, those pins are part of the SPI bus used to talk to the SD card. Pin 11 is MOSI and Pin 12 is MISO.

https://learn.adafruit.com/adafruit-dat ... and-config
On an UNO, note that Digital #13 is the same as ICSP SCK, #12 is ICSP MISO, #11 is ICSP MOSI

adafruit_support_carter
 
Posts: 16938
Joined: Tue Nov 29, 2016 2:45 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Sat Feb 29, 2020 10:29 am

So, should i pull pins 11 and 12?
And if so, where could i solder them in?

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by adafruit_support_carter on Mon Mar 02, 2020 1:30 pm

The shield itself uses the ICSP header to make the SPI bus connection. But specific to an Arudino UNO (which it looks like you have) those same SPI pins are also at digital 13/12/11, so they can't be used for anything other than SPI when using the shield.

What are pins 11 and 12 wired to currently?

adafruit_support_carter
 
Posts: 16938
Joined: Tue Nov 29, 2016 2:45 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Mon Mar 02, 2020 1:52 pm

pins 11 and 12 are wired to reed switches.

According to someone who successfully used this configuration before (on an an older version of the data logging shield?) the 2x3 header socket was not needed for the SD card and pins 11 and 12 could be used for reed switches.

which pins could i use for reed switches if i pull them from pins 11 and 12?

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by adafruit_support_carter on Mon Mar 02, 2020 1:57 pm

The older version of the shield did not use the 2x3 header and instead used pins 13/12/11/10 (as well as A4/A5) directly:
https://learn.adafruit.com/adafruit-dat ... inouts-4-5
But that would not allow those pins to be used for other things.

which pins could i use for reed switches if i pull them from pins 11 and 12?

You will need to move these to some other free digital pins.

adafruit_support_carter
 
Posts: 16938
Joined: Tue Nov 29, 2016 2:45 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Mon Mar 02, 2020 2:20 pm

Can i use pins 0 and 1?

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Re: SD card...error: Card failed, or not present

by adafruit_support_carter on Wed Mar 04, 2020 1:38 pm

You would need to make sure not to conflict with the hardware UART.

adafruit_support_carter
 
Posts: 16938
Joined: Tue Nov 29, 2016 2:45 pm

Re: SD card...error: Card failed, or not present

by spyropdd on Wed Mar 04, 2020 3:12 pm

Pin 0 has on the side the marking "0 -> RX" (Arduino Uno)
Pin 1 has on the side the marking "1 <- TX" (Arduino Uno)
- Would these be indications of a possible conflict?
- Can you suggest a sketch that i could run to test for conflicts with the hardware UART?

Also, the wires coming from pin 11 and pin 12 are connected to reed switches that are in the OFF position (open circuit).
- This being the case, how could these wires interfere with SD card recognition?

spyropdd
 
Posts: 22
Joined: Thu Feb 20, 2020 2:01 pm

Please be positive and constructive with your questions and comments.