The story of atomic radio clock
This is a story why I’m not gonna add atomic radio synchronization to my Arduino clock project.
I started working on a clock based on Arduino and Chronodot that would synchronize with the WWVB radio signal and got the prototype working. But, yeah, there is a but.
The WWVB radio station that sends the time signal is in Fort Collins, Colorado. Its signal reaches New York without any problems but the interference in the city introduces errors in the time code sent by the station. Only at night it’s possible to read the time and set the clock.
So here is what I have:
- Arduino
- Chronodot (I2C)
- Two 4-digit 7-segment LED displays
- MAX7219 LED matrix driver (SPI)
- CMMR-6P-60 receiver module (digikey: 561-1014-ND)
- 100mm ferrite antenna (digikey: 561-1001-ND)
- LCD and SD-card (and Ethernet) shield for debugging
I wrote a library to decode WWVB signal that can be found in my git repository. It’s an initial working copy but does not have any examples yet.
The Chronodot and display part of the clock project were easy. I had the prototype running in no time. Also, connecting CMMR-6 module to Arduino was not a big problem. I will have another post on that – it might jump-start a lot of folks doing the same thing.
The stairs began with getting rid of interference. I could get a signal when I run the clock from a 9V battery, but the battery cannot drive all debugging displays and logging that I have connected for a long time, so naturally I started using a 9V power supply. I quickly noticed that the 5V regulator on the Arduino got too hot; so hot, in fact, that I was unable to touch it, as well as the ethernet port just above it. I switched to iPhone charger that outputs a nice 5V DC on the USB port and I used a USB cable. All worked great without overheating.
Once the power situation has been cleared I left the clock running overnight to collect some data and see it the signal synchronizes the Chronodot. I got nothing over the first night. Well, a bad reception night, bad weather (we had a snow storm in the US at that time). But I got no data for the next few nights. That made me thinking that the reception is bad in New York City. Period. But I noticed that the signal appeared when I was touching the LCD screen. Soon I discovered that the signal was perfect when I was touching the ground wire. That leads me to believe that the switching power supply introduces some kind of interference and prevents the receiver from getting any usable signal.
How do I quickly ground an electronics circuit? I run a wire from the ground to the shield of the cable-TV connection. Signal appeared! I got multiple synchronizations over a single night for the first time after two weeks of prototyping and programming!
In the end I will not proceed with WWVB synchronization just because it’s too difficult to shield from all the interference and properly grounding the project. Additionally, the positioning of the ferrite antenna in relation to the transmitter in Colorado is very important. I don’t want to be forced to place the clock in the room in accordance to the radio transmitter.
My idea of clock synchronization is by employing XBee radios (which I use for lighting project already). The clock will listen for time signal commands and set the clock. The time reference can be sent by a PC from either local clock or by querying an NTP server. I’m also thinking about building a GPS receiver with an XBee radio that will sit at my window and send the time periodically to my PC and the clock. This way the project is more versatile and I get to build more fun devices
Update (2011-02-20):
I did some more testing last night and got very little signal. So grounding helped, but I guess there are good and bad reception days.