fade-in/fade-out leds (not throbbing)

orubap

n00b
Joined
Nov 3, 2005
Messages
41
Hi just looking for some advice for a relatively simple circuit.

Have a circuit in mind using around 30 leds running off a 12v supply, in strings of 3to4. Im looking for a way to make ALL the leds fade-in when the circuit is switched on, ie light up from zero to full power over a space of a few seconds, instead of coming on instantly. And again when the circuit is switched off, instead of the leds turning off instantly they fade-out out as well. Im not looking for the leds to throb or anything just fade-in, fade-out and stay constant inbetween.

Using linears led wizard, here's a quick circuit diagram (value's not necesarily final). Looking for one straight forward addition to the circuit (at the red circle) that would handle the fade-in/fade-out for the entire circuit.

ledcircuit.jpg


With my limited component knowledge im guessing capacitors will be involved but other than that im not sure what i need. Any info/advice appreciated.
 
Yep; you'll want a capacitor between the red dot and ground. You'll want a switching diode (not an LED) between the +12 supply and the red dot. This gives you a simple RC circuit. A resistor in series with the diode will help control the time, but that will change the voltage shown to the array of diodes and so you'll need to re-compute your current limiting resistor values.

200 mA is a ton of current, so you'll need a pretty big capacitor if you want to have any lengthy time with the lamps on after the power is removed. If you're drawing 200 mA at 12 volts, you've got an effectivel load of 2.4 ohms. The time constant says you need 0.417 farad capacitor -- not microfarad! -- and that's really large.

With such a large swing, a passive solution might not be the best approach. Is there a constant supply available, aside from the switched 12 VDC input you've got drawn here?
 
If you were to use a regular capacitor, the fade wouldn't be very long. One option is to get a super high value car stereo cap in 1/2 or 1 farad value and use that, but they are huge. another option is to use a transistor. I have a transistorized fade circuit somewhere, I will try to dig it up
 
Whatsisname said:
totally unnecessary
How can you do it without a large cap if there's no constant supply available, Whatsisname?
 
because you can get cheapo capacitors (or a few of them) for next to nothing at surplus stores that will hold plenty of juice, rather than wasting 40+ dollars on a stereo capacitor. Additionally, this project reaks of bad design and I'm sure there is a much simpler and cheaper solution anyway.

My objection to the stereo capacitor is not in how much charge it will hold but cost and application.
mikeblas said:
How can you do it without a large cap if there's no constant supply available, Whatsisname?
 
Whatsisname said:
because you can get cheapo capacitors (or a few of them) for next to nothing at surplus stores that will hold plenty of juice, rather than wasting 40+ dollars on a stereo capacitor. Additionally, this project reaks of bad design and I'm sure there is a much simpler and cheaper solution anyway.

If you have constructive input, I'm eager to hear it.

"Plenty of juice" isn't enough: see the math I did above. 0.417 Farads is 417 milliFarads, or 417,000 microFarads. The biggest commony available electrolytic is 4700 microfarads; if you're lucky, you can find 6800 microfarads.

So, you'd need about sixty wired in parallel. Sixty is much larger than my definition of "a few". New from Jameco, those parts are 0.94 each in quantities less than 100; $60 for your order. If you luck out and get 'em half price, then you're doing great.

I do agree that such a large capacitor is going to be tough to work with, but if there's really no constant-on source, there's not much else we cand do. I think one approach might be to make the LEDs flash when power has been removed. If the duty cycle is 50-50, we've cut our power usage in half -- though we still have to power the oscilator.

If you have some other suggestions, I'd love to hear them. Without any concrete input, you're not coming off as being helpful or courteous.

If a constant supply is available, then this just becomes a special case of the fade-in, fade-out circuit.

Jameco sells "memory backup" capacitors that are rated at 1 Farad and 0.47 Farads. That's quite enough for this application -- problem is they have a maximum voltage rating of 5.5 VDC. So you can buy two, put them in series, and get half the capacitance but twice the voltage rating. This isn't a good design because leakage is a problem -- but they're only $4 each for a total cost of $8.
 
Hmm, cheers for the help guys - i'll explain my intentions as it might help with the solution. Im wondering if i explained correctly that i want the leds to stay at a constant brightness between switching the circuit on and off.

