Note that the original complaint "36 seconds per day" is only 0.02% error...
Makes me wonder ABOUT our expectations, and AT the talents of mechanical clockmakers...
Arduino Timekeeping -- Crystal tuning
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- grabberson
- Posts: 9
- Joined: Tue Sep 20, 2011 12:27 pm
Re: Arduino Timekeeping -- Crystal tuning
I assume the oscillator is some division of the clock crystal, which says SPK16.000G on the top - presumably 16 Mhz. The hardware says Arduino UNO, board model R2.
Using the above method above I can get +/- 1 second every four days. Maybe better if I kept refining the TIME_CORRECTION value. But I think JChristensen is right - without temperature compensation (e.g. Chronodot) that's about the best I can do.
I agree Westfw - an amazingly small error is unacceptable in a clock application! A mechanical watch that's banged around and encounters large temperature variations keeps time as well as this.
Regards.
Using the above method above I can get +/- 1 second every four days. Maybe better if I kept refining the TIME_CORRECTION value. But I think JChristensen is right - without temperature compensation (e.g. Chronodot) that's about the best I can do.
I agree Westfw - an amazingly small error is unacceptable in a clock application! A mechanical watch that's banged around and encounters large temperature variations keeps time as well as this.
Regards.
- rbardsley
- Posts: 62
- Joined: Fri Jan 06, 2012 11:09 am
Re: Arduino Timekeeping -- Crystal tuning
Hi everyone. Fascinating thread! Would you happen to have the full example code for this checktime() function? I am not a programmer, but learn by example. I can't figure out how to implement this correctly. Are you using the time library? Anyone mind sharing a barebones example of this that spits out something to the serial monitor?
Greatly appreciated!
Ryan
Boston, MA
Greatly appreciated!
Ryan
Boston, MA
Please be positive and constructive with your questions and comments.