Close
0%
0%

Relay computer circuits with pre-1940 components

Relay clock generator. Latch. D-flipflop. Program counters. DRAM. Fast adder. Parity checker. Zero+max detector. ROM. Shift/rotate unit. ALU

Similar projects worth following
Clock generator: uses one relay, two resistors and an electrolytic capacitor.

Latch: does not need clear before writing, has complimentary outputs.

D-flipflop: 2 latches in series, separated in time by a clocked relay, has complimentary outputs.

Program counters: presettable self incrementing using D-flipflops, one a ripple counter, one with built-in fast adder.

Dynamic RAM: uses capacitors for storage and one vacuum tube + relay dedicated per bit line.

Fast adder: 2 DPDT relays per bit, propagation time 1 relay time.

Parity generator/checker: 1 DPDT relay per 2 bits, propagation time 1 relay time.

Zero and maximum value detector circuit: n-1 DPDT relays for n bits, propagation time 1 relay time.

ROM: uses neon bulbs and one vacuum tube + relay dedicated per bit line.

Shift/rotate unit: scratch register, rotate, single and multi words shifts.

ALU: 8 function ALU with input and output registers, 23 DPDT relays per 2 bits.

Address adder: 15 DPDT relay

About this project

In 1838-1858, Charles Babbage designed a programmable (punch card) digital mechanical computer, the analytical engine, with conditional branching and loops. It was never built, as it was too difficult.
From 1938 to 1941, Konrad Zuse built a programmable (35 mm film) digital electromechanical computer (relays). It worked (22 bits floating point), but had very limited capabilities (no jumps, no tests, no subroutines).
After seeing a replica of the Zuse Z3 in Berlin, I thought: Babbage had the idea but not the technology, Zuse had the technology but not the ideas. What if Zuse had had the ideas?
This project is about designing circuits that could have been made with the technology available at the time (i.e., no semiconductors). Whether I will actually build a computer with it is undecided yet.


General technology

These circuits assume 3 logic states: 0 (GND), 1 (=relay activation voltage), Z (high impedance). The 0 and 1 should be able to source and sink the current  of a number of relays (limited by relay contact current). Relay settling time is represented by the letter T (e.g. 5 ms, likely slower for pre-1940 relays). Pre-1940 there were no reliable diodes, relay coils should have something to damp large voltage spikes. A small neon bulb over the coil limits the spike for my relays to about 125V, a R of coil resistance and C of 10 nF in series over the coil limited it to about 225 V. Measurement with an oscilloscope shows neither method slows relay settling time (a diode does). This damper circuit is not shown in the circuits.

All relays are 2 form C (DPDT), because they are easy to get now. Pre-1940 4 form C (4PDT) would be available, and save quite a few relays in certain circuits, like the DRAM/ROM address decoders.


Tools used

  • Circuit drawings: KiCad, can do PCB drawings too (but cannot simulate relays).


Clock generator

Choose R1 so that the relay reliable engages.
R2 is ideally such, that the parallel resistance of the relay coil and R2 equal R1. In the example, 1500 parallel with 700 gives 477 ohm.
R2 determines duty cycle (within limits), I got 75+85 ms per cycle. Different relays will need different component values.

C1 determines frequency, in my test I selected for 6 Hz. Lower C1 values give higher frequencies, but the relay switch time becomes a larger part of the total cycle time.

If the clock generator drives only a single DPDT relay, that relay can be wired to provide both clock and inverse clock, with some small dead time between the two due to relay switching time.

With another relay one could at selected times add Cs parallel, to lower frequency, when a slower clock is desired e.g. for a slower circuit. Such a C should always be connected to GND at the minus side, and permanently fed at the plus side via a high resistance value (say, 1 M Ohm) from a voltage equal to the lowest voltage on the relay, to prevent wrong pulses when it is switched parallel to the existing C.


Latch with clear

This 2 bit latch uses the fact that the hold current of a mechanical relay is lower than the activation current. VDC is the relay voltage.

Choose R1 and R2 so that the relays reliably holds. In my tests, with 24V/700ohm relays, 1k2 ohm gave the minimum hold voltage according to the datasheet, but my relays held fine with 1k8 too. It saves considerable energy too, when in hold mode.

If the "write" relay is activated, input data (here D0 and D1) is connected to the associated latch relay. If the input is VDC, a latch relay will be activated if it was not, otherwise it stays activated. Once activated, it stays activated if K1 is de-activated because of the R. During the latch relay activate time...

Read more »

relay_address_adder_4bit_test.circuitjs

Address adder simulation file

circuitjs - 20.94 kB - 12/11/2025 at 09:45

Download

relay_alu_2_bit_a.circuitjs

ALU simulation file

circuitjs - 15.66 kB - 10/29/2025 at 13:42

Download

relay_shift-rotate_test.circuitjs

Shift/rotate simulation file

circuitjs - 13.94 kB - 10/07/2025 at 10:06

Download

relay_clock_generator.circuitjs

Simulation file

circuitjs - 830.00 bytes - 01/02/2025 at 12:19

Download

relay_latch.circuitjs

Latch simulation file

circuitjs - 2.73 kB - 01/05/2025 at 20:27

Download

View all 13 files

View project log

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates