Listen To The Sound Of The Crystals

We’re all used to crystal resonators — they provide pretty accurate frequency references for oscillators with low enough drift for most of our purposes. As the quartz equivalent of a tuning fork, they work by vibrating at their physical resonant frequency, which means that just like a tuning fork, it should be possible to listen to them.

A crystal in the MHz might be difficult to listen to, but for a 32,768 Hz watch crystal it’s possible with a standard microphone and sound card. [SimonArchipoff] has written a piece of software that graphs the frequency of a watch crystal oscillator, to enable small adjustments to be made for timekeeping.

Assuming a microphone and sound card that aren’t too awful, it should be easy enough to listen to the oscillation, so the challenge lies in keeping accurate time. The frequency is compared to the sound card clock which is by no means perfect, but the trick lies in using the operating system clock to calibrate that. This master clock can be measured against online NTP sources, and can thus become a known quantity.

We think of quartz clocks as pretty good, but he points out how little it takes to cause a significant drift over month-scale timings. if your quartz clock’s accuracy is important to you, perhaps you should give it a look. You might need it for your time reference.


Header: Multicherry, CC BY-SA 4.0.

30 thoughts on “Listen To The Sound Of The Crystals

  1. Looks like Casio F-91W – this watch fits for Man and Woman, and I think every hacker/maker should have one! It is a good starter at least. There are even mods for this watch. I had one and switched to Casio Royale with all metal mod from AExpress.

    I was wondering how on Earth input filters will not cut frequency, also mr. Nyqiust was wispering to my ear, but ok “A soundcard with a sample rate of 96000Hz minimum” – makes sense.

    Casio Royale has very good and calibrated frequency reference, I say 1-2 seconds per week is a reasonable value of inaccuracy.

    1. Nyquist wouldn’t hurt at all, since you know the rough frequency. Undersampling is commonly used to measure high frequencies. The problem indeed would be the aliasing filters, since without it a sound card might pick up some high frequency noise and shift it into the audible range.

    2. I think it’s Casio W86. I was recently planning to buy F91W and this looked slightly different.
      But agree that those are great value and very versatile watches. Only wish they put metal buckle – this plastic prog tends to go through frame under bit of force (almost lost my W800 this way).

    3. Nyquist is not a problem. The signal would be aliased to a lower frequency. The Linux driver for the Conexant 2388x PCI chips samples the analog TV channels with a few kHz to detect the pilot tones (several MHz) for various audio standards.

      My Casio ABX-20 gains half a second per day, btw.

      1. Hello :-)
        I did try that, I was thinking that maybe we could still detect the signal strongly attenuated by the low pass filter that prevent aliasing.
        No, it doesn’t work, I guess you would need to rise the level of the signal before the soundcard so that it’s still detectable after the filter.

    4. I rock g-shocks that pick up the WWVB signal so they only have 24 hrs to drift before being set to an atomic clock’s time again.
      They are more expensive but I love them, you can find many models that have aftermarket adapters for standard watch bands. Can’t really go wrong with Casio, they have killer hardware for all of their price points.

  2. 32,768Hz as it’s the lowest power-of-2 frequency above the 20,000Hz top-end of human hearing. Using 16,384Hz instead would only need 14 divider-stages instead of 15, but would generate a constant annoying high-pitch whine audible to (young) years.

      1. Also, you can’t simply use a ‘1Hz’ (1 ‘tick’ per second) crystal.
        Crystal resonators work in a similar way to tuning forks and pendulums, the lower the frequency you want to generate, the physically larger they have to be – a 1Hz crystal would technically be possible, but it would be ridiculously huge, way too big for a watch.

        1. Aww… I googled “1Hz quartz crystal” and although the AI overview lied that they are sometimes used I couldn’t find a single reference to one that actually exists.

        2. The Bulova Accutron watch (early 1960’s) used a tuning fork driven by a single transistor circuit that operated at 300 to 700 Hz, depending on the model. One of the dads in my neighborhood had one that he used to show off. I recall it emitting an audible buzzing sound.

      1. Please don’t, be happy rather. You’ll miss hearing the birds chirp, the leafes making noise in wind, the higher pitch sounds of rain..
        Everything becomes muffled and eventually even the memories of higher frequencies will fade away.

  3. Nothing to do with the project, but I’ve been wearing a Cassio Illuminator since the very early 90’s. For I’ve always liked them since they only have the features I want. I just have to ignore the occasional razzing at work for wearing an ancient watch.

  4. NTP does not work for this, or at least, it won’t work very well. The github page admits he does not know accuracy (apparently has not verified it), and yet he makes a claim of “should be better then 1sec per month”. Well, one month has 36002430 = 2592000 seconds so that would require an accuracy of 386ppb and there is no way that NTP is going to reach anything near that accuracy for short time measurements. NTP has an expected accuracy of “tens of ms” http://en.wikipedia.org/wiki/Network_Time_Protocol but that is over long time averaging. And it can be as bad as a few hundred ms. For short time (for example a one minute measuring time) it just relies on the internal PC clock. To get to a 386ppb accuracy from that, you need a measurement time of half a day to several days. Possible, yes, but not very practical. You’d be better of by visually comparing the seconds rollover of your watch with your PC.

      1. The network delay (as [paulvdh] says, 10s or 100s of ms and variable by nature) prevents super-accurate measurement of the type needed here.

        The radio signals of time (available in the US, Europe, and east Asia) would be better – delay is almost 0, and extremely consistent. GPS is another option.

      2. Well, sometimes. Windows 95 had a counter that kept track of up time. It would overflow after about 49 days which was a bit annoying.

        I needed two bits of equipment to talk to each other, so I put a Win95 box in the middle. Had to make it reboot every month else it would crash. Ditto for machines running backups, monitoring etc.

    1. Hello !
      OP here, you’re absolutely right, bare NTP would give poor result, but the system’s clock is constantly monitored and adjusted using NTP over the course of several days. Once you’re system’s clock is settled you only need some few secs of reading to get a good estimate of the frequency of your watch.
      For instance right now on my computer, with an uptime of only 20minutes, chronyc give a skew of 0.410ppm on the drift, that’s already close to 1sec a month.
      This software is in noway perfect, but before I made it adjusting a quartz watch took me weeks (or months), now it only takes some few minutes maximum, and I can see the effect of temperature.

    2. yeah that was my thought exactly. i can imagine a lot of hacks to get a pretty good result but my kid’s casio f91 really is much less than a minute of error per year. the effective precision to which casio tunes their crystals is really extraordinary imo. i don’t imagine the mechanism they use to calibrate their measuring equipment could be this ‘easy’. love to find out how wrong i am :)

      1. Hello,
        OP here (I tried to respond earlier but I dont see my message, so I do it again, my apologies if the first message finally appears and is redundant).
        You’re both absolutely right, bare NTP wouldn’t make the cut, but on a modern system it’s the internal system clock disciplined by NTP. This is insanely good. Currently my computer have an uptime of less than 3 hours, when I poll the synchronization between the internal clock and ntp, chrony tell me this :

        Frequency : 8.286 ppm fast
        Residual freq : +0.001 ppm
        Skew : 0.104 ppm

        That’s 0.25sec a month of uncertainty. If the clock of the computer is stable this will go lower and lower.
        Of course, better equipment exists, using GPS, thermally regulated high frequency crystals, or maybe iridium or cesium clock, but those costs literally thousands of euros, compared to a few hundreds euro for a computer you already have.
        BTW, I also did some verifications with tuning the frequency to the DCF77’s one instead of a quartz watch. I find consistent drift for the soundcard between the 77.5khz and the system’s clock.
        I was thinking of using those radio clock frequency to calibrate further the soundcard’s clock. But the system’s with NTP is already very good.

        1. Though in general, I would trust DCF77 a tad bit more, considering that it uses multiple atomic clocks and has very low latency because of the medium (being on VLF).
          Back in the 80s and 90s, radio receivers for receiving DCF77 were quite common. They were serial port dongles in various shapes (rounded box for wall mount, pyramid etc).
          Inside, there was an ordinary VLF receiver for DCF77 that interfaced with one of the serial port pins for data and power each, respectively.
          In principle, the DCF77 pulses were simply sent to one of the V.24 input pins, the magic happened in software.
          For parallel port, I remember, there was an intelligent DCF77 receiver sold by Conrad Electronic or ELV at the time.
          It had its own LD display, I think. So decoding took up less computing power.

        2. yeah i figure disciplining the system clock, or i would really like to discipline the sound card’s clock. indirectly, right?

          it seems to me the effective precision of an ntp-discplined clock would generally be better than 200ms / (duration it has been synced to ntp). trying to be conservative here. so to get 1ppm seems like it would take up to 0.2s * 1,000,000 = 200,000s or 55 hours. that’s a pretty naive take on my part.

          i know in practice ntp often does a lot better than that because it compensates for the ping delay, and because ping is not always wildly unstable, and because you can get lucky with the set of servers out of the pool — doing an average of several sources over a month is going to give you a pretty good estimate of the length of that month, right? but it’s not the same as disciplining perfectly to an authority for a month.

          so yeah i figure it could do pretty well but if i was using it, i would definitely keep an eye on the real life drift of the units i’d tuned this way :)

          1. I am not sure I fully understand your point.
            Maybe there’s a confusion: To synchronize the system clock with NTP you have basically two parameters : the relative speed, and the offset. The offset is the difficult part because because by definition you only have indirect measure of it. The good news is that we dont care about the offset.
            The relative speed is what we want and it’s easier to compute because we can dilute the uncertainty in the long run.
            I am not very knowledgeable on this topic, but modern NTP client such as chrony seems to make an amazing job at it. A computer running for several hours might have an offset uncertainty of maybe some few ms, sure, but a frequency uncertainty smaller than 0.1ppm.
            That’s why I am pretty confident this software is perfectly usable for a hobbyist wanting to regulate an old quartz watch without a properly calibrated timegrapher. To be fair, I am also pretty confident this software is actually better than a lot timegrapher without externally controlled clock.

  5. There is a difference between a resonator and a crystal. Which is it?

    Crystals are usually made of quartz, and are accurate (ppm’s) and hard to get started. Resonators are cheap, inaccurate (%) and almost guaranteed to start.

  6. I have a small cheap LCD clock. It worked fine for years, but, after falling down a few times, it stopped keeping accurate time. It started being off something like 15 minutes per day. I changed the battery, but that didn’t help. I opened it and found only an epoxy blob and a 32768 hz crystal in a can, so I replaced the crystal. That brought its timekeeping back to snuff. My theory is that the original crystal chipped when it fell, throwing its oscillation off by a bit.

Leave a Reply to DanielCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.