DS3231 RTC failure

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rob_
 
Posts: 8
Joined: Wed Dec 05, 2018 5:19 pm

DS3231 RTC failure

Post by rob_ »

I've been running the DS3231 in a project based on Arduino Nano for about 3 years without problem. On Friday it inexplicably jumped forward around 100 years. Now if I try and set a date with RTC_DS3231::adjust() that has a day anything other than 1, it resets to 1/1/2000. I can still change the month and year. It was originally running RTClib 1.1.0 and have just updated to 2.0.2 but this does not fix the problem. I have also tried removing and replacing the coin cell.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: DS3231 RTC failure

Post by mikeysklar »

@rob__,

Are you able to load the demo RTClib/ds3231 demo? Are you running the Adafruit fork?

https://github.com/adafruit/RTClib

What is the voltage on the replacement coincell?

User avatar
rob_
 
Posts: 8
Joined: Wed Dec 05, 2018 5:19 pm

Re: DS3231 RTC failure

Post by rob_ »

Yes, it is the Adafruit fork.

I only removed the cell to clear the memory of the RTC, then put it back. Is the voltage relevant when it is powered up from the Arduino?

User avatar
rob_
 
Posts: 8
Joined: Wed Dec 05, 2018 5:19 pm

Re: DS3231 RTC failure

Post by rob_ »

Yes, I can upload RTClib/ds3231 but it writes corrupt data to serial:

Code: Select all

��,㤼���c�0��.�c�~w$��#es�2��,�c1�t$��,㤾���s�1��/�b�~w%��-c��#eg�1����c��w%��,�=���f�((��*��~w$

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: DS3231 RTC failure

Post by mikeysklar »

This sound like a dead coin cell. What is the voltage of it? It is necessary to having a working battery.

User avatar
rob_
 
Posts: 8
Joined: Wed Dec 05, 2018 5:19 pm

Re: DS3231 RTC failure

Post by rob_ »

mikeysklar wrote:This sound like a dead coin cell. What is the voltage of it? It is necessary to having a working battery.
3.01V

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: DS3231 RTC failure

Post by mikeysklar »

3v doesn't seem terrible. I'm under the impression the coincell might be usable down to 2.3v, but the sign of a dying battery is usually the inability to keep correct time.

If it is not too much hassle I would recommend putting a fresh coin cell in so we can rule that out.

User avatar
rob_
 
Posts: 8
Joined: Wed Dec 05, 2018 5:19 pm

Re: DS3231 RTC failure

Post by rob_ »

I don't have a spare cell, but I can say that without a cell at all it behaves exactly the same as long as I don't disconnect the Arduino power source. This is what I would expect and it has probably only been unpowered for a few hours in the years I have been using it:
BAT - this is the same connection as the positive pad of the battery. You can use this if you want to power something else from the coin cell, or provide battery backup from a different separate batery. VBat can be between 2.3V and 5.5V and the DS3231 will switch over when main Vin power is lost

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: DS3231 RTC failure

Post by mikeysklar »

Can you try reverting the RTClib back to 1.4.0? I do see an issue that appears related to your scenario.

https://github.com/adafruit/RTClib/issues/253

User avatar
rob_
 
Posts: 8
Joined: Wed Dec 05, 2018 5:19 pm

Re: DS3231 RTC failure

Post by rob_ »

I think that is a different issue. In my case it stopped working with no software change and running 1.1.0. I only upgraded in an attempt to fix it. The only plausible explanation I can think of is hardware failure assuming I am the only one experiencing this problem.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: DS3231 RTC failure

Post by mikeysklar »

I see. Sorry I confused the order of the library upgrade with the code not running.

The noise you were seeing on the console when uploading the RTClib/ds3231 did look like a possible serial baudrate setting, but this does not explain the adjust() code not setting. Before you write this off as a hardware failure replace the coincell. I toss all mine when they hit 3v as they are unreliable.

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

Return to “Clock Kits (discontinued)”