Stepping switch
In electrical control engineering, a stepping switch or stepping relay, also known as a uniselector, is an electromechanical device that switches an input signal path to one of several possible output paths, directed by a train of electrical pulses. The major use of stepping switches was in early automatic telephone exchanges to route telephone calls. Later, they were often used in industrial control systems. During World War II, Japanese cypher machines, known in the United States as CORAL, JADE, and PURPLE contained them. Code breakers at Bletchley Park employed uniselectors driven by a continuously rotating motor rather than  a series of pulses in the Colossus to cryptanalyse the German Lorenz ciphers. In a uniselector, the stepping switch steps only along or around one axis, although several sets of contacts are often operated simultaneously. In other types, such as the Strowger switch, invented by Almon Brown Strowger in 1888, mechanical switching occurs in two directions, across a grid of contacts. Single-axis stepping switches. Stepping switches were widely used in telephony and industrial control systems when electromechanical technology was paramount. A basic stepping switch is an electrically operated rotary switch with a single (typically input) terminal, and multiple (typically  output) terminals. Like other typical rotary switches, the single terminal connects to one of the multiple terminals by rotating a contact arm, sometimes called a wiper, to the desired position. Moving from one position to the next is called stepping, hence the name of the mechanism. Using traditional terminology, this is a single-pole, multi-position switch. While some stepping switches have only one pole (layer of contacts), a typical switch has more; in the latter case, all wipers are aligned and move together. Hence, one input with multiple wires could be connected to one of multiple outputs, based on  the receipt of a single set of pulses. In this configuration, the rotating contacts resembled the head support arms in a modern hard disk drive. Multipole switches were common; some had perhaps as many as a dozen poles, but those were less common. Most switches have a bank of stationary contacts extending over half a cylinder, while some have only a third of a cylinder. The typical "half-cylinder" switch has two sets of wiper contacts opposite each other, while the "third of a cylinder" type has three sets, equally spaced. For any given level, both or all three wipers  are connected, so it makes no difference which of the two (or three) is connecting. When access to more outlets was required, the rotor had two sets of wipers opposite each other but offset vertically: on the first half rotation one set of outlets was accessed; the second set of outlets was accessed on the second half rotation. An electromagnet advances (steps) the wipers to the next position when fed with a pulse of DC. The magnet's armature (spring-loaded) operates a pawl that advances a ratchet. When the pawl reaches its full stroke, it blocks the ratchet so  it and the wipers will not overshoot. When power to the coil disconnects, the spring retracts the pawl. Another pawl, sometimes called a detent spring, pivoted on the frame ensures that the wipers do not move backward; contact friction keeps them in place. Some uniselector designs step on application of the operate pulse; others step on its removal. In most applications, such as telephony, it is desirable to be able to return the wipers to a "home" position; this is at the beginning of rotation, at one end of the array of fixed contacts. Some switches have a cam attached  to the wiper shaft. This cam operates a set of contacts when the wiper is at home position, which is at the beginning of the span of rotation. Other circuit designs used one level (pole) of the contacts to home the wipers, so the separate homing contacts were not needed. Typical stepping switches have contacts directly operated by the stepping magnet's armature; these contacts can serve to make the magnet cycle ("self-step") and advance the wipers as long as power is applied. The external control circuits remove power when the wipers reach the desired position; that could be  the home position. Most stepping switches rotate the wipers in only one direction, but some are bidirectional; the latter have a second magnet to rotate the wipers the other way. A third variety "winds" a spring as the wiper steps progressively, and a ratchet holds the wipers from returning to home position. When the circuit is no longer needed, another electromagnet releases the holding pawl; the spring then returns the wipers to their home position. Stepping switches were quite noisy in operation (especially when self-stepping), because their mechanisms accelerated and stopped quickly to minimize operating time. One could compare  their sound to that of some snap-action mechanisms. Nevertheless, they were engineered for long life, given periodic maintenance; they were quite reliable. Single-axis stepping switches are sometimes known as uniselectors. Two-axis stepping switch. Slightly more complicated was the "two axis stepping switch", (also called "Strowger switch" or "two motion selector" in Britain). Typically, a single compact group of wipers could connect to one of 100 (or 200) different fixed contacts, in ten levels. When the switch was idle, the wipers were disengaged from the fixed contacts. The wipers moved up and down on a vertical shaft, and  rotated into the contact bank to make a connection. A spring, internal to the vertical shaft, returned the wipers to their home position at the bottom. This type had two stepping coils with pawls and ratchets, one to raise the wipers to the desired banks of contacts, and one to rotate the wipers into the banks. These were commonly used in telephone switching with ten banks of ten contacts. The coils were typically driven by the electrical pulses derived from a rotary telephone dial. On a two-motion selector, as a digit was dialed, the wipers would step up the  banks, then automatically rotate (self-step) into the selected bank until they found an "unused" outlet to the next switch stage. The last two digits dialed would operate the connector switch ("final selector" in Britain). The second to last digit would cause the wipers to move up and the last digit would cause them to rotate into the bank to the called customer's line outlet. If the line was idle then ringing voltage would be applied to the called line and ringing tone was sent to the calling line. Another variant of the two-axis switch was the Stromberg -Carlson X-Y Switch which was quite common in telephone exchanges in the western USA. It was a flat mechanism, and the moving contacts moved both sidewise, as well as to and fro. It was quite reliable, and could be maintained by people with minimal training. Applications. Stepping switches are used in a variety of applications, other than telephone systems. By connecting several in series with the highest output of one going to the stepping contact of the next, a counter could be constructed. Or by feeding the stepping contact with an endless pulse train via a relay, and controlling  the relay from the switch's own output, it can be made to automatically hunt for the first unpowered line (or powered, depending on whether the relay is normally open or normally closed). They could also be used as a demultiplexer, so that two input lines could control a number of output devices. One input line steps the switch until the correct device is selected, and the other then powers that device. Many other applications are possible. Such switches were used in a series of Japanese cypher machines during World War 2: CORAL, JADE, PURPLE (the names were American). The  British code-breaking machine called Colossus used rotary stepping switches, which was used to break the German Lorenz cipher.