In this instructable I will be showing you how to make a combination lock out of lego. I did not include the drawer that slides out when the combination is made, or the cover for the top. I just showed the lock mechanism instructions. I will also note that this will not be a step by step guide all the time. In some parts you will have to improvise to make your own combination, and sometimes you will need to put the pegs in areas that work.
Step 1: Learning how it works:
To build your own combination, you have to learn how a combination lock works. At first I thought it was a very complicated mechanism, but really, it is quite simple. In a normal lock there are 3 main segments (although you can make as many segments as you want with lego.) Each segment has a disc. And each disc has 1 notch and 1 peg. When you turn clockwise 2 times, all of the segments are being pushed by the peg of the segment before them. When you stop at the first colour or number, the notch is facing a spot where a pin needs to go. Each notch needs to be facing each pin to unlock the lock. Then when you turn it to the second colour/number, it opens the spot for the second pin. Finally, when you put it to the last colour/number, it frees all of the pins and allows the lock to unlock. Depending on where the notch and peg are, decides what the combination is.
Step 2: Building the first segment.
For the first segment you need to put a triple pin in all of the outside holes in the gear (disc), except for one, that you leave empty (triple pins are blue in the photo). Then you need to put a "9" long axle through the centre of the gear, with a spacer on the inside of the gear (grey in photo). Then put another large gear on top of the other so it makes a thick/double disc with a notch at one point. Afterwards you take two spacers and put them on either side of the gear. Once you have done that put one end through a brick and put another gear on the other end. Finally put a peg in one space on the lone gear. Your end product should look like the last picture.
Step 3: Building the second segment.
For the second segment you also need to put triple pins in all of the holes except for one (I suggest to open a different hole than the first time, but you don't have to.). Then you need to put a "6" axle through the centre with another spacer. In the empty hole, where the notch is, you need to put a peg on the outside. Then put the other gear on and slide it through the brick. There should only be "1" sticking out. Then put another gear on and another peg.
Step 4: Building the third segment.
Repeat the last step, but put the peg and notch in different places, and don't put a peg on the empty spot.
Step 5: Building the unlocking system.
Take another "9" axle and put an axle connector on one end. Then slide a small "L" right to to the end, so it is touching the connector. Next take a 1x2 brick which has a hole in it and slide it all the way through, too. Afterwards take 2 half long "L"s and slide them to the end. You need to leave a "3" gap and then hold another 1x2 brick there. Then you need to put another small "L"and hold it after the brick. You need another axle connector after that. Now you need to put a "7" axle on the other end of the connector and another brick. Now make a "4" gap, then another brick, and finally on the end put another small "L".
Step 6: Building the key.
You don't have to build this. You can also just put an axle in, but I thought it would be cool, to also have a key. So, here are the steps to make a simple one: Put a spacer on a "5" axle. Then put a "s" piece after that. Finally put a winch piece on the end.
Step 7: Putting it all together.
Now you have gotten all of the mechanism built. You are ready to put the segments together. Put the first segment on one end (in my picture you can see it on the left). Make sure the peg is on the inside. Then put the second segment right beside it, on the inside, having the lone gear with the peg interact with the peg of the first segment. By now, if you spin one segment, the other should follow after one rotation. Then put the last segment after the second, so if you turn the first one the others will both be turning after two rotations. Place the unlocking system on the right side, so the small "L" pins line up into the middle of each wide gear disc. Now you lock is finished.
Step 8: Figuring out your combo.
The last part is figuring out your combo. Sometimes it doesn't always work, so you have to move the peg into a different spot, but eventually you will figure it out. To find your first colour, turn the wheel clockwise until the last segments' notch is open to the small "L"pin. The colour at the top is your first colour. Then turn the wheel counter clockwise until the second segments' notch is open (the colour at the top is your second colour). Then turn it clockwise again, so all of the notches are open to the pins and turn the axle with the key and - Voila! - it's unlocked! I added some blocks at the bottom, so if you turn the key too far, it stops it.
Step 9: Thanks! Have fun building!!!
Thank you for reading my instructable and taking your time to look at this. If you like it, please vote or "favourite" my project and if you have any suggestions or modifications please leave them in the comments.