Alarm Clock Hardware
This is the hardware setup of the alarm clock.
Main Components
- Arduino Uno
- 16x2 Character LCD
- 7-Segment Serial Display
- PIR Motion Sensor
- AT24C256 EEPROM
- Three Buttons
The 4 digit 7-Segment display displays the current time. The LCD displays the date and allows the user to configure the clock settings and set alarms using the three buttons. The buttons provide a simple and intuitive way to interface with the clock. From left to right, the buttons are previous, select, and next.
Since there is no battery backup, we included an EEPROM to save the user-set alarms and configuration. The current date and time will need to be set again if the clock loses power.
I talked about the motion sensor in my previous post: Body Movement During Sleep.
We bought a 5 x 2.5 x 2" Project Enclosure from RadioShack to put everything together. After a lot of rough measurements and guesstimation about how everything will fit together, we cut out the holes for all of the components:
To power the clock, we initially used a 12v DC power adapter I had laying around. (I couldn't find a working 9v adapter and a 5v adapter was not enough to power everything.) Because the plug was too long to fit in comfortably with all of the components of the clock, we cut it off and soldered the wires from the adapter directly onto the connector on the board. We eventually scrapped this idea and went with a USB cable (still had to solder the wires directly onto the board) for two reasons: First, with how tight everything was inside the box, we didn't want to have to open it up any more than we needed to. Having a USB connection would allow me to program the clock without having to open it up. Second, we noticed the board was getting very warm after a couple minutes when being powered from the 12v adapter. According to the Arduino Uno page, the recommended input voltage is between 7 and 12v, the maximum being 20v so it shouldn't have been a problem but we err on the side of caution.
After some more testing, the clock stopped working. Turns out, it had to be reset after being given power for the sketch to load. After some unsuccessful Googling we took everything apart and tested each of the components individually. The fault lies in the LCD. For reasons I have yet to understand, when the LCD is connected, the Arduino will not load the sketch on power-on. To fix this, we added a resistor to the reset pin and 5v. Still don't understand why this is necessary, or why it works, but it just does. To make sure this wouldn't interfere with anything else, we added a switch on the back of the clock. This way, we can "disable" the resistor hack if need be.
Here's the finished product:
So that's the rundown of the hardware of our "intelligent" alarm clock! The software still needs some work, but it's coming along nicely. Thanks for reading!




