Thursday, December 31, 2099

Enigma Machine Simulator Documentation

Product documentation, build instructions and software for Enigma Uno, Enigma Z30, Mega Enigma and Pico Enigma, all of our Enigma Machine Simulators:

Sunday, May 16, 2021

How to use PicoEnigma, an Enigma Z30 Simulator

PicoEnigma is an Enigma Z30 simulator, a rare, numbers only Enigma Machine. 

Its mode of operation is similar to other Enigma machines, it has a keyboard and a lampfield, pushing a key sends electricity to the entry rotor (ETW), then the electricity goes from right to left through the rotor pack, comes back through the reflector (UKW), and returns from left to right through another set of wires in the rotor pack, goes into the ETW and out to a lamp. 

In this machine, the rotors can be rearranged, the ring setting can be changed and the rotor starting position can be set. To successfully decrypt a message, the machine settings must be the same used to enctypt it.

This simulator is designed to operate the same as the Enigma Z30 Simulator for the KIM Uno:

https://arduinoenigma.blogspot.com/p/enigma-z30-for-kim-uno.html

After the simulator is turned on, it is ready to encrypt a message. The rotor starting position is 4321. Pressing a key advances the rotors and lights the result. The result will be illuminated while the key is being pushed. Releasing the key turns the lamps off. 

During machine operation, all the lamps will be off if none of the black keys are pressed, or one lamp will illuminate when a black key is pressed. Pressing the red key enters the configuration mode. To indicate at a glance that the machine is in the configuration mode, all of the lamps are lit except for one. 

When only the first lamp is turned off, the rotor types are being changed. Pushing the keys above or below the displays changes the rotor type for that position. Each rotor can only be used once. Once a unique rotor combination is selected, pushing the red key again advances to the next setting. 

When the second lamp is turned off, the ring settings are being changed. The up and down keys are used to change this setting, Each rotor can be set differently to a number from 0 to 9. Pressing the red menu key advances to the next setting.

When the third lamp is turned off, the stepping mode is being changed. There were two kinds of machines, one with a traditional lever stepping and another with geared stepping. The lever stepping machines suffered from a double stepping anomaly where a 9 in any position steps that wheel and the one to its left.  A double stepping sequence is: 0088 0089 0090 0101 Geared stepping works like a car odometer and no digits are skipped. 

The stepping mode is indicated by the digit on the right. If it shows a 0, the machine is using lever stepping, if it shows a 1, it is using geared stepping. In this screen, pushing the leftmost up and down button also changes the brightness of the lampfield digits. 

Pushing the red menu button again turns all the lamps off and returns to the operating mode screen.

Pushing the up and down buttons changes the rotor starting position. The machine is now ready to encrypt numbers. 

To send a text message, an encoding scheme must be devised. Either substitute letters by two numbers A 01 B 02 ... Y25 Z26 or use a codebook where words are substituted by numbers, first translate the message to numbers then encrypt the numbers. 

To decrypt the message ensure the machine is set up exactly as the machine used to send the message. Ensure the starting position is set the same as well.

For example, to encrypt the message TEST, use the table below.

 A  B  C  D  E  F  G  H  I  J  K  L  M

01 02 03 04 05 06 07 08 09 10 11 12 13

 N  O  P  Q  R  S  T  U  V  W  X  Y  Z

14 15 16 17 18 19 20 21 22 23 24 25 26

The word TEST would be encoded as 20 05 19 20

Typing and holding one number at a time in the machine using the default settings after power up yields 44 57 43 94

The wheels should be at position 4329 after all the numbers have been typed. 

To decrypt it, use the up and down keys to reset the wheels to the starting position of 4321. Then type the encrypted message (44 57 ...) and the original message (20 05 ...) will be displayed.


Thursday, January 21, 2021

Dual Screen DSKY talks to host computer via Virtual Serial Port

This is a new project, a DSKY, the Display Keyboard interface for the Apollo Guidance Computer (AGC), using two 240x320 LCD screens and a keypad made with Kailh Cherry clone keys.

This DSKY uses an Arduino Mega 2560 to interface with the host computer via a USB Virtual Serial Port. The Arduino Mega uses two of its auxiliary serial ports to communicate with the Arduino Nano on each screen. The Arduino Mega is also responsible for scanning the DSKY keyboard and sending keypresses back to the host computer. 

