Go Down

Topic: RTC modules - who's is "best"? (Read 5 times) previous topic - next topic

RandallR


I only bother to adjust once per day at midnight. Drift is approx 7.5 seconds per day so at midnight I read the time, add 8 seconds, wait 0.5 seconds and then write the time back.

I was looking at adjusting as soon as it was off by a second.  So in your case I would add a second every 3 hours and 12 minutes.  I was also looking at having the clock track it's own error.  If I need to subtract a second after a couple days I might change the interval to 3 hour 12 minute 16 seconds.
It reminds me of the old grandfather clock.  Reset the time and then turn the screw under the pendulum.

Riva

Quote
I was also looking at having the clock track it's own error

How was you going to do this?

I could adjust the time hourly by reading time, waiting 312ms and writing time but will probably replace the DS1307 with one of my DS3231 chips as drift amount also varies with temperature. The 7.5 seconds was determined during winter/spring but with summer here it's drifting nearer 7.8 seconds per day.

RandallR


How was you going to do this?

I was thinking, though I haven't done so, of starting off assuming zero drift and having with zero adjustment.  The clock would note the time it started.  At some later point I would check the time and adjust it up or down.  The clock would then take the adjustment amount and the amount of time that had elapsed and calculate a drift value.  It would then apply that drift amount.  At some point later if I needed to adjust the clock again the clock would use the addition adjustment to recalculate the fine tune the drift value.

I guess if I wanted to try and compensate for temperature I would need to add a DS1820 and track that as well but I think I will hold off on that.

It would be interesting to have a contest to see how accurate a clock you could make for under $5.

If power were not an issue, you could make a small oven for the clock or crystal and hold it at 40 degrees C or something.  That way you would not see a drift due to temperature changes.

lost_and_confused

macegr,

I am slightly leaning your way to get one of yours.

Try and support people who develop the Arduino.

Looking at it, all looks good, but how do you set the "adderss" of it on the I2C bus?

That isn't mentioned.

I am still having trouble getting my head around that part - see my other post/s on the subject.

Still can't work out how to get the 23017 MCP working.

macegr

The address is hardcoded...actually, most of the I2C RTCs use the same address. That's why code designed for the DS1307 will work for the DS323x.

There is a library that makes using RTC modules and doing various timekeeping functions pretty easy. Here's an example I made a while back: http://www.macetech.com/blog/node/115

While I appreciate the sentiment, don't feel too obligated until you check out the relative shipping fees..USPS is killing me here.
Unique RGB LED Modules and Arduino shields: http://www.macetech.com/store

Go Up