SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By TheCraiggers
#110569
http://www.amazon.com/BioBrite-Sunrise- ... 178&sr=8-4

Perhaps you've heard of these devices, and perhaps you have not. Basically, it's little more than a normal bedroom alarm clock, but it has a lightbulb inside the enclosure that gradually begins to brighten 30 minutes before the alarm goes off. It sounds weird, but having experienced one firsthand a few years ago, I can attest they do help me wake up easier. Problem is, I don't want to spend over $100 for what amounts to a cheap alarm clock, a lightbulb, and a dimmer. I figured I could make it better and cheaper myself.

I first thought about just using a stepper motor connected to a simple dimmer switch from the hardware store, but that seems really wasteful to me. The attractiveness to this method is I already have most of the parts I need, and understand the technology.

My second thought, and what I've come here for help with, is to use those new fancy super bright Luxeon Rebel LEDs. However, from looking at the datasheets, it doesn't look like they are meant to be left constantly on for a half-hour. It seems like I would need a monster of a heatsink to run them that long. Also, I'm a little hesitant on the coloring- should I go with a RGB configuration and try to get the color just right myself, or should I just go with a warm-white? Will one set be enough to light up the room from my nightstand? Questions, questions, questions.

I'm interested in any thoughts you all might have on this, especially on the Luxeon LEDs, since I've managed to find out very little about them in my own research. Thanks.
By glassfog
#110575
The Luxeons are nice but they are stupid bright and they draw upto 350mA. You really need the mounting and heatsinking hardware to make these beauties worthwhile, the costs add up.

You might consider http://www.sparkfun.com/commerce/produc ... cts_id=531 or something like it ; 20mA max draw. Simpler to add a couple of smaller leds with limiting resistors, cheaper too.

Just a thought.
By bcgrown
#110576
TheCraiggers wrote:http://www.amazon.com/BioBrite-Sunrise- ... 178&sr=8-4

Perhaps you've heard of these devices, and perhaps you have not. Basically, it's little more than a normal bedroom alarm clock, but it has a lightbulb inside the enclosure that gradually begins to brighten 30 minutes before the alarm goes off. It sounds weird, but having experienced one firsthand a few years ago, I can attest they do help me wake up easier. Problem is, I don't want to spend over $100 for what amounts to a cheap alarm clock, a lightbulb, and a dimmer. I figured I could make it better and cheaper myself.

I first thought about just using a stepper motor connected to a simple dimmer switch from the hardware store, but that seems really wasteful to me. The attractiveness to this method is I already have most of the parts I need, and understand the technology.

My second thought, and what I've come here for help with, is to use those new fancy super bright Luxeon Rebel LEDs. However, from looking at the datasheets, it doesn't look like they are meant to be left constantly on for a half-hour. It seems like I would need a monster of a heatsink to run them that long. Also, I'm a little hesitant on the coloring- should I go with a RGB configuration and try to get the color just right myself, or should I just go with a warm-white? Will one set be enough to light up the room from my nightstand? Questions, questions, questions.

I'm interested in any thoughts you all might have on this, especially on the Luxeon LEDs, since I've managed to find out very little about them in my own research. Thanks.
You could use a microprocessor PWM output or a 555 PWM circuit to drive a triac using a zero-crossing driver/optocoupler like the ones from Fairchild. The zero-crossing driver will keep your EMI down by preventing abrupt transitions in the AC waveform.

The colour is really just personal preference I think, but you may be able to get higher light output from a plain white LED. For high output you will need a decent heatsink. The goal is to keep the LED junction temperature below whatever the manufacturer recommends because otherwise it won't last as long. Follow manufacturer recommendations as always.
By TheCraiggers
#110578
bcgrown wrote:You could use a microprocessor PWM output or a 555 PWM circuit to drive a triac using a zero-crossing driver/optocoupler like the ones from Fairchild. The zero-crossing driver will keep your EMI down by preventing abrupt transitions in the AC waveform.
Sadly, I'm more of a programmer than a circuit designer, so please excuse any stupid questions. Still, with a bit of reading I managed to figure out just what the heck you just said. ;-)