Each indicator on the left and right screen is controlled by a command from the host computer. For example to illuminate the indicators below, the host computer sends to the Mega the following string "C F P  V00 N00 X 00000 Y 00000 Z  000  ". The Mega receives commands from the host computer and forwards them to both screens. The left screen reacts to single character commands A..O. Upper case commands illuminate an indicator, lower case commands turn them off. The right screen uses the Q command to illuminate the COMP ACTY indicator and the P, V, N, X, Y, Z commands to display numeric data which may include a leading positive or negative sign.  



This DSKY is being made to interface to a modified version of Moonjs, An Online Apollo Guidance Computer (AGC) Simulator (https://svtsim.com/moonjs/agc.html). The simulator has been modified to use the experimental Web Serial API available in the Google Chrome browser in order to both send screen data to the external DSKY as well as be controlled by keypresses from the external DSKY. 

The modified simulator accepts keypress commands from the external DSKY via Serial Port. The commands correspond to the first letter of each key legend. For example if KEY REL is pressed in the external DSKY, it sends K to the simulator. Thus, to calibrate the IMU as part of the launch checklist, the simulator receives V 3 7 E 0 1 E from the external DSKY. 

The modified simulator is available at https://gitlab.com/arduinoenigma/serialmoonjs


A PCB is being designed to hold both screens and the keypad. Each screen connects to an Arduino Uno compatible pin header and is controlled by an Arduino Nano located under it. The Arduino Nano has been rotated so the USB connector is accessible  Only the minimum number of signals needed to control the display using SPI have been routed from the Nano to the LCD screen pins. The RX pin on each Nano is connected to a separate auxiliary TX pin on the Mega. 


The minimum number of signals needed to control the SPI LCD screen was experimentally determined by using jumper wires. 


Here is an OSHPark (https://oshpark.com/profiles/ArduinoEnigma) rendering of the board design so far:





Sunday, October 25, 2020

UHR Switch Bill Of Materials (BOM) and Assembly Instructions

For more information about the UhrSwitch:

Bill of Materials:


1) 1x UHR Switch PCB

2) 1x Meduino, (Mega 2560 Pro Mini). Make sure the pins to the right and the left of the USB connector match
https://www.ebay.com/sch/i.html?_nkw=meduino

3) 2x 0.56 inch RED 7 SEGMENT LED DISPLAY COMMON CATHODE. Get either 2x 5161AS or 2x 5611AH 
https://www.ebay.com/sch/i.html?_nkw=5161as

5) 1x Potentiometer Cap (you may want to substitute with something more appropriate)
https://www.ebay.com/sch/i.html?_nkw=potentiometer%20cap%206mm%20inside

7) 20x  0.5M Audio Cable 3.5mm Male to Male 90 Degree Angle. Get the 0.5M the 20cm is too short.
9) 4x M2 6mm Plastic Screw (Black)

10) 4x M2 6mm Brass Screw

Component Pictures:










Assembly Steps:


Read all of the assembly steps and look at the pictures at the bottom before starting any soldering. The components can be placed in the PCB before soldering them in order to verify that everything fits and is on the correct layer. Start soldering only once everything is understood. 

Identify Top and Bottom sides of PCB.
Top: only shows EXT and INT words in white
Bottom: Flag, word UHRSwitch

-Insert power switch on 3 pin header next to the words EXT and INT on top side of PCB and solder it.
-Insert 2x seven segment displays on headers on top side of PCB and solder them
-Insert ENC11 Rotary encoder on top side of PCB and solder it
-flip PCB to bottom side
-Insert pin headers for Meduino into bottom side of PCB. Insert the short end of the header pins into the PCB so they do not protrude too far out the front side. Flip the PCB and place on a flat surface. Solder pins on front side of PCB. Be careful not to touch the side of the seven segment displays with the soldering iron.
-Flip PCB and insert Meduino onto long side of pin header on bottom side of PCB. Solder it
-Insert PCB Spacer on DC Power Jaack and Insert Jack into bottom side of UHRSwitch PCB. The role of the Spacer is to keep the DC Power Jack pins from protruding too far out the front side of the PCB. Solder the Power Jack.
-Flip PCB to top side.
-Insert audio cables into holes on PCB from top side. The tails of the cables should point down, away from the seven segment displays.
-Flip PCB to bottom side.
-Solder one spot from the audio cable plug to the PCB.
-Once all soldering is completed, sand down any mouse bites sticking out the sides of the PCB.

