Relay clock employs hysteresis for state retention

Article By : Larry Stabile

Retro-engineering and Steampunk can sometimes venture into electrical design areas that may not have been trodden in the past.

Long before tubes and semiconductors became the main active components in digital circuitry, relays were used for highly sophisticated control of electronic systems. Today’s retro-engineering and Steampunk kinds of work often result in projects that wind up being largely artistic — where “watching it work” is an important aspect — yet they can also sometimes venture into electrical design areas that may not have been trodden in the past. This paper describes a relay-based digital clock that is of interest in this regard.

The clock described here could have been built in the 1930s or even earlier.  The telegraph and telephone industries had, by the 1930s, long been using relays for switching and basic logic. Relays were used in aspects of computation as well, with combinations of electromechanical devices used in tabulators and other business calculation machinery [Ref 5].  And by the late 30s and early 40s relays were beginning to be applied in more general settings as well, as evidenced by the Zuse [Ref 3], Harvard [Ref 4], and Bell [Refs 10, 11] relay computers. Generally, these included various other kinds of electrical components, such as resistors, capacitors, and inductors.  However, in terms of component count, relays dominated.

The relays used in these systems also had many enhancements over what we today might call a basic relay, offering multiple poles, multiple coils, cross-bars, and different core materials for timing control. Types included “counting” and stepping relays [Ref 7] and could also offer connections to various other mechanical devices. For example, the Harvard Mark 1 drove sets of mechanical calculators to crank out basic arithmetic [Ref 4].

In the work herein, however, the only active component is a small DPDT relay, which can be had very inexpensively – perhaps an ironic tribute to its larger ancestors.  In modern times wire can be drawn to gauges less that a hair’s breadth, and well-refined materials, needed for good magnetic permeability and electrical conductivity, can be made inexpensively. These materials can thus, again inexpensively, be stamped out to accurate, precise, and repeatable dimensions. The resulting relays are not only small but quite sensitive. So, a project like this in the 1930s would have been feasible but would also have been considerably larger and more power-hungry.

This design ventures into un-trodden design territory because it uses an RC-based binary counter cell that relies on relay hysteresis, rather than latching, as its fundamental state-retention mechanism. This hysteresis behavior is described in the EDN Design Idea: Relay hysteresis provides toggle function [Ref 2], implementing a push-on/push-off power control cell. The ability to cascade these cells allows us to form a binary counter, with which we count seconds and thus build a clock. We can get a source for those seconds in a number of ways, the simplest of which is to use an RC oscillator. An RC oscillator is easily built using relays, however driving a clock from RC oscillators is very inaccurate and prone to drift.

Another approach could use LC circuits. Using relays as the active element for an LC oscillator is a very definite design challenge, though. I did some research and calculations and found that it looks possible to build such a thing, and one can then potentially get much better accuracy and temperature stability than with RC.

While the LC oscillator might make for a decent clock, I did not pursue the LC route further. Historically, it does not seem that LC oscillators of any kind were used in clocks, although of course they were used extensively in radio receivers and transmitters.   More common for clocks was the use of items like tuning forks and pendulums as the resonant element, driving them purely from electromechanical devices or tube amplifiers. Warren Marrsion, who developed the quartz crystal oscillator, summarizes the history nicely in The Evolution of the Quartz Crystal Clock, in the Bell System Technical Journal of July 1948 [Ref 7]. (This is also the same journal issue containing Claude Shannon’s A Mathematical Theory of Communication. It’s a small world.)

I opted instead for a different approach to obtain seconds with accuracy, although I did use an RC oscillator to test. I divide down the frequency of the AC line to one Hz – using relays, resistors, and capacitors. [Note 1] The AC line, though varying in frequency throughout the day by as much as 0.02 Hz, is guaranteed at the end of a single day to have generated exactly 5,184,000 cycles [Note 2] [Ref 1]. So if one can count these cycles, one can build a fairly accurate clock. This technique has been around for a while, dating back to the development of synchronous AC motors, whose spin is in lock step with the cycles on the AC line. Clocks based on this idea have been around since the early 1900s [Ref 8].

This project, then, has two basic components. First is the design of an hours-minutes-seconds counter and display, that accepts one-second pulses.  Second is the 60 Hz frequency divider needed to produce those pulses. Each of these components poses interesting design challenges.

The Binary Counter

The basic toggle module in Ref. 2 may be used in cascade to implement a binary counter. The circuit shown in Figure 1 implements a four-bit counter as an example.  The input signal is in the form of 12V pulses. Note that the magnetic field of each coil, denoted by the dotted line, is to be thought of as signal, to illustrate – more clearly than an electrical model – the circuit’s modularity. The relays used are commodity HK-19F DPDT relays, in 12-volt and 6-volt versions [Ref 12].

