The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
Please vote in the Forum Structure Poll. Polling will close at 2PM EST on January 21, 2025.

Help wireing 3 LEDs in a rotating sequence

Hi guys, I'm trying to build a Infusion bottle for a costume for PAX, and I'd really like the bottle to light up like in Bioshock. However, that means that it needs to cycle between blue, red and yellow, and I don't know how to do that. I've got some skills in electrical work, but I think something like this would be beyond my knowledge. Any help would be appreciated! Thank you again for your time.

FTC: honk.
FTC: HONK.

HLRpxno.png
PAX Prime 2014 Resistance Tournament Winner

Posts

  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Tri-color LEDs, you can wire RGB independently. If you don't want to use a full microcontroller, you can get away with an oscillator, a counter and basic logic gates

  • Ghostly ClockworkGhostly Clockwork Registered User regular
    Don't mean to sound like a moron, but I have no idea what those are. My electronics skills are limited to resistors, capacitors and LEDs. Thank you though, it's a place to start, I'll start looking online for anything about those. Thank you again!

    FTC: honk.
    FTC: HONK.

    HLRpxno.png
    PAX Prime 2014 Resistance Tournament Winner
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    edited August 2013
    Ah, well if you want it to switch automatically you need an oscillator which generates a square wave pulse, a series of on-off at a given frequency - however it's hard to get really low frequency clocks, so you may have to use a counter to make it slower (use one of the output bits to divide the frequency by 2**N where N is the bit).

    To light up the LEDs, you need to cycle the colours, so let's say you want red -> yellow -> blue, so decomposing that into RGB, you light up red, red+green, blue. So let''s say you have a second counter set up to produce 0, 1, 2 (or 00, 01, 10). Then you'd wire r to the inverse of the high bit, green to the low bit and blue to the high bit

    The other option is to use a simple microcontroller, which is easier, sort of, but has more to go wrong

    Phyphor on
  • TechnicalityTechnicality Registered User regular
    edited August 2013
    There are LED's that will do all the tricky bits for you, but finding one that does just blue->red->yellow might be difficult. Try searching for things like "flashing RGB LED".

    Otherwise if the colour is crucial and you can't find one that does what you need, a simple microcontroller like the Arduino might be easiest for an electronics beginner, as the wiring would be simple, and the code would be really basic.

    If you are feeling brave and want to make a circuit there are lots of ways to do it, but all of them a little complicated. I'd probably try a shift register and a clock like the 555.

    Technicality on
    handt.jpg tor.jpg

  • DrunkMcDrunkMc Registered User regular
    Do you have any coding experience? Since you don't seem to know low level electronics (555 timers, counters) I would try to find a cheap Arduino. You can try to find one of the old models since you're just cycling three LEDs (or changing an RGB LED). Google Arduino, check out Instructables.com and YouTube. Its pretty simple.

  • TehSlothTehSloth Hit Or Miss I Guess They Never Miss, HuhRegistered User regular
    I haven't tried doing it with a tricolor LED but I think the easiest for your purposes (and definitely cheaper/smaller than using an arduino) is a 3-stage ring oscillator. You can get all the parts you need from radioshack if need be, although other suppliers are going to be much cheaper (but will take time, and shipping costs might be high for just getting a few transistors, caps, resistors, and leds). You could use 3 different LEDs but I don't think blues are very common unless you cannibalize it from something else.

    It's not the most simple circuit in the world -- trickier than a 555 timer and a decade/octal counter but a lot easier to source parts for if you don't have that stuff laying around.

    FC: 1993-7778-8872 PSN: TehSloth Xbox: SlothTeh
    twitch.tv/tehsloth
  • Ghostly ClockworkGhostly Clockwork Registered User regular
    I don't have any coding experience, and from the sound of what I've been reading both hear and offline, I think it's beyond my skill...I may have to go with plan B, and just use one color. Heh, luckly, I DO know how to wire up a single LED for constant glow. Thank you so much for your time and effort though!

    FTC: honk.
    FTC: HONK.

    HLRpxno.png
    PAX Prime 2014 Resistance Tournament Winner
  • halkunhalkun Registered User regular
    edited August 2013
    You are making things too complicated!
    Just get a Lilypad. They are super easy to wire up and program for flashy stuff. It seems scary, but they are super simple and really cheap. They are designed to be sown into costumes and clothing.

    If you follow this tutorial you have have a blinking light by step 6. All you have to do beyond that is wire up other lights around the edge and change the code a touch to blink those. It's really simple and a huge community can help you with code if you can't do it. Someone can even write it for you if you ask really nicely on their forums. (I've had people write me code that was much much more complex and I didn't even mean for them to do all the work for me.)


    halkun on
  • BlazeFireBlazeFire Registered User regular
    You really don't need to program anything. You can do this with components as others have mentioned. If you went to a hobbyist forum (a robotics one maybe?) you may have even someone draw up schematics for you.

  • dukederekdukederek Registered User regular
    edited August 2013
    Oddly enough, I made a circuit for something different which requires three outputs to be cycled between.
    TvbUvsZ.jpg
    (that's D type flip-flops and NOR gates both of which are cheap)

    All it needs is a clock signal (I suggest a 555 to get a decently slow signal) and in your case, LEDs connected to Ao, Bo, Co. IIRC each LED is lit for one clock cycle and then off for two.

    EDIT: how to 555: en.wikipedia.org/wiki/555_timer_IC#Astable

    dukederek on
Sign In or Register to comment.