Led strip fade in and fade out

zoxzox

Junior Member level 1
Joined
Sep 20, 2024
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
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
 

On power-up the capacitor takes a second or two to charge through the resistor. Use the capacitor as an integral function on the bias wire of the mosfet. (That is, one end of the cap goes to ground.) The led becomes the load.
 

Hi,

What is the current of the LED strips?
How long do you expect the fade-in and fade-out to take?

What exactly is this power supply? best if you can provide a link to it´s datasheet.

Klaus
 

Brad and Klaus are making an assumption here that when you say "fade in/fade out when power supply is on/off" there is still power available to keep the LEDs on for a while. If you kill the power source completely, your requirement can't be met with just three components, you need at least another capacitor to hold charge as the LEDs dim. The MOSFET can be used to limit the LED current ramping up but not to provide current after the power supply is switched off.

Brian.
 
@KlausST Power supply is 12v 60W, fade in/out for 5 seconds, current 1.2A

@betwixt i think you are right, when i cut power supply i cannot get fade out effect...
lets start from the begining
I asked chatgpt how to get fade in/out effect and got answer how to connect all components, in short:
Positive terminal of power supply goes to positive terminal of Led and one end of resistor 100kOhm, the other end of resistor goes to positive terminal of capacitor (1000microF), then junction of resistor and positive capacitor goes to Gate, negative terminal of Led goes to Drain and negative terminal of capacitor and negative terminal of Power Supply go to Source. and thats it...in this circuit i got great fade in effect but when i kill power supply i do not get slow discharging but fast.
Thats why i say @betwixt you are right and i cannot get slow discharging or fade out effect....what do you suggest now?
 

It requires a much larger capacitor to sustain voltage to your load after power is removed. Something like 50,000 uF lasts a second at 12V 1 Ampere.

Because the led load has its built-in voltage threshold, it dims very quickly and draws no more current. However if you were to build a voltage multiplier/booster you could extend the time a bit.
 

wow thats huge capacitor...i cant believe it is very hard to make fade in/out effect on simple way....must be easier solution
 

We know how to do it but we can't defy physics!
Fading in and out when there is a power source present is easy, your problem is that the LEDs have to stay lit when the power is switched off, that means you have to keep a reservoir of power to sustain it as it fades out, hence the large capacitor.

Brian.
 

Since the power source is available to begin with, let's assume the power source is available all the time. This is the simple method to fade an Nmos On in a second after the switch is energized, then Off in a second after opening the switch.
--- Updated ---

Clicking the link below:

*Navigates to falstad.com/circuit,
*Loads my schematic into the animated interactive simulator,
*Runs it on your computer.

tinyurl.com/27ugsjb5

Click the switch to open and close it. The scope trace travels to the left.
The bright white led's flash on and off.
 
Last edited:

thank you @BradtheRad, i bought these components and tried, it works, these fade in/out effects are amaizing
but i have new problem now....the idea from the beginning was that PIR sensor turns led strip ON/OFF with fade in/out effects
this scheme works great with switch, but with this PIR i cannot get fade/out effect, fade in works fine
PIR MODEL
 

.the idea from the beginning was that PIR sensor turns led strip ON/OFF with fade in/out effects
from the beginning?
I can´t find this information.

It would have made things more simple ... but you wrote you like to switch ON/OFF the power supply.
But this is not the case anymore. It seems the power supply now is ON all the time...

But I´m not sure. Please clarify.


Klaus
 

Sorry guys if i made confusion, i just wanted to make it simpler and just asked to turn on/off led strip with fade effects, thinking that after that i will have to add pir and it will work, but now realize itd not like that.... Yes power supply 12v is always On and is conncted to Pir but as i understand as a rookie pir acts like switch. Never mind, power supply goes to pir and then to led strip.
 
Last edited:

With the power source always present things get far easier.

What you need is the PIR output to act as though it was a switch. That is certainly possible but how to implement it depends on the kind of PIR you are using. If it is a PIR module, the kind of thing that normally turns room light on as you enter, it will already have some switch inside it. Most modern ones use a relay, some older types use a triac but as they don't work properly with LED lighting they have fallen out of favor. If it has a relay, use the schematic shown earlier and wire the relay contacts as the switch.

If you are using a bare PIR device, the three legged IC with a square window, we need to know an exact type. Different detectors produce different outputs so some additional circuitry may be needed.

Brian.
 

I tried to add pir to @BradtheRad scheme but coukdnt get fade out effects... I am using this PIR...it looks to me as a beginner that this model already has switch inside but please look on the link of the pir
 
Last edited:

I tried to add pir to @BradtheRad scheme but coukdnt get fade out effects... I am using this PIR...it looks to me as a beginner that this model already has switch inside but please look on the link of the pir
The switching method and biasing method may need rearranging to suit. The delay may also need rearranging. You may decide to use a P device, or put the load close to one supply rail rather than the other. You may decide to create a Darlington pair or sziklai pair of transistors or mosfets.

The capacitor introduces a delay by charging or discharging. That's the principle that makes it easy to fade the load in or out. You may need one ohm-value to charge it and a different ohm-value to discharge it.

It sounds as though the led strip needs 12V @ 5 Amperes (60W), correct? Then the load-carrying transistor or mosfet needs to perform resistive drop for about a second. During that same transition it dissipates many watts. You need to give attention to the amount of heat this generates.
--- Updated ---

By the way, in my simple schematic the switch stands by itself. It needs no grounding.
However I believe your PIR needs a ground, and it cannot be grounded through the 1M Ω potentiometer.
 

@BradtheRad i do not understand what you are talking about and can only follow schematic like you sent. Thank you again. Yes you are right this PIR need ground i think... Is there any solutions how to make my pir turn led on off with fasing effect? My led is 14.4w and power supply is 12v 60w (5A).
 

I believe this schematic more resembles your project. The PIR is now the switch. Just maybe the mosfet delivers sufficient power. Mosfes vary in their response. And the PIR has specs listed. Just the same you have to experiment.

 

Ok thanks i have to buy these components first... Is it possible to make simulaton like previous one to see result?
 

Falstad's is surprisingly easy to learn to use. Hover the mouse over a component to highlight it. Right-click to bring up an Edit menu.

Choose components among the uppermost menu. Various cursor commands let you move components or wires or the entire circuit.
 

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…