Instructables

Make your own Enigma Replica

FeaturedContest Winner
Picture of Make your own Enigma Replica
EDIT: This Instructable has won Second prize in the 2013 Radio Shack Microcontroller Contest. Thank You to all who voted!

EDIT2: We are now LIVE with our "Open Enigma Project" on Kickstarter! Please visit https://www.kickstarter.com/projects/438986934/the-open-enigma-project?ref=search and choose your reward based on your budget/needs. THANK YOU for your support!

This is our very first Instructable and this step by step guide will show you how to build a fully functional electronic replica of the world famous German Enigma machine. This Arduino based Open Source project is able to encrypt & decrypt any Enigma M4 encoded message.

This first ever fully functional Open Source Enigma "exact " Replica was inspired by the Kid's Game to Arduino Enigma Machine by sketchsk3tch.

Using Charlie-plexing Multiplexing for the LEDs, this circuit with 115 light emitting diodes uses only 38 pins and the 36 push buttons use only 4 pins total thanks to properly placed resistors (and the P-Channel MOSFETs) in the keyboard loop. These 4 16-Segment displays & an LED for each keyboard button would add up quickly the total number of pins required and even the Arduino Mega would have ran out of pins without the 2 methods mentioned above....

In response to the overwhelming demand, we designed the PCB and made it available through www.stgeotronics.com. Skip to Step 10 & beyond for more info. We also offer it as a complete electronics kit & an assembled & tested complete product.


 
Remove these adsRemove these ads by Signing Up

Step 1: Proof of concept on Breadboard

Picture of Proof of concept on Breadboard
IMG_0423.JPG
Before going all out on the development of this electronic Enigma replica, we wanted to make sure we could properly drive the 16 Segment LEDs. If we can do that, than we will be able to do everything as the rest is only Math...
ST-Geotronics (author) 4 months ago
Boards are tested, working great and available now for shipping. Kits & assembled/tested/boxed Enigma Replicas are also available. www.stgeotronics.com to order.
Good.JPG
DIY93934 months ago
This is amazing!

You deserve a reward!
DIY9393 DIY93934 months ago
If you don't mind me asking, how much did all of this cost you?
ST-Geotronics (author)  DIY93934 months ago
Thank You DIY9393 for the kind words.
I guess we should have mentioned the hardware costs in the instructable. All in all, we spent less than $200 in materials. But QUITE a few hours...
No problem!

Thanks for the info!
ST-Geotronics (author) 4 months ago
The PCB drawing phase is completed. We have ordered them from the Fab & are anxiously awaiting their arrival so we can populate & test 1 set ensuring that everything works fine. As soon as this crucial step is completed, they will be available for ordering/shipping.

NOTE: There was NOT enough space on the Enigma PCB to have all necessary components AND connect to the Arduino Mega2560, so we had to create a daughter card for the Mosfets & to receive the Duino. This daughter card will be sandwiched between the motherboard & the Mega2560.
ST-Geotronics (author) 6 months ago
We just posted the second and last Circuit Schematic (for the lampfield and keyboard) at the end of the instructable.

We will start soon working on the PCB design, so stay tuned. Don't forget to vote, every vote counts. Thank You!
Thank you!!
reflector wheel=b
wheel order 1,2,3ring setting A,A,A
ground setting RAF
HLCI LVSV GXOH YCIE GIYW UQLO JWHT LETL S
ST-Geotronics (author) 6 months ago
In response to the popular demand, we just added the first of 2 Circuit Schematic at the end of the Instructable. You can now find how each of the 4 16-Segment Displays are wired. Stay tuned: We are currently working on the 2nd Circuit Schematic, which will show the rest of the Perfboard wiring: how the 26 keyboard buttons, the 10 function keys, the 26 keyboard lamps & the 5 LEDs are all hooked up. After that, we will design & post the PCB file.

Thank You for the overwhelming positive feedback & don't forget to vote for this Instructable in both contests if you enjoyed it.

thompsms6 months ago
I just can't wait for the PCB!! Astounding. You deserve a Bletchley Park Medal.
Junophor6 months ago
I am really deeply impressed!!
Take a bow

Yours Aeon Junophor
bob30306 months ago
Most intriguing instructable I've seen. Must be a record for lines of code in an instructable. Your patience in the wiring is commendable. I would be interested in the PCB you mentioned. Thanks for posting.
nwsayer9 days ago

This is great, but it always astonishes me greatly when folks embed a prototyping board in a custom printed circuit board design. If you're going to all the trouble to design a custom printed circuit board, then why not just embed the ATMega chip directly into your design? It just can't help but be cheaper, lighter and smaller that way.

MarkCauer1 month ago

How does the arduino measure the resistance if there is no current traveling through the resistor and pushbutton setup? Shouldn't there be a ground somewhere?

qbrown23 months ago
I guess i can peak at the code but how did you translate the 7 segment digit dispays to nixie ?
ST-Geotronics (author)  qbrown23 months ago
QBrown2, we didn't:

The 7 Segment displays are actually 16-Segment displays (17 if you count the decimal point) and we are using these as opposed to 7 Segment so we can have a nice Alphabet.

We decided to wire them standing up & encapsulate them inside a test tube to give it somewhat the look of period accurate Nixie Tubes.

So, no Nixies were used in this project...
P.S. the printed circuit board we made allows for 16-Segments LEDs to be horizontal or vertical, but still has not been designed with Nixies in mind...
ST-Geotronics (author) 4 months ago
HURRAY! HURRAY!
Thanksgiving Holiday brought us our Prototype boards. We are now busy populating & testing one to make sure it works as great as the proof of concept does. We are now accepting orders at www.stgeotronics.com & expect very soon to start shipping. We added Step 10 to this Instructable to show pictures & more details.

