Step 2: Power Supply Circuit, LED Driver Circuit, and Wiring
Power Supply Circuit
If I were to hook the microcontroller straight up to the Vcc of the clock, I would blow it up (well not really, but render it useless). I needed to condition the voltage and bring it down to 5v. I used a simple regulator circuit that uses just two capacitors and a 5v regulator. I went to the schools lab and located a 5v regulator in the trash pile. I hooked up the circuit and tested it out. It provided a nice and steady 4.99v.
LED Driver Circuit
Since the ATMega168 can only deliver about 16mA of current to each of its digital outputs, a current regulator is needed to power the LEDs. I found this circuit on the Arduino help forums and it seems like a fairly common and simple circuit. To direct the light of the LEDs, I decided to use a reflector from a flashlight. The flashlight I bought had three holes for three LEDs. I decided to grind them bigger and put four in each hole, thus explaining the way the circuit is drawn.
Once I figured out I could successfully use the clock's Vcc and the the alarm output, I decided to solder up some thin wires and thread them out through a hole in the side. I also had the idea to add a loop in my microcontroller program to play a song instead of the original alarm. I soldered two longer wires to the piezoelectric speaker and threaded those out the side as well. I used some wire clippers to cut out a small notch in the top half of the clock and screwed everything back together.