Decking Out a DIY Relay Computer



As someone who has designed and built many retro computers and peripherals, I know very well how this type of project can take up residence in one’s mind and refuse to leave until every last bit is complete. A vintage computer enthusiast that goes by the handle DiPDoT is in the midst of such a project right now. After finishing the build of a very cool mechanical computer powered by relays, DiPDoT could not shake the feeling that something was missing. The only solution, of course, was to build that missing component.

To be of much use, every computer needs some way to load data into its memory, and that is exactly what the relay computer was missing. For a computer modeled after the pre-transistor machines of the first half of the twentieth century, you might expect a mass storage device to take the form of paper tape or cards. But the equipment needed to punch those tapes is quite expensive today, so DiPDoT had to get creative and improvise a bit.

The idea DiPDoT came up with is something that will be immediately familiar to those that cut their teeth on early personal computers at the beginning of the 1980s — cassette tape storage. The plan was to use both channels of a stereo recording, with one serving as the clock signal to use as a latch, and the other a stream of bits to load into the machine.

Using an Arduino, DiPDoT generated audio tones for the clock and data signals and recorded them to the left and right channels of a standard audio cassette. The clock channel pulses would drive a relay-based ring counter that stepped through a sequence to latch incoming data bits into a full byte. This byte could then be loaded into memory on the relay computer.

Getting the clock signal working required converting an audio amplifier’s AC output to DC, which DiPDoT accomplished with a custom full-bridge rectifier. With a stable clock in place, the focus shifted to the data signal. The Arduino’s default tone library could not produce simultaneous tones on two channels, but a more advanced library solved that problem. After some coding and experimentation, both channels of the tape played back correctly and could be read by the system.

The byte-building mechanism uses relay logic to combine incoming bits, from most significant to least, into a full 8-bit value. A sequencer step at the end then clears the latches in preparation for the next byte. Logic relays act as gates to make sure bits are only latched during the correct clock phase, solving timing problems that would otherwise be caused by the mechanical delays of the relays.

With data loading working smoothly, the final piece was connecting the system to the relay computer’s memory. DiPDoT added new sequencer steps to handle loading memory and advancing the program counter. After a bit of rewiring everything came together in a neatly organized breadboard build affectionately dubbed “The Monolith.”

The system was tested with a small program stored on cassette that loaded register values and shuffled them around in memory before halting. DiPDoT was visibly excited when the test was successful, but while all the planning, prototyping, and troubleshooting paid off, there will always be something else to do next. Trust me.

Leave a Reply

Your email address will not be published. Required fields are marked *