Relay hysteresis provides toggle function

Ever-way HK19F

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” [1]. There are also related Design Ideas by Anthony Smith [2, 3, 4].

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.

A momentary-contact pushbutton toggle.
Figure 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, operating at 12 volts. Typical pull-in is at 7.3 V (10 mA), and typical drop-out is at 2.7 V (3 mA). This was measured over a batch of a dozen or so relays. This type of relay has a specified typical turn-on time of 5 ms.

At power-on, a bias current of about 6 mA 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 12 V to the upper end of resistor R2. When the button is pressed, C1 is thus charged to V+, in about 60 ms. When the button is released, a pulse of current peaking at 12 V 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.

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 12 V pulses. With the component values shown in Figure 1, the counter can handle signals up to 30 Hz.

A 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 6 V relay with a 12 V supply allows for a relatively wide range of frequency control. Due to the feedback loop, the 6 V 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.2 Hz to 10 Hz.

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".
  2. Smith, Anthony, "A new and improved latching power switch".
  3. Anthony Smith. «Выключатель питания с нулевым потреблением мощности на основе нефиксируемой кнопки»
  4. Smith, Anthony, "Latching power switch uses momentary-action pushbutton".

Materials on the topic

  1. Datasheet Ever-way HK19F


1-4 Layer PCBs $2

You may have to register before you can post comments and get full access to forum.
User Name