Answers.Body: <p>This would push the pins up and down like a <a href="https://i.sstatic.net/KAVwK.png" rel="noreferrer">normal key</a> would.</p>
  
  <p><img src="https://i.sstatic.net/TT3WL.jpg" alt="enter image description here"></p>
  
  <p>Here is the basic system. I don't have time to build to whole thing but this resolves the main problem and proves the feasibility. </p>
  
  <p>The main problem was to reproduce the pins system with LEGO bricks since each pins needs to have different lengths.   Early in this project, I wanted to have a 'analog' approach of setting the pins length so to not be constrained by only stacking plates.  For that I used axle perpendicular-joiner (6536) on an axle to build the driver pins (top pins):</p>
  
  <p><img src="https://i.sstatic.net/3upuA.jpg" alt="enter image description here"></p>
  
  <p>The key pins (lower pins) are caped with angles connectors (32013) creating the needed round tips on which the key can push.</p>
  
  <p>In a standard pin tumbler lock system, if the right key is not pushing on the pins, both the driver pins and the key pins can prevent the rotation motion.  If the key tooth is too low, the driver pins is blocking and, if the key tooth is too high, the key pin is blocking.  In my system the driver pins are doing both functions. </p>
  
  <p>In the prototype the red rounded beam and the driver pins would be fixed while the rest would rotating with the key.  In the following picture you can see the lock without the key.  In that state all the driver pins go through the black Technic beam (under the red rounded beam). This would prevent the key from turning.</p>
  
  <p><img src="https://i.sstatic.net/sXH54.jpg" alt="enter image description here"></p>
  
  <p>In the following picture the key is now inserted and all the driver pins are now flushed.  In this position ther driver keys are not engaged into the beams that are part of the rotating module.  This enables the key to turn.</p>
  
  <p><img src="https://i.sstatic.net/Qbm7I.jpg" alt="enter image description here"></p>
  
  <p>If the wrong key is used or the key is not inserted correctly, the pins would be either too low or too high engaging into the beams that are part of the rotating module and thus preventing rotation.</p>
  
  <p><img src="https://i.sstatic.net/3pNUo.jpg" alt="enter image description here"></p>
  
  <p><strong>Movie time!</strong> Here's a <a href="http://youtu.be/-lEQQbiLYxk" rel="noreferrer">video</a> demonstrating the mechanism.</p>
  
  <p>The biggest downsides of this system are the size and the fact that the driver pins are not pushed down by spring but by gravity.  Both of those troubles are put to shame by the total awesomeness of having a functioning pin tumble lock made of LEGO bricks.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2011-11-08T05:11:04.260Z
