DS3231 module bad drift, how to fix?

I have a DS3231 cheap ebay module. Probably not original. It lose 1-2 seconds in 1 day. I tried to compensate by to add those the lost seconds in the code but it not works as i want. More problem. Code is very complex.

I'm interested in to try to compensate for it by adjust the aging offset. Does anybody knows how to do that? Is it easy? Can this 2 seconds per day fix by aging offset or is aging offset too fine?

I could not find a LIR2032 battery where I live so I disable battery charge system on this ebay module. i am thinking, may be that it is because of CR2032 battery? less voltage than LIR2032.

Hi,

If you have a scope or frequency meter it easy. Just make a sketch with two buttons to change the aging offset register and monitor the 32kHz output. It should be 32.768kHz.

Check youtube, I remember a video.

hauerdie:
Hi,

If you have a scope or frequency meter it easy. Just make a sketch with two buttons to change the aging offset register and monitor the 32kHz output. It should be 32.768kHz.

Check youtube, I remember a video.

What I mean is that how can I do it and then just test the clock to see if drift gets
better? Without fancy equipments. How to do it? Which coding to use I mean? Any step by step tutorials available?

Can I use Fluke 287 voltmeter for to measuring frequency?

Sorry for my english.

Found this link. It is about calibrating ds3232 but I think it can also use for ds3231. But from the instructions on this, it is not very clear where to connect everything. Only clear is 2 buttons go to pin 2 and 3 on arduino.

How is this suppose to work in general? Does the ds3231 forget calibration if coin cell battery dies? Or can you calibrate ds3231 with one arduino and remove it and use it with another arduino or will it forget calibration? Because my project is already soldered but I have a spare arduino which available.

The frequency is measured accross which points on the ebay ds3231 module? Or which legs of the ds3231 chip?

Please help me.

hauerdie:
Hi,

If you have a scope or frequency meter it easy. Just make a sketch with two buttons to change the aging offset register and monitor the 32kHz output. It should be 32.768kHz.

Check youtube, I remember a video.

Ok, I think I found a good sketch for offset adjustment. But I confused about 32kHz output? Some instructions on internet say, the output should be as close as possible to 32kHz other sources suggests it should be close to 32.768. Which one is correct?

Also, can I use digital multimeter such as fluke 287 to measure frequency? what else, can I use to measure frequency and how to connect? use 32kHz output and ground? or only 32kHz output?

Hi,

Datasheets are your friends, always check them first.
32.768 kHz on page 3 in the sheet.

According to the manual of the Fluke 287, it can be used. Positiv probe to 32kHz Output and negativ to Ground.
A lot of multimeters can measure frequence, but the cheapest ones show only 2 digits in the 32kHz range.

And you can measure frequency with an arduino, just google.

Only thing to notice, if the calibration of the multimeter is bad or you don't know if your clock frequency on the arduino is off, if you use one for measure, you may not geht the right result at first time.
Then you may use trail and error to minimize the drift of the DS3231.

Please post your code and a link to the module.
HowToPost

JohnElectronics:
I have a DS3231 cheap ebay module. Probably not original.

There is your problem.

The real solution is to just buy a better module. It will actually save you money, because otherwise you will end up spending even more money on the aspirin for the headaches you will have.