Go Down

Topic: DS3231 slow down (Read 7426 times) previous topic - next topic

kwow

Hi everybody!
I try to use ds3231 RTC, but it slow down. I made clear code on arduino Pro mini 5V . The code display only time.
Then i turned off arduino and RTC works only on coin battery.
After 2 days I turned it on and I get 4s delay on RTC time.

I checked voltage on battery and it is 3.32....

could you give me some adivce how to run it correctly?

Riva

#1
Aug 21, 2015, 05:52 pm Last Edit: Aug 21, 2015, 05:53 pm by Riva
I think 2 seconds per day is (almost) with normal tolerance. If this is not good enough then register 0x10 is an ageing offset that you can alter to fine tweak the clock speed.
Don't PM me for help as I will ignore it.

kwow

I'm not an expert, but I saw in datasheet that DS3231 works on 2ppm, so the accuracy should be about 5s per month.
Please correct me if I'm wrong.

Riva

I'm not an expert, but I saw in datasheet that DS3231 works on 2ppm, so the accuracy should be about 5s per month.
Please correct me if I'm wrong.
Now I look, my datasheet for the DS3231 says 5ppm and a +-0.432 seconds per day tolerance so 4 seconds in 2 days is excessive. Is it a genuine Maxim IC or a Chinese cheapy?
Don't PM me for help as I will ignore it.

kwow

thanks for help!
i bought modules on ebay. One is ZS-042 and on second is only "LC" sign.
Thats they look:
http://i.ebayimg.com/00/s/NzAwWDcwMA==/z/UzoAAOxyFd1SKA37/$(KGrHqJ,!o4FI(f)kVNRBSK!37gVsQ~~60_35.JPG

The second (litle) i set up about 6month ago and right now it has about 16 min delay
I thought that delay will be couple of seconds per year.

Riva

i bought modules on ebay. One is ZS-042 and on second is only "LC" sign.
Thats they look:
http://i.ebayimg.com/00/s/NzAwWDcwMA==/z/UzoAAOxyFd1SKA37/$(KGrHqJ,!o4FI(f)kVNRBSK!37gVsQ~~60_35.JPG

The second (litle) i set up about 6month ago and right now it has about 16 min delay
I thought that delay will be couple of seconds per year.
Not relevant to your time problem but this might be worth a look for your ZS-042 RTC.
16 minutes in 6 months is bad. Probably worse than can be expected from a DS1307. For me the DS3231 (I have 3 on the go ATM) is about 1 second per week without any tuning.
Don't PM me for help as I will ignore it.

kwow

I saw this link. I run RTC with Arduino Pro Mini 5V for 24 houres and i get delay to, but it is less then 2s. So it is quite better, but still bad.
Could you tell me how did you connect your RTC? I use only SCL and SDA. How about SQW and 32K?

Riva

Could you tell me how did you connect your RTC? I use only SCL and SDA. How about SQW and 32K?
One I just use SCL/SDA/GND and poll about once per second. But later designs I use the SQW configured as 1Hz output to feed an interrupt pin on the Arduino. This saves me having to poll (and could even allow the MCU to sleep in low power systems) or delay waiting for ticks. I also use it to trigger a heartbeat LED to confirm RTC is working.
Don't PM me for help as I will ignore it.

kwow

Thank you Riva,
How do you think. Is it problem with module or code?
Could you tell me where did you buy your RTC, or recomend me some more accurate RTC?

Riva

How do you think. Is it problem with module or code?
Could you tell me where did you buy your RTC, or recomend me some more accurate RTC?
The problem could be with either module of code but best to start with the code first and then assume the hardware is at fault.
I just bought some DS3231 chips (the 8 pin version) and just add the battery, decoupling and pullup resistors myself.
I have just bought a couple of modules from eBay so when they arrive I will set them up and see how well they do.
Don't PM me for help as I will ignore it.

kwow

I made some test. I run 2 DS3231 in almost same time. Both of them has realy close delay - to each other.
I also suppose that they slow down much after 24h. i didn't confirm it yet.

kwow

Hi Riva,
were you able to test your DS3231?

I set up 5 ZS-042 and leave for 4 days only with coin battery. After that time i check te time and every RTC gave me different resault. It was about 10 seconds lag.
One of them has 2min delay.
Could you tell me which libs do you use?

Riva

were you able to test your DS3231?
They only just arrived and I set them both up Saturday morning so not enough time has passed yet.

I set up 5 ZS-042 and leave for 4 days only with coin battery. After that time i check te time and every RTC gave me different resault. It was about 10 seconds lag.
One of them has 2min delay.
Could you tell me which libs do you use?
I use a version of this library, tweaked with my own additions.
Don't PM me for help as I will ignore it.

el_supremo

@kwow: post your code (in code tags)

Pete
Don't send me technical questions via Private Message.

jboyton

I just bought some DS3231 chips (the 8 pin version) and just add the battery, decoupling and pullup resistors myself.
The DS3231 isn't available in an 8-pin version. Perhaps you mean the DS3231M. It uses a completely different compensation method and is less accurate than a DS3231.

Go Up