Answers.Text: That's the kind of design I had in mind (maybe not multicolor though ;-)). @JoeWreschnig I was assuming there was one tumbler per brick, every 8mm thus — which seems reasonable enouch to me. But a 1x1 plate instead of tile might be gentle enough to work, depending on the design of the pins.
Answers.UserDisplayName: Joubarc
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2011-11-08T10:33:05.397Z
Answers.Text: I was referencing to my design of the key when I mentioned it wouldn't work. This is exactly what I understood when you explained it. It looks like the cylinders would get stuck about four studs from the left, perhaps the tile could be replaced with a cheese slope?
Answers.UserDisplayName: Ambo100
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2011-11-08T11:17:22.180Z
Answers.Text: @Ambo100 if you build your cylinders with rounded ends they will accept the imperfections.  you could use Technic axles and cap them with a Axle Towball (2736)
Answers.UserDisplayName: pcantin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2011-11-08T18:53:05.893Z
Answers.Text: @JoeWreschnig yes, that's certainly going to be an important factor, and as a matter of fact the key and the tumbler should be designed together — even if one has ideas for keys, it's only when building the tumbler that it's possible to see if the idea will be practical or not. I'm curious enough to try it too, honestly, but I don't know when I'll find the time.
Answers.UserDisplayName: Joubarc
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2011-11-16T22:12:44.000Z
Answers.Text: I'd be happy to accept this as answer if it included more detail on  both the lock key and mechanism.
Answers.UserDisplayName: Ambo100
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2011-11-20T16:31:30.203Z
Answers.Text: @Ambo100 There you go, I added an edit.
Answers.UserDisplayName: pcantin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2011-11-20T19:23:25.500Z
Answers.Text: Neat! Now you'll need to build the door around it.
Answers.UserDisplayName: Joubarc
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2011-11-21T19:51:16.853Z
Answers.Text: I like the solution, as I made something similar, but not near as compact as this in the past. (I used rubber bands to provide the spring effect though.) However what I didn't solve however was how to make it rotate nicely while still keeping the pins in the right position, so they wouldn't fall down when you rotate it. Any ideas to this?
Answers.UserDisplayName: Sebastian Wahl
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2011-11-21T20:07:15.123Z
Answers.Text: I thought of that.  Sliding a beam under the read rounded beam would do the trick.  The beam would be attached to the fixed part of the mechanism and, using LEGO elastics, would slide under the red beam when the mechanism rotates from under the driver pins. When the key is rotated back, that beam would be pushed out of the way, freeing the driver pins to move down.  The beauty is that, when the right key is in, all the driver pins are flushed (same height).  This is a lot easier to manage.
Answers.UserDisplayName: pcantin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-05T12:54:25.433Z
Answers.Text: This would be cool if you could attach it to the door.
Answers.UserDisplayName: MTK Plays
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2011-11-07T23:18:14.143Z
Answers.LastActivityDate: 2011-12-05T17:59:31.767Z
Answers.LastEditDate: 2011-12-05T17:59:31.767Z
Answers.UserDisplayName: pcantin
Body: <p>I'd like to make a working <a href="http://en.wikipedia.org/wiki/Pin_tumbler_lock" rel="noreferrer">pin tumbler lock</a> out of LEGO bricks. I have already designed a key I'd like to use that should be compatible with five cylinder lock.</p>
  
  <p><img src="https://i.sstatic.net/VpbBj.png" alt="Technic Key"></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2011-11-07T19:40:00.263Z
