Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Slowly Fading LEDS In and Out

Status
Not open for further replies.

ErikMK

New Member
Hi, I am preparing to install some lighting effects into my car using white and blue LEDS. When turned on, I would like to have the LEDS slowly illuminate from their off state to there on/fully bright state over a time of about 3 seconds from when the power is switched on (Slowly getting brighter as power is connected). And when turned off, I would like to have the LEDS slowly dim down from there on/fully bright state to their off state in about 3 seconds from when the power is switched off. (Slowly dimming as power is disconnected). So far I have successfully made a circuit that slowly dimmed a LED as the power to it was cut, but I cant seem to find a way to slowly illuminate a LED as power is switched on. The circuit I made involved a 1500uF capacitor connected in parallel to the LED with a 390-ohm resistor connected in series between the capacitor and the LED’s anode, the power is from the cars 12V battery and is regulated for 12V, so when the car is on the voltage wont jump up to 14.X. How would I go about slowly fading in a LED when the power to it is switched on and slowly fading out an LED when the power is disconnected? I figure that I could use some type of circuit that slowly increased voltage to an LED and charged a capacitor when power is supplyed. Then when the power is cut the capacitor would discharge and slowly fade the LED out. Can anyone help me design an circiut to accomplish this type of automative LED Fading?

Thanks in Advance!

Erik
 
1 thing you might want to look into is PWM (pulse width modulation).
Instead of slowly applying an increasing voltage, you could turn on and off the LED very rapidly. By doing this the LED will look dimmed.

I'm not sure if there is a chip to do this or not... you could program a microcontroller to do it...

as for using caps, the off dim would be easy... but I'm not too sure how to do the on dim...
 
Does anyone know of a circuit that will slowly illuminate a LED(s) to its full-on state, and keep the LED(s) lit at their full-on state until the power to the circuit is disconected? I need some type of schematic for this. If I can find a circuit to slowly illuminate the LED(s) then I can surely use a capacitor to control the slow fading of the LED(s).

Thank in Advance!

Erik
 
maybe if you use a transistor, like a darlinghton, or a normal one will work too, and connect a cap between the E and B. then use a reistor to drive the transistor and the cap.
not sure if it works......
 
well i understand the concept og how, you would use the charge rate of a capacitor, then use a transistor, maby a NPN 2n3904 ? hooked to the base with the negative side of the cap, the emmiter to ground and emmiter to load, and load attached to 12V. u may need anothother transistor, a higher power PNP to work off the NPN so you can allow more voltage/ amperage throughput.

uhm..?? somone else wann draw up a schematic? im not sure enough of myself to say its good, nor have anny spare parts that i want to blow up ;)
 
Hi Erik,
you might try putting the 390 ohm resistor before the cap (in line with the 12v)
this would slow the charge time of the cap.
might have to juggle cap. and/or res. values a bit but it should fade on and fade off.

Hope this helps, good luck!
 
ErikMK said:
So far I have successfully made a circuit that slowly dimmed a LED as the power to it was cut, but I cant seem to find a way to slowly illuminate a LED as power is switched on. The circuit I made involved a 1500uF capacitor connected in parallel to the LED with a 390-ohm resistor connected in series between the capacitor and the LED’s anode, the power is from the cars 12V battery and is regulated for 12V, so when the car is on the voltage wont jump up to 14.X. How would I go about slowly fading in a LED when the power to it is switched on and slowly fading out an LED when the power is disconnected?


Erik

Try connect another 390ohm resistor series in +12V wire...
 
?? but wont that that will only allow it to slowly charge...wait.. now im gonn go try it...

uyhm, it seems that adding a 390 Ohm resistor to the "fading circuit will alow the cap to charge slowly, but the leds are still running off the 12v, through the resistor, not directly and only off the cap. how do u isolate DC currents?
 
Hey jaw,
what happens with the resistor connected to the input side of the cap is that the cap only charges up to 1.7 volts (or whatever the LED voltage drop is).

When you disconnect the 12 volts the LED draws the stored voltage (1.7V) from the cap and fades out.

As I said earlier you may have to experiment with different resistors and caps to get the effect you want. I wouldn't reduce the resistor much below 390 ohms cause you might burn out the LED.

More ohms = less bright and longer fade on time, same fade off time
Less ohms = more bright and shorter fade on time, same fade off time
More capacitance = same brightness and longer fade on and off time
Less capacitance = same brightness and shorter fade on and off time

Hope this helps a little
 
how about this?
i think that you can use the first circuit without R1.
now, if you have a 555 timer with 50% duty cicle then you can make a similar circuit like the second, but with a PNP transistor, then you can make the leds fade in and out.......
it will be nice to have a bicolor led and wich will change colour from red to greed, for example, but going trough green.
i'll be back with the schematic a bit later.
 

Attachments

  • leds_142.jpg
    leds_142.jpg
    7.8 KB · Views: 1,430
or, here is another idea. use a 555 to generate pulses and drive a decade counter like 4017. you can hook up to 10 leds wich will be fading.
i think that it will be cool, having a red, green, orange, yellow, amber(well, it is just like orange), blue, and wihite led, but not in this oreder wich will be fading .......
 
LED Fade In Circuit

Ok, I finally found a circuit that does what I have been looking for (see attachment). The circuit slowly increases its current across the 20 LED's when voltage is applied to it. The LED's see a maximum of 20mA through the cycle. Once fully illuminated the LED's will stay this way until power is cut to the circuit. To fade the LED's once the power is cut a few diodes, resistors, and fairly big capacitors should do the trick (I am working on this right now). The waveform is easily adjusted through C1 size and R2, R1 and R3 make small adjustments to the waveform angle, R4 adjusts the horizontal phase of the wave (time delay), and R5-R24 make large adjustments to the current across the LED's.
 

Attachments

  • SlowilluminateLED_s.gif
    SlowilluminateLED_s.gif
    15.7 KB · Views: 1,777
well, i see a problem with this circuit.
first, the leds D11-D20 don't have there cathodes connected to anything. they come connected to the GND, like the rest of the leds.
secondly, the leds will not fade out when you turn off the power, because there is no cap that holds the energy they require to keep illuminating after power is cut off.
maybe someone has a solution for this ? considering that there are 20 leds, quite a large cp is required.
how about having the circuit connected to the power suply, and have some sort of an ON control, so like when the ON is connected to the +12V then the circuit will think that it is on. so it will fade in the leds. then when the ON is disconected from the +12V then the circuit will think it is turned of, and it wil fade out, but the energy it needs to fade out is not from a very large cap, but it is still drawn from the battery.
sounds good?
 
uhm.. itl work just fine...
 
yes, if you connect those leds to ground, it will work.
but it will only fade in when you turn it on, it will not fade out after you turn it off. it willl just turn off instantly.
 
Hi Everyone

I know this thread is getting on for 10 years old! But I have a question if anyone can help. I just built the circuit that ErikMK posted and was wondering how you could increase the delay from power on to full brightness, I am looking to get roughly 2 mins to full brightness as opposed to 18-20s. I built the circuit with values as described and it worked as described. I then tried increasing the value of R2 to lengthen the time to full brightness, but this did not work - the LED just came on straight away without any fade in.
Am I doing something wrong, do I need to adjust the value of the cap upwards as well as R2 in proportion? Is there any formula that I can use to work out the values that I need?

Any help much appreciated!

David
 
Thanks for the replies.. was wondering why the positive lead of the capacitor was connected to the ground! But the circuit still worked anyway with it the wrong way around which is even more confusing?

I will try a larger cap and see if that does the trick.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top