05/27/2019 at 17:30 •
Using a genuine Arduino MEGA to test the plugboard logic:
All the plugboard pins are set to input with the pullup resistor activated. One at a time, each plug is set to output and low. The other plugs are read one at a time, a 0 is returned if the other end of the plug is installed, otherwise a 1 is returned.
The code is implemented as a state machine and only one I/O operation is done each time it is called. This routine needs to be called once or twice in between changing the display from one digit to the next.
Thie state machine takes 24us to run.
Here a list of the installed plugs is shown:
The code stores any plugs detected in an array. The scanning process is shown below.
Notice that column 23 changes to 6 as the plug is discovered. Column 6 was already changed to 23 as one side of the plug was discovered.
Detecting when a plug is removed is equally important. and a different logic is needed. If all the plugs are read and neither returns 0, reset the plugboard entry to itself. Notice the last row changes from 1 to 26 once the A-Z plug is removed;
05/25/2019 at 16:51 •
The pin assignments have been traced and double checked. Each LED and switch on this board can be uniquely addressed with two microcontroller pins.
This simulator uses a fairly conservative multiplexing design to light up the LED and read the keys. There are a lot of different devices on each pin, but that is solved in software by controlling each device at a different frequency. The 16 segment displays need to be driven more frequently to eliminate flicker. The keyboard can be read one key at a time when switching from one sixteen digit display to another. The lampfield can be treated like another sixteen segment displays and if needed, multiple lamps can be lit simultaneously.
Here is a detailed schematic for one row, pin 3 is selected because it has 6 devices. Other lines may not have anything connected on LED2L, KEY2L or UPDNL (schematic made with the Klunky Schematic Editor https://www.qsl.net/wd9eyb/klunky/home.html)
Pin 3 controls one side of:
1) Segment A1
2) Lampboard letter Q
3) Lampboard letter P
4) Keyboard letter Q
5) Keyboard letter P
6) Up Key for Digit 1
Here is the algorithm to illuminate and read all of the devices (although not at the same frequency)
1) put the correct bit pattern on A.. H segments for digit 1 (active high). In order to control the brightness difference between letters with a lot of segments and letters with few segments, this task can be subdivided in two by putting the bit pattern for 8 segments first, then putting the pattern for the other 8 segments.
2) make the CCDS1 line active low to illuminate the first 16 segment digit. Make CCDS2..CCDS4 high or inputs to prevent anything from showing in digits 2..4
3) make the LED1L and LED2L lines high or inputs to prevent anything from showing in the lamp field.
5) Wait 400uS or execute an Enigma encoding task that takes less than that time to execute.
6) Make all the segments 1 in preparation to read the keyboard
7) Make 1 segment low, start with A1, on next iteration, select A2...
8) Read KEY1L, if 0, Q is pressed
9) Read KEY2L, if 0, P is pressed
10) Read UPDNL, if 0, DS1up is pressed
11) repeat step 1, but activate CCDS2 to illuminate the second 16 segment digit. When all four 16 segment digits have been illuminated, repeat step 1 again but activate KEY1L, then repeat one more time with KEY2L
Here are the tasks one at a time:
1) letter pattern (active high)
2) CCDS1 (active low) and wait 400us
3) Read one set of keys (set one segment to low and read KEYxL for low)
4) letter pattern
6) Read next set of keys
7) letter pattern
9) Read next set of keys
10) letter pattern
12) Read next set of keys
13) lampfield pattern
15) Read next set of keys
16) lampfield pattern
18) Read next set of keys
It looks like a state machine will take care of the multiplexing.
05/24/2019 at 05:06 •
The Arduino Mega 2560 Pro Mini has arrived. The good news is that it is compatible with the External Lamp Field. Below is the Mega sitting on its spot on the simulator. On the actual PCB, it will be soldered underneath the board. The USB connector will stick out through a discreet hole on the back of the simulator.
This device from miniduino matches the Fritzing footprint and uses an ATmega16u2 for the USB connectivity. It can be found on ebay by searching for "mega 2560 pro mini atmega16u2"
While this one is a little cheaper and works fine for other uses, the external lamp field does not have drivers for the USB chip on board this one:
05/23/2019 at 05:16 •
While waiting for parts, I have decided to design a new PCB for the numbers only Enigma Z30 using only parts on hand:
05/18/2019 at 15:00 •
The board is almost ready for production, can you spot the hidden vias under the G key?
Here is the bottom copper layer. @Benchoff, Is this the latest Fritzing autorouter or is it done by hand?
More pictures and the description of how it was done are here:
05/14/2019 at 03:05 •
Next, we will start designing the main board. The main components here are the Arduino Pro Mini and some 16 segment displays.
The display and the Mega are arranged in a board the same size as the plugboard. A lampfield and a keyboard are designed as well,
05/14/2019 at 02:55 •
A proper Enigma Machine SImulator needs a working plugboard. The Mega 2560 Pro Mini has enough pins. Let's see if a plugboard can be put together in Fritzing.
This is a quick concept thrown together. The holes are custom size vias. The board ends up being around 138mm wide.
An order is placed for 3.5mm Female Stereo Audio Jack Connector panel mount M631.
This design will use common 3.5mm audio cables, so an order is placed for
6" 3.5mm Eurorack Modular Synth Patch CABLE - BLACK - 10 PACK
05/14/2019 at 02:46 •
This is the board that makes this project possible. It is a smaller version of the Arduino Mega 2560. It has a Fritzing model. A couple of these are ordered.