This documentation is incomplete. This is a personal project of mine, and the main page can be found here.
Can't get up in the morning? I share your pain. It's gotten to the point where I set 5 alarms, all on the opposite side of the room, and I still find myself sleeping in after turning them all off. It's amazing what a sleepy and determined unconscious mind can do.
I've spent years longing for the beds in the Jetson's - Literally launching the sleeper to their feet, with cartoon comedy soon to follow. However, this is the real world, and to build a system like that would be expensive, and require some heavy equipment. Physically blocking the bed is also out of the question - so crawling back into bed will always be an option. So, how do I combat my animalistic sleepy self?
Psychology! I have to reward myself for getting up, and punish myself for returning to bed - and for best results, it has to be instant. Electric Shock! No no, that's too harsh - and hard to set up. How about we stick with a basic alarm clock, but make it smart!
And so, my quest to build a smart alarm clock began. I considered all different types of sensors: IR Range, Thermo, Bend... Nothing seemed to beat a basic pressure sensor. After making an order from sparkfun, the construction of a pressure-based alarm clock was under way.
Before starting the project, I wanted to see if anybody else has done this before. A search reviled two similar ideas: "Smart Alarm Clock" proposal at the University of Illinois, and "Weight Sense Alarm Clock" at Duke University. However, both reports were more focused on the hardware and getting a good grade from the ECE professor that they failed to mention anything about how well it worked in the mornings (if used at all). Also, both came with a hefty price tag - over $200 each just for parts! The goal of my project became to make a cheap pressure sensitive alarm system.
Being a poor college student, cost became a large factor in my design. I managed to keep my whole system under $40 (1/5th the price of the previous two mentioned). This cost could be even cheaper, since the micro-controller board I chose has a programmer in it - if you already have a programmer, you could save $10, but not many people do.
Force Sensitive Resistor - Square (SEN-09376) $7.95
Arduino Duemilanove (ATMega328) $29.95
Buzzer - PC Mount**
**Note: I originally used this speaker, but found it to be too quiet (it seems quieter than it's rated for, so maybe I got a bad one?). My Micro-controller professor (Bruce Land - Great guy) gave me this buzzer he had laying around to use instead. It works much better, and I'm sure you could find something similar online.
Other parts needed:
(Image of pressure sensor here) To make sure the weight was evenly distributed over the pad, I used the foam that the pressure sensor was shipped in, with cardboard from the box to keep the foam from mis-shaping. (Circuit Diagram of pressure circuit) The resistance of the sensor decreases as pressure increases. To measure the resistance, we create a voltage divider using a resistor with constant value (1k). Constructing the circuit as shown gives higher values on the analog in as pressure increases (pressure increasing leads to the resistance of the sensor decreasing, which increases the current from 5V to GND, which increases the voltage across the 1kOhm resistor - which is what the analog input measures). This circuit isn't the most accurate or consistent, but it's cheap, simple, and more than accurate enough to pick up the weight of a human being, which is all we need.
(Buzzer and/or Speaker schematic) The software I have written supports both buzzers and speakers. Speakers require a waveform to create sound; Buzzers only need a voltage source, and they will create noise on their own. When the alarm is going off, Pin 11 outputs a square wave of approximately 2kHz, in pulses, to drive a small speaker. Pin 8 outputs long 5V pulses to drive a buzzer. Note: The max current of the micro-controller's outputs are 20mA. A buzzer or speaker that draws more than 20mA current may burn out the pin, making it useless.