single switch to change operation

Discussion in 'General Electronics Chat' started by Yashabh Goyal, Jul 23, 2017.

  1. Yashabh Goyal

    Thread Starter New Member

    Jul 23, 2017
    4
    0
    I want a simple circuit in which i don't have to change the switch (it is fixed on off switch) but operation or mode of circuit is change.
    Ex: A circuit having one power source, switch, and two led light connect.
    I want to turn on one led at a time and other off. When i turn on the power using switch led1 on, led2 off and when i turn off switch led1 off, led2 off. Now when i turn on switch again led1 is off and led2 turn on... And this pattern continues.

    I want circuit before led bulb, after switch.

    Please help me in this if any doubt in question you can ask.
     
  2. #12

    Expert

    Nov 30, 2010
    18,078
    9,616
    No. Too many restrictions. When you say I can not reach before switch to get power for LED when switch is open, can not be done.
     
  3. MrChips

    Moderator

    Oct 2, 2009
    16,722
    5,127
    What you are seeking is a device with non-volatile memory. For a solid-state semiconductor circuit, that will require either backup battery operation or a device with EEPROM. You can do this either way with a simple microcontroller.

    A simpler solution is to find a mechanical switch with some sort of bi-stable mechanism.
    There is a pushbutton that will do this for you. It operates somewhat similar to the pushbutton ballpoint pen, push on, push off.
    This switch has SPDT contacts. When in the ON position, it alternates between two contacts on every second push.

    This switch has an ingenious mechanism. I have taken these apart to figure out how it works. There is a rotating wheel. Every time you press the button the wheel rotates, alternating between OFF and ON to a new contact position.

    (On a side note, when I ordered 25 of these, it was not what I had wanted and expected. I was seeking a momentary ON SPDT switch for bounce-free pushbutton operation. I ended up removing the wheel and creating what I really wanted.)

    https://www.digikey.com/product-detail/en/judco-manufacturing-inc/50-0041-00/529PB-ND/611178
     
  4. ScottWang

    Moderator

    Aug 23, 2012
    6,248
    970
    1. Switch on led1 on, led2 off
    2. Switch off led1 off, led2 off
    3. Switch on led1 off, led2 on
    4. Switch off led1 off, led2 off
    5. Goto 1

    Does the procedure same as above ?

    If that is true, probably using one cd4013 could match what you want.
     
  5. Yashabh Goyal

    Thread Starter New Member

    Jul 23, 2017
    4
    0
    Yes there are too many restriction but when you see your home lighting switch
    Then you understand.
    I want too add this with my home switch. That's why i don't want too interfere with the switch. And i want this thing too be portable so that i take it anywhere and in any socket
     
  6. Yashabh Goyal

    Thread Starter New Member

    Jul 23, 2017
    4
    0
    Yes the order is correct and i want exactly same.
    But can you please explain the cd4013 process.
     
  7. ScottWang

    Moderator

    Aug 23, 2012
    6,248
    970
    In series two stages of d flip flop as showed on the right side of the attached curcuit(the left side wasn't included).

    Maybe you need to using bjt or mosfet to drive the leds, and how much current does the led draw, what kind of led are you trying to use, and how is the Vf of led?

    And the input should be do some debounce for push switch.

    [​IMG]
     
Loading...