SD Card Data Logger still a question

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
SquidTeeth
 
Posts: 24
Joined: Thu Aug 11, 2011 9:47 pm

SD Card Data Logger still a question

Post by SquidTeeth »

I had the original SD Data logging shield, which worked fine until one day. It refused to recognize the SD card although there were files it had written to the card. I replaced the level shifting chip (because i didn't really know what it was doing) thinking that it might be the problem to no avail. I replaced the whole shield with the new pre-assembled version, but still it won't read or write to the any of my cards. I've formatted cards on both PC and OS-X, and even a vintage camera although all the cards could be read and written to, I have changed SD cards (512MB to 4GB), changed shields, and re-wired a 3rd time. All the pins on the Arduino will drive an LED, the RTC on both shields still outputs date info and the LCD shield still will do as it's asked. The only thing i can guess is that my arduino uno (SMD) has somehow lost it's nut. Is there anything i have missed? Anyone in the Victoria BC area want to try loading a script and a pair of cards onto their 'duino?

Either that or there is some foul force in the universe that doesn't want me to perfect a solar powered sea-salt making machine, although i doubt that.

...should have been a brick layer, you never hear about brick 2.0 problems...

Thanx in advance
Darren

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: SD Card Data Logger still a question

Post by adafruit_support_bill »

Try running the 'cardinfo' sketch from the SD library and post the output. Be sure to change the Chip Select pin definition to pin 10 in the code before you run it.

SquidTeeth
 
Posts: 24
Joined: Thu Aug 11, 2011 9:47 pm

Re: SD Card Data Logger still a question

Post by SquidTeeth »

When the Card info sketch runs I get:

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?

no matter which SD card, or which Shield. Is there some way to confirm that the Arduino is working, other than confirming the BLINK sketch will make all the Digital and Analog pins can drive a LED. I also read that thread about not being able to properly format cards, do I need to use that utility? I had thought not because i had never had a problem previously, and was using the same card. Would the size of card be an issue, or it's class, or if it's a micro SD in an adapter?

Thanx again
Darren

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: SD Card Data Logger still a question

Post by adafruit_support_bill »

Please post photos of the front and back of the shield. The Arduino is not communicating with the card at all.

SquidTeeth
 
Posts: 24
Joined: Thu Aug 11, 2011 9:47 pm

Re: SD Card Data Logger still a question

Post by SquidTeeth »

Prepare to be underwhelmed, both stock and (reasonably) fresh from the box...
Not quite sure on the photos, I'll send a link to the files on googledrive. In any case, the only soldering i did on this pair is the stackable headers

SquidTeeth
 
Posts: 24
Joined: Thu Aug 11, 2011 9:47 pm

Re: SD Card Data Logger still a question

Post by SquidTeeth »


User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: SD Card Data Logger still a question

Post by adafruit_support_bill »

Your soldering looks fine (had to ask - we see all kinds :wink: )

The SD card interface is pretty straightforward. Just 4 pins routed through a buffer/level converter. Given all the combinations of cards & shields you have tried, the Arduino would be a suspect here. Any possibility of testing with a different Arduino?

SquidTeeth
 
Posts: 24
Joined: Thu Aug 11, 2011 9:47 pm

Re: SD Card Data Logger still a question

Post by SquidTeeth »

That was my conclusion as well, but i lack a 2nd Arduino. If i can get a LED to work on all the Digital and Analog pins, should that not be enough?

Is there some debug routine so i can find out what is breaking down in the communication. Serial arduino to Serial Level Shift to Serial SD internal card controller, there is a lot of room for a missed bit.
Any thoughts?

BTW does the ongoing problem in formatting SD cards come into play in this?

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: SD Card Data Logger still a question

Post by adafruit_support_bill »

If i can get a LED to work on all the Digital and Analog pins, should that not be enough?
Turning on a LED proves that the pins work in output mode. The MISO pin (pin 12) at least needs to work in input mode to read data from the card.
Is there some debug routine so i can find out what is breaking down in the communication.
Cardinfo is our usual diagnostic. Beyond that it cones down to the health of the 74HC125 level shifter chip and a couple dozen solder connections.

I have seen 74HC125s overcooked by heavy-handed soldering, but I've never seen one die in action. To encounter 2 bad ones on 2 competently assembled (I assume that your header soldering is representative of your work on the other board) and previously working boards (we do test ours in production) seems unlikely.

SD cards have been known to go bad. Formatting is also a problem (we recommend the SD-association formatter), but the cardinfo errors for format problems are different from what you are seeing.

SquidTeeth
 
Posts: 24
Joined: Thu Aug 11, 2011 9:47 pm

Re: SD Card Data Logger still a question

Post by SquidTeeth »

Shouldn't i be able to test Pin 12 like this

Code: Select all

void setup()
{  Serial.begin(9600);  }

void loop()
{  Serial.print(analogRead(12)):  }
with a 5k pot across 5V and the wiper to pin 12?
Seems not to be working though

SquidTeeth
 
Posts: 24
Joined: Thu Aug 11, 2011 9:47 pm

Re: SD Card Data Logger still a question

Post by SquidTeeth »

Cancel that last thought, I used a DHT22 Sensor on pin 12 and it's fine, BUT Pin 11 & 10 Don't read it. I am not sure now because the DHT can't be read on pin 2 or 12 anymore, so i might have killed it in this test. More to follow, but this could be the the clue

SquidTeeth
 
Posts: 24
Joined: Thu Aug 11, 2011 9:47 pm

Re: SD Card Data Logger still a question

Post by SquidTeeth »

Well no more testing for today, the DHT sensors will no longer respond on any pins. So my question is where do i go from here? What could i use to test the Digital Inputs that will not be destroyed by failed pins? would a simple switch closure work?

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: SD Card Data Logger still a question

Post by adafruit_support_bill »

You would need a switch and a pullup (you can use the internal pullup resistor). See lesson 6 for details: http://learn.adafruit.com/adafruit-ardu ... tal-inputs

SquidTeeth
 
Posts: 24
Joined: Thu Aug 11, 2011 9:47 pm

Re: SD Card Data Logger still a question

Post by SquidTeeth »

oh, yeah...i knew that...

SO if pin 10 is the only one that is not functioning as an input, i went into the Adafruit SDLibrary, in the utility folder and tried to edit the Sd2PinMap.h file. i found the entry for 168 & 328 Arduinos, the SS_PIN is assigned to 10, which i then changed to 09. I got an error on upload of the CardInfo sketch that i had an invalid number in an Octal constant,

I guess the best way to frame my question is, should i just order a new arduino & 2 more DHT22's, but how will i know if the card logger has been damaged or not?

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: SD Card Data Logger still a question

Post by adafruit_support_bill »

vi found the entry for 168 & 328 Arduinos, the SS_PIN is assigned to 10, which i then changed to 09. I got an error on upload of the CardInfo sketch that i had an invalid number in an Octal constant,
C++ assumes that integer constants with a leading zero are octal (base 8). Since there is no 9 in base 8, 09 would be an invalid number. Try '9' instead of '09'.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”