Central Seven

Science is fun!

1

Sunrise Alarm Clock, v2.0

Sunrise alarm clock version 1 was a great success, but it still clearly had a lot of areas for potential improvement. The biggest problem was that I now had this awkward looking box sitting on my night stand next to my buzzing alarm, and every time I wanted to change my wake-up time I had to switch both. Also, the buttons were all unlabeled and their use non-intuitive, so thus came version 2.0.

Summary

I took a $5 alarm-clock from Target and added on a “sunrise” module. 20150910_172711.jpgI hijacked the speaker connection, and when the Arduino detected noise coming in over the line (buzzer going off), it would initiate the “sunrise.” After the LEDs were fully powered up (roughly 1/2 hour), it would then allow sound through. This way I could also preserve the buzzer or the radio alarm functions.

The Build

First, the internals of the clock itself. It has a 3W wall wart that is soldered onto the board. When I opened the case on the clock and tested the input power connections, I found that the power coming in off the wart was 12V AC. So in the wall wart had just a step-down transformer, no other circuitry. Within the case of the clock, then, was a bridge rectifier. By finding the large electrolytic capacitor (~2200 uF), I could find the end of the full bridge rectifier, and that was where I initially tapped into the power connection for the Arduino.

Here is the schematic of the original alarm clock, as it pertains to my modifications.The alarm clock has I/O in the form an AlarmClock_alone_schem2LCD display, 5 simple push-buttons, and the speaker. The rest of the components of the alarm clock are represented here as just a box.

For power for the Arduino, I tapped into the existing power supply. Initially I was going to take the raw AC (after it was stepped down from 120V to 15V) and run that through my own diode rectifier and capacitor, but after some probing on the board I figured it would be easier to just use their rectifier circuit. I added 7805 to convert the noisy 12V DC connection to a fairly smooth 5V DC line. Everything looked good in testing until I added the LEDs- when they started shining the system would reset. After some testing, I realized the problem was power- the wall wart said 3W and no other information, which meant that if it was putting out ~10VAC then the whole system was running on roughly 300mA. That’s fine for just a few small components, but having 30 LEDs shining at full strength was too much for it. I tried adding a current limiting resistor, but the LEDs were too dim then. So I swapped it out for a larger supply I had around (old cell phone charger), but I think in the future if I just bought a slightly nice clock power wouldn’t be such an issue.

I used the Arduino to listen on the line of the speaker channel, and when it detected sound (ie the alarm going off),  it initiated the sunrise. However, it also had to break the speaker connection, otherwise the buzzer would sound when it was still dark. So I stuck a NPN transistor in the speaker line, and only turned on the speaker line after the sunrise was complete.

basic_sunrise_schem

I switched my Arduino Uno out for an Arduino Mini Pro, soldered that and all the components onto a small piece of protoboard, and shoved the board into the empty plastic space of the clock. I had to cut out the battery compartment to make it fit, but I was able to seal up the case without any noticeable difference.

20150910_170200.jpg

For the LEDs, I used the board I had previously made, and hooked power, ground, and the three controlling lines up to a molex connector and a ribbon cable. Then I drilled a few holes and had the other end of the connector stick out of the alarm clock plastic. To encase the LEDs, I found a simple half sphere on Thingiverse, which I printed out in natural ABS with 0 fill and 1 layer. I used a straight edge to open it up along one layer, and slipped the LED board inside.
20150910_170239.jpg

Last, I added a manual OFF/ON button. The manual “ON” mode also doubles as a sunset-mode, so at the end of the day I can have it slowly get darker. I haven’t found this mode quite as useful.

In Conclusion

If I were to repeat this, I think I would be a nicer alarm clock, that hopefully had a little better power supply. For those interested, here’s the code.

I think the beauty of this project has been learning how to tap into signals of common electronics and adding functionality. It has given me ideas about inserting ATtiny into other pieces of equipment I have, and adding LED indicators or speaker functionality.

The alarm clock only cost $5, the Arduino mini was less than $10, and most of the rest of stuff I had around the house. A comparable device on Amazon is about $100, and this one I can easily re-program or re-purpose if there’s something I don’t like about it.

Dantana • September 11, 2015


Previous Post

Next Post

Comments

  1. Leo February 27, 2016 - 11:29 pm Reply

    Hi Nice!!!
    I build it but when the asrduino starts the white leds go directly on without a alarm signal?
    What do i wrong?

    Thanks
    Leo

Leave a Reply

Your email address will not be published / Required fields are marked *