Saturday, June 1, 2019

A Seven Segment LED tester

The seven segment displays required for previous projects had, on rare occasions, defective segments. In order to test them all, some contraptions were devised.

Here is a calculator without the displays soldered. Testing the display involved inserting the display in the PCB and running a special program that cycles through all the digits.



This is another rig to test a single seven segment display for the Art Installation Project. This one simply illuminates all the digits simultaneously. The Arduino UNO is simply providing 5V and all the digits are hardwired with jumper wires.



Faced with the prospect of testing the 16 segment displays for the Mega Enigma, building another single purpose jig was not an attractive option.


Most of the Led listings on AliExpress shows the displays being tested on some sort of ZIF socket. We will set to build something that works like that.




The following socket was found:


Here is the datasheet for the socket, we'll design a PCB based on these dimensions and adjust it later if needed.

And here is a preliminary PCB design. It is a very simple design where the bottom 9 pins on the socket are connected to an Arduino Nano.




Here is a preliminary design for a laser cut base. This design shares an edge between two pieces to minimize laser cutting time and therefore cost.


Once the socket arrives, the design for the tester and its base will be finalized. This will be a low cost tester, notice only the bottom 9 pins are wired, and that is good enough for the 16 segment displays. A later design might use the Mega Pro Mini and wire all the segments in the socket.

Tuesday, May 21, 2019

Hackaday Prize 2019

We have three projects running on the Hackaday Prize 2019 this year. 
Two are Enigma Simulators. One, the Z30 has never been made into a physical simulator before.

This year, for every skull you give to these, projects, we get $3, so this is a simple way to show support for these projects. If these get enough skulls, we can order the PCBs and parts for free!!!

Thanks!

https://hackaday.io/project/165684-nano-z30-a-numbers-only-enigma-machine-simulator

https://hackaday.io/project/165559-at-mega-enigma-a-2560-pro-mini-enigma-simulator

https://hackaday.io/project/163549-a-seven-segment-art-installation

All of our projects:
https://hackaday.io/projects/hacker/72667

Saturday, May 18, 2019

Enigma Simulator PCB almost ready for production

The design of the board is almost ready for production. It's been fully routed, all the connections verified, a routing mistake has been found and fixed and the mounting holes are in their final location. All that's left to do before production is some more double checking and cleaning up the bottom silkscreen. Still waiting on the 16 segment displays to arrive, so there is time to check this.


We have the opportunity to do the vias under a key trick again. It is harder to hide all the copper by routing it on the bottom layer on this design, and there are a couple of vias in the display area that are not hidden under a display module. Let's just think that all of these imperfections give this board some character.



A routing mistake was found on the menu button located below the enigma logo. It was wired to the exact same select line/return line combination as the B key, so if unfixed it would have registered as pressing B. 

The fix was simple, the select line above the existing via was unused. All that was needed was to move the via to the next select line. The fix in Fritzing was easy: right click on the bottom wire going from the button to the via and "Delete Wire", right click on the via "Convert Via to Bendpoint", right click on the bendpoint, "Remove Bendpoint". Then create a bendpoint on the next wire, right click on the bendpoint "Convert Bendpoint to Via", drag a wire on the bottom layer from the button to the newly created via and use the parts inspector to set it as "Super Fine (8 mil)" on the bottom layer. 


The resulting fix:


Here are the pin assignments. The 17 pins used to control the display segments are also used to read the keyboard using the KEY1L, KEY2L and UPDNL input pins used as sense lines. This layout allows keys on different sense lines to be pressed simultaneously without corrupting the display. Any single button on the keyboard can be pressed simultaneously with the up/down buttons used to change the rotors. This gives an extra measure of realism by allowing some of the wiring checking procedures on the Merkblatt to be performed. 


The silkscreen labels on the bottom layer need to be cleaned up. This will probably be done last.


Here is the top copper layer. Mostly horizontal lines. The angled lines going to the six lamps on the bottom right stay clear of the silkscreen labels. Six vias are visible on the display area. There will of course be tented. These vias will probably disappear under the shadow of the displays.


Most of the routing action is happening on the bottom layer. To get this clean routing, the board was wired in the following order:

