I built an audio timegrapher feature for my watch accuracy app, ChronoLog. Professional timegraphers use a piezo contact sensor and can cost upwards of $1,000. I wanted to do it with a phone mic.

The problem: an iPhone's built-in microphone picks up a mechanical watch's tick at about 1.5 dB SNR. The solution turned out to be epoch folding — the same technique radio astronomers use to find pulsars. Stack 100+ tick periods together and you get +20 dB of effective gain, enough to reliably measure rate and beat error.

The post covers the full DSP pipeline — bandpass filtering, epoch folding, autocorrelation (and why it finds harmonics before fundamentals at low SNR), Kalman filtering for convergence — and what I learned from five rounds of device testing.

If you know the structure of the “tick”, you can apply the technique of a correlation receiver. It can dig up signals below the noise floor and is used in GPS reception.

I'll do some research on this! I have a nagging feeling that there is more I can do to get the most out of this, but struggle with knowing where to look since this is not my background. I'm learning a lot as I go!

Did you consider trying the iPhone accelerometer? Perhaps lay the phone face down on the table and then lay the watch on the back? Wondering if this would have higher or lower SNR.

I don't think it would work because the accelerometer updates are at too low a frequency. Apple's developer info says:

``` Before you start the delivery of accelerometer updates, specify an update frequency by assigning a value to the accelerometerUpdateInterval property. The maximum frequency at which you can request updates is hardware-dependent but is usually at least 100 Hz.

```

100Hz is way too slow. Presumably some devices go higher but according to the article the peak signal is in the 3kHz to 15kHz range.

Awesome writeup! I wonder whether with a real contact mic (Korg offers one for about 20 bucks) you could get much better results. Due to no 3,5mm on phones anymore it might be easier to use a sound-enabled SBC though.

This is definitely the way. Even the old wired mics Apple phones used to ship with that had the little rectangle mic works better because you can press it right up against the case back.

How does it compare to other apps ("watch accuracy meter" for example) on android?

I have this in open beta on Android right now so you're welcome to give it a shot and let me know :)

One difference is cost. I know that mine is lower cost, and is a one time unlock -- no subscription. So there's that. I'm also therefore positioned a little bit more towards the casual user, I prioritize speed of completion which means I need high confidence in a good signal quickly and don't hesitate to cancel mid-flow.

I think one thing alternatives offer is the ability to run for longer -- like a 10 minute check for instance. There are marginal gains in precision for every additional second, but they seem to diminish pretty quickly past 30 secs or so. But that's one difference I'm aware of.