4Bit Relay Adder

Kontakt: nopx

Projectstatus: DONE (May 2020)

See here for latest information.

This project is basically just a preproject for the EuroTwo CPU I'm currently working on. The plan for this project is to checkout how the design might look and how tiny I can get the boards. Also the connectors are of interest. Because there will be many wires in the back of the EuroTwo CPU which I will have to wire by hand I have to optimize the process and the connectors for them. There are many things to learn before starting with the bigger EuroTwo CPU.

The goal is to build a 4Bit-Adder from relays. Therefore 4 PCBs with a 1Bit-FullAdder each are connected to one PCB with a 4Bit-Controlled-Inverter. Also I build a PCB containing the control switches for the inputs etc.. This board, called ControlPanel, is also displaying the output of the calculation. The PCBs are connected via soldered wires behind the visible front of the project. Each board has a backlight of 12 LEDs (3 per side).

This project will use 40 relay of the typ SRD-FormC (SPDT) and up to 150 LED for the backlight and the indication of states.

This project uses the following states:

Logic Electronic
Low (0) floating
High (1) +5V



The XOR gate is build from 2 relay in this logicfamily.


I know I can build an AND gate from one relay. But in this preproject I build it from two. It is easy to explain how it works this way.


The OR gate is very simple. As High is 5V and Low is floating we can just connect the wires to get the or logic.


The FullAdders works like this:

The boards will be connected to realize the following circuit:

A controlled inverter is the same as a XOR in my project. I know there are different understandings for this part.

In the following schematic I have documented how the project is working. It is clear that the real PCBs contain much more components like LEDs, Resistors, Caps and connectors. This schematic is a simplification.

Functional schematic rev1 [PDF]

The controlpanel contains switches to give the following inputs:

  • On/Off-Switch for the complete project
  • Reserved-Switch
  • Enable-Inverter-Switch
  • Enable-Plus1-Switch
  • 4 Inputswitches for A
  • 4 Inputswitches for B

The Enable-Inverter-Switch and Enable-Plus1-Switch enable the user to substract by using the two's-complement. Thus it is a 4Bit-Adder and a 4Bit-Substractor.

Each switch has a LED-indication of it's state.

The result is displayed in 5 bits, including the Carry-Bit (as „16“) of the FullAdder.

Designator Package Quantity Designation
LED_1206_3216 29 blue at 16mA, 5V
R_0603_1608 29 330R
C1,C2 CP_Elec_6.3×5.4 2 47uF
C3,C4,C5 C_0805_2012 3 100nF
MST-102 12 MST-102
  • Use just one switch to switch to the substractor-mode
  • Build an alternative display mode for the substractor. Which is active depending on the one sub-switch. In this case Out_3 is the sign bit and should be displayed as „-“. This will require some more relays.

The 1Bit-FullAdder sums 3 (A,B,C) inputs and outputs a sum bit and a carry bit.

Therefore 8 relays are used. For details see the schematic.


Designator Package Quantity Designation
D7,D11,D12,D10,D6,D9,D4,D5 D_A-405_P10.16mm_Horizontal 8 1N4007
R_0603_1608 25 330R
LED_1206_3216 25 blue with 16mA, 5V
R4,R6,R7,R10,R11,R12 R_0603_1608 6 not mounted
C1,C2 CP_Elec_6.3×5.4 2 47uF
C3,C4,C5 C_0805_2012 3 1000nF Keramik
K1,K2,K3,K4,K5,K6,K7,K8 SRD-C 8 SANYOU SRD Form-C

The 4Bit-Controlled-Inverter board is able to invert 4 bits. The board is enabled by the Enable-Inverter-Switch on the ControlPanel. It also indicates the input bits and the output bits by LEDs.

Designator Package Quantity Designation
LED_1206_3216 21 blue at 16mA, 5V
R_0603_1608 21 330R
C1,C2 CP_Elec_6.3×5.4 2 47uF
C3,C4,C5 C_0805_2012 3 100nF
D_A-405_P10.16mm_Horizontal 8 1N4007
K1,K2,K3,K4,K5,K6,K7,K8 SRD-C 8 SANYOU SRC-FormC

  • Make the LED indicators from Cu!!! GreenMask is really transparent!

Finished the 4 Bit Relay Adder. But will add the backboard later.

Finally milled the backboard:

The remaining LEDs arrived.

I finished the integration test and everything works as intended. :) I'm out of LEDs now but new ones are in delivery. The whole thing looks very nice now! Hope I can produce the backboard soon when all the hackerspaces are open again after this corona thingy.

Remaining boards assembled. Waiting for the remaining 50 LEDs and 40 Diodes to finish the boards. Because of the current corona-crisis all the maker and hackerspaces are closed, so i won't find a place to build the backboard and finish the project in the next 5 weeks. :(

The relays arrived! The first 1-Bit Adder is assembled and works as intended!

The switches arrived!

Backlight LEDs work. The remaining parts like the relays, switches etc are still in delivery.

PCbs arrived!

PCBs are in delivery

The PCBs are in production and all the main parts, to check the functionality, are ordered on Aliexpress.

  • projekte/4bitrelayadder.txt
  • Zuletzt geändert: 2020/10/18 14:01
  • (Externe Bearbeitung)