So, just to make sure I understand this correctly, your idea was to use a triac as a dimmer for the lightbulb? This is something totally new to me and I'll have to do more reading to know how these things work, but currently this is an interesting lead as it sounds like a much better method of controlling the brightness of a lightbuilb than the kludgey way I was first thinking of. Also, they seem pretty cheap, which is always good.
By TheCraiggers
#110579
glassfog wrote:The Luxeons are nice but they are stupid bright and they draw upto 350mA. You really need the mounting and heatsinking hardware to make these beauties worthwhile, the costs add up.

You might consider http://www.sparkfun.com/commerce/produc ... cts_id=531 or something like it ; 20mA max draw. Simpler to add a couple of smaller leds with limiting resistors, cheaper too.

Just a thought.
Yeah, all the 'extras' that the Luxeons seemed to require were a big turnoff for me; I don't know why I discounted an array of smaller (but still quite bright) leds. I wonder how many I would need to match the output of a regular lightbulb.

I suppose the best thing about my project is that I have plenty of space to work with here and if I wanted to cram an array of 100 leds into a box I could.
By bcgrown
#110582
TheCraiggers wrote:
bcgrown wrote:You could use a microprocessor PWM output or a 555 PWM circuit to drive a triac using a zero-crossing driver/optocoupler like the ones from Fairchild. The zero-crossing driver will keep your EMI down by preventing abrupt transitions in the AC waveform.
Sadly, I'm more of a programmer than a circuit designer, so please excuse any stupid questions. Still, with a bit of reading I managed to figure out just what the heck you just said. ;-)

So, just to make sure I understand this correctly, your idea was to use a triac as a dimmer for the lightbulb? This is something totally new to me and I'll have to do more reading to know how these things work, but currently this is an interesting lead as it sounds like a much better method of controlling the brightness of a lightbuilb than the kludgey way I was first thinking of. Also, they seem pretty cheap, which is always good.
A TRIAC is basically a bidirectional switch that can be turned on by applying a voltage to its gate. Just the thing for controlling AC current. In fact your hardware store dimmer may have a TRIAC inside.

The driver/optocoupler provides isolation so that your sensitive micro doesn't get damaged by transients from the AC side of the circuit, and puts out the right voltage to drive the gate. So you apply a voltage to the input side of the driver and it waits till the AC voltage hits a zero-crossing, then turns on the triac until you remove the voltage from the input.

Let's say you want a 50% duty cycle, then you turn the optocoupler on for 1 cycle, then off for 1 cycle. So if you're on 60Hz, on for 16ms and off for 16ms. For 25% you turn it on for 1 cycle and off for 3, etc.
By TheCraiggers
#110586
bcgrown wrote:Let's say you want a 50% duty cycle, then you turn the optocoupler on for 1 cycle, then off for 1 cycle. So if you're on 60Hz, on for 16ms and off for 16ms. For 25% you turn it on for 1 cycle and off for 3, etc.
How bad is the flickering / humming noise with this method I wonder?

Thanks for all your help so far bcgrown. If anything, I've learned something new today.
By tecoist
#110590
bcgrown wrote:Let's say you want a 50% duty cycle, then you turn the optocoupler on for 1 cycle, then off for 1 cycle. So if you're on 60Hz, on for 16ms and off for 16ms. For 25% you turn it on for 1 cycle and off for 3, etc.
I've never seen a dimmer built like this. In your example, if you try to get 25% duty cycle, you also end up powering the lamp at 15Hz, which will indeed flicker most impressively (in the US and similar countries; in 50Hz-land, 12.5Hz, which is Even Less Fun (tm)).

