DS3231 spontaneous reset

Hello!

This is my first writing on forum. I'm using Arduinos for many many year and always found an answer when I was looking for.

I'm building a project; device to be installed in car dashboard - time, altitude, temp in and out.

The problem which seems to be unsolved is RTC - DS3231SN.
Set time and date and reading of "day name" works fine. Happy!

After about 10 minutes it resets itself to 00:05 and 1st January 2005.

Have someone experience such a thing? Maybe someone know the solution?

Deeply thankful!
HErcio

which rtc is it and what type of battery are you using. I know one of the cheap ones I bought had a problem where the vcc was trying to recharge the battery and the fix was to cut a track on the board or buy a $6 battery. Needless to say I just cut the track and its been running non stop for 3 months now.

Hello!

Thank you for respond.
I'm using DS3231SN on a breakboard ZS-042. I've tried 2 batteries; firstly chip chines and secondly Panasonic CR2032 - no difference. Of course; I've tried also without bat - result is the same.

Breakborad with DS3231SN is powered with 3V3 - as recommended.

This is my first time messing around with RTC. It left me confused :smiley:

Hello and welcome,

Maybe it's a problem in your code.

If you are sure the power supply to the chip is OK, make sure there isn't a reset pin which is being randomly shorted somehow.

How are you dropping & conditioning the 12V+ car supply down to the voltage needed by the DS3231 as I have read the cars power can be very dirty.

If you just have the clock on without the engine running then does it still reset or is it only happening when the car is running?

hercio007:
I'm using DS3231SN on a breakboard ZS-042. I've tried 2 batteries; firstly chip chines and secondly Panasonic CR2032 - no difference. Of course; I've tried also without bat - result is the same.

Breakborad with DS3231SN is powered with 3V3 - as recommended.

Does your microprocessor also run on 3.3V? You can't mix 5V and 3.3V on the I2C bus without special interfacing.

I run the same board zs-042 of the 5v pin with the track cut I use the cr2032 battery with out a problem.

this could be a programming error, bad zs-042 or a power drop causing a reset condition on the arduino.

heres the post I followed for the rtc. post one has a picture of the track

http://forum.arduino.cc/index.php?topic=278270.0

Hello!

Kindly thank you for all the replies.
I found the error in my code. Obviously?! 8)

The clock shows hh:mm. So no need that code runs over and over again through to send time on LCD, but only once every 60 sec. And there was a problem... And played with another lib :slight_smile:

Because of the wiring of the sensors and "hairy" DC voltage, a make small breakboard with a LDO and additional conds. I checked with my RedPitaya - smashingly beautiful and stable DC voltage :smiley:

And yes! I'm mixing 3V3 and 5V. The MCU is on 5V. I was using "software" enabled pul-ups - where possible.

When I finish the device, I will publish a photo or two :wink:

Thank you for all the help!

From the datasheet:
SDA: "The pullup voltage can be up to 5.5V, regardless of the voltage on VCC."
SCL: "Up to 5.5V can be used for this pin, regardless of the voltage on VCC."

Hello!

Yes! I know. But it is recommended to power the RTC with 3V3. Parallel to DS3231 is also BMP180 pressure sensor which requires 3V3. So I decided to put RTC also on 3V3.

Thanks!

hercio007:
Yes! I know. But it is recommended to power the RTC with 3V3. Parallel to DS3231 is also BMP180 pressure sensor which requires 3V3. So I decided to put RTC also on 3V3.

Recommended by whom? The datasheet says Vcc from 2.3-5.5V. I've been using a DS3234 at 5V. I believe it's identical to the DS3231, except for the interface.

While it's true the BMP180 requires 1.8-3.6V, you could have a system where everything is at 5V except for the BMP180 power pins at 3.3V. Like the DS3231, the BMP180 tolerates 5V on it's I2C interface pins.