Im in the process of making a custom case for my xbox almost entirely from perspex. This xbox is softmodded with a modded pc dvd-drive to play all types of cd-r/dvd+r/ etc and it uses xbmc as a dash/frontend. So the box will mainly be used to play movies (dvd's, divx's on 700mb discs etc) and also access my network shares and occasionally be used as another box for halo system link. Its going in the bedroom and im going for a sharp-black-media-unit look to tie in with my gear. Now i did a few cad designs at uni but didnt bother bringing them home, so here is a VERY crappy renditon in Paint.

Please read this carefully and keep an open mind before flamin'. Feel free to offer constructive criticisms though.

case.jpg


As you should be able to see the case is an oblong in shape with the sides curved, and the front and back panes flat but with rounded edges. All the parts in black are where the perspex is spray painted matt black on the inside. The white circle is where a patch is left clear to show the top of the modded dvd-drive so you can see the disc spin.

Now the parts in red are broader strips of perspex that mimic the shape of the case but allow me to drill and insert (probably predictably blue) leds on the inside. These strips will be sanded to a frosty finish so mostly it looks like a black unit with blue glowing edges. The drive bezel will be part of the logo and backlit too (already made rails so it stays lit when the drive is open). The yellow dots are just to give an indication of where the leds might be placed - they dont signify the number used or final placement, but as you can see with the curves etc i'll need alot of leds to get an even light through those strips. Already considered using EL wire but ive used it before and its not gonna give me the effect i want, which is why i want to use leds.

Obviously i've ommited the IRsensor and usb ports etc but they're not relevant here, just wanted to show Why so many leds and What for. And of course since the all the edges light up and are as much an indication of the boxes on-off state, id rather they fade than just flip on and off. Ive already decided on a separate psu for the leds and a relay etc, im just looking for advice with the fade effect.

--------------

So assuming im running for talkings sake 30 leds in parallel strips, is it just a case of placing a resistor and capacitor in series with these - i.e. at the red dot in the OP?

Is there any other considerations to getting a a fairly even fade? I'd prefer it not to be exponential but thats not a pre-requisite, especially if it drastically complicates the circuit.

Again, appreciate any and all help.
 
Using a large capacitor is not a good idea. You'll be drawing more current than is safe from your PSU when charging a 0.5F cap which would likely cause problems with your hardware, also considering this is a xbox mod you also have space limitations which a 0.5F cap doesn't meet.
 
This circuit should work if your 12V is always on. Q1 is a PNP transistor with current handling capacity for your LEDs. When the switch is in the position shown, C1 discharges through R2 gradually turning the LEDs on. In the opposite position, C1 charges through R1 gradually turning the LEDs off. You''ll have to play with the component values. 4.7K for R1 and R2, and 220 uF for C1 would be a good start.

fade.jpg
 
I was going to suggest something very similar to Frank4d's circuit, but he beat me to it. I would make just one modification: use a FET of some sort instead of a BJT. It'll give you more consistent results across temperature ranges (read: when the transistor heats up), and you don't have to worry about gate/base current getting out of hand. It's an easy replacement--a simple substitution.
 
Thanks for the reply frank, that diagram looks kinda straightforward. The only thing that detracts from this circuit is in the way the power supply would always be on. See in practical terms i was thinking the easiest way for me to do this mod, is use the stock psu to power the box itself and simply get another psu (like say the wall adapter for your cordless phone - anything that outputs 12v and enough current) and splice that on the 240v (im in UK) coming into the box. Reason for the separate supply is there are many reports of xbox performance suffering when too many other things (extra fans, leds, ccfls, etc) are leaching power from the stock supply. And i was thinking a relay would be straightforward enough to install so that when the xbox is powered on, the led circuit is powered on too.

I suppose i could rethink the relay to work with this circuit but i think overall it would add to the complexity and im wondering about the efficiency and more importantly the heat issue of having that psu on indefinately inside the case. Id like to keep cooling requirements down so i can leave out extra fans that would make the case bigger.

Could you recommend a method where the charge and discharge occured simply with the input power supply being switched on and off, without the use of the switch at S1? Cheers for the help!
 
it would be pretty simple to build a small switching power supply that you could use with your circuit. When I get home I can crack open my reference book and give you a circuit that would be able to provide 12v at a few hundred milliamps.
 
Back
Top