Assembled Unit Pictures:




Friday, October 16, 2020

BinaryEnigma is possibly the smallest enigma machine ever built

[alank2] started a class of enigma machine simulators under 10x10cm and has now announced the latest addition to this family: BinaryEnigma

This class of machines was started to take advantage of the discounted rate when ordering pcbs sized 10x10cm and under from the Far East. The original, MicroEnigma using a 2 layer board and SMT components is described here:

https://enigmaworldcodegroup.freeforums.net/thread/91/microenigma

Another member of the family, PicoEnigma is a few millimeters smaller than MicroEnigma and uses all through hole parts, but needs a two board stack. 

https://arduinoenigma.blogspot.com/p/picoenigma.html

The smallest of the bunch, BinaryEnigma was announced in this forum post:

https://enigmaworldcodegroup.freeforums.net/thread/245/binaryenigma

It appears to use an Oshpark PCB with a minimal number of components, LEDs and pushbuttons in the front and an SMT ATtiny84a in the back along with a few support components. The whole thing is powered by a CR2032 lithium battery that lasts 200 hours of machine operation.

Here are a few videos of the members of this family:

MicroEnigma:


https://www.youtube.com/watch?v=TomMZATAFVY

PicoEnigma:

https://www.youtube.com/watch?v=e5l5f0q9yeA

BinaryEnigma:

https://www.youtube.com/watch?v=PVQSm2OKFzc


Saturday, September 12, 2020

Pico Enigma Machine Simulator Kit now available

Pico Enigma is now available in a Kit. This is very easy to assemble, with all the parts being thru-hole. The kit includes all the parts needed to assemble your own enigma machine simulator. The glue to put together the wood enclosure is not include. Gorilla Go2Gel is recommended. 


The kit is available at the link below:

http://tinyurl.com/enigmastore

For assembly instructions:

https://arduinoenigma.blogspot.com/2020/06/assembly-notes-for-picoenigma.html


Sunday, August 16, 2020

7 Segment LED Board now drives 16 LEDs

The seven segment LED board can now drive 16 LED using only an Arduino Nano.  Using the circuit described below it can drive 18 LEDs using a stock Arduino Uno/Nano and 20 if the LED on pin D13 is removed by desoldering it.

Here is a picture of the board showing the first 16 digits of PI

The first board gets two Arduinos. The first one, at the top of the board sends instructions to the second one at the bottom of the board. The bottom arduino is responsible for receiving serial instructions and driving the LEDs, If a packet received through the serial port is not meant for the current board, it gets relayed to the next board. The TX pin in the bottom Arduino is connected to the RX pin on the next board's Arduino Nano.


This is the same board when it could only drive 9 LEDs.

We have previously written about this project: 






By daisy chaining these boards, a larger installation can be assembled. Note the Arduino shadows, the board on the top left has two Arduinos, the rest of the boards, only one.



Here is a picture of the PCB as displayed by Fritzing. Note all the segment pins are connected in the top layer using vertical traces. The segment pins on each vertical stack are connected to other stacks using horizontal traces on the bottom layer and vias under each display. Notice the middle pin on the B displays is connected to the Arduino and an A and a B display are connected together. 

A 5611AS display is installed in all the sockets labelled A and a 5611BS display is installed in all the sockets labelled B. Another display like the higher brightness 5161 can be used, but be sure to get the 5161AS and 5161BS, do not mix 5611 with 5161 in the same board as the brightness will not be the same.


The schematic for this board is drawn below:

The A segment is connected  to all the displays. 

A Common Cathode (5611AS) display and a Common Anode (5611BS) display are connected in parallel. Their common pin are tied together and become the 1/2 select line..

Unlike charliexplexing, this arrangement allows a whole digit to be illuminated at a time. To illuminate a seven (7) in the first digit, a,b,c are set to output and high, and 1/2 select is set to output and low. All other pins are set to input and low, to prevent the internal pull up resistor from weakly driving the pin high. To illuminate a one (1) in the second digit, b and c are set to output and low, and 1/2 select line is set to output and high. The circuit can be extended with as many select lines as available.


