Relay hysteresis provides toggle function

Article By : Larry Stabile

How the humble electromechanical relay can be used to implement a push-on/push-off function and a binary counter.

In this Design Idea, we look at how electromechanical relays display hysteresis behavior that is surprisingly similar to the solid-state Schmitt trigger circuits, and how they can be used for many similar applications. This Design Idea is inspired by Vladimir Oleynik’s “Schmitt trigger provides toggle function”, an EDN Design Idea dated March 17, 2011 [1]. There are also related Design Ideas by Anthony Smith [3, 4, 5].

The circuit shown in Figure 1 takes an electromechanical approach to implementing a toggle function, replacing the Schmitt trigger IC in Olenyik’s design with a relay.

Momentary-contact pushbutton toggleFigure 1 A momentary-contact pushbutton toggle.

Like Schmitt triggers, relays are nonlinear and display hysteresis. The relay used here is a commodity HK-19F DPDT DIP relay [2], operating at 12 volts. Typical pull-in is at 7.3V (10mA), and typical drop-out is at 2.7V (3mA). This was measured over a batch of a dozen or so relays. This type of relay has a specified typical turn-on time of 5ms.

At power-on, a bias current of about 6mA flows through the coil of K1 via R1. This is insufficient for pull-in, so the relay remains off.  The normally-closed terminal of Pole 1 of K1 supplies 12V to the upper end of resistor R2.  When the button is pressed, C1 is thus charged to V+, in about 60ms. When the button is released, a pulse of current peaking at 12V is applied to the coil of K1. This turns on the relay, and it remains on after the capacitor has discharged down to the bias voltage, due to hysteresis and the bias current. When on, the normally-open contact of Pole 1 is closed, and grounds the upper end of resistor R2. Thus, when the button is pressed again, the capacitor is fully discharged, and when released effectively shunts the relay coil to ground, turning it off. It remains off because the coil current is now below the pull-in threshold.

Wow the engineering world with your unique design: Design Ideas Submission Guide

An advantage of this circuit is that maintaining state does not depend on latching and thus leaves one pole of the relay isolated and free for switching loads.  It provides push-on/push-off power functionality in a minimal, self-contained package.

This basic toggle module may be used in cascade to implement a binary counter. The circuit in Figure 2 implements a four-bit counter.  The input signal is in the form of 12V pulses. With the component values shown in Figure 1, the counter can handle signals up to 30Hz.

Four-bit binary counter driven by a variable-frequency relaxation oscillator

Figure 2 A four-bit binary counter, driven by a variable-frequency relaxation oscillator.

Note that in Figure 2 logical modularity is illustrated by showing the magnetic field of the relay coils (dotted lines) as part of signal coupling.  Physically, each relay is part of two successive bits of the counter.

The counter was test-driven using a relay oscillator, also shown in Figure 2. From a digital logic perspective, this is essentially a relaxation oscillator implemented using a single buffer followed by an inverter, with an RC-controlled feedback loop. The use of a 6V relay with a 12V supply allows for a relatively wide range of frequency control.  Due to the feedback loop, the 6V relay is not exposed to overvoltage. A frequency range of more than 5:1 was attained in tests, with the component values shown in Figure 1 covering about from 1.2Hz to 10Hz.

Of course, many kinds of relays are available and there are many variations on these circuits.  Metronomes and clocks are potential applications. An interesting challenge is to build accurate frequency sources using only relays and passive components. A further challenge is to design these circuits such that they could have been built before the era where tubes, transistors, and ICs were commonly available as active or passive switching components.


  1. Oleynik, Vladimir, Schmitt trigger provides toggle function, March 17, 2011,
  3. Smith, Anthony, A new and improved latching power switch, March 27, 2019,
  4. Smith , Anthony, Latching power switch uses momentary pushbutton, January, 2014,
  5. Smith, Anthony, Latching power switch uses momentary-action pushbutton, October 28, 2004,

This article was originally published on EDN.


Leave a comment