Simple circuit to fade in / fade out LEDs randomly

ledrandom

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!).

Best Answer

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.