Close

Chasing the PPMs - Fixed / floating precision

A project log for A more precise Tuning Fork Clock

A clock that uses a tuning fork as a time reference, but calibrated!

ppPP 07/21/2025 at 21:570 Comments

I had a shower-thought: Most or all of my test runs tend to drift into the direction "too fast".
And I was talking about a microsecond of resolution per period being at the limit of a second per day....


The code is correctly estimating a lot of digits after the comma for the microseconds, but on every accumulation cycle (one second, i.e. around 440 periods) I round off the sub-microseconds... 

So basically I am throwing accuracy out in the order of ~1 microseconds per second, which results in 86400 * 0.5us = 0.086s / day, which is roughly one second per week.

My plan to tackle this is to keep the fixed-point microseconds for reading off the time, but also keeping the sub-microsecond digits after the comma in a float to correctly round up or down.

Let's start another two week run with the modifications and let's see whether this improves the drift...

Discussions