LED Ramp Circuit

Thread Starter

FrozenMel

Joined Aug 23, 2011
34
Hi,
So I've been looking around the forum trying to figure out how to make an LED ramp circuit and so far, the 555 PWM generator circuits seem the best fit.

However, my requirements are a little different. I need an LED Ramp circuit that takes a group of LED's from no light to full and stay at full until turned off. The ramping can't have any human interface and activates by itself. ie, you turn a switch on and the LED's slowly get brighter over say...5 seconds and stay bright until you turn the switch off. I would also like a turn around of less than 30 seconds after turn off so the LED's will ramp again if the light has been off for 30 seconds but not if it hasn't been turned off for 30 seconds.

If possible, I would like to avoid programming anything and keep it cheap.
 

iONic

Joined Nov 16, 2007
1,662
For the LED ramping the 555 PWM generator would be the complicated method as it would require manual adjustment via a pot to increase the LED brightness over time. The 555 will work for the 30sec portion of your circuit.
 

Thread Starter

FrozenMel

Joined Aug 23, 2011
34
Yeah, from what I understand, the 555 will do everything I need except the adjustment. Any suggestions to get around it?
 

elec_mech

Joined Nov 12, 2008
1,500
Hi Frozen Mel,

Welcome to the forum!

Okay, let's step through your requirements:

1) User turns on device by:
a) pushing a momentary button?
b) flipping a toggle switch/pushing a latching button?

2) Once device is turned on, LEDs go from off to full brightness in 5 seconds?

3) Once full brightness is achieved, LEDs stay on until switch is turned off.

I would also like a turn around of less than 30 seconds after turn off so the LED's will ramp again if the light has been off for 30 seconds but not if it hasn't been turned off for 30 seconds.
4) What does the above mean? Do you want:
a) A light sensor to turn on and off the LEDs at a given rate when the switch is on?
b) The LEDs continue to turn on after the switch is turned off?
c) Other?

Is it imperative you have a true ramp or would you consider incrementing the LEDs' brightness in steps? For instance, 10% in half a second, 20% in one second, and so on?
 

Thread Starter

FrozenMel

Joined Aug 23, 2011
34
Hey elec_mech thanks for the welcome

As to your questions,

1) The LED's turn on when a switch is flipped to pass power to the circuit
2) Yes, when the switch is flipped, the LED's go from off to full power in 5 seconds (the time doesn't really matter, just longer than 1 or 2 seconds)
3) What I meant by the 30 seconds is that if the switch is flipped on then off and, 30 seconds later,on again, the LED's will ramp again. So for example, if the LED's were capacitors I wanted charged, they would discharge by at most 30 seconds after power was cut so they could be charged again. But, the LED's DON'T dim when power is cut. They just turn off.

As for the true Ramp, it doesn't matter if they are incremented in steps. Preferably not, but if the circuitry is simpler than a true ramp, that's fine.
 

elec_mech

Joined Nov 12, 2008
1,500
FrozenMel,

Okay, I almost understand what you want to do. I'm still terribly confused by the last part.

Keeping it simple for my part, if the power switch is turned on then immediately off, the LEDs might start to come on, in the blink of an eye, if at all.

If you flip the power switch on 5 seconds, 30 seconds, or two hours later and leave it in the ON position, the LEDs will ramp up to full brightness in roughly 5 seconds and remain there until the power switch is turned off.

When power is cut, LEDs turn off immediately.

This is how I envision operation at this point. I don't understand what you're describing with pretending the LEDs are capacitors. Do you want the LEDs to go from bright to dim to off under certain conditions or something else?

If possible, explain, step-by-step, exactly what you want to happen when.

Example:

1) User flips power switch on
2) If power switch is turned off in the next x seconds, THIS happens. If not, then THAT happens.
2a) THIS (explanation of what is supposed to happen)
2b) THAT: LEDs go from dim to full brightness in five seconds then stay on until power switch is turned off.
 

Thread Starter

FrozenMel

Joined Aug 23, 2011
34
Alright, I can see how this could be confusing but step by step, but I don't need the 30 second thing to work.

1) User flips power switch on
2) If power switch is turned off within 5 seconds, the LED's turn off without reaching Full Intensity
2a) If not, LED's ramp to Full Intensity and stay on until switch is flipped off
3) If switch is flipped off, LED's go out without dimming
4) If switch is flipped on, before 30 seconds have passed after LED's were turned off, LED's Do Not Ramp but turn on at full intensity
4a) If switch is flipped on, after 30 seconds have passed after LED's were turned off, LED's Ramp to Full Intensity


