how to ........sequentially control two lights with one switch

Discussion in 'General Electronics Chat' started by firosekhan, Apr 13, 2016.

  1. firosekhan

    Thread Starter New Member

    Apr 13, 2016
    15
    1
    Hi,
    Recently, i brought a dual LED ceiling light. It has 2 independent lights. Center one is 6W white light and on rim it has 2W blue light. It operates from regular switch. Sequence is as follows
    (White light = light A and Blue light = light B)

    This is one complete Cycle

    1st On -> Light A ON, Light B OFF
    1st Off -> Light A OFF, Light B OFF

    2nd On -> Light A OFF, Light B ON
    2nd Off -> Light A OFF, Light B OFF

    3rd On -> Light A ON, Light B ON
    3rd Off -> Light A OFF, Light B OFF
    Cycle repeats...

    I want to have such controller to use with other appliances as these can be really helpful, where you have conceal wiring. Please suggest what/how to make such controller.
     
  2. Marley

    Member

    Apr 4, 2016
    142
    40
    Obviously it "remembers" the last state while the power is off. I expect it has a simple micro-controller inside with flash memory.
    So you need a simple micro-controller and support circuits.
     
  3. dl324

    Distinguished Member

    Mar 30, 2015
    3,211
    619
    The functionality is built into the light. How do you want other appliances to respond?
     
  4. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    It's a great idea, but probably harder to turn into a generic device controller than you think. For one thing, it is controlling low voltage LED lights with the controller integrated into the LED power supply, not a line-powered controller switching AC power to two unknown devices such as table lamps or fans.

    About that flash memory... I agree that if it always picks up where it left off in the rotation no matter how much time there is between switch action, then flash or EEPROM is needed. But if it is the case that the switch controller resets to the beginning of the cycle if it is off for a long time, then no flash and no uC are needed. I'll try to explain...

    If the switching action is modified like this:
    1st On -> Light A ON, Light B OFF
    1st Off -> Light A OFF, Light B OFF

    2nd On -> Light A OFF, Light B ON
    2nd Off -> Light A OFF, Light B OFF

    2 hour delay

    3rd On -> > > What?

    If, after a 2 hour Off delay, the 3rd cycle is as in post #1 with Light A ON, Light B ON, then non-volatile memory is needed. But if the cycle resets itself during an Off period of, say, 2 seconds, so that the 3rd On would in fact be a 1st On, then all you need is 1.9 seconds of holdup. I think this is a better way to go because you can reset the cycle back to the start with less switch action. A variation of this idea is going on in another thread.

    ak
     
  5. firosekhan

    Thread Starter New Member

    Apr 13, 2016
    15
    1
    dl324, inspite it is designed for 12V led, it can be turned into generic usable controller by using 12V relays.

    Thanks for all your replies. Since, the item is readily available in the market and in very compact form, i expect there must be some feasible solution to make this. Waiting for the right solution...............
     
  6. Picbuster

    Member

    Dec 2, 2013
    373
    50
    Make a counter use bit 0 and bit 1 to drive the lights use fet's for led's and relays to switch mains power.
    that's all. (pwr-on is all off)
     
  7. highvoltpower

    New Member

    Apr 5, 2016
    12
    0
    If u are run a light switches the blank wire form the switch via the light box directly connected on the light terminal and the white wire from the supply wire.
     
  8. firosekhan

    Thread Starter New Member

    Apr 13, 2016
    15
    1
    Picbuster Can you please elaborate the details.........Thanks
     
  9. GopherT

    AAC Fanatic!

    Nov 23, 2012
    5,979
    3,686

    Something like this.

    You have 6 discrete states. You need three control bits (8 max). Therefore you need the NAND gate to reset the counter when it reaches the 7th state so you stay in the first 6.


    The mosfet drives the coil of the relay so you can have Control of AC Mains powered lights or other devices.

    Add a capacitor parallel with the switch for debouncing.

    Use CD4000 components if you want to do automotive and run 12 v.

    image.jpg
     
  10. Picbuster

    Member

    Dec 2, 2013
    373
    50
    See GopherT 's schematic
    if you use a 74ls93 then nand gate is in the chip (pin 2 & 3)
    There is some optimizing possible but this will save you one fet.
     
  11. firosekhan

    Thread Starter New Member

    Apr 13, 2016
    15
    1
    Hey GopherT and Picbuster, Thanks for the detailed info. Schematic looks practically feasible. Definitely will give it a try and come up with the result.
     
  12. firosekhan

    Thread Starter New Member

    Apr 13, 2016
    15
    1
    Now the question is how it will retain the status because every alternate click is power off. Without power how it will latch the status???
     
  13. GopherT

    AAC Fanatic!

    Nov 23, 2012
    5,979
    3,686
    The bottom output of the counter (Q0) alternates on/off with each press. That means Q0 alternately turns on/off the N-channel mosfet with each press.
     
  14. GopherT

    AAC Fanatic!

    Nov 23, 2012
    5,979
    3,686
    It cycles as follows.

    From counter = 0 to counter = binary 5. (6 total states). It starts with both off and then both on, then all off, B, off, A, off then repeat. User can stop at any point.

    image.jpg image.jpg image.jpg image.jpg image.jpg image.jpg image.jpg
     
  15. firosekhan

    Thread Starter New Member

    Apr 13, 2016
    15
    1
    awesome reply........a big thanks GopherT.
    By d way, which software you have used to simulate d circuit?
     
  16. GopherT

    AAC Fanatic!

    Nov 23, 2012
    5,979
    3,686
    iCircuit for iPad
     
  17. dacflyer

    Member

    Nov 19, 2010
    13
    0
    i remember years ago you could buy a module like this.. was for a light kit, and all you had to use was your ordinary house light switch..just flick it for which mode you wanted it.
    i'll do some searching and see if i can find something and post it here..
    it is like a 2 circuit fan light switch, but electronic in nature..
     
  18. dacflyer

    Member

    Nov 19, 2010
    13
    0
  19. Jony130

    AAC Fanatic!

    Feb 17, 2009
    3,957
    1,097
    This circuit (using only HFE 4017) will also do the job
    1u.png

    But if I had to build such a circuit I will use a micro-controller (ATtiny13 or smaller).
     
  20. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    What is the reason for or advantage of having an of state between each on state combination?
    ak
     
Loading...