Atomic Clock Trades Receiver For An ESP8266

The advantage of a radio-controlled clock that receives the time signal from WWVB is that you never have to set it again. Whether it’s a little digital job on your desk, or some big analog wall clock that’s hard to access, they’ll all adjust themselves as necessary to keep perfect time. But what if the receiver conks out on you?

Well, you’d still have a clock. But you’d have to set it manually like some kind of Neanderthal. That wasn’t acceptable to [jim11662418], so after he yanked the misbehaving WWVB receiver from his clock, he decided to replace it with an ESP8266 that could connect to the Internet and get the current time via Network Time Protocol (NTP).

This modification was made all the easier by the fact that the WWVB receiver was its own PCB, connected to the clock’s main board by three wires: one for the clock signal, another that gets pulled low when the clock wants to turn on the receiver (usually these clocks only update themselves once a day), and of course, ground. It was simply a matter of connecting the ESP8266 dev board up to the two digital lines and writing some code that would mimic the responses from the original receiver.

If you take a look through the provided source code, a comment explains that the WWVB signal is recreated based on the official documentation from the National Institute of Standards and Technology (NIST) website. There are functions in the code to bang out the 500 ms “one” and 200 ms “zero” bits, and once the microcontroller has picked up the correct time from the Internet, they’re called in quick succession to build the appropriate time signal. As such, this code should work on any clock that has an external WWVB receiver like this, but as always, your mileage may vary.

This is a very clean hack, but if you wanted to pull off something similar without having to gut all the clocks in your house, we’ve seen a WWVB simulator that can broadcast an NTP-backed time signal to anything listening nearby.

9 thoughts on “Atomic Clock Trades Receiver For An ESP8266

  1. It’s better than even odds that the 60 kHz receiver is functioning just fine, and that it is just swamped by rising ambient noise floor from more and more bad switching power supplies in the vicinity.

    1. Would be interesting to see what the noise floor looked like. But most SDR receivers wont go that low. I was wondering if it might be and old capacitor going bad and losing the 60kHz tuning so it couldnt lock onto the signal anymore.

      1. There are up converters you can build or buy to listen to LF on an SDR. You can also try using a sound card and pre amp, but many sound cards will be low pass filtered and unusable at 60kHz.

        The tuning capacitor will likely be ceramic or film. It would be unusual for one to fail in that sort of application.

    2. Or it got knocked and the coil moved a little along the ferrite.

      Or it’s at a slightly wrong angle.

      Or someone put a frame up behind it!

      If surprises me that they work at all frankly!

  2. If the connection had been as straight forward as this was, I’d have done this with a bunch of LED clocks that were getting their time sync from the 2G cell network…until they weren’t.

    Couldn’t even just leave them alone because they started setting themselves to random garbage times.

    I got lucky and was able to blindly disconnect (desolder) half of the module to disable it. Removing the module completely made the clocks not work at all.

    Interestingly, I’ve only had to set the time on one of the 10 or so units since the modification about a year ago. Dodged a bullet there.

  3. I’m very interested in this project – I have a Lacrosse WS-8007U Radio controlled clock, but since I use it in the basement, it doesn’t get synced to WWVB. I opened it up tonight and found two glop-top chips on the circuit board and noticed only a few circuit traces between them. Sure enough, I was able to see the very slow square waves that appear to be the time code! I’ll be looking into this in more detail to see if I can get your code working on an ESP8266.

  4. Few, if any, WWVB clocks actually adjust their running rate the way a properly configured NTP-using clock would. Mostly, they just jam the time to the value they receive in the middle of the night.

Leave a 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.