Slow fading LED

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
The objective was to have an LED slowly fade in and out over some seconds. My first attempt was to use the comparators and latch of an LM555 but I couldn't get it to work. So I tried using an LM393 and a 74LS74 to do the same thing and this worked. Getting away from the LM555 also let me set a wider range between "trigger" and "Threshold" so it worked out for the better, but I can't understand why the LM555 didn't work.
Using the LM555 the LED came on quick and stayed.
As it is using a 10 uF cap for the timing it fades on over about 10 seconds, stays on for about 10 seconds, then fades off slowly.
The question ... other than the voltage divider what is the difference between the LM555 and what works?

I will have to recreate the LM555 schematic, give me a bit.
 

Attachments

Jony130

Joined Feb 17, 2009
5,157
My hypothesis :
With 555 the voltage at the gate of a MOS is between 3/2Vcc = 3.4V and 1/3Vcc = 1.6V . Also 100k will quickly discharge the cap.
And this is why you do not see any change in diode brightness. And have you try to configure Q1 as voltage follower instead-of a CS amp ?
Your second circuit has a much lower frequency of operation because now the cap is charged and discharged via 1MΩ only and this is why you now can see the effect. Also what is the purpose of a R10 resistor?
 

crutschow

Joined Mar 14, 2008
24,726
Move the LED resistor and connect it between the transistor source and ground.
That will make the LED current more proportional to the input voltage and give a slower fade.
 

ScottWang

Joined Aug 23, 2012
6,882
The below is a fade in/out circuit, if you wish reach to 10 seconds then you can use C1 as 22uf and increase the R1 values or use R1 as 33uf and decrease the R1 values.

DelayOnDelayOffForNpnLED_ScottWang.gif
 

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
Move the LED resistor and connect it between the transistor source and ground.
That will make the LED current more proportional to the input voltage and give a slower fade.
Super! Thanks.

(edited to add ...)
Well it fades in and out a little. It looks like it might delay a relay going on and off better. :)
 
Last edited:

Lestraveled

Joined May 19, 2014
1,946
I am throwing my hat in this ring.


OK, here is how it works. I have not simulated this. Maybe one of you LTSpice experts will fine tune the values. @crutschow

- The 555 is configured to have a 50% duty factor. So, the voltage waveform at C1 should look like Figure 5 on page 8 of the attached data sheet. The top peak is at 3.33V and the bottom peak is at 1.66V, assuming Vcc is 5V.
- Q1 is a simple emitter follower (high impedance buffer) to keep from messing up the timing of the 555. We lose .65V through the base-emitter junction so waveform at the emitter of Q1 is 2.68V to 1.02V.
- Now for the fun part. The B-E junction of Q2 is .65 plus the junction voltage of D1 (schottky diode) equals .65 + .45 = 1.10 volts. This means that at the bottom peak of the waveform (1.02V), Q2 will be off and thus D2(LED) will be off also.
- When the waveform rises above 1.10V, Q2 will start to conduct. How much it conducts is set by R2 + R3 and the gain of Q2 (100). In other words, R3 adjusts how bright the LED will get.

Don't nitpick me on lack of decoupling caps and other things. You know they are suppose to be there, so put them in.

I await your comments
 

Attachments

ScottWang

Joined Aug 23, 2012
6,882
Interesting. I'll have to build it just to play with it, but the objective was to have it oscillate.
I just thought that you want a breathing light led, the circuit that I designed just for fade in/out once when the power on and off, the circuit you want need an oscillator to drive it to replace the switch.

If you using the ne555 then you may connecting from pin 2 as Lestraveled attached.
 

Thread Starter

hp1729

Joined Nov 23, 2015
2,304
I am throwing my hat in this ring.


OK, here is how it works. I have not simulated this. Maybe one of you LTSpice experts will fine tune the values. @crutschow

- The 555 is configured to have a 50% duty factor. So, the voltage waveform at C1 should look like Figure 5 on page 8 of the attached data sheet. The top peak is at 3.33V and the bottom peak is at 1.66V, assuming Vcc is 5V.
- Q1 is a simple emitter follower (high impedance buffer) to keep from messing up the timing of the 555. We lose .65V through the base-emitter junction so waveform at the emitter of Q1 is 2.68V to 1.02V.
- Now for the fun part. The B-E junction of Q2 is .65 plus the junction voltage of D1 (schottky diode) equals .65 + .45 = 1.10 volts. This means that at the bottom peak of the waveform (1.02V), Q2 will be off and thus D2(LED) will be off also.
- When the waveform rises above 1.10V, Q2 will start to conduct. How much it conducts is set by R2 + R3 and the gain of Q2 (100). In other words, R3 adjusts how bright the LED will get.

Don't nitpick me on lack of decoupling caps and other things. You know they are suppose to be there, so put them in.

I await your comments
Yes, it works as you designed it.
 
Last edited:

wayneh

Joined Sep 9, 2010
16,384
The nicest looking throb I've achieved was the fancy way, with a PWM source fed a sine wave for the duty cycle control. You can tweak the min and max duty cycle to achieve the brightness range you want.
 
Top