Im a very beginner to electronics. Im trying to build a simple circuit with push on off latch button. Means if we push the switch first the led should on, again push it should off.

So when in search I got a circuit as shown below. But its little different from my requirement. My requirement is like there are 5 switches. When ever a switch presses the corresponding led should toggle. Also the worry is if we hold the switch to the on state for some seconds, does it toggles quickly. if so how can we avoid that. Like even if we hold the switch it only should toggle one time

enter image description here

So if first switch presses, it should turn its corresponding led if the led is off. Same way when the second, second led should on (if its off). 3rd 4th 5th are same. So when 1st again press the first led should go off. Requesting kind help.

Also a very dump question. In circuits there is marked ground?? So if a battery power circuit, what is mean by ground???

  • 2
    \$\begingroup\$ I'd use a microcontroller - it will be much easier, cheaper and have fewer components. Connect negative side of battery to all grounds of the same type (directly or indirectly). \$\endgroup\$ Jul 19, 2017 at 10:10
  • \$\begingroup\$ Sorry.. Im a very beginner. No idea how to deal with microcontroller.. just starting with basics.. \$\endgroup\$ Jul 19, 2017 at 10:22
  • \$\begingroup\$ ground is normally the 0V \$\endgroup\$ Jul 19, 2017 at 10:23
  • \$\begingroup\$ I feel that we, as solvers, don't need to know that there are 5 LED's, that's a little bit misleading in the question. For one second I thought that there was one button that toggled through all 5 and the off state. \$\endgroup\$ Jul 19, 2017 at 10:30
  • \$\begingroup\$ You might also like to consider using a cross coupled 4011 NAND gate or even a 555 using the trigger and reset inputs - (circuitdigest.com/electronic-circuits/…) \$\endgroup\$ Jul 19, 2017 at 10:31

2 Answers 2


enter image description here

Figure 1. "Latching a pushbutton". Source: Talking Electronics.

  • When the circuit is turned on, capacitor C1 charges via the two 470k resistors. When the switch is pressed, the voltage on C1 is passed to Q3 to turn it on. This turns on Q1 and the voltage developed across R7 will keep Q1 turned on when the button is released.

  • Q2 is also turned on during this time and it discharges the capacitor.

  • When the switch is pressed again, the capacitor is in a discharged state and this zero voltage will be passed to Q3 turn it off. This turns off Q1 and Q2 and the capacitor begins to charge again to repeat the cycle.

So if a battery power circuit, what is mean by ground?

Ground is taken as the zero reference. Very often it is the battery negative. See my answer to positive vs negative, power vs ground, flow direction for some more ideas on this topic.

  • \$\begingroup\$ woow, thanks a lot \$\endgroup\$ Dec 14, 2023 at 13:53

What you need are 5 bi-stable switches, something like the T flip-flop (well, not exactly but similar).

You can do that with either:

  • a microcontroller, as RedGrittiBrick pointed out
  • 5 T flip-flops with their input at logic '1' and your switches commuting their CLK
  • any other bi-stable logic circuit

Note that, in order to create a logic input from a switch, you need a pull-up and pull-down circuit, for instance using a resistor as pull-down and the switch as pull-up:


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ For TTL or CMOS, you're usually better off with a pull-up resistor and a switch going to ground. You usually want a capacitor across the switch, for a cheap debounce circuit. For ECL, use a level translator. \$\endgroup\$ Jul 19, 2017 at 18:11
  • \$\begingroup\$ @JohnR.Strohm thank you, you're right. Though I think that in order to understand the principle using Falstad, the simplest circuit could help too \$\endgroup\$
    – clabacchio
    Jul 20, 2017 at 6:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.