The 2019 Saintcon Cybersecurity Conference Badge is an Enigma Machine.
The badges can be interconnected and form a circle in the shape of an Enigma Machine Rotor Wheel when 26 of them are put together.
Something is happening... pic.twitter.com/BbMiRPA4RL— SAINTCON (@SAINTCON) October 24, 2019
We are currently designing a new Universal Enigma Machine Simulator.
Let's design a new PCB shape for this project. Fritzing accepts specially designed SVG files as PCB outlines. We need a way to design the SVG files first.
Sketchup is a 2-D and 3-D capable CAD program that's easy to use and can produce dimensionally accurate designs ready for laser cutting or 3D printing.
Sketchup has recently stopped updating the downloadable version and gone to the cloud. The free cloud version does not support exporting to SVG or downloading from the Extensions Warehouse.
Been using Sketchup to design enclosures for a while
Once an enclosure is designed and the finger joints drawn, the faces are selected, exported to SVG and placed in a Ponoko template for laser cutting in 3mm Birch Plywood.
Recently I have started using Sketchup to design objects for 3D printing as well.
The goal is to make a new PCB Shape for this. The dimensions of the rectangle are 139mm by 171mm.
This post expands upon a previous one showing how to do a custom shape using Inkscape and Fritzing. First, Inkscape is used to generate an SVG file with three layers (board, silkscreen, silkscreen0). Fritzing will use this SVG file as the PCB outline.
Let's get started...
Use the circle tool to draw a 26 segment circle. Press C, type a number, then type S26 to select 26 segments and finally draw the circle. The semicircular shape is drawn by first drawing a circle and then attaching two circle segments to the sides. The portions of the circle that are not needed are erased and we are left with a wavy contour.
The same technique is used to draw a 26 side circle, the width of the segment is set to 140mm by measuring it with the tape tool and then 140 is typed to resize the measurement to the desired value. The height of the PCB shape is set to 171mm. Then the width of the top of the shape is measured and the wavy shape in step 1 is resized by using the tape tool and copied and pasted to this file.
The bottom of the shape is flat but it can be made into a semi-circle by selecting the circle and specifying that it will have 96 segments instead of 26.
Here is the final shape. The width at the bottom is 140 mm and the height of the rectangle is 171mm.
Using an export plugin, the shape is saved as an SVG file.
Open Inkscape and load the SVG file generated in the step before.
Go to File-> Document Properties and click on Resize Page to Drawing or Selection. This step can be omitted.
Using the Fill and Stroke tool, color the inside of the PCB. Any color is fine. Select something easy on the eyes. The PCB is rotated as well. (Rotating the PCB is also optional, it can be done at the end in Fritizng). Add three layers, name them "board", "silkscreen" and "silkscreen0". These names are for display only, the file will need to be edited to locate the XML "id" property and set it to match the display names.
Fritzing does not use the XML label property. It needs the ID property set. For that we need to edit the XML that makes the SVG file and change the layer ID properties.
Go to Edit->XML Editor, or press CTRL+SHIFT+X
Look for a line that says inkscape:label="board", click on it.
Click on the "id" attribute on the right, click below the 'Set' button and type "board" without quotation marks and then click on the "Set" button.
Repeat for "silkscreen" and "silkscreen0" The layer attributes should now be as shown below.
Open Fritzing, Click on the PCB tab, click on the default PCB and on the Inspector window, click the "load image file" button.
Navigate to where you saved the Inkscape SVG file and select it.
A warning dialog will be shown, click OK and the PCB should be displayed. If it is sideways, click on "rotation" on the Inspector window and set it to -90
An existing design is copied from another file into this. Notice that the shape of the PCB is accurately dimensioned.
Rearrange any parts, save the file and export for production, select "Extended Gerber..."
I prefer the look of tented vias, covering with soldermask the plated holes that connect traces in different layers.
This article shows the difference between tented and exposed vias.
-File->Export->For Production->Extended Gerber, create "tented" folder
-Routing->Select All Vias
-Press Delete key
-Export Gerbers to no-vias folder
-Copy maskTop and maskBottom, silkTop and silkBottom files from no-vias to tented folder
The mask and silkscreen files from the no-vias folder are copied to the vias-folder. This will ensure that the vias are covered with soldermask and if text is drawn above them, the silkscreen will show.
The Gerber files are put together in one ZIP file and uploaded to OSHPark.com
And it is a fail. Instead of a purple board, we get a white one. The contour is open. Time to find where.
Finish the import process at OSHPark, save the defective board and click on the board image, look for discontinuities in the outline. Here we have found one.
Go to Sketchup and add lines in the problem area, delete any doubled up lines and repeat from step 4. This step might be difficult. Sketchup may decide that the contour is no longer closed even though it appears so. Keep adding lines and deleting doubled up lines until the contour closes again.
When repeating the setup process in Inkscape, this time the shape was not rotated and the document was not resized (steps 5-6). Instead the PCB was rotated -90 degrees in Fritzing.
Repeat the Gerber export process and inport to OSHPark.
Success. It took a couple of tries, but finally we are rewarded with a purple board.
Finish the import process and then click on the board, make sure things look ok.
Here is an example of a 3D printed design being turned into a PCB. We will start with this 2-D Kokopelli figure and follow all the steps in this write-up.
And we get rewarded with a white board, another failure. Click on the board image and look for discontinuities in the outline.
The discontinuity was found in the lower arm elbow.
Going back to Sketchup, a circle with more segments was added to the lower elbow and the import steps repeated. This time we get rewarded with a properly rendered board.
This board will not manufacture 100% as drawn given the limitations of the routing bit used to cut the outline of the board. Sharp inner corners like the one where the lower arm touches the body and the flute will have a rounded edge.