Momentarily switch to latch on/off LED

Discussion in 'The Projects Forum' started by Ongsl, Apr 25, 2013.

  1. Ongsl

    Thread Starter New Member

    Apr 18, 2013
    Hi all,

    I have some problems on designing the relay circuits:


    a) I require a momentary switch to latch On/Off LED using non latching relays. Meaning if I press the switch, the On LED lit and if I release the switch, On LED is still lit. When I press the switch again, the Off LED lit and remain lit after I realease the switch and On LED will not lit.

    The LEDs toggles and latch each time I pressed and depressed the momentary switch. The LED is powered by 12Vdc.

    Could someone guide me in this using some drawings? Many thanks for your help.
  2. aws505


    Mar 11, 2013
    Hi there,

    I've attached a schematic of something that I think will work. What I've done here is use a JK flip-flop and turned it into a T flip-flop. Any time the button is pressed, the flip-flop toggles states. The output of the flip-flop drives a FET transistor that will switch the 12V for the LED.

    Since the flip-flop needs a clock, I've hooked up an astable 555 timer to act as a clock. You can adjust the frequency of the timer by playing with R4, R5 and C2. If you pick it to be sufficiently fast (several kHz should do), then your eyes will not notice the delay.

    Perhaps there is an easier way, but I do believe this would work. I should point out that I have not simulated this circuit, though...
  3. crutschow


    Mar 14, 2008
    Toggle Relay circuits tend to be complex.

    Easier would be to use a single flip-flop which can be configured without a clock to make a T-FF to control a MOSFET switch.
    For example to use the D-type 4013 FF as a toggle circuit, connect the D input to the /Q output.
    Then connect the CLK (clock) input to the switch.
    Ground all other inputs (not outputs).

    Note that you will need to debounce the switch with a suitable circuit. This simple RC circuit should work:

    Connect a 10Ω resistor from the V+ to the PB switch.
    Connect the switch output to the FF CLK input.
    Connect a 100kΩ resistor from the CLK input to ground.
    Connect a 1μF (or larger) capacitor from the CLK input to ground.