3D printed Enigma keyboard.

August 6th, 2017

First another film. Sorry for the blurriness again, really need a better camera! Canon Ixus 175 is rubbish! Don’t buy one!

I have been busy working on the keyboard mechanism of my machine. This will vary a lot in actual mechanical details from an original machine as I am using totally different switches. The original Enigma used metal contacts actuated by pins though the shafts of the keys. Two rows of keys (of the three on the keyboard) use compression springs on the key shafts but the third, top row, actually uses small tension springs. My mechanism is considerably different.

I am using modern micro switches in mine as they are easy to obtain and come in standard sizes. To wire the Enigma up correctly you need what is called a double throw switch. This switch has three contacts, a common and then two outputs, one active in each switch position. In the real Enigma machine the key switches swap the current from being an input to an output. The switch is wired so the common goes to the entry wheel (via the plug board). The NC (normally closed – key up) contact goes to the lamp matching the letter of the key and the NO (normally open – key down) goes to the battery positive. When a key is pressed the switch in it connects that letter to the battery. The current then flows through the plug board, into the scrambler (entry wheel, three rotors and reflector) then back out of the scrambler to a different key (NEVER the same key – one of Enigmas weaknesses). That key, being up, directs the current to its correct letter lamp.

I started by modelling up small parts of the mechanism. I am using the same external dimensions as the real machine for the keyboard itself and the keys. I made a base plate with little pockets that the micro switches press fit into. I only printed a part of the whole plate for these tests.


I then set about making some kind of cam to actuate the switch as the key is pressed. For the shaft of the keys I am using 1/4 inch aluminium rod. I can 3D print shafts but they aren’t really smooth or strong enough so don’t provide a very nice action. I know some dozy twat will come along and say “the machine isn’t fully 3D printed then” but having one 100% 3D printed is somewhat impossible so I am not claiming it’s fully 3D printed. I could 3D print a static model I guess but a working one will always need some non plastic parts of course.

I started working out how to do a cam and the basic idea is very simple. A press fit collar on the key shaft that has an appropriate profile to actuate the switch as the key is pressed. I started playing about with ideas. Luckily small parts like this are quick to print so you can try many ideas (rapid prototyping).


A simple round collar with a flat on the side worked but the issue then was that the key shaft is free to rotate. You could use square shafts in square holes to solve that issue but that’s a lot harder to engineer. To stop the rotation happening I ended up using the body of the switch itself. I extended the cam collar so it had little flat extensions to it. These are sized to be just wider than the width of the switch itself and they slide up and down the sides of the switch freely but prevent the key shaft from rotating.

IMG_0880_1 IMG_0876_1

The other thing I did was make the hole in the base of the cam wider than the shaft. This is so there is room for a spring that fits around the shaft and up inside the cam. This spring will cause the key to pop back up after it is pressed. I have ordered some appropriate springs from China (thank you Aliexpress!) so am waiting for them to arrive now.

To test the whole mechanism I printed a small model of one key. You can see it below with the key fully down then fully up.

IMG_0870_1 IMG_0871_1

I think on my machine the keys won’t move up and down as much as on a real machine. You only need around 10 mm maximum movement to actuate the mechanism to step the rotors. My key mech gives me 11mm of movement currently. I can add up to another 5mm to that if needed. The other tricky thing is each of the three rows of keys moves a slightly different amount. I should be able to compensate for this by changing the profile of my cams. This will take some trial and error but should be workable. Of course the key needs to move the rotors THEN actuate the switch. I do know from a film that James did for me that the keys on a real machine go all the way down to the body. On mine they will probably stop a little short.

The whole mechanism holding the keys consists of three parts. The bottom part holds the switches. Then there is an upper part that has supports to press down on the switches to hold them in place. That sits directly under the actual keyboard, which I have printed to the same dimensions and profile as the original so the keyboard layout will be identical although my mounting holes are in different places. The whole lot is held together with the same aluminium rod as the key shafts. I drilled and tapped these on the lathe to make spacers.


There are spacers under the bottom layer that attach the keyboard to the base and hold it the correct height above the see-saw. These I tapped both ends then I added threaded rods (cut down machine screws) into one end. These threads are Loctited in place. These threads pass through the switch plate then the top spacers are screwed onto these sandwiching the switch plate between the spacers. The top plate sliders over the spacers. Then the keyboard itself sits on top of this plate and on top of the spacers. Screws though the keyboard hold everything in place. The pictures below should help explain.

IMG_0881_1 IMG_0882_1 IMG_0884_1

When I make the base I will add in stops that go under the see-saw part to provide physical limits on that. I will also add in some extra supports for the middle section of the keyboard to stop that sagging. The original machines did have an extra middle support there.

The key tops need some work too. I mentioned in the film using my little laser cutter to make plastic windows for the key tops. This will definitely work and I might do that but I have ordered some 12mm glass microscope cover slips and I am hoping those will work so I can have real glass in the keys. I need to do some work with the actual key top printing. These are printed in two parts and I have the model complete but I need to play with my printer settings to get them to print very cleanly. This is so they will press fit together nicely. I also need to create the font for the key tops in the same was as I did the font for the letter on the rings of the rotors. Then I need another font for the lamp board. They are all different and it really annoys me! I thought the Germans were more ordered than that.

I have discovered there is a book called “Inside Enigma” by Professor Tom Perera which you can buy from the Radio Society of Great Britain online shop that apparently has pictures of the insides of the machines. This probably would have been a great help before I started. I have ordered one but it hasn’t arrived yet. Prof. Perera is also involved with the enigmamuseum.com site where you can buy real machines (if you have around a quarter million $US to spend)!

I know there were many different models of Enigma, I am not sure exactly how many, so I am really looking forward to this book arriving.

Making the keyboard made me realise how much wiring there is going to be in this bloody thing. It’s actually going to be quite tricky wiring and assembling everything. I still need to make all the little brass contact pins for the rotors (156 of them) as well as the 26 key shafts, caps and the cams. I also need to model the lamp board but that should be fairly straight forward (I hope) and the second part of the base that the keyboard and lamp board attach to.

So still lots to do!

3 Responses to “3D printed Enigma keyboard.”

  1. Peter Coleridge Says:

    “The current then flows through the plug board, into the scrambler (entry wheel, three rotors and reflector) then back out of the scrambler to a different key (NEVER the same key – one of Enigmas weaknesses).”

    It seems to me that one reason the Enigmas use a reflector (with its associated weakness) is that it makes it easier to use the same machine to decrypt. Without this it would need at least twice as many relays if not more. I wonder if you have an opinion on this.

  2. david Says:

    Dear sir, thanks for your great site; I have one question about the Miele vacuum… How do you open the motor, mine seems sealed.
    I’ll be glad to learn the technique from you.

    All the best,


  3. david Says:

    I’m sorry to write here but I didn’t find the button to subscribe to your blog/site. Only the LOG. Kind regards, David