Go Down

Topic: RTC on DataLogger Shield arbitrarily forgets date and time (Read 112 times) previous topic - next topic

Mortenson

Hey there,

My build consists of a Mega, the Datalogger Shield and a RGB LCD Display (negative) from adafruit.
It's powered by a 50Ah Powerbank, everything sitting in a watertight case for autonomus outdoor application. Connected to the Arduino are two sensors for measuring Co2 and O2 and a little pump driven by a Mosfet for flushing purposes. The sensors' values are polled every once in a while and stored with a timestamp on the SD card for logging purposes.

I have a little problem using the Datalogger Shield from Adafruit and was looking for some advice:

I set the time on the RTC with the provided sketch "pfc8523". That is working fine.
I resoldered and changed ChipSelect from Pin10 to Pin3 for that I have two SoftSerial connections running on Pins 10/11 and 12/13.

Now every once in a while, when I detach the powerbank and plug it back in, the RTC is forgetting the set date and time and is obviously not initialized anymore. The battery in the SD Shield is brand new, its voltage is a stable 3,12V.
This behavior is not linked to the length of the detachment of the power. It happens even when the power bank is only removed for a mere second.

Now the peculiar thing is, when I keep the RESET button pressed while detaching the power bank, the RTC never once forgot its initialization. I found this out by accident but tested it since a couple dozen times. Even so, forgetting to press the button when changing the batteries results in useless logging data. Since these devices will be used out in the field, there wont be a laptop to re-initalize the RTC with the "pfc8523" program.

Has anybody witnessed some similar behaviour and can provide some help?
Much appreciated!
Greetings,
Martin

Nick_Pyner

Well, it is quite likely to be down to slack installation, but nobody will ever know, or be able to help you, because it is a secret. It just might be down to code. Oh, that's a secret too. The only thing you have told us is that you have been soldering something, which might be telling, and you are apparently using software serial on a Mega, which is probably pretty silly, but may also be telling.

Go Up