Home Page
+ Reply to Thread
Results 1 to 2 of 2

Thread: Looking for a Way to Get 16 LEDs to Flicker at "random" Rates on a Circuit

  1. #1

    Request Looking for a Way to Get 16 LEDs to Flicker at "random" Rates on a Circuit

    Hi all,

    I'm completely new to this forum, so I hope I am asking in the right area.

    I'm working on building a toy for my 3 year old boy. What I am trying to do is to get 16 LEDs in a circuit to all flash independent of one another at seemingly random rates (probably in the 50-250 ms range) - to give a flickering/shimmering effect. In addition, I want to use a radial potentiometer to vary the brightness of the LEDs (as a collective) as well (i.e. as he turns the dial, the set of flickering LEDs all get brighter / dimmer together).

    And to complicate matters - I want four sets of these (each with 16 LEDs and its own pot).

    I'm assuming I'll need to use something like 555 timer circuit in conjunction with something.

    Does anyone out there have any bright ideas as to how I might accomplish such a thing?

    Thanks for any useful suggestions you might have.

    P.S. This is just for a toy - it has no commercial use.

  2. #2
    First of all, sorry for such a delayed response.

    To preface my post, my feedback will be heavily biased towards a digital approach, as I'm most comfortable with digital circuitry.

    As far controlling the brightness of the LEDs, the ideal approach is to use PWM (pulse width modulation) as opposed to using a potentiometer as you can control the brightness with orders of magnitude more accurately, as well as not worrying about load impedance (since you don't know how many LEDs might be on at the same time as they're all random). You would place a small voltage across the potentiometer in series with a ~1k-5K resistor (although the value is loosely dependent on the source voltage and max value of the potentiometer) and use an ADC to convert the voltage drop across potentiometer the into a digital numerical value for controlling the duty cycle of the LED. If you decide to implement this project with a microcontroller, most MCUs will have at least one ADC/DAC as well as several PWM I/O ports, which will simplify the project greatly and reduce the surface area needed for the circuit dramatically. You can certainly achieve this with 555 timers in the analog domain, but I'd highly recommend tackling this in the digital domain with the help of a microcontroller. I say that because you want a random time period for each LED, and random signals in the analog domain can get quite complicated (I'm not well versed on the subject matter).

    Assuming you decide to implement this project with a microcontroller with PWM (which is my recommendation), there is one major design constraint; having enough PWM I/O ports. Ideally you would want 16 PWM I/O ports (one for each LED), but this is highly impractical as I highly doubt your MCU will offer so many. So that leaves us with two solutions:

    1) Using multiple MCUs to provide each LED with its own unique PWN I/O port (highly impractical/inefficient)
    2) Using shift registers to control more LEDs than available I/O ports (there are lots of tutorials if you do a google search). This would be my suggestion.

    Hopefully this gives you some insight towards an approach in the digital realm (I haven't gone into much detail with my explanation. If you actually go through with this I can provide much more feedback/help). If you're rather set on doing this in the analog realm (ie: using 555 timers) let me know and I can provide some more assistance, although I'd advise against it as this project would become much more complex and require a lot more parts (which obviously introduces a higher chance of design/construction errors).
    Last edited by Mr. Hasselhoff; 12-29-2011 at 12:47 PM.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)