LED Strip "Fade to ON" / "Fade to OFF"

Thread Starter

Tonyr1084

Joined Sep 24, 2015
7,852
I have a 12VDC 2A power source to light a white LED strip (16 foot long). It came with a dimmer. Apparently it's a current control device. When I check for resistance through the fade control neg to neg I get about 10 meg ohms with a constant descending resistance regardless of where I set the slider. Measuring pos to pos I get 4.6Ω again, regardless of where I set the slider. Input side of the slider - I get an open reading between pos and neg. Same is true when checked at the output side of the slider. So this is not a simple variable resistance.

Checking with scope: At full dim (no light) I get a mostly square wave. As I increase the intensity (no load) I get nearly full 12 volts with some icicles dropping about a volt or two from the 12 volt rail.

Checking amperage: At full bright the lights are drawing 240mA (I'm only using two feet of the strips for lighting during Zoom meetings). At about half brightness the draw is 100mA. LED's light up with as little as 7mA. So I'm concluding that the slider is a current source control.

Here's what I want: Set the brightness to a suitable level (adjusted according to preference) and have a switch that simply switches it on or off. But I don't want sudden on and sudden off - I want to fade between OFF and whatever set brightness. So I'm looking for a circuit to replace the VCC (Variable Current Controller). Fade to ON can be 1 to 2 seconds, there's no need for precise control, and 2 to 4 seconds to fade to OFF when switched off.

Anyone point me in the right direction? Maybe a MOSFET used in the resistance region, since I'm not going to be drawing more than around 100mA? Alternative approaches are also welcome.

Thanks. TR

[edit] with load I clearly get PWM.
 
Last edited:

Audioguru again

Joined Oct 21, 2019
6,672
We do not know if your current meter can correctly measure the high frequency pulses of the squarewave. The actual maximum current might be much higher than you measured.

Simply adding a hot Mosfet in series with the LEDs might abruptly stop the squarewave generator circuit.
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
7,852
We do not know if your current meter can correctly measure the high frequency pulses of the squarewave. The actual maximum current might be much higher than you measured.

Simply adding a hot Mosfet in series with the LEDs might abruptly stop the squarewave generator circuit.
I'll accept that. First test was using the 10A section of the meter. Second test (no higher than 100mA reading) was on the 400mA test setup. It's an Extech, and I didn't spend a gob of money on it, so you're probably right.

OK, so what about a home brew circuit to control current to a preset level with the fade in fade out feature? Constant current devices are not anything I've ever built many of. My practical experience is practically none. Could find CC circuits, but the fade in and fade out feature is what I'm after.

And this is NOT something I absolutely must build. I keep my screen (computer) low as well as ambient light so that when I'm quiet I'm not being blasted with light in my face. But when I have something to contribute to the meeting I want to flip the switch and have the lights come up. When finished I want them to fade out. Sure, I can just slide the slider back and forth, but personal opinion is that looks cheesy.

Again, this is NOT something that must get built.
 

Irving

Joined Jan 30, 2016
3,843
No, its almost certainly PWM of a constant current source - there's no analog current control. Your mA reading is rubbish because its a pulsed current and not a sine wave assuming you were measuring AC mA. If you were measuring DC mA its some sort of average depending on how fast your meter samples, so pretty meaningless.

The only way to achieve your requirement6 is to replace the control circuit. You may be able to repurpose some of it if you do a tear-down and reverse engineer it...
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
7,852
Thank you. Since it's a working unit I won't be tearing it down. It's a plug-in unit so I can replicate the plugs (barrel connectors) and build a circuit around whatever device I want to build. Trouble is - I don't know how to approach this matter. I THINK I could use a big MOSFET and use it in the ohmic range. Slow charge the gate to get the rise in light level I want and slow discharge the gate to get the fade to off I want.

There's my trouble. While this might work - it's probably not a good solution. So I'm open to any ideas.

Thanks.
 

crutschow

Joined Mar 14, 2008
34,281
Since it's a working unit I won't be tearing it down
It will thus likely require a separate circuit with its own power supply.
In particular, to do a fade-out requires that the power be applied during the fade, so you can't just turn off your present controller for that.

So you might be able to add a light level and fader control at the output of the supply you have while always operating the supply at its maximum (DC?) output.
A search turned jup some faders that can do the fade, but none with adjustable light level when on.
I can gin up a circuit if you want to build your own.
 

Irving

Joined Jan 30, 2016
3,843
Fading a bank of LEDs with current control rarely works well. LED output isn't linear with current (mostly) and they certainly won't be in step.

The correct solution to this is simple. A low-end MCU, doesn't need to be anything more complex than a PIC, an Arduino is almost overkill, switches a MOSFET from its PWM output. A pot connected to an analog input sets the brightness level. A 'store' button logs that level into the MCU EEPROM. The on/off button then just ramps the PWM up & down to that level.

Thinking further, you don't even need a pot. Just one button. Press briefly for ON, press briefly for OFF, press and hold to cycle brightness, release to store the level.... simplicity is all!
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
7,852
Thanks all. I'm sure it's a simple matter of creating my own circuit.

The DC power supply is 12.4V (unloaded) at 2A. This supply is used to light a 16 foot long string of under-cabinet lights. Only, I'm just using 24 inches, not the whole 16 feet. So current isn't going to be demanding. Whether a push button or a switch, I just want it to ramp up when it's my turn and ramp back down when I'm done. The timing of when it's "MY" turn is simply (as I imagine) just a switch. Turn it on and the lights gradually increase to a comfortable light level. Turn it off and they slowly extinguish. The exact timing of this doesn't matter. 1 second, 5, 10 seconds - anywhere in that range. Prefer to ramp UP quicker than it ramps down. A few steering diodes on the control circuit should do just fine. And I have a stockpile of 555's if I go that route. PWM from 0% (or nearly) to 100% (or nearly) (( or somewhere in-between - depending on the desired light level, hence a limiting pot )).

Speaking of Zoom meetings, I have my next one in 45 minutes (from the time of this post).
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
7,852
The output on the PS is steady. No fluctuations no frequencies (that my scope can read). 12.4V. So it's not the supply that is modulating the current, it's the mid-line dimmer control. Let me bang out a drawing.
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
7,852
OK, here's whats on the table: As you can guess - I can plug the PS directly to the LED's. That gives me blindingly bright light strips. Each group of LED's (grouped in threes) has its own current limiting resistor. The dimmer is simply PWM. The amplitude doesn't change, only the duration of the duty cycle. Changing the duty cycle brightens or dims the LED's. Again, all I want to do is add a fade circuit with a switch. Switch it on - fade in. Off - fade out.
1618338955372.png
 

Bernard

Joined Aug 7, 2008
5,784
You might use SgtWookie's comparator PWM & add post #11 or add switch controlled R-C buffered with a Darlington transistor emitter follower?
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
7,852
@sghioto Thanks, but that's way more effort than I want to put into it. The voltage follower should be good enough. Since current is a function of voltage over resistance, with a fixed resistance, varying the voltage should work well enough. It may be as simple as a programmable regulator such as a 431 - but I don't know.

I've been somewhat busy with things around the house. Have a project the city inspector finally gave approval for. Had to jump through hoops of stupidity, but I got it there. Then last night we had a wind storm that blew my elderly neighbor's flat roof membrane half off. Have been busy helping with getting that back in place and covered so that the rain and snow don't cause any further damage.

I WILL give this project a try or two, but it's just not that important that I need to dedicate a µC to it or build some elaborate circuit. Simple is - um - well, it's simple. That's how I like it. KISS! Keep It Stupidly Simple! And if it gets any more complicated than "Simple" then I'll just fade the lights on and off manually. After all, CV19 is eventually going to go away and we won't be having Zoom meetings. Maybe - at the outside - another six months. After that - this will all be a moot point.

Thanks all for the good suggestions thus far.
 

crutschow

Joined Mar 14, 2008
34,281
Below is a modification of sghioto's circuit in post #11.
I added some op amp gain and a Sziklai Pair at the output to get the maximum output near 11V.
It is connected between the PWM output and the LEDs to vary the amplitude of the PWM output signal without affecting the voltage to the PWM controller.
That will vary the average current to the LEDs to give a fade on and off.
The LTspice simulation is done with a 50% duty-cycle PWM signal.

Q2 will likely need a small heatsink as it will dissipate about 2W at full p0wer.

1618445435564.png
 

sghioto

Joined Dec 31, 2017
5,377
One more suggestion keeping it simple.
Set R4 value for brightness.
Set R2 value for ON delay.
Set R3 value for OFF delay.
1618503009575.png
 
Last edited:
Top