Connect with us

First ever project, How do I make randomness???

Discussion in 'General Electronics Discussion' started by johnreb23, Mar 20, 2015.

Scroll to continue with content
  1. johnreb23

    johnreb23

    6
    0
    Mar 20, 2015
    Hi everyone, I have next to no experience with electronics or anything like it but I would like to do a simple (I hope) project, and would really appreciate some advice.

    Basically I want to make a box with three pairs of light bulbs and an on / off switch. When the switch is turned on, I would like one bulb from each pair to be randomly activated. Here is a basic drawing of what I am looking for:


    Untitled.png
    Is this possible with simple materials like a circuit board and resistors and all of that? or do I need some sort of computer to create the randomness? I really don't even know where to start and would really appreciate a push in the right direction.

    Thanks, John.
     
  2. KMoffett

    KMoffett

    723
    75
    Jan 21, 2009
    True randomness is difficult. It might be possible to drive each pair of lamps with with a LM555 astable oscillator. Each 555 would be operating at a different frequency. With the switch off, all three pairs would be continuously alternating between the two lamps, fast enough so that the eye's persistence's of vision (>30Hz) would not see the flashing. When the switch is turned on, all the 555s stop in their current state.

    Ken
     
  3. johnreb23

    johnreb23

    6
    0
    Mar 20, 2015
    Thanks for the response Ken, what you described would work for my purposes. It doesn't have to be actual randomness, just seem like it.

    I did some reading about this 555 timer and got the impression that it had one output and could turn a current on and off? Could I then use that oscillating output to operate a relay switch that sent power to one lamp when it was on, and the other when it was off?

    I appreciate the help because I am just trying to use logic and Google to figure this out, haha.

    Thanks again
     
  4. johnreb23

    johnreb23

    6
    0
    Mar 20, 2015
    Upon further research, it sounds like I should use a transistor instead of a relay switch due to the high frequency.

    This is quite the learning process.
     
  5. KMoffett

    KMoffett

    723
    75
    Jan 21, 2009
    Are these incandescent lamps or LED's? The 555 can output up to 200mA.
    The output of the 555 can pull a load high or low to turn it on. Just depends on what the lamp is connected to. In this case you connect your lamps in series. One lamp in connected to the +supply and the other is connected to common. The junction of the two lamps is connected to the 555's output. When the output goes high, the upper lamp is shorted out and the lower lamp is lit.When the output goes low, the lower lamp is shorted out and the upper lamp is lit.

    Ken
     
  6. johnreb23

    johnreb23

    6
    0
    Mar 20, 2015
    I was originally planning on reusing some incandescent bulbs that I have, but I would rather buy a few small LEDs if it would make this simpler to build.

    Thanks for bearing with me as I figure this out. What do you mean by one of the lamps being connected to common?

    -John
     
  7. KMoffett

    KMoffett

    723
    75
    Jan 21, 2009
    Lamps connected like this.

    555 Astable Temp.gif

    Ken
     
    hevans1944 likes this.
  8. johnreb23

    johnreb23

    6
    0
    Mar 20, 2015
    Thanks Ken, I've been staring at this diagram trying to decipher it for the last hour, that should give you an idea of how familiar I am with electrical diagrams :rolleyes:

    So I take it that I don't need a transistor as long as I keep the output of the 555 low enough to not fry it (200mA). I just need to figure out how to set up these three 555's to oscillate very fast and output the correct amperage to run the LEDs. Which I am reading is controlled by the resistors and capacitor that I hook up to it.

    And then I need to figure out how to fit the switch in that would freeze all of the LEDs in their current state. Or would it be three switches.

    I'm really wishing that I had taken electronics instead of woodshop in high school.
     
  9. KMoffett

    KMoffett

    723
    75
    Jan 21, 2009
    Just threw this together and replaced the lamps with LEDs and resistors.

    555 Astable Temp2.gif

    Ken
     
    Last edited: Mar 20, 2015
    hevans1944 likes this.
  10. johnreb23

    johnreb23

    6
    0
    Mar 20, 2015
    This is awesome!

    Thanks so much Ken, I never would have been able to figure all of this out on my own.

    I'll be sure to post pictures once I put this together, and I'm sure I'll have a question or two along the way. It's always fun to learn something new and I really appreciate your help.

    Thanks again, John
     
  11. KMoffett

    KMoffett

    723
    75
    Jan 21, 2009
    John,

    Happy to help along the way. But, now you will have to be my resource for woodworking questions. ;)

    Ken
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-