That's they way I envisioned it, but all it really needs to do is Ramp to full intensity every time the switch is flipped on. And turn off when the switch is turned off without dimming.
 

Thread Starter

FrozenMel

Joined Aug 23, 2011
34
From what I understand from the datasheet (correct me if I'm wrong) is the output is a linear voltage ramp that has a specific period, ie. it repeats going from 0V to what looks like 3.3V. To Ramp a LED, you need a PWM signal that has a duty cycle that goes from 0%-100% like the Pulse Width Modulator App note in the datasheet.

The problem with the one in the datasheet is that it needs an input signal to adjust the duty cycle of the PWM signal and I need a circuit that doesn't need an input signal.

And this just gave me an idea, Could I use the PWM circuit design in the datasheet and use a Cap that slowly charges up to max as the input modulation signal? I realize it wouldn't be linear but could it work? I don't know how long it would take to discharge the cap if it is set to charge in 5 seconds.
 

iONic

Joined Nov 16, 2007
1,662
From what I understand from the datasheet (correct me if I'm wrong) is the output is a linear voltage ramp that has a specific period, ie. it repeats going from 0V to what looks like 3.3V. To Ramp a LED, you need a PWM signal that has a duty cycle that goes from 0%-100% like the Pulse Width Modulator App note in the datasheet.
If you look at Fig. 13 of the datasheet the top trace is the momentary switch, The middle trace is the period set by Re and C, and the bottom trace is the ramp voltage which happens to be linear. It only repeats when the momentary switch(trigger pin) is pressed again.

A "Simple" Fade in LED. It does however fade out also, but am not sure why this is an issue.

 
Last edited:

Thread Starter

FrozenMel

Joined Aug 23, 2011
34
See, that is all I thought I needed to do but I was reading around and it sounds like a PWM signal to turn a power transistor on and off to flicker the LED's above the visual range at like 1kHz is the best way to modulate the brightness. With that, I was thinking a circuit like the one attached would work as long as I adjusted the LM555 output to operate the TIP31 and all the unmarked resistor values are correct. The Vcc I have available is 8V which works for the LEDs and I think works with the LM555.

To adjust the ramp time to 5 seconds, the R and C attached to the MOD in would have to be 50kOhms and 100uF. The ramp would be nonlinear but I don't think that matters.

PS. I apologize for the Paint circuit design. I don't have a CAD tool on hand.
 

Attachments

iONic

Joined Nov 16, 2007
1,662
To adjust the ramp time to 5 seconds, the R and C attached to the MOD in would have to be 50kOhms and 100uF. The ramp would be nonlinear but I don't think that matters.

PS. I apologize for the Paint circuit design. I don't have a CAD tool on hand.
This is why I created a 10 second delay as the LED's will see 80% of their brightness within the first 1/3 of the charging curve, thus making the ramping appear a bit more linear for 5 seconds. By the time the LED's reach 80% of their brightness you probably not see much change thereafter!

So fiddle with the RC and choose what you like best.
 

Thread Starter

FrozenMel

Joined Aug 23, 2011
34
Hey, So I read through Bill's book again and it seems like the throbbing LED setup is close to what I need but different enough that I don't know how to adjust it's design offhand.

I did figure that I do need to use a PWM signal for my purposes because of the large number of LED's I intend to drive. As such I came up with the schematic attached which should create a PWM output that ramps from 0 to 100& duty cycle (or whatever the highest value the 555 can get to) with an input of only power. This in turn will drive a TIP31 power transistor which will allow power to flow through the LED's which are offboard connected through J3 to ground.

What I don't know now is what to put between the output of the second 555 to drive the TIP31. I know I need a resistor of some size but I don't know how to size it. Suggestions?

For those who want to know, I found the PWM circuit here
 

Attachments

Wendy

Joined Mar 24, 2008
23,415
I'd be glad to help design something, but I'm still not quite clear as to what you are trying to do. Lets go through the specifics. If you answered this elsewhere I missed it.

1. How many LEDs?

2. What is their color, and what is their dropping voltage?

3. What is the power supply voltage?

4. I assume 20ma current per LED. If this is wrong what is the LED current (per LED)?

5. You mention you want this circuit to ramp up by itself and hold, what is the trigger? Turning the power supply on?

If I have the right of it I had a similar thread about 6 months ago. Problem was, English wasn't the gentlemans first language, so we went round and round a few times before we had it settled out. If I ask you to explain something in a different way a second time that is why.

You will probably need a 555, a LM393 (dual comparitor), a NPN and PNP transistor (one of each, not critical, but I generally use a 2N2222A and a 2N2907A or PN2222A and PN2907A), and a N channel MOSFET (also not critical, Radio Shack sells an inferior example that will work just fine).

You may be able to get rid of the NPN and MOSFET transistors, depending on actual current draw. I'll wait for more information before I draw something up.

If you look at the parts list I just named you will see it is pretty generic to the designs in the article. (A book! Really? THANK YOU! :D )
 
Last edited:

Thread Starter

FrozenMel

Joined Aug 23, 2011
34
Alright so,

I am using 26 LED's. 14 at 2.2V and 12 at 3.4V with individual currents of 20mA. 10 are red, 4 yellow, green, blue and white.

They are wired as in the attachment. If you know what the diode is there for let me know cuz I can't figure out why.

Power supply voltage is 8V.

The trigger is turning the power supply on.

And yes the old thread is similar. The only thing is I don't want a circuit that goes on and off repeatedly. Just something that goes from 0 to 100 and stays at 100 until power is turned off.

If you can figure out a way to do it, can you also explain whats going on in the circuit? I want to make this a learning experience.

Also, is there something wrong with the circuit I was thinking of using for the ramp?
 

Attachments

wayneh

Joined Sep 9, 2010
17,496
I believe D1 is there to just drop voltage by ~0.7V. Why the current limiting resistors aren't just larger instead, one can only guess. But you don't need a diode in series with two other diodes. Hmmm... Unless there is some concern about surviving reverse voltages.
 

Thread Starter

FrozenMel

Joined Aug 23, 2011
34
I thought it had something to do with circuit protection but the drive circuits are all the same for each color and the red and yellow led's have the same specs. Plus, the resistors are overlarge for the voltages. They only need 90ohm resistors instead of 120 or 150. It could be that they diode in conjunction with the larger resistor keeps the red LEDs from getting too bright and outshining the others but I don't know.
 

Wendy

Joined Mar 24, 2008
23,415
Actually red LEDs tend to be the most robust and toughest of the breed. Blue and white LEDs (which are actually the same LED, white is a blue LED with white phosphor on it) can take the least amount of back voltage, and tend to be a bit more current sensitive.

The diode may be there to reduce the amount of heat the resistors generate by dropping the voltage a little.

How stable is the power supply voltage? This is important. A simple 9V battery can drop to 7VDC fairly quickly and hold there.

As it turned out the other thread wanted it to fade in when it was turned on and fade out when it was turned off. Your circuit wants it to fade in when it is turned on, then simply turn off when it is turned off, correct?

Alright so,

I am using 26 LED's. 14 at 2.2V and 12 at 3.4V with individual currents of 20mA. 10 are red, 4 yellow, green, blue and white.

They are wired as in the attachment. If you know what the diode is there for let me know cuz I can't figure out why.

Power supply voltage is 8V.

The trigger is turning the power supply on.

And yes the old thread is similar. The only thing is I don't want a circuit that goes on and off repeatedly. Just something that goes from 0 to 100 and stays at 100 until power is turned off.

If you can figure out a way to do it, can you also explain whats going on in the circuit? I want to make this a learning experience.

Also, is there something wrong with the circuit I was thinking of using for the ramp?
The red LEDs drop 2.2V (qty 10), you don't have the voltages for the green or yellow (qty 8, I'll assume 3.0VDC), and the blue and white are 3.4V (qty 8).

The circuit you have looked up in post #14 is PWM only, no ramp fuction exists. It is also way overcomplicated for what you want to do. The first half is a simple square wave generator, an astable multivibrator in the jargon of electronics, which feeds a simple monostable that generates a fixed width pulse. As you vary the frequency of the first the second has a constant width on time with variable gaps between the pulses. This is generally not a good way to make a stable PWM signal.

It is overcomplicated because the first oscillator can do this function by itself. But in neither case is there a ramp function.

The circuit shown in Figure 5.3 in my article is probably the best out there. It may look complex, but it is actually very simple, the 3 resistors feeding the comparator can be exchanged with an RC network. I'm going to re-lay out the LEDs as put it into context with the PWM circuit. It'll take about a day or so.
 
Last edited:
Top