Blue LED dawn simulator for Soleil Sun Alarm

 by ewilhelm
Featured
This add-on to a Soleil Sun alarm lets the clock control the brightness of a bank of LEDs. A microcontroller adjusts the power of the LEDs so they appear to dim at the same rate as any incandescent lights you may have attached to the alarm.
 
Remove these adsRemove these ads by Signing Up

Step 1: Background

We run a tight ship here at Squid Labs. Partners are expected at their desks, pencils ready, at 7:00 AM sharp. Given the 4-hour each way commutes typical of the Bay Area and 12-hour works-days, there's not alot of time left for sleeping! So, anything to simulate a natural existence, like a sunrise, is greatly appreciated.

I use a Soleil Sun alarm with its incandescent light controller to simulate sunrises in the morning. It works fairly well and often I wake while the lights are about half brightness, before the radio comes on. Recently, a few close friends, some with seasonal affective disorder, have started using a blue light box -- the Golite -- and swear by it's effectiveness.

Despite having timers on the Golite, it doesn't have an alarm setting and won't turn the LEDs on automatically. Worse, in darkness, the lowest light setting of 10% isn't that different than 100%, and compared to a "sunrise" driven by incandescents, the difference between 0% and 10% is quite jarring. I wanted to try blue light and so decided to build my own LED light source integrated with my alarm clock.
SenorD says: Sep 21, 2011. 12:10 AM
So the datasheet for the BuckPuck says that the ref pin outputs at 5V. Is there any reason I should use the a separate voltage regulator, as you have, rather than just powering the control circuit off the ref pin?
ewilhelm (author) in reply to SenorDSep 23, 2011. 4:19 PM
I wasn't sure how much current that reference pin could source, so I added a regulator.
ABaruwal says: Jan 25, 2011. 5:12 AM
Im making a wake up light for my final engineering project and and unable to find useful information :(
Can anyone help me with the circuit for the wake up light, please.
Ragasteady says: Oct 31, 2009. 9:43 AM
This design involves a risk for the eyes. According to Lumileds documentation :

"Blue and RoyalBlue power light sources represented here are IEC825 class 2 for eye safety."

http://en.wikipedia.org/wiki/Laser_safety#Class_2


This means that LED can cause damage is the user stares at them. HB LEDs should always have a diffusor in front of them.

jkollin in reply to RagasteadyJan 16, 2011. 2:16 PM
If you really want to safe, use 505nm (Cyan) LEDs as well as a diffuser. That's what I am doing. It should be 60% as effective as blue while having < 10% of Blue Light Hazard (photochemical damage of retina).
Fake_Name says: Oct 17, 2006. 1:22 PM
My only comment is a PWM frequency of 190 hz can be detected by some people (I, for one), particularly at really low intensities. Something in the khz range might be a better idea.
ewilhelm (author) in reply to Fake_NameOct 24, 2006. 2:45 PM
Are you sure? 190 Hz is three times faster than AC powered lights and LEDs. At 30 FPS (effectively 30 Hz for this matter), movies must look really choppy to you! G3 (the G right under middle C) is 196 Hz. Can you "see" middle C?
4hodmt in reply to ewilhelmFeb 28, 2010. 1:24 PM
You can see flicker well into the KHz if it's a point source and you move your eyes fast enough.
sysadmn in reply to ewilhelmJan 9, 2007. 7:24 AM
Is it possible that there is a beat frequency effect between the 190 Hz and 60Hz incandescent or fluorescent lighting? I know 60, 70, and 72 Hz monitor rates bother me, but 80 and up are fine.
dantu in reply to sysadmnSep 30, 2010. 7:27 PM
Definitely - 60*3=180 so at 190hz there is a strong risk of a 10HZ beat going on... and a dimmed incandescent bulb (depending on the dimmer) may have more "flicker" than one running at full power (the power-output is closer to a square wave).

I've never noticed a flicker at 190Hz myself, but I used to have an old monitor that would drive me crazy at "90hz" that wasn't quite 90hz and had about a 1hz beat; 75 was fine.
Fake_Name in reply to ewilhelmOct 24, 2006. 10:20 PM
It's kind of like the "fluorescent light flicker" thing. Also, the lower the duty cycle, the more visible the flicker. Movie theatres give me a headache, for the same reason, I suspect.
bamamike says: Jan 27, 2008. 3:01 PM
personally i like the lamp a lot better than the light. that reflective surface is awesome.
mori says: Nov 22, 2007. 5:40 AM
Oooo i'm so close; the circuit is made, the programmer is built.
I've got it working without the nonlinear code; but I'm getting compile errors when running the makefile. :(
I suspect they've changed the codebase of the reference files.
downloading the latest avr-gcc, and comiling using the make files:
make -f makefile.txt
gives me the following error:
Google search returns a couple of germans who've had similar problems but it looks like they didn't have resolution.

C:\Users\Brian\Documents\atmel>make -f makefile.txt
avr-gcc -g -Wall -O2 -mmcu=atmega8 -c -o pwm_int.o pwm_int.c
In file included from pwm_int.c:21:
c:/progra~1/winavr-20070525/bin/../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete. Use <avr/interrupt.h>."
pwm_int.c: In function 'ioinit':
pwm_int.c:88: warning: implicit declaration of function 'timer_enable_int'
avr-gcc -g -Wall -O2 -mmcu=atmega8 -Wl,-Map,pwm_int.map -o pwm_int.elf pwm_int.o -lmpwm_int.o: In function `ioinit':
C:\Users\Brian\Documents\atmel/pwm_int.c:88: undefined reference to `timer_enable_int'
make: *** [pwm_int.elf] Error 1
gskerbitz in reply to moriDec 26, 2007. 7:59 AM
Add #include to pwm_int.c after the math.h line. HTH.
mori in reply to moriNov 22, 2007. 6:28 AM
tried every version of avr-gcc back a couple of years, with mixed results; nothing quite as neat as the error I reported. Any chance you could help me out ewil? Brian
ewilhelm (author) in reply to moriNov 23, 2007. 10:09 AM
Here's my entire "alarm clock code" folder. Maybe something in it will help? As I've written before, if I were to do this project again, I'd us an Arduino to simply the coding.
mori says: Oct 21, 2007. 9:49 PM
Thanks ewil. Your circuit kicks'a.
Just went to the electronics store and bought nigh on $150 of tools to build this.. :)
I'm fairly experienced building circuits, but horrible at modifying circuits; and i've never created a digital circuit. I'm hoping this might break me into the techniques.
I'm finding it hard to read the circuit diagram however. The text is nigh on unreadable; even after clicking the "i".
Also.. having tried to decifer the component list:
Are they 1W or 3W stars?
What wattage are the resistors?
Will 1 watt voltage regulator do?
I could only get a 24V 1000ma power supply. Do I need to modify the circuit at all?
Also I couldn't get a hold of an optoisolator.. "discontinued" aparently; i'll get one online. Whats the purpose of this component? Simply to isolate it from the other circuit?
I've never used a buckpuck. There are options i've got no idea about; No dimming, Dimming with internal pot, Dimming with external pot; Also flying lead option. re: http://www.cutter.com.au/proddetail.php?prod=cut131 Too many options! heh.

Thanks; i'm really lost.

Brian
mori in reply to moriOct 21, 2007. 9:52 PM
Apollogies, I see there is an attachment link for the schematic now. All other questions still apply.
ewilhelm (author) in reply to moriOct 22, 2007. 10:23 AM
Forgive me for saying this, but if you're having trouble determining the wattage of the resistors, you might want to try a few simpler projects before diving into this one. That said, it is good to always do things just above your ability so you can learn the most.

As mentioned here, I used Luxeon III's, which are 3 watts. The wattage of the resistors doesn't matter because they are not being used as power (dissipating) resistors. The voltage regulator only powers the Atmel, which draws far less than 1 watt. A 24 V power supply will limit the total number of LEDs you can drive, because they are driven in series and the total voltage of the system has to be greater than the combined drop across all the LEDs. The optoisolator prevents this circuit from affecting the circuit in the Soleil alarm clock.

If I were to do this project again, I would probably use an Arduino to avoid dealing with the Atmel programmer directly.
mori in reply to ewilhelmOct 22, 2007. 3:43 PM
Thanks ewil. The research I did yesterday answered most of my questions. However I don't have a brains trust to check with, so I left the question alive. Thanks very much for the oppertunity to break into digital eletronics! :) Great circuit. I'll let the thread know if the circuit works out.
ewilhelm (author) in reply to moriOct 22, 2007. 7:20 PM
I'm looking forward to your results!
sysadmn says: Jan 9, 2007. 7:31 AM
Which programmer is this - it's an ATMEL, but which? Looks like it has everything but the kitchen sink! Is it also a development board / emulator?
ewilhelm (author) in reply to sysadmnJan 10, 2007. 7:33 PM
KoolKat says: Oct 22, 2006. 9:31 PM
I think it's cool.
menaceX says: Apr 6, 2006. 7:03 PM
A couple questions, what is the purple box? Is the 5v regulator powering the atmel? Would attaching the optocoupler across the speaker of a regular alarm clock have the same effect? (assuming I was going to remove the speaker) Thanks for putting your project up, looks great!
radiorental says: Apr 3, 2006. 10:54 AM
for the less technically astute. You can use the open source Day application to display any instances of Sunrise through the Window API.
furbobble says: Apr 3, 2006. 7:26 AM
Paint your lamp a primary color and you've might have the worlds largest milton bradley Sorry! piece.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!