0
\$\begingroup\$

I have a group of 8 blue LEDs (Vf 3.2V @ 20 mA) currently powered up in parallel by a resistors (one for LED) and a 4.5V power source (3xAA batteries). I've been playing with fade in/out effects and 555 circuits.

What would be a simple circuit to randomly (or-pseudo randomly) fade in and out them independently? I mean, when some LEDs are increasing in intensity others could be decreasing following no specific pattern (the fade in/out cycle time could be different as well).

Ideally, I'd like the fade-out effect not to be complete. In other words, more than a fade in/out effect what I'm looking for is a circuit that can slightly affect the light intensity if each LED randomly (e.g. fluctuating the current from 3mA to 20mA).

I would appreciate any hints or pointers. A detailed explanation or circuit diagram is now necessary (but it would be awesome!).

\$\endgroup\$
  • 5
    \$\begingroup\$ Are you willing to use microcontrollers? \$\endgroup\$ – Scott Seidman Aug 6 '14 at 21:02
3
\$\begingroup\$

For fading you'll probably want varying PWM. Generally you'd want to do this with microcontrollers. The Arduino is a very simple platform that is cheap and easy to use. I don't recommend it if you really want to learn how microcontrollers work, but if you just need something to get work done, it's definitely your best option. It has built-in PWM functionality, as well as MATH functions (like a random-number generator, which can be used to determine which LED to control), and the Uno (probably the most common model) has 6 PWM pins. You could also go for the Mega if you want more PWM outputs.

You could also do this with multiple 555 timers (one per LED), but this seems like a lot more work than simply using an Arduino. However, if this interests you, here's the schematic:

555 LED Fading

This site explains it a bit more: http://www.555-timer-circuits.com/up-down-fading-led.html

You can change the capacitor value to adjust the fading speed. By offsetting this speed slightly, it will appear that the LEDs are fading in and out randomly.

\$\endgroup\$
  • \$\begingroup\$ Or you can do timer-assisted software PWM if you have power to burn. \$\endgroup\$ – Ignacio Vazquez-Abrams Aug 7 '14 at 1:44
  • \$\begingroup\$ Yep. Pretty much any sort of PWM should work, though you'll need a separate PWM output for each LED. \$\endgroup\$ – DerStrom8 Aug 7 '14 at 1:58
  • \$\begingroup\$ Thanks @derstrom8, this is a very detailed response. Using several 555s was my first attempt however I have two issues: (a) Not sure how to avoid the LED to completely fade out when the capacitor is reset by the 555 and (b) I'm using 3xAA batteries and a BC547 transistor. I see a big voltage drop if I put the LED load on the emitter, and the blue LED which requires 3.2v barely lights, even with a very low resistor. I could put the load on the collector, but unfortunately all the negative wires of the circuit are soldered together, so I can play with the others wires only. Any advice? Thanks \$\endgroup\$ – Sebastian Aug 7 '14 at 16:02
  • \$\begingroup\$ a) My recommendation would be to put a capacitor (probably slightly larger than the other capacitor) across the LED. That way it will still be holding a charge after the other capacitor discharges, which keeps the LED somewhat lit. Fiddle around a bit with different cap values to see what effect you like most. B) Try driving the the circuit at a higher voltage. 4.5v is probably unable to supply a high enough current to your LED. Try running it with a 9v battery instead. In order to get around 20mA to your LED with 4.5v, you'd need a 68 ohm resistor in series with the LED, not 470 ohm. \$\endgroup\$ – DerStrom8 Aug 7 '14 at 17:06
  • \$\begingroup\$ I just made a simple demonstration in Proteus to show how this works: youtube.com/watch?v=EyxiZXcIFhE&feature=youtu.be \$\endgroup\$ – DerStrom8 Aug 7 '14 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.