
&mu;WWVB: A Tiny WWVB Station - anishathalye
http://www.anishathalye.com/2016/12/26/micro-wwvb/
======
anishathalye
Hi HN! I wanted to share the story of µWWVB, a watch stand that I built that
automatically sets the time on my atomic wristwatch.

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.

~~~
madengr
Very nice work! Can you receive WWVB via a larger, resonant loop antenna; say
a 10 cm diameter solenoid and resonating capacitor? If so, you may be able to
place the watch at the center of the resonator (i.e. within the solenoid) so
it parasitically couples.

The antenna gain will be proportional to area, so much more gain than that of
a watch antenna.

~~~
anishathalye
Oh, that's a neat idea! Yeah, I think I should be able to receive WWVB in my
dorm room via a larger antenna. I should try it when I'm back in my dorm room
after the winter break.

~~~
madengr
Maybe build one with a short piece of large diameter PVC pipe as the coil
form. Use a signal generator at 60 kHz to drive a smaller, transmit probe
coil. Then another receive probe coil hooked to an oscilloscope. Use this
loose magnetic coupling technique to tune the large coil for resonance. You'll
of course want to shoot for as high of Q as possible, but that's an
engineering trade off of AC wire resistance, capacitor Q, etc. Go for as large
of inductance as feasible, until your self resonance is just above 60 kHz,
then pull it to down on frequency with a silver mica cap, or adjustable air
variable cap.

------
mysterydip
While currently I have no use for this, I definitely appreciate the research
and effort that went in to solve a localized problem, and sharing the results.
Epitomizes hacker culture to me. Thanks for sharing :)

------
dragontamer
The WWVB protocol has been interesting me for the past few months. I have been
thinking about doing the opposite: building my own WWVB receiving station.

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).

[https://www.amazon.com/60kHz-atomic-clock-radio-
module/dp/B0...](https://www.amazon.com/60kHz-atomic-clock-radio-
module/dp/B01KH3VEGS)

\----------

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.

~~~
anishathalye
Ah yes, I didn't go into details on the milling process. I used a 1/64" flat
end mill for the traces and a 1/32" flat end mill to cut out the board from
the stock.

Also, the software workflow was really easy - Otherplan (Othermill's CAM
software) can directly import Eagle's .brd files and drive the Othermill.

~~~
dragontamer
> 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).

------
Animats
That's the computer hacker solution. The RF hacker solution would be to build
something that receives WWVB and retransmits its own signal on the same
frequency without interfering with itself. The wavelength is long enough that
you could pull this off. This has the advantage that you're not degrading the
accuracy of the time signal.

~~~
jrockway
It's not that accurate anyway; WWVB doesn't compensate for its propagation
delay like GPS time does.

~~~
wl
WWVB's worst case propagation delay is ~20 ms. This project's error can be up
to 500 ms. For a wrist watch or wall clock, the former is imperceptible and
the latter is not.

~~~
jrockway
Yeah, the conclusion I reached after making a GPS-based NTP server is that
having my clock accurate to a few nanoseconds didn't really matter for
anything.

My watch is a minute behind my computer right now. Doesn't matter.

------
hackuser
Could someone provide quick background on WWVB, or at least say if the
Wikipedia page is accurate? I clicked the link to the NIST page,[0] which
helped a little but was written for someone already familiar with it - it's
both too detailed and leaves fundamental questions unanswered; for example:

* 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?

[0] [https://www.nist.gov/pml/time-and-frequency-
division/radio-s...](https://www.nist.gov/pml/time-and-frequency-
division/radio-stations/wwvb)

~~~
anishathalye
EDIT: apparently a couple other people have already answered your questions,
but I didn't see the other answers because I was typing my response. I'll
leave my answer here cause it contains some information not in the other
responses.

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...](https://en.wikipedia.org/wiki/Radio_clock#List_of_radio_time_signal_stations)).
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](http://tf.nist.gov/stations/wwvbcoverage.htm)

~~~
dom0
> DCF77 (Germany, 77.5 kHz)

Actually DCF77 can be received all over Europe :) I believe reception is even
possible in Russia and along the northern African coast.

~~~
mynameisvlad
I don't think OP ever claimed it couldn't be, just that that's where the
signal propagates from.

------
camtarn
Part of the linked page describing the WWVB transmission station which I
enjoyed:

"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 :)

------
runeb
Could you attack WWVB receivers by overriding the transmitted signal and
change their time?

edit: Not something I'd want to do obviously, just seems like a rather
insecure technology.

~~~
cvoss
I believe you can if your signal is strong enough relative to the real one,
which can be pretty weak in certain areas (hence the need for this device).

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.

~~~
gravypod
What calculator was that? That sounds like a lot of fun!

~~~
cvoss
Mine was a TI-84, although an 83 would have worked too. I wrote it in native
assembly, since TI-BASIC doesn'the give you enough control. You can do clever
things with that jack, like play music if you've got a 2.5-to-3.5mm adapter.

And yeah, it was a blast!

~~~
gravypod
How did you get programs to and from the calculator? Did you type it all out
by hand on the calculator?

~~~
cvoss
I developed programs on my computer and transferred them. There's some
fantastic communities out there with all the resources and help you'll ever
need [1]. I got my start working through this guide [2].

[1] [https://www.omnimaga.org](https://www.omnimaga.org)

[2]
[http://tutorials.eeems.ca/ASMin28Days/welcome.html](http://tutorials.eeems.ca/ASMin28Days/welcome.html)

------
ChuckMcM
Very nice, I was originally thinking "Gee with NMEA signals they won't be able
to do better than 1/2 second accuracy." and then realized its a wristwatch,
you don't generally care about milliseconds and the watch can lose or gain a
half second in a day anyway! So in fact it is engineered quite well for the
requirement.

I also liked the antenna solution. Very nice piece of work.

------
eximius
Great work! And I applaud the concise and thorough explanation of the legality
regarding the unlicensed transmissions!

------
VLM
That's a cool project.

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.

------
homero
I'd love to buy one. My house stopped receiving them for a year now. Maybe I
have a noise source or something.

------
codewritinfool
Nice work!

------
coin
-1 for disabling zoom on mobile devices

