Connect with us

LED control circuit

Discussion in 'Electronic Design' started by gstringe, May 18, 2006.

Scroll to continue with content
  1. gstringe

    gstringe Guest

    This will probably be easy for you folks who do this all the time and
    are up on what is available IC wise.

    I want to sequence an LED thru modes with a push button. It will
    sequence like this: on, flash, off, on, flash, off etc.

    I would supply steady power and flash power to a bus maybe as there
    will be a lot of LEDs to control.

    Any clever ideas out there?

    Many thanks for the help.
  2. Guest

    You didn't say what the flash time is compared to on and off times, but
    maybe you can use a decade counter like 4017 with 4 counts as 'on', 1
    count as 'flash' and the others off?

  3. qrk

    qrk Guest

    PIC, or eqivalent, microcontroller is a cheap way of doing this if you
    have the development kit. You could make a simple sequencer out of
    logic gates.
  4. Luhan

    Luhan Guest

    PIC10F200: 63 cents in quantity one from Mouser.

  5. gstringe

    gstringe Guest

    Thanks guys, yes I had thought of the 4017 but in a little different
    mode. The PIC sounds interesting and of course requires me to learn
    and exercise my brain. Yeeks!

    Lemme splain what I am a doin...This is the 4th system like this I have
    done in the last 20 years and it is a clinic or Dr. office exam room
    status system. Wall plate outside room with 3 colored lites and each
    lite has a double throw switch with center off. So one direction hooks
    the lamp to the steady power and other direction to the flash power.
    Each lamp can also be monitored at master status panels at various
    locations in the clinic if desired. This basic system is really
    simple, trouble free and if designed properly will last almost forever,
    cepting bulbs. Well the first three systems I did had incedescent
    bulbs and this newest one is going to use LEDs so I am toying with the
    idea of eliminating the switch and going to a lighted pushbutton that
    combines the functions.

    I thought I had retired from this kind of thing but the ole Dr. friend
    weasled me into one more system. Of course there are a couple of
    manufacturers that make this stuff but costs have put them out of the
    ballpark for the Dr. and me being Mr easy....well you know the rest.

    Please keep the ideas commin if you think of more.

    many thanks,
  6. Mac

    Mac Guest

    I think your basic idea is good. There is a flashing bus, a continuously
    on bus, and ground.

    For each button, there is a counter, which is configured so it resets
    itself when it gets to 11. So it counts as follows: 00, 01, 10, 00 etc.

    These counter outputs go to an analog mux/demux which, according to the
    input count, selects either the continuous bus, the blinking bus, or

    Let me know if you want more detail.

  7. gstringe

    gstringe Guest

    Aha, thanks Mac, I had the counter part figured but hadn't thought
    long enough about it to come up with the rest. I might think as an
    example that the outputs of lets say a 4017, one would turn on a
    transistor fed by the steady bus and the next output would turn on a
    transistor that was fed by the flash bus and the next one ground...Hmmm
    not bad thanks for the jog in the brain. The next step is can I make
    it simpler? Other than size I can't get much lower cost than a 4017,
    two transistors and a pushbutton. Right now I have three switches &
    three LEDs mounted on a single gang electric cover plate. Might get
    crowded. Could also put the control circuitry at a central place with
    the power supply. Why do I get myself into these things ;-)
  8. Tam/WB2TT

    Tam/WB2TT Guest

    You could do this:

    1)Run a clock at twice the blink rate into a D flip-flop.
    2) Lets assume a 0 at the Q output corresponds to LED ON.
    3) with SET and RESET (aka PRESET) inactive, the LED will blink at 1/2 the
    clock frequency.
    4) With the SET lead a 0, the LED will be OFF.
    5) With the RESET lead a 0, the LED will be ON.

    Control the thing with a 3 bit shift register. Use 1-1/2 dual D flip flops
    that powers up in state 011 ( the leftover stage is your D flip flop that
    connects to the LED). Connect the Q of the third stage to the serial input.
    Connect the push button (debounced) to the SR clock input. Connect the Q of
    the first stage to the RESET of the Dff,. Connect the Q of the third stage
    to the SET of the Dff.

    To power up in state 011, connect the RESET of the first SR and the SET of
    the other two SRs to a 22K resistor that goes to VCC, and a 10 uFd capacitor
    that goes to GND.

  9. Rich Grise

    Rich Grise Guest

    And $100.00 for the development kit, and 6 months to learn to program
    the damn thing.

    Just build a 3-stage Johnson counter, where step 1 is "ON", step 2 is
    "flash", which you can do with a 555 or a couple of transistors and
    some discretes, and "Off."

    What's the real problem?

    Good Luck!
  10. Rich Grise

    Rich Grise Guest

    Welcome to the world of consulting! ;-)

  11. markp

    markp Guest

    Bite the bullet and use a micro! I'd use a small Atmel AVR microprocessor
    such as ATtiny13 (8 pin dip with internal oscillator) for around $1.50,
    download the free evaluation version of CodeVisionAVR from
    which is code size limited but won't effect you for this app, buy a cheap
    programmer (ATAVRISP MK II), and write your program in C using the example
    programs as a guide. Go on, it'll be worth it! As an aside, CoveVisionAVR is
    one of the best and easiest to use C compilers I've come across -
    inexpensive, feature packed and very well supported. Worth paying for the
    full Standard version IMO. The AVR is also very much suited to C code.
    Buffer up the output with N-MOSFETs such as 2N7002 or use logic buffers.

  12. qrk

    qrk Guest

    Because it's fun!
    One other thing you need to consider. If you're using long wires to
    connect pushbuttons to your circuitry, using all these nice logic
    gates means you may need to protect the inputs that connect to
    pushbuttons from static and remote lightening strikes. A series
    resistor and pair of diodes will work. Don't forget to debounce your

    pushbutton----R----+---gate input
  13. John Fields

    John Fields Guest

    Geez, it's all so simple, isn't it?

    But... I don't see a schematic.

    "Left for the student" to figure out, huh?

    I'd call that "badvice"
  14. Rich Grise

    Rich Grise Guest

    Well, it's not .basics, after all - how hard is it to look up "johnson
    ring counter" on google?

  15. gstringe

    gstringe Guest

    Great thoughts and ideas folks.. I didn't expect this much help..again
    many thanks
Ask a Question
Want to reply to this thread or ask your own question?
Electronics Point Logo
Continue to site
Quote of the day