Because I can't receive the regular atomic watch radio signal where I live, I built a device that determines the current time by using GPS and then emulates the WWVB protocol to set my atomic watch.
In the process of building this, I learned a lot about time, clocks, radio, and WWVB, and so I thought I'd share what I had learned.
The antenna gain will be proportional to area, so much more gain than that of a watch antenna.
You also have access to some very nice milling and 3d printing equipment. That is one beautifully designed and soldered PCB.
Have you given any thought towards building a home GPS powered NTP server? That would be a cool variant on your project.
If you want to build a GPS based NTP server, you need a GPS board that outputs a PPS signal. When I built mine I used an adafruit board hooked up to a raspberry Pi's GPIO pins.
It's something of a bear to get everything to play together properly and get the extremely precise PPS signal to the NTP server, I recall it required a custom kernel module and a lot of tinkering with tick rates.
There are modules which can automatically receive the WWVB radio signal and output the high/low pulses (which still need to be translated from PWM to ones and zeros).
If I were to make a recommendation: you're hiding a bit of magic here:
> I designed the board using the EAGLE PCB design software and milled the board from a single-sided FR-1 circuit board blank on an Othermill v2:
You haven't said the kinds of endmills you're using (flat square mills? Or did you use a V-tip?). If so, where did you source the V-Tips from? The software side probably had a few extra steps as well (IIRC, its usually Eagle -> Eagle CAM Plugin export -> CAM software -> GCode -> Mill)
So expanding on what you did here would be most helpful... to me at least :-)
> It’s challenging to design good antennas for such long wavelengths
FYI: the loopstick / Small Loop antenna operates on the magnetic-portion of the wave instead of the electric-portion of the wave. Instead of making a very large wire (which "receives" the voltage as the wave passes), the small loop antenna is basically an inductor that generates a current as the magnetic wave passes over it.
That's how it gets so small, since the electric wave is 5000-meters long, its a bit difficult to make.
Also, the software workflow was really easy - Otherplan (Othermill's CAM software) can directly import Eagle's .brd files and drive the Othermill.
Hmm, good to know. The only CNC Mill I have access to however is the Nomad 883. So I guess for my purposes, I'd have to do something else. But that's a nifty feature of "Othermill" for sure.
> I used a 1/64" flat end mill for the traces
I'm glad to know this is feasible for some of these larger surface-mount parts (like an ATTiny44A).
Yep, and you can feed this into ntpd also!
My watch is a minute behind my computer right now. Doesn't matter.
* Is WWVB the norm for consumer clocks that synchronize to an outside source? If I see a clock with that feature, should I assume it uses WWVB? Is it one of several options?
* Why not use GPS? Because of poor signal indoors?
* How far does this signal from Colorado propagate?
See also "The Current Readability of the WWVB Time Code": http://tf.nist.gov/tf-cgi/wwvbmonitor_e.cgi
As a teenager with the newly issued amateur radio call sign N9WWV, I used to set my wristwatch to WWV as I would constantly get asked, "What time is it?" anytime someone heard my call sign.
It sounds like this: https://en.wikipedia.org/wiki/File:WWV_time_signal_-_2009090... (.ogg, via Wikipedia).
When I started reading the article, I assumed the author would be using the PPS signal from the GPS for synchronization. You can do this w/ cheap GPS receivers and a small embedded computer (i.e. Raspberry Pi, BeagleBone Black, etc.) and synchronize your computer to it for extremely accurate time.
GPS time is much better, because you know exactly how far away you are from each satellite, so can subtract out the transit time reliably. WWV varies from day to day (and frequency to frequency).
The Wikipedia page seems to be pretty accurate. To answer your questions:
> Is WWVB the norm for consumer clocks that synchronize to an outside source? If I see a clock with that feature, should I assume it uses WWVB? Is it one of several options?
In the United States, yes. Clocks labeled "atomic clock" or "radio clock" are set up to sync with WWVB. Nowadays, many clocks are multi-band, which means that they are designed so that they can receive from multiple radio stations (there are a bunch of these; see https://en.wikipedia.org/wiki/Radio_clock#List_of_radio_time...). Usually, the clock decides which station to try to sync to based on which time zone they are in (which is part of the configuration). For example, my wristwatch, a Casio AWGM100B, can receive from DCF77 (Germany, 77.5 kHz), MSF (UK, 60 kHz), WWVB (United States, 60 kHz), JJY (Japan, 40 kHz / 60 kHz), and BPC (China, 68.5 kHz).
> Why not use GPS? Because of poor signal indoors?
I think the main reason is that GPS is a lot more complicated, so it requires more sophisticated hardware and software (and more power) to get time via GPS. There are some higher-end watches that do use GPS - for example, the Casio GPW1000-1A.
> How far does this signal from Colorado propagate?
Depends on weather conditions and time of day. NIST has coverage maps that show where you can get > 100µV/m for different times of the day: http://tf.nist.gov/stations/wwvbcoverage.htm
Actually DCF77 can be received all over Europe :) I believe reception is even possible in Russia and along the northern African coast.
2. Indoor operation is part of it. Also, GPS receivers are more expensive and power hungry.
3. Depends on time of day, but it generally covers most of North America. There's coverage maps here: http://tf.nist.gov/stations/wwvbcoverage.htm
Yes. WWVB is the NIST Atomic clock radio station. In fact, any cheap clock that auto-synchronizes is going to be WWVB. Its the cheapest option for mass electronics that I'm aware of.
WWVB however has one major fault: and its the speed of light. The speed of light can make the signal off by a few dozen miliseconds as it travels across the country. So extreme accuracy is not really possible. But for anything that can take a few miliseconds of delay (ie: most consumer clocks), this isn't a problem.
GPS is far more expensive. A WWVB receiver is only $5 for an antenna, $3 for amplifying components, and $1 for a very low-end microcontroller. The 60-bits to determine a timestamp are sent at 1Hz (yes, one-bit per second). And indeed, the 1Hz signal is sent exactly on the second, on every second. As the signal is so low-baud, it is trivial to find a microcontroller that is fast enough to process it.
As a very very low frequency, the WWVB signal penetrates through most walls. It also reflects off the ionosphere, giving a very long-distance range... far longer than the horizon.
The WWVB signal is also the atomic time standard of the USA. The radio station is owned by NIST and the signal is basically the current American definition of time.
At night, when there's the least amount of interference from the sun, the signal propagates all the way to the Pacific Ocean and Atlantic Ocean, covering the entirety of the continental USA, and a good chunk of Canada as well.
1. WWWVB is the norm. When they say 'Atomic Clock' they are using WWVB to synchronise time.
2. Putting GPS on a consumer electronic would be WAY more expensive.
3. WWVB covers Continental US and Southern Canada. https://en.wikipedia.org/wiki/WWVB#Propagation
"A computer is used to automatically tune the antennas during icy and/or windy conditions. This automatic tuning provides a dynamic match between the transmitter and the antenna system. The computer looks for a phase difference between voltage and current at the transmitter. If one is detected, an error signal is sent to a 3-phase motor in the helix house that rotates the rotor inside the variometer. This retunes the antenna and restores the match between the antenna and transmitter."
Cool technology :)
edit: Not something I'd want to do obviously, just seems like a rather insecure technology.
My high school's math and science club tried to do this once to the school's clocks as a prank. We never got the transmission circuitry working, but I did write a program for my graphing calculator that computed and outputed the correct signal sequence for a given timestamp through its 2.5mm jack.
Edit to add: As I recall, our particular clocks synced at midnight or if you hit the reset button. I think that was to increase the chances of a good signal.
And yeah, it was a blast!
I also liked the antenna solution. Very nice piece of work.
Something I'd find irresistible is messing with the protocol to find the limits of your watch receiver. I mean sure the spec is 500 ms pulse for a one and 200 ms for a zero, and we can safely assume anything from 499 to 501 ms is close enough, but I wonder how far those limits can be pushed. Is the crossover from understanding 1/0 the arithmetic mean or geometric mean or some arbitrary limits or does the firmware crash or go into easter egg mode or ...
Another fun game to play is the AT44A is much weaker than the 8-bit home computers from the 80s that could synthesize live audio in real time up to a couple KHz. A somewhat more advanced chip in the 2010s could numerically synthesize live 60 KHz signals, which might be fun instead of altering hardware PWM. Then you could play with amplitude and keying signals. Its well trodden ground that square wave modulation of a morse code signal is extremely wide bandwidth. A fancy raised cosine would be very smooth. Perhaps you'd get better SNR at the receiver with less keyclicks, so you could reduce power, or it would be more reliable per watt transmitted. Or it might not matter. But live realtime synthesis would none the less be entertaining alternative to modifying PWM registers on the fly. A cleaner yet simple modulation method might be let the PWM fly free and use a digital pot with a I2C interface to smoothly AM modulate the output, probably only cost one chip and might provide some performance gain. Most digital pots are just FET with some buffers and drivers, they seem to be spec'd to 44 KHz sometimes 192 KHz so I assume 60 KHz would be no big deal.
Another funny thing about ferrites and reciprocity is how interesting their output is when they saturate, and how low the power level is when they saturate. That's why very little ham radio work has been done with ferrites as transmitting antennas, compared to the more conventional yet still rather obscure air core magnetic loop antennas. Ferrites are cool, strange chemical magic. Anyway a simple air core coil made resonant-ish might work better as an antenna than you'd think, maybe better than the ferrite. You get best performance with the correct ferrite core material for the frequency band selected. Probably the gutted radio clock you used, used the correct core material, or maybe it used the cheapest one that mostly worked (although not in your dorm room as you mentioned). Trying to use Amidon core material 17 would be quite futile at 60 khz, a bar of amidon material #3 would probably work at 60 KHz assuming you could find it. Manufacturing your own optimized antenna large enough core to handle some power and with the proper ferrite core material would be an interesting 3rd experiment.
Daydreaming about ways to continue iterating on a design is fun.