Here is a sample pin assignment for an Arduino Nano. The display segments (a..g) are connected to I.O pins. The decimal point (dp) can be connected, or turned into an additional select line  

The D0/D1 pins should not be connected to avoid interfering with the built in Serial capabilities. 

The D13 pin has an LED connected to it and cannot be floated by turning it to input and low, so it should be left unconnected unless the LED is removed by desoldering it.

The A0..A5 pins can be used as digital outputs, with the exception of A6/A7 which are analog input only pins and should be left unconnected.


With the above setup, 18 digits can be controlled. If the decimal point is turned to a select line, a stock Nano can display 20 digits. If the LED on D13 is removed, 22 digits can be controlled. 

This board is bigger than the previous one, measuring 142 x 142mm.  

There is only one place that consistently manufactures board this size: PCBWay.com  The boards look good, function as designed and do not have extraneous markings like manufacturing codes placed. Other fab houses have returned boards to us with job numbers in prominent places in the front layer, or noticeable silkscreen issues.  

The Online Gerber Viewer was used to verify the accuracy of the files submitted:



Manufacturing took a couple of days, the progress of the board manufacturing could be tracked in the website: 




DHL delivered this package in 4 working days. In total, it took a week from submitting files to receiving the boards in the mail.

The boards were safely packaged and they came with a free 6 year anniversary sticker and badge.


The badge was designed by @akirasan (instagram: https://www.instagram.com/akirasan21h_) (twitter: https://twitter.com/akirasan)

The badge uses a 2032 battery (not included). A pin is included and is easily soldered into place. Once powered up, the onboard RGB leds light up and sweep through the color spectrum.




The next stage in this project is to consolidate multiple 16 display modules in the same PCB.

Sunday, August 9, 2020

Design of an Enigma Machine Rotor using PCB, pogo pins and 3D printed parts

Here are a set of PCB that are accurately wired like the rotors and reflectors of an Enigma Machine. This project was inspired by: https://hackaday.io/project/156935-enigma-machine



The gerbers are available at:
https://oshpark.com/profiles/ArduinoEnigma/




Rotor Wiring: 

First line: RIGHT SIDE - Bottom Layer
Second line: LEFT SIDE - Top Layer

ETW ABCDEFGHIJKLMNOPQRSTUVWXYZ
        ABCDEFGHIJKLMNOPQRSTUVWXYZ
I       ABCDEFGHIJKLMNOPQRSTUVWXYZ
        EKMFLGDQVZNTOWYHXUSPAIBRCJ
II      ABCDEFGHIJKLMNOPQRSTUVWXYZ
        AJDKSIRUXBLHWTMCQGZNPYFVOE
III     ABCDEFGHIJKLMNOPQRSTUVWXYZ
BDFHJLCPRTXVZNYEIWGAKMUSQO

IV ABCDEFGHIJKLMNOPQRSTUVWXYZ
ESOVPZJAYQUIRHXLNFTGKDCMWB
UKWB    ABCDEFGHIJKLMNOPQRSTUVWXYZ
        YRUHQSLDPXNGOKMIEBFZCWVJAT
UKWC ABCDEFGHIJKLMNOPQRSTUVWXYZ
FVPJIAOYEDRZXWGCTKUQSBNMHL

To use:

The rotor PCB are bolted to a 3D printed part. The order, from left to right is:
PCB, 3D printed Part, Head of Pogo pin.

The PCB markings are meant to be exposed and on the left side of the PCB when bolted to a 3D printed part. 

The ETW takes no pogo pins. The wires from the keyboard are soldered to either the exposed vias or the A1..Z1 contacts on the right side.

The UKW will have its dark side on on the left. The contacts will be on the right and hidden when bolted to a 3D printed part.

To make a machine, the minimum set of parts, from left to right are:
UKW(B or C), Rotor 3, Rotor 2, Rotor 1, ETW.

The wires from the keyboard switches go to the ETW (stationary entry wheel), the signals then go through the three rotors, in and out of the UWK (stationary reflector), back through another parh through the three rotors, then out of the ETW to the lampfield.