Making panels

Thought I’d write up something about my process for making front panels.

Or rather for designing them — the actual making is someone else’s job. I’ve made my own in the past, drilling sheet aluminum and then affixing a paper overlay with a transparent plastic layer. But all the ones I’ve done in the past couple years have been FR4, fabricated by a company. DIY is cheaper but fabbed is still pretty cheap, especially if you can find people to buy your extras.

If I had any artistic ability, or even just the ability to do hand lettering neatly, I’d do things differently, but I don’t. So it’s all on the computer. It starts in drawing software, and since I use Linux that pretty much means Inkscape. Years ago I was a Mac user, I used Intaglio, and when I tried out Inkscape I thought it was vastly inferior. But some of that was just unfamiliarity, and some of my real dislikes have been taken care of in later updates. There still are some really annoying things about Inkscape, but generally it is very capable and fairly usable.

I’ve saved a template file for my panel designs. It looks like this:

Kosmo panel template file

Over on the right is the panel itself, with some auxiliary stuff. Left of that is a library of common panel components.

Except you can’t see everything going on, because there are multiple layers:

Template file layers

At the bottom is Standards. It just shows how far apart the rails are, and indicators of the vertical positions for jacks and LEDs — I almost always put jacks at the bottom, 25 mm apart in each direction, with standard vertical positions for jack labels, the black boxes indicating outputs, and any indicator LEDs I want alongside them.

Standards layer

Next is Outline. It’s just an outline of the panel dimensions.

Standards and Outline layers

Mockup is a layer for doing an initial layout with simple color shapes standing in for components.

Standards, Outline, and Mockup layers

Sometimes I skip this step, but sometimes I just want to get a first run at the layout without getting into details, and I do it here.

Next layer is called Behind Panel, and it shows approximate sizes of pots, jacks, et cetera behind the front panel. Whatever’s happening on the front, you also want to make sure things aren’t colliding on the back.

Standards, Outline, and Behind Panel layers

Next are the Art and Labels layers.

Standards, Outline, Behind Panel, and Art layers
Standards, Outline, Behind Panel, Art, and Labels layers

The Art layer contains the background — a white, borderless rectangle the full size of the panel — along with the lines across top and bottom and the name and creator of the module. The Labels layer contains the rest of the panel graphics. I like to keep these separate because I like to hide or show the Art layer depending on if I want to see the Behind Panel layer, and I like to lock the Art layer so I can select and drag things around on the higher layers without inadvertently selecting and dragging the white rectangle.

If you want to do the design with white labels on a black background, you can do that. Or you can design black on white and then have it fabricated white on black. See below.

Incidentally, don’t take the components and labels seen here too seriously. They’re just placeholders or examples; this isn’t an actual panel design.

Above Labels is Holes. This marks positions and sizes of panel holes, including crosshairs on the hole centers.

Standards, Outline, Behind Panel, Art, Labels, and Holes layers

Then Panel Hardware, with representation of the knobs, jacks, et cetera.

Standards, Outline, Behind Panel, Art, Labels, Holes, and Panel Hardware layers

Finally there’s the Notes layer, not shown because there’s nothing very interesting there. It’s a place to put notes that can be shown or hidden as needed.

When I go to design a panel I start from the template file, and I set the Outline and Art rectangles to the width I expect to use. As noted, maybe I go into the Mockup layer for a rough draft of the layout, or maybe I skip that step.

Then I start dragging components onto the panel.

The knobs, switches, jacks, and so on you see to the left on the first image are in the Panel Hardware layer but underneath them are holes, labels, and behind-panel shapes in the corresponding layers as well. It’d be nice if these could be in a separate library file to be copied and pasted into the panel design file, but in Inkscape when you paste everything gets pasted into the current active layer, and you’d have to manually move everything to the correct layer. So I keep the component library in the template file and when I need a component I drag-select it, duplicate it (which preserves layers), and drag it into place.

I use alignments for basically everything. Everything’s aligned to a half millimeter grid. I use that grid to set guideline positions, and then mostly work with the grid turned off and align things to the guidelines.

Eventually I come up with a design:

Hero VCO panel design including Outline, Art, Labels, Holes, and Panel Hardware layers

Then I turn off all but the Art and Labels layers, and export that as a PNG at 1000 DPI. In principle the SVG file could be imported into pcbnew, or it could be exported to DXF and imported to pcbnew, but I’ve found these don’t work out very well. For one thing, text always gets messed up. You can convert text to paths in Inkscape and then that gets imported okay, except that (if I remember right) on DXF import the text paths get imported as outlines only, not filled. And for SVG import, any paths and any filled shapes get imported as foreground color, regardless of whether it’s black or white in Inkscape, so for instance the above triangle, sine, ramp, and square wave shapes would be invisible on import because they’re foreground color against a foreground color rectangle. Really what you’d like is to have those shapes knocked out of a filled rectangle, but KiCad can’t do that. So PNG export it is. Here is that export:

Hero VCO panel design including only Art and Labels layers

That goes to a file called e.g. hero_panel_art.png. Then I turn on the Holes layer and export that into hero_panel_holes.png:

Hero VCO panel design including only Art, Labels, and Holes layers

Now I have to get these into KiCad, using the Image Converter tool. Said tool always gets the resolution wrong, resulting in a slightly wrong size, so I have to manually correct the size. (Fortunately it’s always supposed to be 200 mm high, so it’s easy to remember. Note that if the white Art rectangle weren’t there it’d be some inconvenient number less than 200 mm.) The _art file gets exported to the front silk screen layer in one footprint file, while the _holes file goes to User layer Eco1 in a second footprint. If your design is white on black, check the “Invert” box to turn it into black on white — the black parts will be silkscreen, even if the silkscreen is chosen to be white when fabricated.

(Once in a while I do something fancier, with panel graphics on the copper layer or something. For that you have to export separate PNG files having just the graphics for silkscreen in one, copper in another, and so on; then in Image Converter choose another layer for the output and then use a text editor to change the layer to F.Cu, or whatever, in the footprint file.)

Next step is to use KiCad to design… no, not the front panel. The PCB. Generally I do all the above before I even start laying out the PCB(s). My attitude is that I want to have the human interface determine the PCB design, not vice versa. Sometimes there has to be some back and forth compromise, of course, but mainly it’s panel design first, PCB second.

So I do the PCB design with the _holes footprint in the User.Eco1 layer, which I use to establish positions of board mounted pots, jacks, and switches.

Hero PCBs in pcbnew; note pots in board on left and jacks in board on right are aligned with two copies of the holes footprint

In KiCad, I mostly place components on a 0.05 inch grid, because most lead spacings are 0.1 inch or multiples of that. But I switch to a half millimeter grid for the panel hardware. To avoid having the _holes footprint disappear when updating the PCB from the schematic, I put the footprint in the PCB as a Graphic symbol from my custom symbols library.

Then I do the panel design.

I work from one of the templates in my Kosmo_panel repository. Every hole has a corresponding symbol in the schematic editor, with most holes connected to ground, and each with a hole footprint usually from the Kosmo_panel footprint library.

Schematic for Hero VCO panel

There are Graphic symbols for both the _art and _holes footprints, as well as the CC0 logo I always use.

In the PCB editor I draw up a rectangle in the Edge.Cuts layer of the right size — 100 by 200 mm in this case. I add a zone on the front and back layers connected to GND. Now it’s just a matter of aligning individual hole footprints with the hole positions in the _holes footprint,

PCB design for Hero panel, with component footprints aligned against holes footprint

and then adding the _art footprint.

PCB design for Hero panel, with art footprint added

You can see how it’ll look in the 3D view.

3D view of front of panel

Sometimes I like to label the panel hardware holes on the back of the panel, especially if they’re panel mounted. I always put my name, licensing, date, and JLCJLCJLCJLC for the order number location on the back.

3D view of back of panel, detail

Then it’s just a matter of exporting the Gerbers as usual and uploading them for fabrication. For panels I always turn off electrical tests, select the “specify location for order number” option, and add a note:

This is a faceplate. There is no electrical circuit. Ignore electrical errors.

I have them fabbed on FR4. At JLCPCB you can specify aluminum instead, though it has to be single layer — which in practice just means get rid of the back copper, mask, and paste layers, though you can leave in the back silkscreen layer and it will get printed. I’ve heard enough complaints about poor silkscreen quality on aluminum that I’ve mostly stuck with FR4, though, and I’m generally happy with the outcome.

Leave a comment