Instead, triac dimmers work by turning the triac on earlier or later in each half-cycle. Full bright, you turn the triac on pretty much all the time. Half-bright, turn it on half way through the half-cycle, and so on. To reduce EMI, flicker, and buzzing, there's usually an inductor-capacitor low-pass filter on the incoming power (series inductor feeding capacitor across the triac). If you google triac dimmer, I expect you can find some examples.
bcgrown wrote:How bad is the flickering / humming noise with this method I wonder?
With the inductor-capacitor filter, not so bad. There are fancier ways to dim, but you've probably seen triac dimmers in action, because that's the most common household dimmer (if the dimmer says "incandescent only," it's probably a triac dimmer).
By bcgrown
#110592
tecoist wrote: I've never seen a dimmer built like this. In your example, if you try to get 25% duty cycle, you also end up powering the lamp at 15Hz, which will indeed flicker most impressively (in the US and similar countries; in 50Hz-land, 12.5Hz, which is Even Less Fun (tm)).

Instead, triac dimmers work by turning the triac on earlier or later in each half-cycle. Full bright, you turn the triac on pretty much all the time. Half-bright, turn it on half way through the half-cycle, and so on. To reduce EMI, flicker, and buzzing, there's usually an inductor-capacitor low-pass filter on the incoming power (series inductor feeding capacitor across the triac). If you google triac dimmer, I expect you can find some examples.
You're absolutely right. I had a bit of a brain fart and was thinking of the circuit I used to control a heater.
By anhingus
#110596
programmer?

use a digital pot to control a string of flashlight bulbs with an LM317 voltage regulator with either voltage or current config. bulbs are a dime, regulator a quarter.

or, maybe, same idea but with an LM3914 dotbar driver, do a dac to run voltage from 0 - 5 volts. 3914 can fire transistors to light 10 bulbs in sequence. use 2, run 20 bulbs.

walwart for power.

all sorts of aesthetic possibilities.
By TheCraiggers
#110617
anhingus wrote:programmer?

use a digital pot to control a string of flashlight bulbs with an LM317 voltage regulator with either voltage or current config. bulbs are a dime, regulator a quarter.

or, maybe, same idea but with an LM3914 dotbar driver, do a dac to run voltage from 0 - 5 volts. 3914 can fire transistors to light 10 bulbs in sequence. use 2, run 20 bulbs.

walwart for power.

all sorts of aesthetic possibilities.
Another interesting direction I didn't think of. Something tells me that lighting 1 out of 10 bulbs is not the same as lighting 10 bulbs at 10% power, however. I think I'm sold on the idea of using multiple, smaller lights though. Be they LEDs or incandescent- the nice thing about them is one can blow out and I'll still wake up.

This thread has taught me just how little I know about electronics. It is humbling, to say the least. Thanks to everyone taking the time to give me ideas and teach me the best ways of doing this.

I really should have taken a circuit design class in school. :/
By anhingus
#110634
actually not much of a shortcoming at all.

the microcontroller - from one point of view - is pretty much an interface device using software to replicate hardware function at a discrete level.

your project is eminently doable with an mcu [cheap, as in picaxe] and there is lotsa stuff on the web for using 10-cent transistors as switches to turn on 5-volt incandescent lights.
By TheCraiggers
#110752
So I'm liking the 'multiple cheap LED approach' more and more. Low heat / power, probably will never have to replace them, and also pretty cheap. Sparkfun has a bag of 100 for $30 which is way less than the Luxeons I was originally tempted on. I just hope they will be bright enough to light up the room.

After reading some examples and tutorials on stringing together LEDs, I now understand that the wiring is not always as simple as it looks; doing it wrong will cause some not to light up at all and/or giving some more current then they should have thus lowering their life. That all said, I'm thinking of going with the LM3914 IC mentioned above to take care of most of that stuff to make it easier (and hopefully require less soldering).

One more big question though- the LM3914 can do its own dimming by (if I'm reading the spec sheet right: page 8 on http://www.national.com/ds/LM/LM3914.pdf) adjusting the voltage on a reference pin. Anhingus mentioned using a DAC to accomplish this, but wouldn't the Arduino's PWM pins be able to do this as well? Or are they not analog enough?