how to make led's flicker and fade

Discussion in 'The Projects Forum' started by karaandnick, Jan 1, 2013.

  1. karaandnick

    Thread Starter New Member

    Dec 19, 2012
    18
    0
    I would like to add LED's (probably red) behind the buttons (maybe underneath) on one of my scary themed pinball machines that flicker and fade in and out randomly to give a spooky effect. How hard would this be and what sort of components (in a general sense) would I be looking at?
     
  2. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
  3. karaandnick

    Thread Starter New Member

    Dec 19, 2012
    18
    0
    Thanks Bill, I will give it a look. What part of Dallas are you in? I'm in Rockwall.
     
  4. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    Garland. We could touch base sometime, several other of our other members are also locals. Ever been to Tanner's or BG Micro (two of my favorite local parts stores)?

    If asked nicely I have been known to help people design circuits.
     
  5. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    I think any time you want something "random" as seen by the eye, you're in microcontroller territory. With any reasonable amount of analog hardware, all you can do is make oscillators. You might pile them up so you get interacting effects, but you won't get much complexity. With a processor, you can have a "pseudo-random" sequence that you'll never recognize as repeating, once a minute or so has elapsed.
     
  6. karaandnick

    Thread Starter New Member

    Dec 19, 2012
    18
    0
    Your right down the road. I usually get all my stuff from Tanners (the place is amazing) but I heard BG's was mail order only so I've never tried to go there. Being that it's in Garland it sure would be convenient. Do you guys (from around here) ever get together? Hopefully you have people over for pcb etching tutorials :D. I'm very new to circuits as my venture into this hobby started as a labor of love collecting and restoring arcades and pinball machines, doing minor board diagnosis and repair. I can usually poke around and change out enough components to get them going again :) (still learning about the logic probe so that is a handicap). I knew I was in trouble when I began purposely looking for the biggest project machines I could find and then started buying broken arcade PCB's just for the challenge of trying to fix them. Now here I am trying to turn some of my dreams into electron infrastructures.

    Also, I just want to say, this forum is by far the most "welcoming" and "helpful" of all the ones I've tried. When I posted my first question here I also posted it to 7-8 other circuit forums (anticipating that some would be more helpful than others), surprisingly enough I haven't received one response on the other forums. Seeing your post count, kudos to you and everyone else here who give your to time help others for no gain other than the satisfaction of seeing someone succeed.
     
  7. wayneh

    Expert

    Sep 9, 2010
    12,087
    3,027
    I pretty much agree. But if you can find something that already makes a satisfying pattern, you can use normal components to scale up the signal to control however much current and power you want. For instance I took one of those LED tea-light candles and used its signal, which was a pre-programmed sequence to simulate a flickering candle. I used the onboard microcontroller's signal to control a MOSFET, and thereby a much larger set of LEDs.

    If you need to program your own effects, you'll need to choose a microprocessor and learn how to program it.
     
  8. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    Truth, I also agree with the µC approach, although I have another circuit in the article, From Four, Twenty, that approaches random, but I don't see how it could be made to fade very well. It takes a lot more parts, but they are cheap so it is not too painful to build.

    I tend to make an order form (informal) before I drive over BG Micro. You save on shipping, and they are very friendly folk. Their place tends to be messy, it is an internet shop after all, and they will get the stock from their shelves while you wait. Jim (owner of Tanner's) and Billy (owner of BG Micro) are good friends, and buy together to save money many cases.

    They used to have a super friendly Great Dane I was good friends with (always brought her dog biscuits), but she died recently from cancer.

    I have met most of the folk that are local one time or another, but usually at public events. The first Saturday sale, for example, or the once a year HAM Con early June. Not surprisingly, Dallas is a good place for electronics hobbiests.
     
  9. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,170
    395
    I wonder what would result if we used wayneh's flickering bulb PWM to control a PNP switch whos output supplies power to a NPN darlington emitter follower. Drive base from timing cap from one of Bill's pulsing 555's??
     
  10. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    All you need is a 16f59 chip, 44 pins.

    2K Flash are more than enough for a random algorithm.

    I can sell one to you + adapter PCB for a good price.

    For this old controller a cheap clone programmer is enough, which costs you $20 or so from eBay.

    The 16f5x series are easy to use, PDF is only 50 pages.

    I bought maybe 25x of these chips some years ago, but don't use them very often. There are still many remaining here.

    At 3 volts, it can drive many LEDs directly, which you can multiplex, no resistors, or wire 1:1 + some small resistors.
     
  11. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    Here's a crazy idea that I recall reading on a model railroad site. It's intended to reproduce the flickering effect of a fire burning in a hobo camp beside the railroad tracks.

    You get a cheap transistor radio, tune it to a talk radio station and disable the speaker. Then run wires out from the speaker terminals to a red light bulb. That's it! The patterns of speech on the radio make a pretty good substitute for the varying brightness of a flame in an open fire. I can't say I've ever tried it, but it sounds plausible.
     
  12. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    I have not tried it, but I understand that using the Tune command to create a musical output from a PICAXE, and connecting the output to an LED creates a flickering, fading effect. More details are on the PICAXE forum.
     
  13. abhaymv

    Active Member

    Aug 6, 2011
    104
    4
    Now, I'm not sure, but IEEE spectrum once reported a relatively simple logic behind Random number generation:
    http://spectrum.ieee.org/computing/hardware/behind-intels-new-randomnumber-generator/0

    Can this be exploited to produce a random flickering effect? Then we wouldn't need microcontrollers, right? forgive me if I'm wrong, its just a thought. We don't need numbers here, just a sequence, right?

    http://imotp.sourceforge.net/noise.pdfhttp://imotp.sourceforge.net/noise.pdf

    Here, they give a circuit related to the topic. Maybe this can be exploited? It produces high quality randomness.
     
Loading...