LED Fade in and out - timed.

thatoneguy

Joined Feb 19, 2009
6,359
Thanks. I'll have a look at those. The idea is to fade up. Stay on until power removed around 11 hours later when it is needed to fade down.
...
Where will the power to light the LEDs come from after the power is removed? Will there be a signal input for "power down", and a separate power source to actually light the LEDs?
 

Thread Starter

Roxy2

Joined Jul 4, 2012
26
Yes. The LEDs will come from a separate feed to that of the control circuit. . If you look at the picture of the 'starting point' circuit I posted at the start of this thread and replace the switch with a relay on a timer you will see the original concept.
 

Ron H

Joined Apr 14, 2005
7,063
Would it be OK if your brightness steps were quantized? For example, what if the brightness varied from zero to 100% in 128 steps (0.8% per step)? 256 steps is possible for a little more money.
I have an idea for a pretty simple, cheap solution that doesn't involve programming, or long time constants, which may have capacitor leakage issues.
 

Thread Starter

Roxy2

Joined Jul 4, 2012
26
Would it be OK if your brightness steps were quantized? For example, what if the brightness varied from zero to 100% in 128 steps (0.8% per step)? 256 steps is possible for a little more money.
I have an idea for a pretty simple, cheap solution that doesn't involve programming, or long time constants, which may have capacitor leakage issues.
Sounds good. I'm listening :)
 

Ron H

Joined Apr 14, 2005
7,063
Sounds good. I'm listening :)
I haven't tested this, or even simulated it completely, because I don't have an AD5220, or even a spice model for it.
It is basically a 128 step digital up/down pot, controlled by a slow oscillator (U4). The pot's output is compared with a 480Hz (nominal) PWM triangle wave, and the resulting duty cycle modulated pulse stream drives a logic-level MOSFET, which in turn drives the LEDs.
The digital pot powers up at half scale when the +12V supply is turned on (resulting in 50% duty cycle), so I provided a fast clock switch which should allow you to get the LEDs to either full on or full off, depending on the position of the fade direction switch, within a few seconds.
Once the pot gets to full scale at either end, it stays there until the fade direction switch is changed.

Maxim has a digital pot that I like better, but it only comes in a leadless (flip-chip) surface mount package.

EDIT: I deleted the schematic because of errors. See post #29 for a schematic.
 
Last edited:

thatoneguy

Joined Feb 19, 2009
6,359
Yes. It provides a stable +5V supply for all the logic circuits. Be sure to add 0.1μF/100nF caps across each IC's power pins (as close as possible to the IC) for minimum interference.
 

Ron H

Joined Apr 14, 2005
7,063
Ron, do you know a rough fade time for this?
With the values shown, it's about 6 minutes to 17 minutes, depending on the setting of the fade time pot. These limits can vary, depending on component tolerances, mainly C2.
Note that there will be a little dead time at the beginning of each fade (up and down), because we want to make sure that the voltages at the ends of the pot are high enough, and low enough, to ensure that the LEDs are full on, and full off. This winds up wasting a little range on the pot. I assumed that you will have about 100 useful steps, out of the 128 possible. If you want to add two more pots and a dual op amp IC (8 pin DIP), we can make pretty much full use of the pot's range. I think this would be a good idea, because the pot's absolute resistance tolerance is ±30%, and its tempco is 800 ppm/°C. The op amps can make these specs irrelevant, and get rid of the delayed fade starts. You will still need a couple of trim pots to make up for resistor tolerances.

I'm attaching that option here.
 

Attachments

Last edited:

Thread Starter

Roxy2

Joined Jul 4, 2012
26
With the values shown, it's about 6 minutes to 17 minutes, depending on the setting of the fade time pot. These limits can vary, depending on component tolerances, mainly C2.
Note that there will be a little dead time at the beginning of each fade (up and down), because we want to make sure that the voltages at the ends of the pot are high enough, and low enough, to ensure that the LEDs are full on, and full off. This winds up wasting a little range on the pot. I assumed that you will have about 100 useful steps, out of the 128 possible. If you want to add two more pots and a dual op amp IC (8 pin DIP), we can make pretty much full use of the pot's range. I think this would be a good idea, because the pot's absolute resistance tolerance is ±30%, and its tempco is 800 ppm/°C. The op amps can make these specs irrelevant, and get rid of the delayed fade starts. You will still need a couple of trim pots to make up for resistor tolerances.

I'm attaching that option here.
Best I get shopping! Thanks
 

Thread Starter

Roxy2

Joined Jul 4, 2012
26
ok. havent got round to Rons design yet but did have a go at the original design I posted, well, i cant get the leds to light at all. I have found a similar circuit elsewhere and the resistors are different within the circuit. Going to try this one as I already have most of the components. But need to change the transistor for a higher rated one. Do you think the BD679 will suffice in place of Q1 as listed? (As a reminder, Im running in parallel, 3 lots of 3x1w led bank with relevant resistor per bank, but will suffice running 1 bank of 3x1w with resistor, as per the original drawing)
 

Attachments

Last edited:

Ron H

Joined Apr 14, 2005
7,063
ok. havent got round to Rons design yet but did have a go at the original design I posted, well, i cant get the leds to light at all. I have found a similar circuit elsewhere and the resistors are different within the circuit. Going to try this one as I already have most of the components. But need to change the transistor for a higher rated one. Do you think the BD679 will suffice in place of Q1 as listed? (As a reminder, Im running in parallel, 3 lots of 3x1w led bank with relevant resistor per bank, but will suffice running 1 bank of 3x1w with resistor, as per the original drawing)
That won't work with a BJT, because the beta is too low. With 1 Amp of peak current, even if you had β=100 (which you won't), the base current would be 10mA. The other problem with that circuit and your LEDs is that the LEDs are cut off except when the voltage on the cap nears full charge (assuming you could eliminate base current).
I think the best analog solution is with a voltage controlled current source. It turns out you can do this, and the peak dissipation of your transistor (MOSFET, Darlington NPN, etc) will only be about 3W, which is manageable with a reasonably-sized heatsink. It will require some slightly exotic parts, like a 100Meg resistor, a 3.3uF polyester (mylar) capacitor, and a CMOS op amp with rail-to-rail output capability.
Note that this circuit produces linear current ramps, NOT exponential, as your most recent circuit attempts to do.
 

Attachments

Thread Starter

Roxy2

Joined Jul 4, 2012
26
Ok, just for info the circuit at post 32 above did work and I swapped out the transistor for the BD679 and it worked too. Ok the fade times aren't what I was after, its giving aprox 3 up and 5 down. Ive got a couple 2200uf caps lying around so might try them to see the effect. More out of interest than anything else.
 

Ron H

Joined Apr 14, 2005
7,063
Ok, just for info the circuit at post 32 above did work and I swapped out the transistor for the BD679 and it worked too. Ok the fade times aren't what I was after, its giving aprox 3 up and 5 down. Ive got a couple 2200uf caps lying around so might try them to see the effect. More out of interest than anything else.
Yeah, it will work for short times. "Work" to me means it will do everything you want. If you get it to do that, please post your schematic with all parts values.
 

KrisBlueNZ

Joined Oct 17, 2012
111
Ron, your second 555 is wired wrong. You've got the 15k resistor on the trigger input; I assume you want to use the output. A designer's equivalent of a typo :)
 

Ron H

Joined Apr 14, 2005
7,063
Ron, your second 555 is wired wrong. You've got the 15k resistor on the trigger input; I assume you want to use the output. A designer's equivalent of a typo :)
Good eye, Chris.
I corrected the schematic in post #29, and deleted the one in post #25.
 
Top