0
\$\begingroup\$

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???

\$\endgroup\$
  • 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\$ – RedGrittyBrick Jul 19 '17 at 10:10
  • \$\begingroup\$ Sorry.. Im a very beginner. No idea how to deal with microcontroller.. just starting with basics.. \$\endgroup\$ – Sandeep Thomas Jul 19 '17 at 10:22
  • \$\begingroup\$ ground is normally the 0V \$\endgroup\$ – JIm Dearden Jul 19 '17 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\$ – Harry Svensson Jul 19 '17 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\$ – JIm Dearden Jul 19 '17 at 10:31
1
\$\begingroup\$

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:

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\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\$ – John R. Strohm Jul 19 '17 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 '17 at 6:41
1
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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