[In my previous posting, I discussed the shortcomings of the digital alarm clock and what my goals were for the ideal clock. A link to that posting is at the bottom of this one.]
How the Clock Works — from the Outside.
Our clock has only three interface elements; a big blue display (the time), a smaller yellow display (the alarm time) and a knob. Pressing the knob turns the alarm (and the yellow display) on and off. No yellow numbers, no alarm. Yellow numbers? That’s what time the alarm will go off. It’s that simple.
You change the alarm time by turning the knob. It moves in 15-minute increments, so in a couple of spins (forwards or backwards) you can move through a whole day. I’ve always thought that the little AM/PM light was hard to notice, so we’ve done away with it here. You set the alarm in 24-hour time. which makes it really hard to get it wrong; 7:00 AM reads as “7:00” while 7:00 PM reads as “19:00.”
That just leaves the noisemaker. Rather than leave it up to the a radio station, which has too many parameters to set (volume and tuning) or may have unreliable programming, I decided to include my own noisemaker. Sure, we could have interfaced to an iPod, but adding another device undermines our assurance that the alarm will go off as planned. Instead, I’ve chosen to play sound files off a micro-SD card. This gives us lots of other capabilities as well, like making the clock chime on the hour, speak the time, or play different alarm tones at different times. Since the reader accommodates a 2Gb card, you can design your own audio “skin” if you like.
Last, but not least, we solved the power problem. With the old mechanical clocks, you lost exactly as much time as the power was out. With digital clocks, even a brief power interruption restarts the clock at 12:00. Some clocks have a back-up battery in case the power fails, but most do not. The ones that do, require you to replace the battery periodically (which no one ever seems to do).
This clock keeps the correct time even when you pull the plug. For how long? At least a few days and maybe a couple of weeks (there are a lot of factors involved). The displays turn off and the alarm can’t sound when the power is off, but when power is restored, the time is still accurate.
How the Clock Works — from the Inside.
The guts of this machine contains a hard-working and very inexpensive 8-bit PIC microcontroller. (It’s the long rectangular black thing in the picture.) There is also some audio circuitry to play sound files off a micro-SD, an amplifier to drive a speaker, some LED displays, and a power supply to make it all work.
The PIC microcontroller does all of the heavy lifting, keeping track of the time, managing the two displays, controlling the audio chip, and handling user interaction.
One more component worth mentioning is the carbon aerogel supercapacitor. (It’s the big round thing on the logic board.) This little guy stores up electricity when we’re plugged in. When we’re not, the microcontroller senses the power failure, shuts down everything non-essential and hunkers down for a long winter. It draws just enough power from the ultracapacitor to stay alive and keep track of the time. Supercapacitors are cool because, unlike batteries, they don’t get tired of charging/discharging so they don’t need to be replaced periodically.
Mechanically
I decided to build this clock into a CD storage container. It was about the right size, inexpensive, and I liked the color. In order to give myself a little more flexibility, I put all of the electronics on two boards instead of just one. There is a display board, which holds the digital displays and the knob, and a logic board which holds the microcontroller, audio electronics, and power supply. A 16-pin connector mates the two boards together.
The size of the display board, which is the larger of the two, is primarily determined by the size and placement of the LED displays. By putting the rest of the electronics on another board that mates behind it, I gave myself the option of fitting the whole thing into a smaller box than I could have if it were all on one board (in case I change my mind later).
In our next installment, we’ll talk more about the details of the design and how engineers design something like this.
I’m eagerly awaiting the next 1158 steps! But it looks like you are in Cancun, though. Or were. Sounds nice, though. Warm….
I’m also hoping one feature of the “perfect” alarm clock is one that gives the happy customer an actual, valid reason to get out of bed. Or would you say that’s outside the scope of an alarm clock’s duties, since it’s technically nothing to do with waking up? (OK, I admit, that was an annoying question.)
Sorry, yes my vacation travels have interfered with this process. I’ll get back in the saddle soon.
Thanks for reading!
Hi Rick. I want to build an alarm clock for a friend for either her birthday or Christmas this year. I just was wondering where you bought these parts like the logic board and the display board. Thanks.
Thanks for your note.
The logic board and display board are of my own design. Had I finished this series of articles (instead of moving into a new house) I would have taken you through the process of designing them, debugging them and getting them manufactured. As it is, I got busy with other things.
I’m not making the plans or the boards available because to do so would be a huge amount of work. The boards, like the first generation of anything, are buggy and need rework and I just don’t have time to clean them up and publish the microcode.
If you want to buy a cool clock kit, you might consider the DOTCLOK by Andrew O’Malley.
If you want to design your own, there are lot of places to get stuff. Here’s a quick list of a few of my favorites:
Spark Fun Electronics
These guys will probably be your most useful source. They are a web-only business that caters to electronic hobbiests. They have lots of fun ideas on their blog and they sell some really unusual and fun parts.
Radio Shack
In the 1980s and 1990s, Radio Shack was an electronic hobbiests dream. Located in every major city, they were often the only source of electronic parts to the small-scale builder. Today they are primarily a phone and low-end consumer electronics store, but they can still be pretty handy for quickly picking up the occasional part, as long as it’s nothing too sophisticated.
Jameco Electronics
JameCo is a traditional electronic distributor. They sell mostly to industrial manufacturers, but their small minimum order requirements, large selection and responsive customer service make them a favorite among individual builders.