Tag Archives: alarm clock

Breadboarding an Alarm Clock

LCD Clock on Breadboard
I actually started this a couple of months back, but now that I have something working to the point where I’m pretty excited about it, I’m ready to share my pet project. Back in college, one of my favorite classes was my small electronics class. Learning about half-adders and resistors was okay but the really fun part was using embedded programming to interface a micro-controller to the outside world. Ever since then, I’ve wanted to build some sort of embedded project of my own. I finally motivated myself to build something I’ve always wanted–an alarm clock that works the way I want it to.

Here are the features of my ideal alarm clock:

  • Accurate to within a minute per month. Even better would be to synchronize to some time source.
  • Shows date, time and day of the week (so after a rough night, I know for sure if it’s a workday or not =D )
  • Easily visible during the day and at night.
  • Time adjustment allows adding or subtracting hours and minutes. I hate missing the correct minute on my current alarm clock and having to hit the set button 59 more times.
  • Alarm can be enabled/disabled according to the day of the week. Do I need an alarm on weekends? No. Am I so lazy that I don’t want to turn the alarm on and off every weekend? Yes.

Here are the items needed for breadboarding. This will be slightly different than the final bill of materials for the finished clock due to the breadboard power supply.

Note on LCD display: I purchased my display off of Ebay for $5 and it works great. If you decide to use SparkFun’s display, keep in mind that it requires a resistor in series when you supply power to the backlight. The resistor is not included in my schematic because my display has the resistor built in.

LCD Clock Breadboard

The notes on the image should give you an idea of what the components look like and what they are for. You will need to study the schematic to hook everything up correctly. If you are feeling lost at this point, read through the first two SparkFun tutorials then stop back. They will walk you through setting up the breadboard’s power supply and loading code onto an ATmega168.

LCD Clock Schematic

LCD Clock Schematic

If you’ve gotten this far, you’re probably interested in the code behind the alarm clock. It is available here. Keep in mind this is not a finished product yet so there are still some features missing. The RTC (real time clock) code is fairly solid though.

I already have a PCB layout ready in Eagle which I’m going to send out to get printed. I’m really looking forward to migrating from the breadboard to the finished product. I’ll make sure to post the result!