The idea is that getting up when it's pitch-black is a wrench. Equally, having a timed light that just switches on all of a sudden is a shock. What you want is a gentle ramp of light from imperceptibly dim to ragingly bright and ideally going from a nice gentle red to blazing white so that your brain thinks it's time to start that melatonin level rising. My solution is a full-function micro-controller, RTC alarm-clock with the following features, among others:
Arduino compatible ATMega328 controlled, open, hackable, reprogrammable.
Battery backed-up RTC
Brightness-controllable red LED display
Cool rotary encoder input
Up to 18W LED dawn light
8-channel PWM light control (2 x 3W RGB + 2 x 6 x 1W white)
Exponential brightness ramp on dawn light
7 independent dawn alarms stored permanently in EEPROM
Alarms setable for any day, for every day, for mon-fri or for sat-sun.
One-press "arm/disarm" with indicator (stored in battery-backed RTC RAM)
Each alarm has optional buzzer
Escalating buzzer tone
Snooze function on buzzer
Controllable "ramp" time (min to max brightness time)
Controllable "hold" time (time at max brightness)
Controllable "buzzer delay" (time between max brightness and buzzer)
Easily controlled "Night Light"
"Security Light" mode (mode stored in RTC battery-backed RAM so safe to blackouts etc).
A dawn clock aims to wake you up gently and you can buy them commercially, but they are expensive, generally just white, not very flexible, and just not much fun! We'll aim to make a full-feature dawn alarm clock and add a buzzer too, just to be sure we actually get to work on time! It's also something of a learning exercise for me so it has a whole bunch of different interface and control techniques for me (and perhaps you) to master along the way. There's about 6 separate projects in here and I'll try to put some example code in so that you can try them separately if you wish.
Although you could do this project perfectly well on a "real" Arduino, and indeed it was prototyped with a "nano" on a breadboard, I'm making the dedicated installation on a minimal Ardu' compatible so that you don't need to commit your "real" Ardu' to the clock. I have made this project both on bits of perf-board and on a dedicated PCB that I have designed & had fab'd. We'll look at both ways to do it - the result is much the same but the PCB is much less time consuming.
There are several discrete "sub-projects" that I've called "modules" in this project, any of which could be made and used individually:
The Arduino clone & RTC
The Digital time display
The Rotary encoder & switch controls with de-bounce.
The "Shift PWM" LED driver board
The lamps themselves & a trivial "buzzer" alarm.
Controlling an ATX power supply for efficient powering of the device
I've tried to make this instructable modular so just skip over any modules you can handle yourself already or use just one or two parts for your own project.
Step 1: See it Working - plus some Shameless Groveling
I've entered this 'ible into the "Glow" contest so if you like it or any of its modules then please consider voting for it. I could have split it into a few entries but really it's more sensible all together and it's taken a year to get together. So if you like it, please....
Vote for me and help me get me some more fun stuff to make fun instructables with!