projekte:4bitrelayadder

Dies ist eine alte Version des Dokuments!


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

Gates

XOR

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

AND

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.

OR

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.

Complete

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
D29,D1,D2,D3,D4,D5,D6,
D7,D9,D10,D11,D12,D13,
D14,D15,D16,D17,D18,D19,D20,
D22,D23,D24,D25,D26,
D27,D8,D21,D28
LED_1206_3216 29 blue at 16mA, 5V
R29,R1,R2,R3,R4,R5,R6,R7,
R9,R10,R11,R12,R13,R14,
R15,R16,R17,R18,R19,R20,R22,
R23,R24,R25,R26,R27,
R8,R21,R28
R_0603_1608 29 330R
C1,C2 CP_Elec_6.3×5.4 2 47uF
C3,C4,C5 C_0805_2012 3 100nF
SW1,SW2,SW3,SW4,SW5,SW6,SW7,SW8,
SW9,SW10,SW11,SW12
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.

BOM

Designator Package Quantity Designation
D7,D11,D12,D10,D6,D9,D4,D5 D_A-405_P10.16mm_Horizontal 8 1N4007
R30,R2,R17,R23,R32,R3,R1,
R13,R29,R21,R20,R26,R16,R14,
R8,R18,R25,R15,R24,R31,
R5,R28,R27,R19,R22,R9
R_0603_1608 25 330R
D14,D13,D18,D29,D21,D30,
D16,D25,D22,D24,D33,D34,D2,D8,
D20,D31,D3,D23,D28,D26,D32,
D17,D19,D27,D15
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
D1,D2,D3,D4,D5,D6,D7,D9,
D10,D11,D12,D13,D14,D15,
D16,D17,D18,D19,D20,D22,D31
LED_1206_3216 21 blue at 16mA, 5V
R1,R2,R3,R4,R5,R6,R7,R9,
R10,R11,R12,R13,R14,R15,
R16,R17,R18,R19,R20,R22,R21
R_0603_1608 21 330R
C1,C2 CP_Elec_6.3×5.4 2 47uF
C3,C4,C5 C_0805_2012 3 100nF
D8,D21,D23,D24,D25,D26,
D27,D28
D_A-405_P10.16mm_Horizontal 8 1N4007
K1,K2,K3,K4,K5,K6,K7,K8 SRD-C 8 SANYOU SRC-FormC

The backboard will be made from wood.

TechDraw:

—-

  • 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.1590134840.txt.gz
  • Zuletzt geändert: 2020/10/18 14:01
  • (Externe Bearbeitung)