Figure 1 The magnetic field of the coils, shown as a dashed line, is an important part of the signal flow in this relay-based counter design.

The Clock Design

Given the basic circuits above, there are a number of ways to proceed.  One must balance the need for an easily readable display against the complexity of the counting circuitry.

The simplest clock is a binary counter, with a binary display, that resets every 43,200 seconds (for a 12-hour clock), or every 86,400 seconds (for a 24-hour clock).  This is not easy for people to read, however.

A step up from pure binary in readability is Binary-Coded Decimal (BCD), in which groups of 4 (or fewer) bits comprise a decimal number made with binary digits. This requires people to read binary only up to four bits, a simpler task.  I went with this as opposed to a more ambitious project, such as a set of digit pixel arrays [Note 3], which might be considered for the future.

The choice of a BCD display then leaves the question of the counter design. A full-day resetting binary counter is possible, but then the decoding logic for BCD time becomes complex.  A more natural choice is to use a set of BCD counters. With a one-second pulse drive this requires counters of modulo 10, 6, and 12.

Figure 2 shows a diagram of the counter modules required. As shown, each counter module has an input clock (Cin) and an output clock (Cout). Upon turnover of its digits from the max value to zero, each generates a pulse for the next counter. This is a straightforward cascade of counters common to both electrical and mechanical counter designs.

Figure 2 A counter capable of showing time in seconds requires modules capable of counting in modulo 6, 8, 10, and 12.

The BCD (and Other Mods) Counters

The modulo counters have modifications over the basic binary counter, since each must be reset to zero on the next clock after it reaches (modulus – 1).  The fundamental structure of a modulo counter is shown in Figure 3, which is a schematic of the modulo-10 BCD counter module. When the count reaches 9 (binary 1001), relay logic shunts the clock to a reset relay. The reset relay generates a pulse on the reset bus and cuts the power to all the bit-bearing relays. The reset pulse needs to be long enough to assure that all the relays drop out, but short enough to assure that it does not overlap with the next clock pulse.

Figure 3 This BCD counter operates normally until the count reaches 9, then the next clock will generate a pulse on the reset but returning the count to 0.

The circuit acts as a binary counter until the counter value reaches 9, at which point k3 turns on and shunts the clock to k2. The clock at this point is low, thus k2 remains off. When the clock goes high, k2 turns on and discharges C1 through R1. When the clock then goes low again, k1 turns on due to the inrush of current through a now-discharged C1. Relay k1 will remain on until C1 is sufficiently charged; about 20 milliseconds.  During this period the power is cut to the relays storing the bits, thus resetting them to zero. The clock is shunted back to k5 and normal BCD counting resumes.

Modulo 6 and 12 are similarly achieved by using appropriate logic to detect count values of 5 and 11, respectively.  The mod 12 counter needs special display decoding, however, since zero must show as 12 (o’clock), and values above 9 must show as a 1 and a BCD value for 0 or 1.  The circuit for this is shown in Figure 4, with the accompanying truth table in Figure 5.

Figure 4  The design of the modulo-12 counter displays counts above nine as two BCD digits to show the hours 10, 11, and 12.Figure 5 This modulo-12 truth table resolves BCD counts above nine as two digits.

Using the 60Hz AC Line for a Timing Source

The plan to generate one-second pulses from the AC line, requires a division by 60. Here we use three cascaded counters of 2x2x15. Details of the first two stages are shown in Figure 6. To handle the required speed in the first stages we need smaller-value capacitors than the design of Figure 1, and 6-volt relays. The first bit must handle 60 Hz, or 16.7 milliseconds total switching time. After that the timing requirements become increasingly loose, though, so that only 15 Hz, a period of 66.7 milliseconds, appears at the clock of the divide-by-15 counter. The modulo-15 counter is based on the same design as the BCD counter in Figure 3, using smaller value capacitors for the first two stages. While this counter’s driving period is fairly long, we must be careful with reset and assure the capacitors are small enough that reset discharges sufficiently to turn the relays off.

Figure 6 To get seconds from the 60Hz line signal, we use counters of 2x2x15.

Note the use of a diode in extracting the timing signal from the AC line. This diode permits relays k2 and k3 to operate at 60 Hz. Because relays are non-polarized, omitting that diode would make these relays run at 120 Hz, an 8.3 millisecond period that is generally too fast for consistent and accurate switch timing. It’s possible that by using faster relays the diode could be omitted, however.

Physical Realization

Here’s the clock as constructed. The main clock board/display is shown in Figure 7 along with the wiring on the reverse side. What time do you think it is showing? [Note 4] [Note 5]

Figure 7 The clock as constructed is shown here from both the component and the wiring sides. (Click image for larger view)

