Intro: Build a Mechanical Lego Binary Calculator
I decided to take the time to design this as a Christmas gift for my stepmother, who is a math teacher. That would be why it is Christmas colored. After a day or three of hours put into designing it (and the case), I find out that Lego doesn't let you order your designs from their digital designer program anymore. So I count each piece by type and color (too much time invested to give up), and then go to order the parts through Lego's "Pick A Brick" program. The price was well over $1,000 which was not affordable for a jobless recent HS graduate. I checked 3d printing services about their prices to have the parts 3d printed, and I think it was an even higher cost due to their greediness. I'm sure it can be printed for under $100 easily, but I do not have a 3D printer sadly :/
Hopefully someone who has a 3D printer or a LOT of specific Legos, will find this instructable useful and save my time/efforts from being in vein :) A thing to take into thought before spending money on this: This hasn't been tested and I imagine all of the tolerance limitations legos have may cause it to not work. This is a concept design.
I didn't really want any springs, and hate when rubber bands are used in machines for long term use, so I designed it to work off gravity and it has to be standing up in order to work.
I didn't think of the entire thing, I just got the idea after learning how computers add numbers, and based the logic gate designs off of this guy's gates.
Please point out typos and mistakes i've made. Kinda made this quickly.
Step 1: How Does It Work?
The calculator is designed to work off of mechanical logic gates, meaning it works similar to a computer. Through networking different types of logic gates together, you can create more advanced logic gates. Let's look at the designs of the three logic gates that make up this calculator.
Keep in mind, these all can likely be simplified, and I am 100% sure some of them can be compacted into smaller versions. Feel free to alter the design.
if you do not understand logic gates, I recommend watching this video. This is the video that I learned from and got the idea for this from.
Based on this video, we will need AND, OR, and XOR logic gates.
Step 2: The OR Gate
This is the simplest gate. It's pretty simple, push any of the two input pins down, and the output pin goes down.
To download the designs and see how to put them together with instructions:
Download Lego Digital Designer
Download my design files by clicking on this link, and then searching in the username field "hifatpeople"
The AND gate is where things start needing thought.
Step 4: The XOR Gate
Each of these inputs/ouput are attatched to a lever end, and weighted to return to the off position unless being acted upon. Other than that, it's simply another OR gate.
Step 5: The Half Adder
Following the diagram in step one, we can combine 2 XOR gates, 2 AND gates, and one OR gate to make a half adder.
I have files for every step on my lego page (the easiest place i could find to upload these files for sharing)
The labels I have on here are wrong, I actually don't remember what parts are what here.
Step 6: Full Adder
This is made by combining two half adders with each other. Connect the carry out of the first half, to an input of the 2nd half.
This picture contains a carry over bar, to carry digits over to the next full adder. You'll notice little white pegs too. this is so that the extension adders (additional full adders) can attach to the frame.
Step 7: The Completed and Wired 10 Digit Binary Calculator
The rest is up to you, you'll have to wire each adder together however you want.
The 10 digit adder file actually crashes the digital designer program due to bad program writing. I built my computer for about $1,000. It has a 4GHz 8 core processor, 32GB RAM, a gpu capable of games on ultra, and is run on an SSD. The program crashes when developing building instructions for this file while the processor and RAM are not used very much at all. That is why I make this instructable step by step by breaking it down into it's components.
It is tricky wiring it all together and you have to take into consideration that plastic flexes.
If you want the rest of the files, send me a message. I have 3D files for some parts if you have a 3D printer, and a parts list.