How to latch a momentary switch circuit

Written by peter syslo
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to latch a momentary switch circuit
Momentary switches are often used as buttons in video game controllers. (Jupiterimages/Photos.com/Getty Images)

A momentary switch is an electronic component that is used for quick changes between "on" and "off" states. A push button on a video game controller is a common example of a momentary switch. When a push button is pressed, it goes into the "on" state and when it is released, it immediately goes into the "off" state. Sometimes it is desirable for a circuit to maintain the on or off state of a push button after it is released. The process of maintaining the state of a push button is called "latching." There are electronic components that are used for latching, such as the J-K flip-flop. The J-K flip-flop requires a minimal number of connections, and a basic LED circuit demonstrates how it operates.

Skill level:
Moderately Easy

Other People Are Reading

Things you need

  • 7805 voltage regulator
  • Electronics breadboard
  • 7805 data sheet
  • 9-volt battery clip
  • J-K flip-flop DM7476 (or equivalent model)
  • J-K flip-flop data sheet
  • Jumper wires
  • Push button (two-terminal, momentary)
  • Two 1K resistors
  • 330-ohm resistor
  • LED (general-purpose, low-voltage)
  • 9-volt battery

Show MoreHide

Instructions

  1. 1

    Insert the 7805 voltage regulator into the breadboard, vertically. The three pins should be in separate rows.

  2. 2

    Locate the "Input," "GND" and "Output" pins of the 7805. Refer to the 7805 data sheet for the pin description. Connect the red wire of the 9-volt battery clip to the 7805 Input pin. Connect the black wire of the battery clip to the 7805 GND pin.

  3. 3

    Insert the J-K flip-flop into the breadboard. The flip-flop should straddle a blank breadboard column that divides the rows into A-E and F-J sections. The notch should be on top. Pin 1 of the flip-flop is to the left of that notch.

  4. 4

    Connect the 7805 Output pin to the flip-flop pin labelled "Vcc." Use a jumper wire for the connection and refer to the flip-flop data sheet for the pin description. This provides a steady 5V level to activate the flip-flop.

  5. 5

    Connect the flip-flop pin labelled "GND" to the 7805 GND pin. Use a jumper for the connection. The 7805 GND pin is the main connection for circuit ground.

  6. 6

    Insert the push button into the breadboard so that it straddles the blank divider column, as the flip-flop does. Connect one pin/side of the push button to the 7805 GND pin.

  7. 7

    Connect one leg of each 1K resistor to the 7805 Output pin. Use jumper wires for the connections if breadboard space is a concern.

  8. 8

    Connect the free leg of one 1K resistor to the flip-flop pins labelled "J1" and "K1." Use a jumper to connect the resistor leg to both locations. These connections hold the J and K inputs at a steady 5V level, which sets the flip-flop to "toggle" mode.

  9. 9

    Connect the flip-flop pins labelled "PR1" and "CLR1" to the flip-flop J1 pin, with jumpers. This holds PR1 and CLR1 at a steady 5V level. These two pins might clear and preset the flip-flop if they are not held at 5 V.

  10. 10

    Connect the free leg of the other 1K resistor to the free pin of the push button. Connect the flip-flop pin labelled "CLK1" to the same push button pin. The push button provides an alternating 5V and 0V signal to the CLK1, or clock, input.

  11. 11

    Connect one leg of the 330-ohm resistor to the flip-flop pin labelled "Q1." Connect the other leg of the 330-ohm resistor to the anode (longer leg) of the LED. Connect the cathode (shorter leg) of the LED to the 7805 GND pin. The push button and flip-flop will turn the LED on and off.

  12. 12

    Connect the 9-volt battery to the battery clip.

  13. 13

    Press and release the push button. A press of the push button turns on the LED. It remains on because the flip-flop maintains the on state. The on state corresponds to a 5V level at the Q1 output of the flip-flop.

  14. 14

    Press and release the push button, again. A second press of the push button turns off the LED. It turns off because the flip-flop now maintains the off state. The off state corresponds to a 0V level at the Q1 output of the flip-flop. Each press-and-release of the push button toggles the Q1 output between on and off, or 5 V and 0 V. That is how the flip-flop works as a push button latch.

Tips and warnings

  • There are two independent flip-flops in the DM7476. The pins labelled with a "1" represent the first flip-flop. Technically,the push button is the clock signal that makes the flip-flop toggle between 5 V and 0 V at its output, Q1. The J-K flip-flop is a dynamic component, like computer RAM. This means that it will lose any latched state when power to the circuit is turned off.
  • Take precautions for static electricity when handling integrated circuits, especially the CMOS type.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.