HELP: CD4013 as toggle switch

Discussion in 'General Electronics Chat' started by hamopp, Aug 6, 2012.

  1. hamopp

    Thread Starter Active Member

    May 13, 2009
    68
    1
    Hi Guys
    Found this ckt online
    (note 1) If you leave out D2, D3, D4 & D5 you'll have two independent toggle switches.

    (note 2) Successive pushes on the orange button will energize and de-energize only the orange relay.
    And the blue button will behave in a similar manner.

    (note 3) If you keep D3 and D4 then - as well as energizing its own relay - each button will de-energize the opposing relay.
    This means that you can switch back and forth from one relay to the other.
    It also means that the two relays can never be energized at the same time.
    As soon as you energize one - the other drops out.

    What i need is a 4 button version of this, using 2 cd4013 ic's, but using note 3 method.
    Also can sw1 be on when power on reset, as it is the audio filter bypass relay, and the others off when power on reset ?

    Thanks
    hamopp
     
  2. hamopp

    Thread Starter Active Member

    May 13, 2009
    68
    1
    Hi
    58 views !!
     
  3. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Assuming this circuit works as it purports, you would add two diodes (eight total in addition to the two D3s and two D4s) between each switch output and the reset pins of the other flip-flops.

    So, referencing your posted schematic, three diodes would be attached to pin 3, D3 plus two more. D3 gets connected to pin 10 as shown. The second diode gets connected to pin 10 of the second 4013 IC. The third diode goes to pin 4 of the second IC. All diodes are in the same orientation as D3. Repeat this for the remaining switches. When SW1 is pressed, the first orange relay will turn on and a reset signal is sent to the other three flip flops turning all three remaining relays off.

    Hope this helps.
     
  4. hamopp

    Thread Starter Active Member

    May 13, 2009
    68
    1
    Hi
    Thanks for your help
    I will try to see if i can understand what you say about the extra diodes
    Time to dig out my big breadboard, will let you know how i get on

    Thanks again
    hamopp
     
  5. absf

    Senior Member

    Dec 29, 2010
    1,493
    372
    Hi, have you got your circuit working?

    I used paint to add in the diodes for you just in case you didnt understand how to hook-up the thing.

    Allen
     
  6. hamopp

    Thread Starter Active Member

    May 13, 2009
    68
    1
    Hi
    ABFS, Thanks for that edited ckt, i see that you have removed diodes D2 and D5, are these not needed ?.

    I would like the switches to work like this;
    When powered on, Sw1 to be ON and the others OFF, as Ry1 is the audio filter bypass relay.
    Press Sw2 and Ry1 go OFF, and Ry2 go ON.
    Press Sw3 and Ry1 and Ry2 go OFF, and Ry3 go ON.
    Press Sw4 and Ry1, Ry2 and Ry3 go OFF, and Ry4 go ON.

    Pressing any one of the switches turns the others OFF.

    Thanks to all members for all the help given.
    hamopp
     
  7. absf

    Senior Member

    Dec 29, 2010
    1,493
    372
    See my mod in the attached diagram. Just add D101, D102, R100 and C100 and that should give you the same effect as pressing SW1 during power on.

    I misread your (note 3) on your first post. You may put them back if you want to. But I simulated it on Proteus and the circuit works without them.

    Allen
     
  8. hamopp

    Thread Starter Active Member

    May 13, 2009
    68
    1
    Hi
    I have added D101, D102, R100 and C100 to the attached diagram in RED, but it do not work as to set SW1 as ON,
    when i first power ON none of the leds (LED1 and 2) are ON.
    I have only built this circuit with one 4013 and without D9,10,11,12,8,7,5 and 2, i also removed both Q1,2 and there relay parts
    as the outputs are to drive BS170 mosfet switches.

    When i
    press SW1, LED1 lights, then press SW2, LED1 goes out and LED2 lights, so that side of the circuit seems to work ok
    When i
    add D101, D102, R100 and C100, things go west:confused:

    hamopp
     
  9. absf

    Senior Member

    Dec 29, 2010
    1,493
    372
    The capacitor C5 at pin 4 should be connected to GND instead of +12V.

    Allen
     
  10. hamopp

    Thread Starter Active Member

    May 13, 2009
    68
    1
    Hi
    So both C5 and R7 go to GND ?, or should R7 go to +12V ?
    Thanks
    Howard
     
  11. hamopp

    Thread Starter Active Member

    May 13, 2009
    68
    1
    Hi

    Well i found my big breadboard and i have made both circuits, but without
    the power on mods and the darn thing works as it should,
    as well as energizing its own led - each button will de-energize the opposing led.
    I just need to have it work this way:
    When powered on, Sw1 to be ON every time and the others OFF.
    But i just not able to get it to work right.

    Thanks
    hamopp
     
  12. absf

    Senior Member

    Dec 29, 2010
    1,493
    372
    Yes, both C5 and R7 go to ground and you're in business.

    Allen
     
  13. hamopp

    Thread Starter Active Member

    May 13, 2009
    68
    1
    Hi all
    Thanks to all the help given by Allen(absf)
    I have now got this circuit to work as i wanted

    Thanks again
    Howard
     
    absf likes this.
Loading...