Computing stuff tied to the physical world

Sequential Clock

In AVR on Nov 24, 2008 at 00:58

Here’s a little clock project with a twist – it displays the current time on a single large 7-segment LED display, by briefly showing each of the digits one after the other.


Note the transition from 12:20 to 12:21. The little red blinking light at the bottom is the actual DCF77 radio signal, one pulse each second, with a long/short duration to encode each bit.

This project uses a Boarduino as brains, a DCF77 radio receiver, a large Kingbright 7-segment display, a 2981 LED driver, a bunch of 470 Ω current limiting resistors (1K for the decimal point), and a 6..12V DC power supply:


On the left are the power plug and 5V regulator, on the right of the Boarduino you can see the reset button, 2×3-pin ICSP header, and 6-pin header used for programming with a USB-FTDI cable. On the far right is the 2981 chip used to drive the LED segments with 8..14V.

The radio print is soldered directly to the Boarduino (digital I/O pins 2..5) in such a way that the reception antenna with L/C circuit fits is snugly between the radio print and the display module. For simplicity, the radio’s +5V and ground are also provided by the Boarduino via digital I/O pins – they are fixed on startup as “1” and “0” outputs, respectively.

I used wire-wrap wire to make the connections because it’s so thin and solders very easily:


One nice software gimmick is that the clock starts by displaying a personalized greeting, since this project was made as birthday gift for a friend. Once the proper DCF77 radio signal has been decoded, the display switches to showing the current time; this usually takes two to three minutes after power-up. The clock will continue to run on its own with ≈ 0.5% accuracy in the absence of valid radio signals.

The C source code can be downloaded here. It decodes the DCF signal and encodes / drives the 7-segment display in a continuous loop.