0) layout the components, giving the keyboard and lampfield the characteristic diagonal slant. Place the displays and the up/down select buttons on the right side of the display they control. Place the Arduino Mega 2560 Pro Mini on the top right corner of the board and place a menu button on the top right corner as well.
1) connect the bottom pins of the keys using the top layer
2) connect the bottom pins of the LEDs using the top layer
3) connect the common pins of the up/down select keys using the top layer
4) connect each pin of the (4) 16-segment displays together on the top layer. Weave the traces around and through the display pins. Do not connect the common pins on each display. Those will be individually run later.
5) on the bottom layer, using vertical lines, connect a lampfield LED to the corresponding button in the keyboard (Q light to Q key, W lamp to W key...).
6) on the bottom layer, connect the bottom pins of the top two LED rows together (single trace going from Q to A. This works out to 17 LEDs on one common pin (LED1L).
7) on the bottom layer, connect the bottom pins of the top two keyboard rows together (Q to A again)
8) Starting with pin 2 (leave pins 0 and 1 unused so the Mega2560 serial port works), run traces on the top layer from each of the display pins to the Arduino.
9) Using the bottom layer, connect each LED on the top two rows to individual segment pins on the seven segment displays.
10) Using the bottom layer, connect each LED on the third row to individual segment pins on the seven segment displays.
11) The six LED on the bottom right of the lampfield were too far away from selection lines and long horizontal lines with slants at the end were run on the top layer. The traces are kept away from silkscreen legends. Once those horizontal traces are closer to the left edge of the board, they are run vertically using the bottom layer to the selection lines. Some of the vias are hidden under the displays.
12) Using the bottom layer, route the 2 common sides of the lamp field leds (LED1L, LED2L) and the 2 common sides of the keyboard (KEY1L, KEY2L) to the Arduino. The common side of the Up/Down select buttons (UPDNL) was too close to Arduino pin 46 and was wired horizontally at this point.

Now, all the LEDs and buttons on the main board are wired and this is a functional simulator. By observing the vertical on bottom layer /horizontal on top layer discipline, plenty of space around vertical traces exists to run individual pins to the plugboard connector at the bottom of the board. It is just a matter of selecting a group of 5 or six pins on the Arduino and planning how to route them to the single row connector at the bottom without crossing wires. At some point, we ran out of space to run plugboard wires without using the top layer. A spot was selected under the G key to place a few vias and cross to the other side of the board.

The last thing to do is find a spot to solder the battery wires, the power switch and connect them to the VIN/GND pins on the Arduino.

And by methodically breaking down this task into simple manageable steps, this board is hand routed.


This is how the displays are interconnected. The DRC is not entirely happy with the traces going in between pins, but as long as the red spots look minimal like that, this will manufacture ok.



The holes are placed to support 3mm standoffs. Since board size costs $$$, there is no extra blank space around. The board will sit inside the enclosure walls, not on top.

After a talking to fellow Enigma Simulator Designer @lpaseen (www.meinenigma.com), transient suppression diodes were incorporated into the design of the board. Attention was paid to not placing solder joints on the plug labels.




One of the last steps is to determine that every pin on the Mega2560 is connected to a single pin on the display, a single Up/Down key, and a single LED (which in turn connects to a single key in the keyboard).

The common lines running across the bottom of the LED and keys go into individual pins on the Arduino,

Arduino pin 18 drives Display pin 10 (segment D2, the down key on the rightmost display, LEDs Z, and B, keys Z and B (not shown).

Arduino pin 27 serves as the common (LED1L) for the leds on the top two rows.




Next, map the plugboard connections, double check some more and hit submit...

Saturday, May 11, 2019

Enigma Simulator Fully Routed.

Everything is fully routed and DRC is somewhat happy. About the only thing left to do before ordering the PCB is to finalize the location of the mounting screws.

The next step is to find out what pins connect to each key. When designing this board, the amount of pins was verified to be sufficient, but they are not assigned, instead each device is routed to the most convenient pin and then the software is designed to account for the pin routing.










We don't use the breadboard or schematic view, go straight to routing and check the work very carefully.




Thursday, May 9, 2019

All Leds and Keyboard and a few Plugboard signals routed.

Routing of the signals continues. At this point this should be functional as an enigma machine. A few of the plugboard signals have been routed.











Wednesday, May 8, 2019

Project Ideas using Seven Segment Displays

Documenting some ideas using multiplexed / charlieplexed seven segment displays. A seven segment display can have an LED in reverse polarity connected between each segment pin and the common pin.

A common anode and common cathode seven segment display can be placed in parallel, only one of them will be lit, reverse the polarity of the pins to illuminate the other one.

1) Enigma Machine:
 - Arduino Mega2560 R3 Pro Mini
 - (4) 16 segment displays, 17 pins to drive segments, 4 pins to multiplex digits
 - (26) LEDS for lampfield, shares 17 drive pins with main display, in reverse polarity
 - (26) pushbuttons for keyboard, 17 drive pins with 2 selection lines
 - (26) plugs for plugboard, 26 individual pins, one configured as an output and 25 scanned for jumper

2) Enigma Z30 Machine
 - Arduino Nano
 - (4) 7 segment displays
 - (10) LED for lampfield
 - (10) push buttons for keyboard
 - (8) push buttons to increment/decrement each wheel
 - (1) push button to enter configuration menu

3) 144 digit seven segment art installation.(12x12 matrix)
 - 9 tiles, each one has 16 displays (4x4 matrix)
 - each tile has 8 common anode seven segments display in parallel with 8 common cathode.

4) 34 digits of PI
 - Arduino Nano (18 I/O pins), not using (2) serial port and (2) analog input only pins
 - 34 charlieplexed seven segment displays using this technique:
 https://www.instructables.com/id/Charlieplexing-7-segment-displays/
 - 17 common anode charlieplexed displays + 17 common cathode charlieplexed displays