{{:projekte:2020:img_20211023_143400.jpg?400|}} ====== 4Bit Relay Adder ====== Contact: [[User:nopx|nopx]] Projectstatus: [[projekte:projektstatus|{{:projekte:done.png?50|}}]] (Nov 2021) [[regeln:labels|{{https://labelgenerator.vspace.one/documented/Max Noppel.png?200|}}]] ===== Lessons Learned ===== * Make the LED indicators from Cupper!!! Green soldermask is really transparent! * Use blue or white soldermask with blue LEDs * Make the signal connections on the front of the adder. This assists the understanding better. * Use the mounting screws for power supply. ===== Status ===== ==== 09.Nov 2021 ==== Finally added the transparent plexi backboard, the diodes and also oiled the wood. The project is finally finished. {{:projekte:2020:img_20211023_143030_01.jpg?400|}} {{:projekte:2020:img_20211023_143400.jpg?400|}} {{:projekte:2020:img_20211023_143219.jpg?400|}} ==== 23.Oct 2021 ==== The sky blue version is ugly, so I bought a new one in transparent. This looks nice. Also I finally found time to put some oil on the wood. This also looks nice. The project is finished now and I am happy with it. Will upload images later. ==== 03.Oct 2021 ==== Finally I just ordered the plexi backboard in sky blue. I hope it looks nice. ==== 11.May 2020 ==== Finished the 4 Bit Relay Adder. But will add a plexi backboard later. {{:projekte:photo_2020-05-11_15-36-52.jpg?300|}} {{:projekte:photo_2020-05-11_15-31-02.jpg?300|}} ==== 04.May 2020 ==== Finally milled the backboard: {{:projekte:photo_2020-05-04_00-03-40.jpg?300|}} ==== 27.Mrz 2020 ==== The remaining LEDs arrived. {{:projekte:gopr1977.jpg?300|}} ==== 21.Mrz 2020 ==== 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. {{:projekte:img_20200321_212134.jpg?300|}} ==== 20.Mrz 2020 ==== 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. :( {{:projekte:img_20200320_151257.jpg?300|}} ==== 19.Mrz 2020 ==== The relays arrived! The first 1-Bit Adder is assembled and works as intended! {{:projekte:img_20200319_175203.jpg?300|}} ==== 17.Mrz 2020 ==== The switches arrived! {{:projekte:img_20200317_163321.jpg?300|}} ==== 15.Mrz 2020 ==== Backlight LEDs work. The remaining parts like the relays, switches etc are still in delivery. {{:projekte:img_20200314_140946.jpg?300|}} ---- ==== 13.Mrz 2020 ==== PCbs arrived! {{:projekte:pcbsarrived.jpg?300|}} ---- ==== 29.Feb 2020 ==== PCBs are in delivery ---- ==== 27.Feb 2020 ==== The PCBs are in production and all the main parts, to check the functionality, are ordered on Aliexpress. ---- ==== Related Work ==== * [[https://hackaday.io/project/179801-relay-adder]] * [[https://hackaday.io/project/180742-relay-alu]] ---- ==== Media ==== * [[https://www.youtube.com/watch?v=K33JyQiCm34|MakingOf Video [Youtube]]] {{:projekte:photo_2020-05-11_15-31-02.jpg?300|}} ---- ===== Preface ===== This project is basically just a preproject for the [[projekte:eurotwo|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. ---- ===== Introduction ===== 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. ---- ==== Logic ==== 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. {{:projekte:xor.png?300|}} == 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. {{:projekte:and.png?300|}} == 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. {{:projekte:or.png?200|}} === Complete === The FullAdders works like this: {{:projekte:logicfulladder_rev1.png?500|}} The boards will be connected to realize the following circuit: {{:projekte:logicsimulation_rev1.png?800|}} A controlled inverter is the same as a XOR in my project. I know there are different understandings for this part. ---- ==== TechDraw PCBs ==== * {{:projekte:techdraw_pcbs_rev1.pdf |TechDraw PCBs rev1 [PDF]}} ---- ==== Functional Schematic ==== 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. {{:projekte:schematics.pdf |Functional schematic rev1 [PDF]}} ---- ===== ControlPanel ===== 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. {{:projekte:controlpanel.png?300|}} {{:projekte:img_20200317_163321.jpg?300|}} ==== Schematic ==== * {{ :projekte:controlpanel_rev1.pdf |ControlPanel_rev1 [PDF]}} ---- ==== BOM ==== ^ 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.3x5.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 | ==== Lessons Learned ==== * 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. ===== 1Bit-FullAdder ===== The 1Bit-FullAdder sums 3 (//A//,//B//,//C//) inputs and outputs a //sum// bit and a //carry// bit. {{:projekte:logicfulladder_rev1.png?400|}} Therefore 8 relays are used. For details see the schematic. {{:projekte:1bitfulladder.png?400|}} {{:projekte:img_20200319_175203.jpg?400|}} ==== Schematic ==== * {{ :projekte:1bitfulladder_rev1.pdf |1BitFullAdder_rev1 [PDF]}} ---- === 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.3x5.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 | ---- ===== 4Bit-Controlled-Inverter ===== 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. {{:projekte:4bitcontrolledinverter.png?300|}} ==== Schematics ==== * {{ :projekte:4bitcontrolledinverter_rev1.pdf |4BitControlledInverter_rev1 [PDF]}} ---- ==== BOM ==== ^ 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.3x5.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 | ---- ===== Backboard ===== The backboard will be made from wood. {{:projekte:photo_2020-05-04_00-03-40.jpg?300|}} {{:projekte:photo_2020-02-27_16-25-40.jpg?300|}} TechDraw: * {{:projekte:techdraw_rev1.pdf |4BitRelayAdder-Backboard_rev1 [PDF]}} * {{:projekte:techdraw_rev1.1.pdf |4BitRelayAdder-Backboard_Rev1.1 [PDF]}} * {{:projekte:plexibackboard_rev1.pdf |4BitRelayAdder-Plexibackboard_Rev1 [PDF]}} ----