Architecture: a hybrid approach
Posted: Jan 15, 2026
If you’ve read my welcome post, you’ll know I’ve been interested in building a relay computer for a while, but always decided against it due to the high costs and effort required. To combat this, I’ve decided on a hybrid approach to the machine and had to make some strategic decisions about what stays mechanical and what goes digital.
The goal here is a 4-bit Hybrid Relay Computer. I wanted to keep the roots of the machine mechanical - things like the ALU, Registers and addressing mechanism. Whilst allowing things like memory and complex control sequencing to be taken care of in a more modern way.
The Brain: An Arduino-Relay Hybrid
In a traditional relay machine, the Control Unit is a nightmare of timing relays. To keep the footprint manageable, I’m offloading the instruction decoding and sequencing to an Arduino Mega.
The Arduino will handle some of the more complex tasks such as reading the program in, managing the timing and driving all the control lines for the various components that make up the computer. This keeps the component count down without sacrificing the fact that the actual “thinking” and math are happening in the relays.
4-bit Relay ALU
This is where a majority of the satisfying “click” will come from. The ALU is built from about 32 DPDT signal relays that will handle all of the machines thinking and logic decisions.
- Addition/Subtraction: Uses a 4-bit ripple carry chain.
- Logic: Bitwise AND, OR, and XOR operations.
- The Zero Flag: A clever series of normally-closed contacts that tell the Arduino if our result is a flat zero.
Memory/RAM: Swapping Relays for Silicon
Relays are expensive, and using them for RAM is the quickest way to turn a hobby project into a huge investment - not to mention relay based memory can often lead to tricky bugs as it can be far less reliable than a modern equivalent. So for this - I’m planning to go with something like the AS6C62256 SRAM chip this has seen success on a number of other relay based computers other people have constructed so I figure why change it if it works.
The chip will give me way more memory than I’ll need or be able to utilise in a 4-bit machine, but it’s cheap, so why not?
Program memory/ROM: Thermal Paper “Punchcards”
I saw a great idea used on the TIM-8 relay computer using printed strips of tape with black squares denoting the data. I came across some thermal receipt printers at work that were destined for e-waste so I’m planning on using two of these to achieve a similar result. One will be used as a printer connected to my computer along with a simple assembler program that converts an assembly style program into the machine code and prints it on the thermal paper. The second will be gutted and fitted with a “read” head using a backlight and LDRs thats all driven from an arduino.
To make things fairy simple and allow jumping to bigger than 4-bit addresses the jump instruction logic will be handled entirely within the arduino and that will then “jump” the paper to the correct location and output the instruction to the “real” computer to continue on its way.
Whats Next? I’m currently finalizing the component choices and about to order some of the key components from LCSC. Once they arrive, the first job will be breadboarding and testing out a few of the “modules” - I’ll probably start with the ALU and Registers. Stay tuned for some more info on the design of those shortly.