I've seen a few combination safes on youtube, but they all used an at least 5 times bigger mechanism than this one. So if you build this safe you have less chance to run out of lego bricks before you're finished.
IMPORTANT: Before you decide to build this, look at the second picture below! Those are the fancy pieces needed. The first, the nine curved bricks, are absolutely required, but not necessarily in red. The two springs, are not extremely important; without it, the door doesn't 'jump' open as you can see in the video below. All other pieces I used, are common lego pieces which belong in an average lego collection, or are well replaceable by a surrogate.
So if you decide to build it, proceed to the next step!
Step 1: The Rotors
2: Place three curved bricks around it, leaving a gap which will be the rotor's notch.
3: A 4x4 plate on top of it.
4: Another round brick, on top of the plate.
5: Cover the rest with tiles.
6: Another plate, on top of the round brick, only for rotor 1 and 2.
7: Now place a 1x1 round brick on the top plate, the place of it will influence the number sequence of your safe. See the next image, an animated gif, to learn where you can put it.
8: Rotor 2 should be exactly like this. Rotor 3 aswell, but without the plate plus 1x1 round brick at the end. For rotor 1 you only need to add the two round plates at the beginning, without the stuff sticked in them.
Step 2: The Frame
2: Add bricks like this.
3: And another layer.
4: Make another four of that, and stack them together.
5: Place 6x1 bars on these places.
6: Just a temporary plate to hold the brick where it should be.
7: Also a temporary plate, because those long holed plate break off fast without something behind it.
8: Maybe you already noticed you can insert the rotors in the frame. Also notice that their connection caps should point in the opposite direction compared to the frame's bricks!
9: These are the pins that will fall into the rotors. The one on the left is different because it will also open the door.
10: You need these staves plus connection element, to hold the pins you just made.
11: Take out the rotors again, for just a moment. First, from the right side, take the longer stave and slide it into the holes, and through the two small pins. Put the connection element at the end.
12: Now, form the left, slide in the smaller stave inside, through the longer pin. All pins should be above a 6x1 bar.
13: A little plate on the end to cover the stave.
14: Add holed bars like this. See the next two steps.
15: 3x2 plates to enclose the rotor's axes.
16: Add more holed bars and 1x4 plates. Not necessarily all bars need to have holes, see step 3.11 and 5.5 to see where there need to be holes, to hold the springs. I'm saying this because if you don't have a lot of holed bars, you don't have a problem. I filled this all with holed bars, because I will need a lot of grey bars without holes on the outside of the safe, and when I use those now, I could run out of un-holed bars when I need them.
17: Make two layers of plates on the back, leaving open the place of the last rotor's axis. I made the last face in black because I didn't have enough grey plates. You can cover the axis aswell, I didn't, because it's not necessary. Maybe you think that it would reveal the place of the 1x1 tab of the rotor, that's true, but it doesn't reveal the code. Because if you only know where the tab is, you don't know yet where the notch(the absent curved brick) of the rotor is.
Step 3: The Door
2: Put a 12x6 plate on top of it.
3: Add eight 1x1 holed bricks(or four 2x1 bricks with two holes, even better)
4: Put connection staves in the holes. connect 4 holed-bars to it. It's no problem if you don't have exactly these ones! I composed them from two different bricks, but that's also not necessary. The important thing is, that there's are holes just over the ridge of the door, with a round edge. They need to be round, because they're going to be the hinges. There are a lot of bricks like this, they dont need to be with four holes, you can also use them with six holes. And the hole on the end doesn't even need to be +-shaped. It may also be O-shaped.
5: Take a twelve-long stave, and build the thing on the left, with 1x1 holed bricks on it.
6: Join them together.
7: Fill the back of the door with bricks like this.
8: add plates, like this.
9: Take the spring and these other things.
10: Join them together.
11: Put it on the holed bars from the frame like this. It will push the door open. Also add those black connection sticks to hold the springs in place.
Step 4: The Dial
2: Take some pieces which will be the part of the dial to hold in your fingers when turning it. I took the inner part of a wheel and a round 2x2 plate, but I can understand if you don't have the weel rim. Use similar lego pieces, there exist a lot of them like this, or other discs to use for the dial, so this shouldn't be a problem.
3: Join it all together.
dial design: print this with the size of 4,5x4,5 cm(or 1,77x1,77 inch) on hard paper.
4: Make a hole in the middle, so, that a black stave fits in.
5: Put some hobby glue on it, You can use just a very little bit if you're going to execute step 7 and 8 aswell. If you don't want to get a little glue on your lego, you can enclose this paper between the two holed discs, but then there's a chance that later on the paper will move, and the combination you've remembered doesn't work anymore.
6: Hold it for a moment as the glue dries.
7: For the best result, take six really small nails.(even these are a bit too big)
8: Press them through the paper, on the places of the disc's connection sticks' holes.
9: insert the dial into the first rotor, and carefully(because the first rotor isn't fully enclosed yet) test what your combination is. You should check this, because now you can see what happens with the rotors. In the next step we will build it in, so you can't see it anymore. If you disagree with the number, you can get the dial out, turn it it a quarter-revolution, and put it in again. Then repeat the test.
Step 5: The Last Steps
2: Place two layers of plates on it. Plus a holed place for the stave to come through. And leave a 2x2 gap around the axis between rotor 1 and the dial.
3: take a 4x2 plate and place two flat round plates under it.
4: Slide it on the stave.
5: Change the composition of the springs like this! In my first design, there was so much pressure, that the door would fly open fast, but it would fly off aswell. So if you like that, you can keep it the way it is, but i recommend to chache it like this. The connection sticks on the bottom are both moved one hole to the outside, as well as the black connection sticks above it. The spring are upside down, so that the grey solid part touches the black sticks - if the spring part touches the black stick when compressing, the movement may stagnate.
6: In the door, place a flat 2x1 tile, to let the opening of the door run more smoothly.
7: It's finished!
8: Optional: If you have lego crocodiles, you can place them on top of the save, to scare lockpickers off.