Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Led strip fade in and fade out

zoxzox

Junior Member level 1
Junior Member level 1
Joined
Sep 20, 2024
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
155
Hello everybody,
I would like to get my 1m led strip 12v to fade in/fade out when power supply is on/off. I have Mosfet IRLB8721, 100kohm resistor and 1000microfarad 16 volt capacitor. Can someone write me how to connect to those components to get fade on/fade out. Is it possible with these components at all? Is there any other simple diy way to make this fading?
Thanks
 
Hi,
please do not be mad always, for you this is easy, but for me is not, i am trying on my second language outside of my field of work, to be precise and explain everything in proper way....
* I´m not mad, I´m just asking for clear informations. Focussed on solving the technical problem for you.
* English also is not my first langauge, too. When in doubt I use online translation.

I have led strip of 5m which is 12V, 1.2A and 14.4 W and 1m strip which is 12V, 0.24A and 2.88W....just the length of the strip is different, from now i will use only this 1m long to avoid confusion.
The problem is: Doing electronics follows rules of physics. In most cases the rules involve formulas ... and thus mathematics.

So if you say 12V 1.2A ... or 12V, 3W ... then this gives not the same results for the value of the capacitor.
In other words if you say 12V, 1.2A .. but then you use the 1m LED strip .. the fading timing will not be as expected.
It´s off by a factor of 5.

If you say the power supply is switched OFF.. but you still want a fade out ... we give you a solution according your informations.
In this case, the whole energy for the LEDs to fade OUT need to come from the capacitor ... and the energy needs to be stored into the capacitor beforehand.

If you later say the power supply is switched ON all the time.. then this results in a totally different circuit. One does not need a capacitor to store all the fade out energy.
I´d recommend a totally different schematic, different function, different parts. Nothing like the solution before.