The large capacitor and pot on the right control an RC oscillator, included so that the clock is self-contained for testing. But the RC oscillator is neither accurate nor stable enough for actual use.

The AC line frequency divider is mechanically very noisy with all those relays continually chattering away, so for soundproofing I built that section inside an old, wood Midleton Whiskey case. Figure 8 shows the box and the circuit board within. The board is suspended in a wire basket to minimize sound transmission through the body of the box itself.

Figure 8 Because the 60 Hz divider relays are constantly (and noisily) switching, this section is built inside a wooden box for soundproofing. (Click image for larger view)

If you want to see the clock in full operation, I have posted a video (see “Relay Clock Demo“).

Conclusion

The use of relay hysteresis, resistors, and capacitors in this design does not appear to have occurred in the systems of yesteryear. So, we need to ask again, would this project have been feasible in the 1930s? I believe so. The relays would operate on higher voltages than used here and have larger coil resistances, so smaller-value capacitors could have been used. Electrolytic capacitors in that era were relatively large and bulky, but nevertheless available. And, of course, resistors and small light bulbs were commonplace. It could have been done this way.

We could have been more faithful to earlier ages and used only relays for the counters, and a frequency-generating method that does not rely on the AC line. The latter may be had using tuning forks and similar devices as the tank circuit for a switching-based active element. Relay-only counters that work at the speeds required are certainly possible, and that can be the topic of another article.

Display, though, is another matter, where going further back in time introduces more limitations. The electric light, for example, goes back to only the late 1800s. Besides, the historical literature on driving clocks, even though from a discrete source such as a tuning fork with contacts connected to it, always shows some coupling element that mechanically turns a clock dial, as opposed to displaying a count as is done here. Even the Bulova Accutron watch, which became available in 1960, drove a gear-based watch display from a tuning fork movement, with a mechanical coupling.  The tuning fork itself was part of a tank circuit driven by a one-transistor oscillator [Ref 10].

Clocks with a digital display did appear in the early 1900s [Ref 9], but these clocks used a conventional movement and flipped digit cards to convey discrete counting.  So in some sense these were counters, but commercially available clocks based truly on counting pulses from some frequency source do not seem to have been developed before the 1960s. So, while this clock could have been built in the 1930s, the display approach would probably not have even been considered.

Clocks and the issues surrounding the measurement and interpretation of time have changed significantly in the modern age. Clocks and watches with tuning forks, or even quartz crystals, are becoming quaint in an era when we can pull out our cell phones and get the time accurate to the second relative to government standards.  But embracing the quaintness can be engaging, the more so the further back in time we wish to go. And it may, as in this case, lead one into interesting and untrodden territory in electronic design.

NOTES

[1] I will admit to using one diode, as shown in later sections.

[2] There is some question as to how well power companies stick to this nowadays. Ref [1] indicates that they still do, but I have not looked at it more deeply.

[3] By this I mean that an array formed with individual lights – LED, incandescent, or other — as pixels. Also, ICs of seven-segment displays or ICs of pixel arrays are not permitted.

[4] Look harder before you look at the answers below.

[5] The times shown are 11:51:51 and 5:26:39.

References

  1. Utility Frequency, https://en.wikipedia.org/wiki/Utility_frequency.
  2. A. Stabile, EDN Design Idea: Relay hysteresis provides toggle function (submitted for publication Oct 2020).
  3. The Zuse Z3 Computer, https://en.wikipedia.org/wiki/Z3_(computer)
  4. The Harvard Mark 1, https://en.wikipedia.org/wiki/Harvard_Mark_I
  5. Geoffrey D. Austrian, Herman Hollerith: Forgotten Giant of Information Processing, Columbia University Press, 1982.
  6. P. Shackleton and H. W. Purcell, Relays in the Bell System, The Bell System Technical Journal, January, 1924, https://archive.org/download/bell00systemtechniamervol3rich/bell00systemtechniamervol3rich.pdf
  7. Warren A. Marrison, The Evolution of the Quartz Crystal Clock, The Bell System Technical Journal, July, 1948, https://edn.com/wp-content/uploads/bellsystemtechni27amerrich.pdf
  8. A Short History of Digital Clocks and Watches, https://blog.onlineclock.net/history-of-digital-clocks-watches/
  9. Bulova, https://en.wikipedia.org/wiki/Bulova. Details of the mechanics and circuitry can be found at various sites, for example https://watchguy.co.uk/teardown-bulova-accutron-218/ or http://members.iinet.net.au/~fotoplot/acctech214.htm
  10. Model V, https://en.wikipedia.org/wiki/Model_V
  11. George Stibitz , https://en.wikipedia.org/wiki/George_Stibitz
  12. HK-19F Relay Specifications, http://grobotronics.com/images/datasheets/HK19F-12V.pdf

This article was originally published on EDN.

 

Leave a comment