Confusing issue with Data logger - Formatting

by mrjinx007 on Fri Nov 30, 2012 4:31 am

I have now acheived communication with the logger.
in my last post i couldnt get adafruit data logger sketch to read SD card

using SDFat their logger sketch works

It was hard to find the the information as the reader is not pointed towards looking at the code for pin setup in my case pin 10 (Uno)

I have changed CS to pin 10
and further down the code SS to pin 10
as it would appear from the instruction in theheader for the code.

I think my problem is that the adafruit sketch is for Fat16 formatted SD cards and the SDfat sketch does not care

could someone please put some light on this issue for me and explain where im going wrong

I would prefer to use the Adafruit sketch as it alreadt has the real time clock reading time and not just mills.
mrjinx007
 
Posts: 9
Joined: Thu Nov 29, 2012 2:27 pm

Re: Confusing issue with Data logger - Formatting

by adafruit_support_bill on Fri Nov 30, 2012 6:05 am

I think my problem is that the adafruit sketch is for Fat16 formatted SD cards and the SDfat sketch does not care

could someone please put some light on this issue for me and explain where im going wrong


Both use the SD library. Both expect fat16 or fat32. What exactly is the problem you are having?
User avatar
adafruit_support_bill
 
Posts: 25556
Joined: Sat Feb 07, 2009 9:11 am

Re: Confusing issue with Data logger - Formatting

by mrjinx007 on Fri Nov 30, 2012 9:05 am

ok i cant get the example sketch to work as it tells me the SD card needs formatted, however the SDFat example sketches work?
unfortunately the SDFat example does not give time correctly and im too lazy to start altering the code.

I have now got the Fridge Temperature and light example sketch working
unfortunately it only runs once after reseting or removing usb so it runs as a stand alone battery operated logger then it claims the SD crad is no longer formatted correctly.

if i reformat the SD card and put it back in it works again until stopped then when i try to use it again it goes back to saying the card needs formatted.

the SD card is not corrupted because i can put it back into the laptop card reader and get old data back off it.

as is is operational all be it intermitent i dont suspect the hardware ie. soldering

so im stumped - i was hoping with the basic configuration i could get it up and running today so i can get it to read 1 Ch of analogue values
over 1 hr running on a battery.

reading through other posts it looks like the SD cards are a mine field.

i am also wondering how to set the RTC to current time so it displays actual time reading was taken and not 1900s
which is long before electronics never mind arduino.

so i supose my question is about intermitent card operation/sketch why the fall over.

My aim is to set up the logger via usb ? and then unplug the usb and have the logger continue logging until its powered down and the data retreived from the SD card.

perhaps i have to start it blind without plugging in the USB as im convinced unplugging the USB whilst it is running disables it.

your help would be appreciated
mrjinx007
 
Posts: 9
Joined: Thu Nov 29, 2012 2:27 pm

Re: Confusing issue with Data logger - Formatting

by adafruit_support_bill on Fri Nov 30, 2012 9:22 am

Intermittent operation suggests a marginal solder joint somewhere. Post clear photos of the front & back of the board and we'll take a look.
User avatar
adafruit_support_bill
 
Posts: 25556
Joined: Sat Feb 07, 2009 9:11 am

Re: Confusing issue with Data logger - Formatting

by mrjinx007 on Fri Nov 30, 2012 12:47 pm

Ok the logger works fine
its the interface with the serial monitor that is at fault.

if the logger is powered up and running and you plug in the usb lead the serial monitor starts displaying the data
if the logger is not running the return message is that the card need formatted , and goes no further.
if you upload a sketch with the sd card installed in the return message is that the card need formatted , and goes no further.

so basically the usb connection to the uno/logger unit fails communication somewhere.
i will happily send you photos of the soldering but im not quite sure what it will acheive other that prooving im a little better than useless at soldering
i will upload photos as soon as i am able.

I also discovered connecting the LEDs is most usefull, could you please add this to your construction notes - it may help newbies to get the logger up and running + previously mentioned comments/ post regarding a detailed explanation of pin configuration for CS in the documentation - a description of using external voltage ref (commented in sketch) as apposed to not using it. + some test results on sample rates using different arduinos.
what would be most excellent would be configuration details aimed at differebnt types of Arduino boards.
i hope this feedback is helpful

J.
mrjinx007
 
Posts: 9
Joined: Thu Nov 29, 2012 2:27 pm

Re: Confusing issue with Data logger - Formatting

by mrjinx007 on Fri Nov 30, 2012 1:29 pm

could you please try this

connect up your logger shield without an SD card
press the rest switch

you get the SD card error

ok insert a formatted card and press the reset switch

magic it works
you may wish to suggest this to all of those folks who have this formatting error.

the problem everyone is having is the handshake between the PC and the arduino
other than the obvious errors of shoddy soldering or not setting the correct CS pins

incidentally did i mention this logger is almost fantastic
when i can figure out how to get the real time clock to remember the time.

I have also worked out that when the logger has external power and is connected to the PC for code mods/ setup and you disconnect the USB lead ready to go logging the USB disconnection resets the logger and bums up the clock.
so im going to butcher a USB lead which only has its data wires connected and see if this prevents the temporary power reset.
mrjinx007
 
Posts: 9
Joined: Thu Nov 29, 2012 2:27 pm

Re: Confusing issue with Data logger - Formatting

by adafruit_support_bill on Sun Dec 02, 2012 9:09 am

connect up your logger shield without an SD card
press the rest switch

you get the SD card error

ok insert a formatted card and press the reset switch

magic it works

Yes. The example code only checks the card at startup. If you want to handle runtime card insertion, you need to check for it in the loop.

when i can figure out how to get the real time clock to remember the time.

Check the battery voltage on the backup battery. Did you remember the blob of solder under the battery holder? That is required for good electrical contact. If you post photos of the front & back of the shield we can check for any assembly problems.
User avatar
adafruit_support_bill
 
Posts: 25556
Joined: Sat Feb 07, 2009 9:11 am