1 input 4 output circuit for light control

Discussion in 'Digital Circuit Design' started by Ahhus21, Nov 5, 2017.

  1. Ahhus21

    Thread Starter New Member

    Nov 5, 2017
    2
    0
    Hello guys, sorry for my bad English.
    I'm an electrician but I'm slow with logic. Here I want to ask how to make a 1 input and 4 output circuit with this sequence:
    1. I=1; O1=1; other output=0
    2. I=0; all output=0
    3. I=1; O2=1; other output=0
    4. I=0; all output=0
    5. I=1; O3=1; other output=0
    6. I=0; all output=0
    7. I=1; O4=1; other output=0
    8. I=0; all output=0
    9. I=1; all output=1
    10. I=0; all output=0
    11. Back to start

    I try to simulate it but I'm going nowhere with my bad logic understanding. I want to make it only with 1 on-off switch and some relays. Is it possible?

    Thank you for your answers
     
  2. AlbertHall

    AAC Fanatic!

    Jun 4, 2014
    6,376
    1,476
    What lights are you trying to control - LEDs, Mains powered, etc.?
     
  3. Ahhus21

    Thread Starter New Member

    Nov 5, 2017
    2
    0
    Just lamps for a room
     
  4. ScottWang

    Moderator

    Aug 23, 2012
    6,288
    972
    Here is the idea:
    Switch → NE555 monostable circuitCD4017 → Q0(O1), Q2(O2), Q4(O3), Q6(O4), Q8 to Reset(CD4017) → 4 Transistors and 4 Relays → 4 lamp
     
  5. AlbertHall

    AAC Fanatic!

    Jun 4, 2014
    6,376
    1,476
    Except the '555 is redundant:
    upload_2017-11-5_16-20-16.png
     
    Lakparinji and ScottWang like this.
  6. ScottWang

    Moderator

    Aug 23, 2012
    6,288
    972
    The output of CD4017 all wrong, that will can't match the condition of
    2. I=0; all output=0

    4. I=0; all output=0

    6. I=0; all output=0

    8. I=0; all output=0

    10. I=0; all output=0
     
  7. AlbertHall

    AAC Fanatic!

    Jun 4, 2014
    6,376
    1,476
    True. It needs a bit more.
     
  8. ScottWang

    Moderator

    Aug 23, 2012
    6,288
    972
    If the TS needs more current of relay then R3~R6 should be reduce some more and the CD4017 changes to 74HC4017 and it can be provides more current for the transistors, this circuit also needs a 5V ac to dc adapter.

    Another considering is that if the TS want to use the 12V relay then ic only can be use CD4017, because the Vmax of 74HC4017 is 6V.

    Switch_NE555_CD4017_Bjt_Relay_AlbertHall.gif
     
  9. ebeowulf17

    Well-Known Member

    Aug 12, 2014
    2,328
    409
    That schematic looks close to me, but doesn't handle state #9 with all outputs on. I imagine you could use diodes to run output Q8 to all 4 resistors R3-R8, then connect Q9 to reset pin.
     
    be80be and ScottWang like this.
  10. crutschow

    Expert

    Mar 14, 2008
    19,760
    5,531
    For the circuit in post #8, you could also use a CD4071 quad 2-input OR gate.
    • Each OR gate output goes to its respective transistor input.
    • One of the OR gate inputs goes to the respective CD4017 output.
    • The other OR gate inputs are all connected to the Q8 output.
    • Output Q9 goes to the reset pin.
    This will turn on all the lights as the last step in the sequence.
     
  11. ScottWang

    Moderator

    Aug 23, 2012
    6,288
    972
    Thank you.
    I missed the condition 9.
    9. I=1; all output=1

    Switch_NE555_CD4017_Bjt_Relay-02_AlbertHall.png
     
  12. AlbertHall

    AAC Fanatic!

    Jun 4, 2014
    6,376
    1,476
    Yes it does, that's what the NOR gates are doing.
    All it is missing is that all outputs should be off when the button is released.
     
  13. AlbertHall

    AAC Fanatic!

    Jun 4, 2014
    6,376
    1,476
    And here it is including the missing bit!
    Each press of the button advances the count of the '4017 so selecting the next relay in the sequence until the fifth press where Q4 will be high. This is fed by the NOR gates to all four lights. The next press resets the '4017 by the link between Q5 and reset. While the button is pressed the 2N7000s are enabled but when the button is released they are turned off, disabling any selected channel.
    upload_2017-11-6_10-28-39.png
     
    absf likes this.
  14. absf

    Senior Member

    Dec 29, 2010
    1,850
    505
    Adding the four 2n7000 mosfet finally fulfill what the TS was asking. Can the 4x 2n7000 be replaced with a CD4066?

    Allen
     
  15. AlbertHall

    AAC Fanatic!

    Jun 4, 2014
    6,376
    1,476
    No. The typical 'on' resistance of the '4066 is 125Ω which is going to be greater than the relay coil resistance.
     
    absf likes this.
  16. AlbertHall

    AAC Fanatic!

    Jun 4, 2014
    6,376
    1,476
    For comparison, here's the microcontroller version:
    upload_2017-11-6_11-20-22.png
     
    eetech00 likes this.
  17. eetech00

    Senior Member

    Jun 8, 2013
    1,141
    232
    Can you really use Q0?
    Isn't that high when chip is reset?
     
    absf likes this.
  18. AlbertHall

    AAC Fanatic!

    Jun 4, 2014
    6,376
    1,476
    The sequence would be correct, but there is no power on reset for the '4017 so the start point is undefined.
    MK3 coming.
     
  19. AlbertHall

    AAC Fanatic!

    Jun 4, 2014
    6,376
    1,476
    MK3 version. It now has a power on reset. After power is applied, C3 will reset the '4017 so Q0 will be high - no lights on as the button is not pressed. The first press of the button will set Q1 high and light the first light. The sequence proceeds as before. Note that it is now Q0 which turns on all four lights.
    upload_2017-11-6_15-11-12.png
     
    absf likes this.
  20. eetech00

    Senior Member

    Jun 8, 2013
    1,141
    232
    Here is an alternate circuit.
    RlySequencer3-Ckt.png RlySequencer3-Sim.png
     
    absf likes this.
Loading...