[sdiy] Semi-OT: DIY clock that learns its own internal drift
brianw
brianw at audiobanshee.com
Tue Nov 11 02:42:02 CET 2025
Interesting topic, Terry. I would say that these two features are not that similar.
The Prophet 5 isn't really a clock, with one-second ticks, but a VCO with a period ranging from something like a 9 millisecond period down to half a millisecond. It basically amounts to adjusting the CV to achieve the desired period as measured by a local crystal based timer, but the crystal in each P5 could easily vary greatly from another. It's likely that the P5 uses a multi-point, segmented "curve" because the CV error might not be linear. The adjustments that are made are one-time, and the VCO is muted during initial tuning or any manual retuning. There is more than one value calculated, but that set of values is set in stone until the next tuing. Tuning can drift after the calibration, and this is especially true during the first 20 minutes. The tuning does not improve over time, nor does the accuracy improve when retuned. i.e. All drift must be manually corrected by the synth player.
In contrast, the SLC has a 1,000 millisecond period, and is continuously compared against a remote NTP clock that might be an incredibly-accurate atomic clock or other such technology. The adjustments are ongoing, although this particular project tries to save battery life by reducing the remote access to a minimum. Over time, the accuracy improves, without any input from the user. The clock never goes dark - it is continuously usable as a clock. The calculated drift adjustment is either a single value, or perhaps two if the SLC correct for both clock modes (crystal and RC). One big challenge with NTP is that the latency of the internet can be huge, so the protocol must also measure the latency and take that into account when setting the time.
Bottom line, in terms of software or firmware, there's probably not a single line of code (or hardware component) that could be reused between the two solutions.
Brian Willoughby
On Nov 10, 2025, at 3:18 PM, Terry Bowman via Synth-diy <synth-diy at synth-diy.org> wrote:
> I'm going out on a limb here but perhaps this will be of interest to some of the digital-heads here:
>
> "The Self-Learning Clock...observes its own timing errors and builds a software correction model for its internal oscillator's drift."
>
> https://www.instructables.com/Self-Learning-Clock-SLC/
>
> The first thing I thought of when I read it was how the Prophet 5 tuned itself, followed by how analog FAX machines sync up. I tend to see connections between things even when there aren't any. Have fun at my expense. 8D
>
> Terry Bowman, KA4HJH
More information about the Synth-diy
mailing list