Feel free to vote for me in the microcontriller contest if you like my project. It would appear that contest might be specific to making things move. So what does this move? It moves the student who stayed up too late doing homework, it moves the parent with a new born child, it moves the Instructables author who was compelled to finish their project against all common sense. It moves what can often be the most immoveable of objects... you.
Direct link to this video http://www.youtube.com/watch?v=szoPO75u46s
Steps 9 and 10 have additional videos.
Some key features:
-Any button press will silence the alarm for 30 seconds so you’re not listening to the buzzing while playing Tetris.
-User can select how long the snooze interval is (with second granularity), how many times you’re allowed to hit snooze (0-255), and whether the snooze interval is from the time the alarm went off or the time the snooze button (any button) is pressed.
-Two separate alarms: One is a traditional alarm that will go off when that time is reached and then disabled for the following days. The other is what I call a “persistent” alarm that goes off at the same time Monday through Friday so isn’t disabled for the following days.
-It uses large numbers for which I was inspired by this Instructable and he got the idea from here .
-It gets power from a base that it sits on but has a rechargeable battery backup so you can tilt the clock without being encumbered by wires. The switching to and recharging of the NiMH battery happens automatically.
-It has a physical key to silence the alarm which is given to your spouse/roommate/parents so the alarm can be silenced with having to play Tetris
-The backlight brightness is user controllable through software and the backlight is turned off when not on the base to conserve power and indicate that external power is absent.
-You can cancel the alarm at any time, even before the snooze intervals have passed, by playing Tetris.
-Four different styles of Tetris, details Step 8.
-When setting the time and alarms instead of the typical adjusting of hours and minutes the user can adjust tens of hours, hours, tens of minutes, minutes, tens of seconds, seconds, tenths of seconds, hundredths of seconds (yes, really) and day of the week. This allows for quick time setting and ability to synchronize easily with another time source. See Step 9 for details.
Other points of possible interest:
-Use of interrupts, Step 4.
-The best (in my opinion) way to debounce switches, Step 5.
-Use of PROGMEM to store strings to save on memory, Step 7.
-Precise and simple instructions for using the Sparkfun FTDI Basic Breakout board and making a barebones Arduino board, Step 13.
-Keeping time with an Arduino without a separate real time clock, Step 2.
-How to deal with the fact that the Arduino function millis() wraps back to 0 every 50 days or so, Step 2.
This is my very first Arduino project and I have to say it’s a pretty slick environment.
Step 1: Parts
-A way of programming the Arduino. I used Sparkfun’s FTDI Basic Breakout item number DEV-09873 . I had a surprisingly hard time figuring out how to hook up the programmer so I have instructions for that in Step 13. ($22.00)
-A crystal and accompanying capacitors. This and the above two items are all that’s required for a bare bones Arduino. A ceramic resonator won’t work in this application because we’re keeping track of time. I got mine from Digikey part number 300-8437-ND . ($0.63)
-A backlit standard (HD44780) 16x2 LCD display. I got mine from Sure Electronics part number DE-LM12111 . ($5.99)
-Four buttons. I used tactile ones from Digikey part number SW404-ND . ($0.35)
-A buzzer. I used one from Digikey that I got a long time ago for another project so I forget the part number.
-A rechargeable 9v NiMH battery. I got mine from harbor freight part number 97865 . ($9.99 although they have a cheaper, lesser capacity one that was out of stock the day I went)
-A 9v battery clip-style holder, I got mine from Digikey part number 71K-ND . ($0.44)
-A 9v battery contact, I had a couple on hand but I’m pretty sure I originally got them from Digikey.
-A ICL7673 backup battery IC, a wonderful device that automatically switches between two power supplies without an interruption in power to the device and even indicates which power source is currently being used. I got mine from Digikey part number ICL7673CPAZ-ND . ($2.08)
-A 5v voltage regulator, I used a Low Drop Out variety from Digikey part number MC7805CT-BPMS-ND . ($0.56)
-A couple diodes, one for recharging the batter and one to insure against reversing supply power. I used one from Digikey part number 1N4148FS-ND and one from my parts box. Two of the ones from Digikey should work just fine. ($0.14)
-A slew (6 or so) of 0.1uF ceramic disk capacitors. I got mine from Digikey part number 478-5741-ND . ($0.13)
-Various resistors, I got mine from Digikey and from my parts box which was originally stocked from a very worthwhile Radio Shack purchase part number 271-312 . ($9.99)
-A project enclosure from Radio Shack (6x3x2") part number 270-1805 . ($3.99)
-Veroboard (stripboard ), I got mine off Ebay, you can used your favorite board making material from etching copper clad to perfboard . Consider getting some stripboard and the tool for cutting the traces together off of eBay if you're going that route.
-I also used a breadboard for initial testing and cardboard to mock up the enclosure.
-Soldering iron, solder, wire strippers, a rotary tool to make the enclosure, typical stuff.