This is an Arduino powered alarm clock that after hitting snooze twice the alarm will not cancel until the user has cleared 4 lines in the game Tetris. You physically turn the clock sideways, so the screen is vertical, to play Tetris.  It's never fun to wake up in the morning but playing a little Tetris is at least somewhat enjoyable and quite effective.

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.

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

-An Arduino or an ATMega328 with the Arduino bootloader. Sparkfun sells them ready to go or save a buck and buy it from Digikey part number ATMEGA328-PU-ND . If you buy one without the bootloader you’ll have to program it yourself. I used a UsbTiny from Adafruit and the process was super easy thanks to the Arduino IDE. ($5.50)
-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.

hi. I am a college student and I wanted to make your project as my project. Can i ask for the complete list of materials for this project? Can you include the values of each components. Please. I would appreciate if you could post it as soon as possible. Thank you: )
Well my INCREDIBLY DETAILED instructable lists all the parts. As for prices Google is your friend. I'm afraid you'll have to do your own homework. :)
<p>Is there any alternative for this component Crystal and accompanying capacitors (CSA-310) that you used. Thank you so much. :)</p>
<p>You really should go with a crystal since this is a timekeeping device. Something like a ceramic resonator would work and be easier and cheaper but would keep horrible time.</p>
<p>For this ICL7673 sir, is there any alternative or substitute for this backup battery IC? Thank you Sir.</p>
<p>Can I use an electrolytic capacitor with the same value instead of the crystal capacitor? I can't find any because this component is already obsolete. Thank you so much for your consideration sir. </p>
<p>The datasheet for any crystal you choose will specify exactly what size of capacitors to use. I would not go with electrolytic, it oscillates so the cap should not be polarized. The cheapest ceramic cap you can find is what I go with.</p>
<p>For this ICL7673 sir, is there any alternative or substitute for this backup battery IC? Thank you Sir. </p>
What a great project, I especially like the large digits on the 16x2 display. Not sure about having to clear 4 lines of Tetris though. Thanks for sharing.
um..bit outdated? <br>try arduino 1.0.1
Is there a &quot;simple&quot; version, with all the wires, blah blah, with just a 'duino and a tetris fliptop?
I enjoyed reading your code. I thought the button handling code was downright elegant :-) A neat hack. Thanks for posting it. I've used Adafruits DS1307 i2c breakout board in my own projects to good effect.
now to make it so we can play halo XD!!!!!!!!!!!!!
My er... kids... yeah kids, so need one of these...
This reminds me of a math alarm clock I built a few years ago. I still use it, and it still works great: http://www.cheaphack.net/2008/01/turing-alarm-clock.html<br><br>I see you're keeping time with a crystal. That will work, but it will be a minute or so fast/slow per day. Try a PLL on mains frequency for better time keeping.
Did you mean a minute or so fast/slow per year? Mine is off by less than a second per day. That's part of the reason I made it easy to synchronize with another time source so I could check that out. In order to synchronize with the mains I'd have to have a way to detect the mains sine wave which would add an additional circuit to the design since I use a standard wall-wort style power supply. Also, since I made the clock removable from the base there would have to be additional connections for that sine wave indicator from the base to the clock. Thanks for the suggestions though.
Cool thing man! When I read the name I laughed so much! :D Your idea is as brilliant as it is simple! When I have the opportunity I will try to make one for myself :)
Wow, really cool clock, but I guess I am too tired in the morning to play tetris ;-)

About This Instructable


46 favorites


More by nolte919: Alarm Clock with Tetris to Prove You're Awake I2C Controlled 7 Segment LED Display Gigantic Halloween Spider Web
Add instructable to: