Since the electronic badges at DEF CON became more and more sophisticated and expensive to produce (heard the 40k $ once), somebody came up with the idea of making add-ons for the badges both as a easy way to get into electronics design as well as a way to extend/hack the badges.
Originally they specified a 4 pin header, for ground, 3V3, and I²C, at some point they added another two for GPIO or whatever. To clear, it's not a standard some gremium came up, but more of a "dumb" "lets do this for teh lulz" idea, which went off.
We gonna use KiCad 5, since there are tons of improvements, coming from KiCad 4.
Disclaimer: I use Arch BTW. Well and I know how to install it on windows.
I use KiCad 5.1 and Inkscape 0.92.4
Go to http://www.kicad-pcb.org and grab the installer, the standard libraries comes with it and is pretty powerful.
Go to https://inkscape.org/release/0.92.4/platforms and grab the installer.
- Search for it in the repos.
- Grab also libraries, if it's a separate package.
or if not in your package system: see Windows
See Windows
- Set to GL mode (named bit differently on differen OS) using \menu{Preferences > Modern Graphics Toolset} or \menu{Preferences > GL Graphics Mode}.
- While routing make a right click and go to interactive Router settings.
- Set \menu{Mouse drag behaviour} to \menu{Interactive drag} to be able to drag traces around in a useful way.
- Check \menu{Mode > Shove} to push around other elements while routing.
An Inkscape plugin we use for PCB art, get it from https://github.com/badgeek/svg2shenzhen and install it as described there.
- Be sure to have lxml for python2 installed.
- Be sure to set the exec bits correctly. badgeek/svg2shenzhen#52
- If you face problems while trying to export to KiCad on a mac: badgeek/svg2shenzhen#64
Get it from https://hackaday.io/project/52950/files
Since KiCads Library management is a bit quirky I usually just put the used external libraries into a folder inside my project folder. Works always.
That's roughly the workflow I use. You maybe find/found one which suits you better.
- In the KiCad main window make a new project \menu{File > New > Project}
- If if a .kicad_pcb is generated, you can delete it.
- Close KiCad.
- Initalize a new drawing using \menu{Extensions > Svg2Shenzhen > Prepare Document...}
- Draw your thing.
- Keep in mind, there are some layer combinations that make no sense.
- If the layers has the suffix disabled it is disabled. Rename it from -disabled to .
- Check if the layers are dark enough.
- If you import from Illustrator, check the size.
- Convert objects to paths. Cleanup SVG.
- Export to KiCad.
- Check \menu{Open Kicad after export?}.
- Uncheck \menu{Open PCBWay after export?}.
- Set the path to the directory of your project.
- Export as a KiCad Layout.
- Make sure the schematics and the layout are named equally.
- Place new components with \keys{A} (or using the menu on the right side of the schematics editor).
- Draw the connections with \keys{W} (or using the menu on the right side of the schematics editor).
- Doubleclick components to changes their values if needed (Resistors, Capacitors)
Tip: Since you can assign basically every footprint to every schematics symbol later, allways use a proper symbol. For example, if you use a pot which is connected ower some cables, use a pot symbol and assign some connector later. I used big SMD resistors as footprints for solder pads quite often.
- Annotate the schematics using \menu{Tools > Annotate Schematics...}.
- Assign footprints using \menu{Tools > Assign Footprints...} or double click on the component.
- Before KiCAD 5 it was needed to generate a netlist and load it into the layout.
- KiCAD 5 can do it in one step, by pressing \keys{F8}
- Define the design rules, for most projects your fine with the default. Also define keepout areas, below antennas for example.
- Place the parts, in a meaninful way reduces complicated routing afterwards.
- Route all lenghtmatched / diff-pair connections
- Route power(\keys{X}), use polygons if possible.
- Route the rest. Route mainly horizontal on one layer and mainly vertical on another.
My normally used Layerstacks are:
- 2 layer: parts & routing & GND, routing & GND or VCC
- 4 layer: parts & routing(& GND), GND, VCC, GND & routing
- Tented vias do whatever you want, tented looks cleaner but legends say the can pop if reflowed.
- Angles should be bigger than 90°. Using a 45° raster is recommended.
- .5 mm - .3 mm are etchable in your homelab.
- Vias are a pain if you etch the prints yourself.
- Go to \menu{File > Plot}.
- Set all the layers you want. Usually:
- copper layers (.Cu)
- board outline (Edge.Cuts)
- silkscreens (F.SilkS,B.SilkS)
- solder masks (F.Mask,B.Mask)
- paste masks (F.Paste,B.Paste)
- Set the options according to your manufacturer
- Set the Output directory (\path{PROJECT > gerber} for example)
- Generate the drill files using \menu{Generate Drill Files...}
- Generate the gerber files using \menu{Plot...}
- Check them in the Gerberviewer
Hint: some supliers accept KiCad files directly. So you don't need to export gerbers.
Tip: For self etching \menu{File > Print...} works way better than gerber files.
Libraries can be installed globally or for a project. If you want to share your project your mostly better off putting them into a subdirectory of your project, and then install it for that project.
your_kickass_project
├── external_libs
| ├── lib1
| | ├── lib1.pretty
| | └── lib1.lib
| └── lib2
| ├── lib2.pretty
| └── lib2.lib
├── your_kickass_project.kicad_pcb
├── your_kickass_project.pro
└── your_kickass_project.sch
KiCad has a plugin system. Unfortunately there is no offical plugin database, repo, whaterver yet.
As a cool example I recommend to look at kicad-round-tracks.
Some handy shortcuts I found out there on the Web.
Key | Schematic editor | PCB Editor |
---|---|---|
\keys[/]{+} | Switch to Next Layer | |
\keys{-} | Switch to Previous Layer | |
\keys{/} | Add Bus Entry | Switch Track Posture |
\keys{?} | Help | |
\keys{A} | Add Component | |
\keys{B} | Begin Bus | Redraw polygons |
\keys{\backspace} | Delete Track Segment | |
\keys{C} | Copy Component or Label | Copy Item |
\keys{\ctrl+F} | Find Item | |
\keys{\ctrl+L} | Load Board | |
\keys{\ctrl+S} | Save Board | |
\keys{\ctrl+V} | Add Microvia | |
\keys{\ctrl+W} | Switch Track Width to Previous | |
\keys{\ctrl+Y} | Redo | |
\keys{\ctrl+Z} | Undo | |
\keys{D} | Drag Track, Keep Slope | |
\keys{\del} | Delete Item | Delete Item |
\keys{E} | Edit Item | Edit Item |
\keys{End} | End Track | |
\keys{F} | Edit Footprint | Flip Item |
\keys{F1} | Zoom In | |
\keys{F2} | Zoom Out | |
\keys{F3} | Zoom Redraw | |
\keys{F4} | Zoom Center | |
\keys{F5} | Switch to Inner Layer 1 | |
\keys{F6} | Switch to Inner Layer 2 | |
\keys{F8} | Schematic to Layout | |
\keys{G} | Drag Item | Drag Item |
\keys{H} | Add Hierarchical Label | Switch Highcontrast Mode |
\keys{Home} | Fit on Screen | |
\keys{Insert} | Repeat Lest Item | |
\keys{J} | Add Junction | |
\keys{K} | End Line Wire Bus | Track Display Mode |
\keys{L} | Add Label | Lock/Unlock Footprint |
\keys{M} | Move Item | Move Item |
\keys{N} | Orient Normal Component | |
\keys{O} | Add Module | |
\keys{P} | Add Power | Place Item |
\keys{PgDn} | Switch to Cooper Layer | |
\keys{PgUp} | Switch to Component Layer | |
\keys{Q} | Add No Connect Flag | |
\keys{R} | Rotate Item | Rotate Item |
\keys{S} | Add Sheet | |
\keys{\Space} | Reset Local Coordinates | |
\keys{T} | Get and Move Footprint | |
\keys{\tab} | Move Block -> Drag Block | |
\keys{U} | Edit Reference | |
\keys{V} | Edit Value | Add Via |
\keys{W} | Begin Wire | Switch Track Width to Next |
\keys{X} | Mirror X Component | Add New Track |
\keys{Y} | Mirror Y Component | |
\keys{Z} | Add Wire Entry | |
\keys{\Alt+3} | 3D Viewer |
- KiCad forums
- KiCad getting started
- KiCad shortcuts
- KiCad cheatsheet
- List of KiCad 3rd party tools
- KiCad footprint collection looks insanly huge.
- badgelive parts KiCAD libs
- awesome electronics curated list of electronics resources.