Comments.Text: I must admit I have some doubts on the key design - the idea of the tumbler lock is that the key is a series of flats and gentle slopes so that the key pins can be pushed gently one way out of the way (against the strength of a spring, no less). I'd rather suggest two layers of 1xn plates, with 1x1 slopes above it or something.
Comments.UserDisplayName: Joubarc
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2011-11-07T20:15:42.793Z
Comments.Text: @Joubarc: The key is half the problem. I can see why it wouldn't work. I tried your advice, but the cheese slopes don't align themselves.
Comments.UserDisplayName: Ambo100
Tags: <technic><building><design>
Title: How can I make a working pin tumbler lock?
UserDisplayName: Ambo100
ThreadText: # How can I make a working pin tumbler lock?
  
  (Asked by: username_0 on 2011-11-07)
  
  I'd like to make a working [pin tumbler lock](http://en.wikipedia.org/wiki/Pin_tumbler_lock) out of LEGO bricks. I have already designed a key I'd like to use that should be compatible with five cylinder lock.
  
  ![Technic Key](https://i.sstatic.net/VpbBj.png)
  
  **Tags:** technic, building, design
  
  > **Comments:**
  > **username_1**: I must admit I have some doubts on the key design - the idea of the tumbler lock is that the key is a series of flats and gentle slopes so that the key pins can be pushed gently one way out of the way (against the strength of a spring, no less). I'd rather suggest two layers of 1xn plates, with 1x1 slopes above it or something.  
  > **username_0**: @username_1: The key is half the problem. I can see why it wouldn't work. I tried your advice, but the cheese slopes don't align themselves.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2011-11-07. Score: 29 | Accepted answer
  
  This would push the pins up and down like a [normal key](https://i.sstatic.net/KAVwK.png) would.
  
  ![enter image description here](https://i.sstatic.net/TT3WL.jpg)
  
  Here is the basic system. I don't have time to build to whole thing but this resolves the main problem and proves the feasibility.
  
  The main problem was to reproduce the pins system with LEGO bricks since each pins needs to have different lengths. Early in this project, I wanted to have a 'analog' approach of setting the pins length so to not be constrained by only stacking plates. For that I used axle perpendicular-joiner (6536) on an axle to build the driver pins (top pins):
  
  ![enter image description here](https://i.sstatic.net/3upuA.jpg)
  
  The key pins (lower pins) are caped with angles connectors (32013) creating the needed round tips on which the key can push.
  
  In a standard pin tumbler lock system, if the right key is not pushing on the pins, both the driver pins and the key pins can prevent the rotation motion. If the key tooth is too low, the driver pins is blocking and, if the key tooth is too high, the key pin is blocking. In my system the driver pins are doing both functions.
  
  In the prototype the red rounded beam and the driver pins would be fixed while the rest would rotating with the key. In the following picture you can see the lock without the key. In that state all the driver pins go through the black Technic beam (under the red rounded beam). This would prevent the key from turning.
  
  ![enter image description here](https://i.sstatic.net/sXH54.jpg)
  
  In the following picture the key is now inserted and all the driver pins are now flushed. In this position ther driver keys are not engaged into the beams that are part of the rotating module. This enables the key to turn.
  
  ![enter image description here](https://i.sstatic.net/Qbm7I.jpg)
  
  If the wrong key is used or the key is not inserted correctly, the pins would be either too low or too high engaging into the beams that are part of the rotating module and thus preventing rotation.
  
  ![enter image description here](https://i.sstatic.net/3pNUo.jpg)
  
  **Movie time!** Here's a [video](http://youtu.be/-lEQQbiLYxk) demonstrating the mechanism.
  
  The biggest downsides of this system are the size and the fact that the driver pins are not pushed down by spring but by gravity. Both of those troubles are put to shame by the total awesomeness of having a functioning pin tumble lock made of LEGO bricks.
  
  > **Comments:**
  > **username_1**: That's the kind of design I had in mind (maybe not multicolor though ;-)). @JoeWreschnig I was assuming there was one tumbler per brick, every 8mm thus — which seems reasonable enouch to me. But a 1x1 plate instead of tile might be gentle enough to work, depending on the design of the pins.  
  > **username_0**: I was referencing to my design of the key when I mentioned it wouldn't work. This is exactly what I understood when you explained it. It looks like the cylinders would get stuck about four studs from the left, perhaps the tile could be replaced with a cheese slope?  
  > **username_2**: @username_0 if you build your cylinders with rounded ends they will accept the imperfections.  you could use Technic axles and cap them with a Axle Towball (2736)  
  > **username_1**: @JoeWreschnig yes, that's certainly going to be an important factor, and as a matter of fact the key and the tumbler should be designed together — even if one has ideas for keys, it's only when building the tumbler that it's possible to see if the idea will be practical or not. I'm curious enough to try it too, honestly, but I don't know when I'll find the time.  
  > **username_0**: I'd be happy to accept this as answer if it included more detail on  both the lock key and mechanism.  
  > **username_2**: @username_0 There you go, I added an edit.  
  > **username_1**: Neat! Now you'll need to build the door around it.  
  > **username_3**: I like the solution, as I made something similar, but not near as compact as this in the past. (I used rubber bands to provide the spring effect though.) However what I didn't solve however was how to make it rotate nicely while still keeping the pins in the right position, so they wouldn't fall down when you rotate it. Any ideas to this?  
  > **username_2**: I thought of that.  Sliding a beam under the read rounded beam would do the trick.  The beam would be attached to the fixed part of the mechanism and, using LEGO elastics, would slide under the red beam when the mechanism rotates from under the driver pins. When the key is rotated back, that beam would be pushed out of the way, freeing the driver pins to move down.  The beauty is that, when the right key is in, all the driver pins are flushed (same height).  This is a lot easier to manage.  
  > **username_4**: This would be cool if you could attach it to the door.  
  
  ---
  
  