Assistance request: A simple 12V Fade in/Fade out circuit for LED modules

Thread Starter

Tee Jay

Joined Mar 25, 2017
2
Hi all,

My first post, so apologies if I've not done it correctly or breaking any rules up front.

My skill level is pretty low while I do have a decent understanding of basic electronics and such. I'm trying to put together a simple circuit/module that I can add to some decking LED lights. I've looked at many Google searches trying to find something simple that will do what I want, which is basically to fade in and out the LED modules (clusters) when they come on and go off rather than hard on/off. I've seen some rather complex ones using PWM and such, that are probably over the top of my skill level and requirements for now.

The setup is as such: Standard 10 LED cluster kit off the web, comes with 12V power supply. I can run 1, or all at the same time. On testing running 5 will pull 65mA, all 10 will use 110mA, so pretty low overall. (Each LED cluster is rated at 0.15W, in total, all on 1.5W.)
I've a PIR module between main power, and the start of the LED clusters. Simple jack plug in type with in and out. That works fine. (On movement, it will fire up the LEDs, after 1min of no movement, off)

Aim is to install the fade circuit between the PIR out to the LED cluster: 'Power -> PIR -> Fade_circuit -> LED clusters' .. with the aim to split into two. So I'd have almost 2 separate strips of 5 LED clusters each side, that part is not what I'm needing advice on and should be easy enough to sort once I've the fade circuit sorted.

The attached PDF should show enough information of what I've done, and have setup so far.

My issue is this, when I power up the circuit, the LED does fade in, but very quick,less than a full second, i'd like this to be a bit longer, so more noticeable. On power off, there is no fade out, its a hard off. I've only so far tested with 1 of the LED clusters connected so far. Maybe it will work better with all 5 or 10 attached. I may try this while I wait for replies and suggestions ;-)

For C1 I've only tested with a 2200uF/16V and 4700uF/16V... While a 3300uF/16V was suggested, I only have a 10V one which I've not tried, but figure I should see some difference in what I've used to far... I'm not seeing any noticeable difference. I've a number of components available, but not so much any of the values mentioned in part 1 of the video. I've gone with the part 2 starting at around 5:30 ->

For the transistor, as I couldn't source the suggested one, I've used a 2N3904 NPN as the youtuber mentioned as a replacement in some of the comments. (See my sketch notes on the others suggested)

So in summary, it looks like I'm getting close, I just need to figure out how to extend the fade in time, and figure why fade out is not working.

Appreciate any guidance.

Thanks... TJ
 

Attachments

LesJones

Joined Jan 8, 2017
4,190
To stay with your very simple approach I would suggest adding an emitter follower stage (Using a 2N3904 or similar) between R2 and the base of your output transistor (2N3904 or TIP41A) With this simple approach it is not possible to calculate resitor values due to the large variation of the current gain of transistors (hfe) Adding the emitter follower will allow you to use larger value resistors so that can get a longer time constant with the same capacitor value. Start by finding the largest value of resistor that will give you full brightness when connected between the base of the emitter follower and the +12 volts. This will probably be between 100K and a few meg ohms. Then select a resistor with about half this value to use as R2. I suggest using a preset (Potentiometer) for R1 with a value of about 20 K so that you can adjust the fade time. Using a PWM design would give more consistant results as commponent values could be calculated better. You circuit using the TIP41A should also fade on switch off but the one using the 2N3904 will switch off straight away as you are removing the power to the LEDs as well as the switching signal to the fade circuit. You will also need to add a resistor between the diode (+ end) and 0 volts so that the fade off time is about the same as the fade on time. About 4.7K should be about right. (If not it will be much longer.)

Les.
 

Thread Starter

Tee Jay

Joined Mar 25, 2017
2
To stay with your very simple approach I would suggest adding an emitter follower stage (Using a 2N3904 or similar) between R2 and the base of your output transistor (2N3904 or TIP41A) With this simple approach it is not possible to calculate resitor values due to the large variation of the current gain of transistors (hfe) Adding the emitter follower will allow you to use larger value resistors so that can get a longer time constant with the same capacitor value. Start by finding the largest value of resistor that will give you full brightness when connected between the base of the emitter follower and the +12 volts. This will probably be between 100K and a few meg ohms. Then select a resistor with about half this value to use as R2. I suggest using a preset (Potentiometer) for R1 with a value of about 20 K so that you can adjust the fade time. Using a PWM design would give more consistant results as commponent values could be calculated better. You circuit using the TIP41A should also fade on switch off but the one using the 2N3904 will switch off straight away as you are removing the power to the LEDs as well as the switching signal to the fade circuit. You will also need to add a resistor between the diode (+ end) and 0 volts so that the fade off time is about the same as the fade on time. About 4.7K should be about right. (If not it will be much longer.)

Les.
Thanks Les, not sure I fully grasp the emitter follower approach you mentioned. I think I found something on it though, where another transistor is added to the circuit so will look at that more. I've a few TIP41A arriving next week so may be able to only test once I have that in hand.
I'm starting to think the PWM approach might be the easier way to go, even though it seems a bit daunting for me having never touched one as yet.

Cheers... TJ
 

LesJones

Joined Jan 8, 2017
4,190
Hi TJ,
To add an emitter follower to the input of your existing transistor you connect the emitter of the new transistor to the base of the existing transistor. You connect the collectors of both transistors together. The input is now the base of the new transistor. If leakage current is a problem you can add a resistor between the base and emitter of the original transistor. You effectivly build a darlington transistor from two normal transistors.
I you decide to use PWM then I think the best way is to start with a sawtooth or triangular wave generator. You would feed that into one input of a comparitor. The other input would be fed from a ramp generator (Just a resistor and capacitor) that produced a voltage ramp when power was applied or removed. (The time that this ramp lasted would be the time you wanted it to take to get to full brightness) This would generate a PWM waveform at the output of the comparitor that ramped up (or down.) from 0% to 100% duty cycle. You could also generate the ramped PWM waveform using a microcontroller.

Les.
 

ErnieM

Joined Apr 24, 2011
8,377
Is the +12 volts still Connected to the LED when you turn it off, or is that going off also?

If it is going off too then you are essentially pulling the plug Somthatnis why it turns off fast. Instead ditch that diode and Switch R1 between 12 volts and ground. That should fade both ways.

Making a longer fade in and out is difficult with such a basic circuit. You have to keep adding lots and lots of capacitance to elongate the time.

If you change the transistor to a darlington type, or add another transistor to do the same thing, you can now increase R1 instead of adding more cap to make longer fade in and fade out times.

Still, without a PWM controller you are limited in how good and long the fades are.
 
Top