*****
Back to 1m and 5m.
Still I don´t know whether you
* ONLY want it to work for 1m
* ONLY for 5m
* or for both
* mabe you hide your true goals: (Example: maybe your end goal is to work if for a range of 0.3m (min) to 20m (= 4x 5m, 4x 15W = 60W max)

--> one can design for 1m, for 5m or for both.
As example:
* a capacitor solution for 1m
* identical solution, but with different capacitor value for 5m
* or a fade IN and fade OUT solution that works for both lengths ... without the need for adjusting the capacitor (or any other part / value)

When I ask for clear and complete informations: It´s a benefit for you, because you get a suitable solution in the shortest time, with the least effort (time and money) for you.

Klaus
 
No I need the trigger voltage from the sensor

On =0V ?
Off = open or ?V
--- Updated ---

All parts connected to FET depend on Vt=1.8 +/- ~25%

V GS(th) Gate Threshold Voltage 1.35 to 1.80 to 2.35 V so delay to ramp and 5 s on/off ramp time are subject to differ from simulation here
Did anyone analyze my solution using his power FET but not the 1 mF cap?
 
Did anyone analyze my solution using his power FET but not the 1 mF cap?

The green led brightens and dims to provide a visual cue as to circuit operation. It can be fine-tuned to suit the real led strip.

The op amp pointing upwards looks like a rocket ship! The two inputs are two ion trails. The red led at the output is the heat shield getting hot ahead of the rocket. Up top is the ground icon or guidance system.

The supply voltage can be 12V. Values in the circuit can be adjusted accordingly. (Falstad's uses 5V as default.)
 
With more details https://tinyurl.com/yn4kgdnz
1728494797798.png


With an improvement on delays and lower Vgs(th)=Vt sensitivity using two white 5mm LEDs or equiv.( +ve to Drain). This has the benefit of biasing the FET to conduct ~ small mA in the string OFF state at threshold to eliminate delays turning ON.
There is still some delay starting the ON ramp and 5s / division while the Ramp depends where you start and stop counting.
Normally engineers use 10%~90% but the eye has a very large dynamic range so you might use 1% to 99%.
The simulation below shows approx 1 div. ON and OFF at 5s/div..

I reduced R3 in the plot to match Toff to Ton. If you remove R3 then only the Toff delay and Toff ramp times increase by 10 s or so by raising the voltage that must drop to Vt threshold to turn off.
1728496996068.png



This FET dissipates heat only during the dimming stage and can handle as much LED load as you wish (e.g. 15A) as long, as the heat sink can handle more power and not burn your finger. (T>55'C) which is a conservative limit for the junction which rises higher.

I hope the thermal time constant does not cause runaway conditions inside the FET with many parallel junctions.
--- Updated ---

For giggles, I removed the PWM so you can see how an "Analog Computer" works.
See if you can toggle the switch.... without displacing it...
OK I'm off to play pickleball
Actually I meant you analyze the analog dimmer method, but nevermind, that one was poor from delay to dimmer threshold > 5s.
My latest is much better and does exactly what he wanted by using a small Miller Cap which is amplified by the gain of the FET so you don't need a large mF cap.

The supply stays ON and a PIR transistor switch to Ground turns on the StripLED with 5 s ramp. with open or +V to turn off with a 5s ramp.
Has anyone ever tried this? I know FET switches have internal current sharing issues in linear mode at certain thermal speeds. Akin to thermal runaway with many parallel FETs.

You should use twisted pairs for any long wires to minimize EM interference.
--- Updated ---

@zoxzox What most non-engineers need to learn is how to define a requirement in terms of the interface voltages and loads {in,out} to solve any problem.

We call these part of the design specs. No worries for your 1st attempt.
 
Last edited:
What you are writing each other here is like a movie withoht subtitle for me. What is FET? Is it other name for mosfet? What op amp you are using, i saw on Google ic741 is most commonly used. What op amp to buy?
What drive ne crazy is fact that @BradtheRad's sceheme can do fade in and it is enough for me, but cannot do fade out. Capacitor can be charged slowly but cannot be slowly discharged.
I do not have multimeter to measure voltage.
 
What drive ne crazy is fact that @BradtheRad's sceheme can do fade in and it is enough for me, but cannot do fade out. Capacitor can be charged slowly but cannot be slowly discharged.
I do not have multimeter to measure voltage.
To slow down fade time might require a greater resistance for the capacitor to discharge through. It depends on your mosfet's bias volt level and range for turn-Off and turn-On. It's likely to be different from a simulated mosfet, of course.

A second potentiometer might do the job, value 2M or 3M or 4MΩ. Or try various resistor values.

Pay attention to heat generated by the mosfet. Temperature rises higher the longer the time it spends doing the transition.
 
Your transistor number is a Field Effect Trans, or FET or MOSFET.

Multimeters (DMM) are cheap online. I guess you don’t know how to measure voltage without one. But if you don’t reply to all my questions, at least I was able to find a simple analog solution.
--- Updated ---



“can do fade in and it is enough for me,”
The FET is a hard switch but I made it transition soft with resistors to the gate input which is high resistance so a small cap produces the big delay. Time = R x. C

All transistors used as switches are inverting the logic of voltage but when used as voltage following buffers are non-inverting and also drop the voltage a bit. So your wiring is not shown or described yet but I guess you gave up.

Your friend might explain more. Have a nice life.
 
Last edited:
@BradtheRad where do put that 2nd potentiometer?
Put the pots in series, and/or install increasingly greater resistor values inline with the branch close to ground.

The aim is to expand your scale of resistance so as to slow the decline of bias voltage and thus shut off the mosfet more gradually. It appears you need to discharge the capacitor more slowly.
 
The "impossible" FET Dimmer for "active low" PIR and whatever it's DC supply is. (e.g. 5 to 12V), with common resistors instead of Zener LED.
1729115957037.png


Vtgs(OFF) threshold of Power FET = 1.85 +/- 50%.
Vgs(ON) >= 2x Vt
Using available MOSFET = IRLB8721 & 100 k resistor for pullup on inverter Q1.
R1 not critical for current limiting.
R2 = R3 = R5 not critical but 10x bigger than R3 to bias On & Off gate voltage (Vgs).
C1 results in 5 s Ton,Toff +/- 25% with less than a few sec delay to ramp start, dependent on Q2 FET temperature and 50% Mfg tolerance of Vgs(th) (OFF).
--- Updated ---

Put the pots in series, and/or install increasingly greater resistor values inline with the branch close to ground.

The aim is to expand your scale of resistance so as to slow the decline of bias voltage and thus shut off the mosfet more gradually. It appears you need to discharge the capacitor more slowly.
How has he wired Drain, Source to LEDs +,- and Cap to Gate to pot or what?
There needs to be a paper napkin schematic...
 
My schematic with second potentiometer.
I'm supposing although I can't be certain, the PIR is active high (human detected), and Off goes to ground. Again, this method is simplistic and generates heat in the mosfet during transitions (as much as a few Watts which can burn your finger). The less time spent in transition the less heat is generated. In comparison it makes the PWM method attractive.

PIR sensor charges cap thru 1 pot discharges through 2nd pot (biases mosfet fades led's).png

--- Updated ---

Link to this schematic to load in website of Falstad's animated interactive simulator:

tinyurl.com/29b69pqu
 
Last edited:
@BradtheRad I use Vt , RdsOn, from datasheet then Vgs to compute BETA with the FET link in Falstad device properties.
If you wanted dynamic PWM losses, not used here, then you add Rg, Cgs, Cdg, Cds with small Rs for current limit and avoid error to approximate any FET.
Since 12V LEDsteps are arrays of nP3S +R the 3 series LEDs will be 3 to 3.1V so I use 9 to 9.3V at rated current then compute R=Vd/I for the difference, Vd from 12V.

@zoxzox You will notice using this method, no Pots are needed however you can if you want. The trick used here is a feedback R from drain to gate. to reduce the range of gate to threshold voltage. These "logic" level FETs only need 2x the Vgs(th) threshold to OFF voltage to turn ON and any more voltage is useful if you were switching > 10 Amps but you aren't so it only gets hot during the 5 second transition time.

The voltage drop across the FET * current, V*I = Power (heat ) dissipation of ~1 watt max so only a small heat sink is useful for reliability.
The FET underside is also the Drain which connected is to the LEDstrip V- and varies 0V to 6V.
Normally an insulator is used like Mica or thermoplastic to avoid shorts with the heatsink, but that's up to you. Look for a TO-220 <=5W heatsink.
The off state was a small 25 mA or so which is relatively dim. If you want it totally off, add an identical parallel R with a signal diode like 1N4148 or any diode, as below, Dim time reaction reduces to 5s or so shown with 5s per division scale.
1729173668742.png
 
Tony... I click the switch and I watch your simulation run, and I get a hint you're saying the RC arrangement automatically discovers the mosfet's thresholds of operation. Some element of it senses when the mosfet starts to conduct and when it minimally conducts and as a result it applies the correct range of bias voltage in order to achieve fading On or Off.
 
Tony... I click the switch and I watch your simulation run, and I get a hint you're saying the RC arrangement automatically discovers the mosfet's thresholds of operation. Some element of it senses when the mosfet starts to conduct and when it minimally conducts and as a result it applies the correct range of bias voltage in order to achieve fading On or Off.
Not quite. It's just a precise voltage divider for gate voltage based on;
LED near OFF voltage, 5.5V on the low side or 6.5V across. or 2.1 per LED instead of 3.2 nom.
gnd 0V,
12V PIR switch, and
the OFF threshold of the FET, Vgs(th) = 1.85V, Coincidentally this turned out to be equal resistors. But yes, the negative feedback of the near OFF & ON string voltage 5.5 & 0V feedback is the secret for controlling the gate voltage with 12V input. For 5V PIR input a different set of R values can be computed but Mfg tolerance might vary these.

There is a large delay if the starting point is too far from Vgs(th) and we want the ramp to start as soon as possible. Likewise for turn OFF hence the voltage divider to limit Vgs max. to be closer to the minimum voltage of around 200% of the threshold to be ON.

Some new students make the mistake of thinking Vgs(th) is the ON threshold, rather it is the OFF threshold at something like 100uA) then you need about 2x this threshold for logic level type FETs and 2.5x for std. Vgs(th)=2~4V type switches for low Ron.

But the more important note is how to simulate actual FETs and 3S+R LED arrays.
 
Last edited:
5V PIR Changes source R only. https://tinyurl.com/27aycjpa

The negative feedback makes the Vg bias track the FET output voltage when the LEDs turn off Vgs= 1.35 to 2.35 better so that resistors are less likely to need to change. However, if the Stripled quality varies widely, the Voff voltage @ 1mA, may affect ramp times and need some R adjustments. But modern SMT LEDs are much more consistent now with better wafer control.

1729439001834.png


1729438513739.png



The Req current limiting value was changed as I changed the LED model to 3x 3.2V/LED = 9.6V @ 1.25A The Drain voltageVd(off) rose 5.5 to ~ 6.17V.
But the Gate off voltage tracked the simulated Vt=Vgs(th) so no changes are required meaning the negative feedback is doing a better job and sensitivity to mfg tolerances seems good.
 
Last edited:

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top