Arduino Atomic Clock
May 26, 2010 Leave a comment
What is WWVB?
WWVB is 60Khz carrier signal that broadcasts the current time from Fort Collins Colorado. The antennas broadcasting the signal have been running nearly continuously since 1965.
The signal is remarkably slow, transmitting only 1 bit per second. With 60 bits in the message it takes a full minute to receive the time.
70 KW towers located in Fort Collins Colorado.
Receiving the signal
The part you will need to buy / salvage to receive the WWVB signal is the CMMR-6P-60. It is available from Digikey 561-1014-ND. Note that there is also a 40 kHz and a 77 kHz variant. If you live in the united states, you want the 60 kHz module.
For only $2 more, you can buy a bigger antenna. 561-1001-ND. Unless you live in Colorado, those will be $2 very well spent.
Hooking it up
See the data sheet for full instructions. Basically to get it working, you need to connect “PON” to Ground, and connect “TCO” to your micro controller. Optionally connect an LED to “TCON” to visualize the actual bits coming in.
Connect the TCO to pin 2 on the arduino,
Connect a led to pin 13 of the arduino.
Writing the Code
Head over to github to get the arduino sketch. Thanks goes to vinmarshal for his excellent work on this.
You will notice that there is simulator sketch which you can load on another arduino to simulate the wwvb module. This comes in handy if you live far away from colorado or are only able to pick up the radio signal at night. Upload the simulator code to a second arduino, and connect it to pin 2.
Once you get the board powered up, you should see the led on the wwvb module blinking like crazy. That is because of interference. Remember wwvb has a transmit rate of one bit per second, so the led should be blinking very slowly. I can’t emphasize enough how susceptible the radio is to interference. I can only get a good connection if all nearby electronics are turned off. (Especially my plasma tv). Frequently I would be getting a good steady transmission until my roommate would walk in to the room with his macbook pro. I’d have to wait until he would leave to get a good transmission again.
Once you finally get a full 60 bits without corruption, the led on pin 13 of the arduino should light up for 10 seconds.
-The wwvb code is pretty basic. Additional features / bug fixes are welcome.
-Don’t expect a successful transfer very often. Updates are most likely to happen late at night because radio waves travel further on earth at night.
-Power supply is important. The ripple caused by cheap power supplies is death for sensitive signals. Genuine Apple iPhone chargers work best for me.
Measure your distance from the antennas here
Credits go to duinolab.blogspot.com for his tutorial.
The Github code first appeared in popular science http://www.popsci.com/diy/article/2010-03/build-clock-uses-atomic-timekeeping