Connect with us

on on off off flasher unit?

Discussion in 'Electronic Basics' started by Rob Convery, Aug 31, 2006.

Scroll to continue with content
  1. Rob Convery

    Rob Convery Guest

    I am looking to build a small unit which will power some 12v LEDs. I would
    like the unit to have two output with the following sequence

    LEDS1: ON ON OFF OFF....etc
    LEDS2: OFF OFF ON ON...etc

    Anyone have an solution to this fairly simple problem? Could I program a
    small chip to do this?

    Cheers

    Rob
     
  2. Chris

    Chris Guest

    Hi, Rob. How about 2 chips, no programming (view in fixed font or M$
    Notepad):

    | ___
    | .---|___|--.
    | | 680K |
    | | |
    | | __ | .----------------.
    | o---| \ | | |
    | | | H )o-o--oCLK 4020 RSTo-. To 12V LEDs
    | o---|__/ | | |
    | +| 1/4 4093 | Q3 Q2 Q1 |===
    | 1uF--- '---o---o---o----'GND VCC
    | --- | | __ |
    | | | o-------| \ ___ |< 2N3
    | === | | | H )o-|___|-| 906
    | GND o-------)-------|__/ 10K |\
    | | | 1/4 4093 |
    | | | '--->
    | | | VCC
    | | | __ |
    | | __ '-------| \ ___ |< 2N3
    | o---| \ | H )o-|___|-| 906
    | | | H )o------|__/ 10K |\
    | '---|__/ 1/4 4093 |
    | 1/4 4093 '--->
    (created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)

    The 4093 is a quad NAND gate with Schmitt trigger inputs, and the 4020
    is a binary counter.

    The leftmost NAND gate is a cheapie square wave oscillator, with a
    frequency of a couple of Hz. It clocks the 4020 counter. The output
    of the least significant bits of the counter look like this:


    .----------------------.
    | Count Q3 Q2 Q1 |
    | -------------------- |
    | 0 0 0 0 |
    | -------------------- |
    | 1 0 0 1 |
    | -------------------- |
    | 2 0 1 0 |
    | -------------------- |
    | 3 0 1 1 |
    | -------------------- |
    | 4 1 0 0 |
    | -------------------- |
    | 5 1 0 1 |
    | -------------------- |
    | 6 1 1 0 |
    | -------------------- |
    | 7 1 1 1 |
    '----------------------'

    With NANDing the outputs together, you can see that the upper PNP
    transistor will turn on when the counts are "1" and "3", while the
    lower one will turn on when the count is "5" and "7". Of course, the
    counter just recycles and counts 0 to 7 over and over, so your LEDs
    will keep flashing until power is removed.

    And by the way, an 8-pin PIC is good for this kind of thing, too.

    If this is too complex, feel free to post questions.

    Cheers
    Chris
     
  3. Rob Convery

    Rob Convery Guest

    Thanks chris - thats just the sort of thing I am looking for although just
    realised that its not quite what I am after. Its really

    LED1 on off on off off off off off
    LED2 off off off off on off on off

    For the circuit above I presume it would need a 5v supply for the chip. Is
    it possible to alter the speed of the oscillater by adjusting the
    cap/resistor?
     
  4. Rob Convery

    Rob Convery Guest

    Sorry - read it through a second time and reslised this does flash as
    expected. Looked at the specs for the 4039 and it looks like it does accept
    12v without much problem. So the only question is about adjusting the time
    of the flash
     
  5. Rob Convery

    Rob Convery Guest

  6. Chris

    Chris Guest

    Hi, Rob. The only difference between your sequence and mine is on
    startup. Yours starts with LED1 ON, and mine with it OFF. Once it
    gets going, it's the same.

    I'm afraid I was a little sloppy in relying on the 4020 pinout from
    memory. I mixed up the 4020 and 4040. In fact, as you said, Q1
    through Q3 on the 4020 are internal, and don't have pins. You could
    multiply the clock rate by 8, and replace Q1 above with Q4, Q2 with Q5,
    and Q3 with Q6. Either that, or you could use the CD4040, or MC14040,
    which is what I guess I meant. Q1 thru Q3 are available on that IC.

    And yes, the oscillator frequency on the 4093 is dependent on the
    values of R and C. As a very rough rule of thumb, the oscillation
    frequency will be about 1/(R * C) +/-50%. You can play with it to get
    it tweaked in by putting a 100K resistor in series with a 500K pot, but
    it seems the frequency will be somewhat temperature dependent. If you
    need an accurate clock frequency that's stable over time, try a 555 --
    your accuracy will basically be that of the cap.

    Here are the data sheets:

    http://www.onsemi.com/pub/Collateral/MC14040B-D.PDF
    http://www.onsemi.com/pub/Collateral/MC14093B-D.PDF

    Good luck
    Chris
     
  7. ehsjr

    ehsjr Guest

    Use a 4017 (it's an easy to understand decade counter)
    and diodes, like this:

    16 8
    +12 -------------+ +-------------+
    | | |
    ---------------------------------- |
    | enable|--------+ 13
    14 >----|clock input | |
    | reset|---+ 15 |
    | 0 1 2 3 4 5 6 7 8 9 | | |
    ---------------------------------- | |
    | | | | | | |
    [D1] [D2] [D3] [D4] +------------+ |
    | | | | 9 | |
    +--+--+ +--+--+ | |
    3 | 4 10 | 5 | |
    | | | |
    [1K] [1K] [10K] |
    | | | |
    [LED1] [LED2] | |
    | | | |
    Gnd -------------+-----------+---------------------+----+

    The 4017 *pin* numbers are given outside the box, and the
    count numbers are given inside the box. For example,
    when the count is 4, pin 10 will be + and LED2 will be on.

    Use whatever you want to make pulses for the counter
    input - a 555, or the 4093 already mentioned.

    You said "I am looking to build a small unit which will
    power some 12v LEDs." There's no such thing as 12v LEDs.
    Typical red LEDs are ~1.8v. What LEDs will you be using?
    With the circuit above, you can run red LEDs - if you
    are using something different like white LEDS, the 1K
    resistor value will need to be changed.

    Ed
     
  8. jasen

    jasen Guest

    you could, but a 555 is all you need.

    connect some out-to-ground and the others +12-to-out.
     
  9. Rob Convery

    Rob Convery Guest

    snip
    Thanks for all your help. Going to go with a 4.7uF cap and a 100K pot which
    should give me a range from 2.5Hz and up

    Only query was the chip - the 4024 does what I need I think which is the 7
    bit counter rather than the 4020 which is 14-bit.
     
  10. Chris

    Chris Guest

    Any binary counter should be OK -- no problem with the 4024 if you've
    got it, it'll be just fine.

    You might want to look at Ed's idea, too -- it will also work well, and
    would be less expensive if you happen to have a 555 and a few diodes in
    your junkbox.

    His note about 12V LEDs is also worth mentioning. There are some 12V
    lamps that are made with LEDs, and they have built-in resistors. If
    you're just using a plain LED, be sure to add a series resistor.

    Good luck
    Chris
     
  11. Chris

    Chris Guest

    Oh, and also make sure you put a 10K resistor in series with the 100K
    pot if you're using the 4093 oscillator. That will give you a 10:1
    adjustment range. CMOS outputs don't like driving large capacitive
    loads.

    Cheers
    Chris
     
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

-