ST-Geotronics (author) 5 months ago
We are finished drawing the motherboard PCB (top), and have started drawing the daughter car (interface between top PCB & Arduino). Daughter card is required cause we can't fit all components on motherboard. As soon as daughter board is complete and we verify they fit together in Enigma machine, we will send them for production. We expect both boards in our hands sometime in December.
Thank you. Will you upload the PCB design file?
ST-Geotronics (author)  englishfire5 months ago
Yes englishfire, we will upload both PCB design files (Motherboard & Daughter Card) once they are both complete & tested. We are aiming for sometime in December.
englishfire5 months ago
Any news about the PCB?
ST-Geotronics (author) 5 months ago
stringstretcher: Reflector wheel= C Wheel order = 3,2,1 ring setting A,A,A Ground setting = USA IYRF TTQP DUPA AIMC DBTG YTNF


englishfire6 months ago
It would be interesting to use Wamco KW-105AL numitrons. They operate at 5 Volt and are alphanumeric.
NoseyNick6 months ago
Love Enigma. Love Arduino. Love LEDs. Love Nixie-tubes. Gotta love LEDs pretending to be Nixie-tubes. Love this project! :-)

Would love to see the rest of the circuit - can you explain the charlieplexing and the analog keyboard?
ST-Geotronics (author)  NoseyNick6 months ago
NoseyNick, the full circuit schematic is now posted in the instructable.

We need to make a correction, as "JuMP" pointed out about the Hackaday article on our Enigma (http://hackaday.com/2013/10/07/arduino-based-enigma-replica-is-fully-functional/), for this project, we are not Charlie-Plexing, we are simply Multiplexing.

Multiplex is just a little simpler to code as we only deal with two states of logic: high or low. It also lets us drive the common anodes easily with a p channel mosfet. This allows more current so a brighter display while observing the rated maximum current limitations of the atmega 2560.
To truly “charlieplex” requires three state logic: high, low, and open. To achieve the open, the pin mode needs to be changed from output to input thus releasing the 2560′s internal pull up and pull down circuits. True charlieplexing would have saved us 7 pins however we did not feel that it was appropriate to sink the anodes of up to 17 LEDs to only one IO pin.

The Analog keyboard refers to all 26 keyboard buttons plus 10 function keys only using 4 analog pins: All 10 functions keys are daisy-chained to Analog 0 with a 1Kohm resistor between each button. Same thing with the first row of 9 keyboard buttons being separated by 1KOhn resistor and daisy-chained to Analog 1. And so on for middle & bottom rows of keyboard...

Then, all we do to know which key has been pressed is read the resistor value at the Analog Pin. Since each button needs to go through a different qty of resistors before it hits the Analog pin, you end up with a different value that is consistent for each key. Very reliable, simple design... We possibly could put even more keys one 1 analog pin, but figured that 1 row per pin was good enough...

three_jeeps6 months ago
Neat idea, thanks for sharing. So, I enter a letter at a time and it is encrypted and shown on the display. Correct?
Does your version have the capability to enter a string of characters, encrypt each character, then cat the encrypted characters into a string and either save it in a file or send it out the serial line?
ST-Geotronics (author)  three_jeeps6 months ago
Three_Jeeps, thank you for the feedback.
Not correct on the process: Just like the real Enigma, for each key you press on the keyboard, a encrypted letter gets lit on the lamp field right after the 16-segment display shows you the new "rotor" position.

The existing code in this Replica was written to emulate as close as possible the operation of a real Enigma. Your suggestion is currently accomplished by many simulators and would be relatively easy to implement on this Arduino, but we have not written that, ...yet.

englishfire6 months ago
Cant wait to See the wiring schematic! Great Job!!!
nwlaurie6 months ago
Wow! ... just WOW!
TheZuke!6 months ago
I don't see the clear domes listed, where/what did they come from?
ST-Geotronics (author)  TheZuke!6 months ago
You're right, my bad... I forgot to list them.
They are 2 Liter soda bottle injection molded preform tubes cut to the desired length.


test tubes with screw cap 22mm x 25mm x 140mm 01.jpg
Great ible, especially for a first! Can you provide any source info for these injection molded tubes?

Can't wait to attempt my own Enigma. Thanks!
ST-Geotronics (author)  gscsderby6 months ago
Thank You gscsderby for the positive feedback.
We bought our Preform Test tubes from Science Bob:
http://www.sciencebobstore.com/products.php?product=Preform-Plastic-Test-Tubes
Nice!
ursm6 months ago
Hi there
Great replica!!
I'm very interested in a pc-board replacing the micro perboard with all that wirning.
Maybe the "nixie" could also be on a board with right angle male headers to connect it to the main board.
otapi6 months ago
Enigma machine was mechanical and not electronic ... So whether it is a replica?
s005006 months ago
This is such a great Project!!!
dougl4s6 months ago
Fantastic!
AJMansfield6 months ago
If you use the same wiring method that the original enigma machine used, you could do this with just 26 digital IO pins (plus the display), which could simplify some of the logic. (It wire each button directly to its own lamp, and an IO pin from the scrambler/transposer mechanism to each of those junctions.) The arduino mega does indeed have enough pins to accomplish this, and then you don't have to do any of the resistor network logic/math needed to decode the keyboard, or the multiplexing grid logic for the lamps.

I think this is a great project, can't wait for you to implement one that does the Lorenz Cipher (hint: use servos and rotary encoders instead of LED displays to help conserve IO pins).
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!