Homemade Digital Clock

I wanted to design a clock from scratch. I ended up with a expensive, over-engineered, multiprocessing monstrosity. But it was fun.

A few years ago, while lying in bed, some long-dormant neurons randomly fired in my brain, and I thought I smelled something. I lay there, trying to figure out what it was. Then I remembered: it was the smell of vaporizing solder rosin. As a teen, I had assembled several electronics kits, the most impressive being a Heathkit H-9 video computer terminal. The only one I still have is my Heathkit digital clock. I had always liked the smell of the melted solder – though it’s probably unhealthful. The memory of the smell reminded me how much I had enjoyed making kits. I wanted to do it again.

The Heathkit of my youth is, tragically, gone. Other companies sell kits, but I thought that, now that I’m all grown up, maybe I should design my own gadget. I needed something within my skill level, and somewhat useful. A digital clock fit the bill.

The clock needed to be self-setting. I have a summer home where we turn off the power during the week, when we’re not there. It’s bothersome to have to re-set the clock every weekend when we visit. It also needed to know when daylight savings time began and ended and adjust the time accordingly. I thought about using the WWVB radio signal from the U.S. government, but it’s broadcast from Colorado, and it’s sometimes hard to receive on the east coast. Besides, were you ever in a Sharper Image store? They’d have a wall of WWVB radio-controlled clocks, each showing a different time, and none of them correct. I can’t imagine why that fine store went out of business.

So, based on a recommendation from a friend, I bought a GPS receiver instead. The GPS messages include the time and date (for jolly old Greenwich, England; the clock would need to know what time zone it was in). I ultimately settled on a design with two printed circuit boards, each with its own microcontroller. Two microcontrollers for a stupid clock? Yes, indeed. At the time, Microchip sent sample microcontrollers out for free, so why not? One processor runs the LED display, and the other keeps time, processes the GPS data, sounds the alarm, and handles the button presses.

The top board controls the clock; the bottom board runs the display.

You can see in the picture that the display board (the larger of the two) has a big unused area; there are white labels there, but no components. I designed this board to be multi-purpose. It has space for buttons and a USB jack. I had several of these boards made, and I hope to use them in the future as USB peripherals, hooked up to a computer, displaying information and receiving user commands.

The clock’s user interface is menu-driven, courtesy of an 8 character alphanumeric display and 4 buttons. The software architecture was inspired by modern GUIs: a message loop dispatches events through a virtual table; when a menu is selected, it brings up a “dialog box” for things like setting time or setting alarms; the dialog boxes have fields that have focus.

I built the case out of red oak, with walnut plugs for the buttons.

For a quick demo of how the clock works, please watch the video, below.

Update: I’ve modified the display board to plug into a USB port and display data from a PC. I’ve posted the schematic, board layout, firmware, and PC software at Web Data on an LED Display.

2 thoughts on “Homemade Digital Clock

  1. Hello Bob,I have just made the Super Probe project & found the link to your site with your amazing GPS clock project. I recently made a GPS clock from a project in the OZ mag Silicon Chip but it only shows 24hr time and no alarms.I have been making projects since my young days in the 50’s the first being a crystal set with cats whisker.I have the kit to program Pic’s and make PCB’s but my knowledge in programming is zero. I am wondering if you plan to make the drawings and code available to other constructors, i would love to make your all singing all dancing clock

  2. Hello Robert,I’m so impressed with your
    GPS clock nothing else on the web comes close, is there any chance you will
    make the schematic and firmware available ?.
    Alan Woodcock.

Comments are closed.