ProtoSpring, part 2: schematic revision and PCB

In the first part of this series I’ve outlined the idea of making a prototyping extension board for the Springboard, and finished with a rough schematic. Since then I’ve revised the schematic based on experience, and laid out the prototyping board PCB.  By the end of this write-up we’ll have a complete design, ready to send to manufacturing.

Before I dive in, probably the single most important lesson learned is to keep in mind all different stages of a board design. There’s a lot of back and forth between schematic, components, footprint, layout, manufacturing specs. The tools help making the right decisions, and often when something feels difficult it is because I’m doing it wrong…

Finding crucial parts

After making the basic schematic I realized that there’s one type of component on the board that can make or break the entire project: the board-to-board connectors. To interface with the Springboard needed to find 2mm pitch, dual row, through hole, perpendicular mounting female receptacles. I couldn’t find anything like that in the local electronic stores. After an hour of search online they did turn up, fortunately both Digikey and Mouser had the required 3×24×2, and 7×2 connectors by 3M.

Finally found the correct 2mm, double row, perpendicular, through-hole connectors I needed

I got a bit lucky too, because these ones can be ordered piecemeal, while other pin count versions (e.g. the 10×2) require minimum order of 300 pieces. This is one of the first example of the importance of choosing components. Of course, if these were 0.1″ (2.54mm) connectors then there wasn’t any problem finding them in the first place, but then they would probably not fit on the Springboard itself…

To choose a fuse I took inspiration from Arduino. Their earlier boards used resettable polyfuses, so I chose one from the same line from Littlefuse, with 1A hold current and 1.8A trip. They have a pretty big footprint (1206).

The only other components I needed to check were the decoupling capacitors. I used a 10uF tantalum (polarized) and 0.1uF ceramic (non-polarized) capacitors. The standard capacitor footprint is 0603 size, and I was wondering why I couldn’t find a polarized capacitor footprint for that size in the KiCad library? When I searched Mouser for capacitors it turned out that the 0603 tantalum capacitors are pretty darn expensive, while actually the larger 1206 size is much cheaper – and it has a polarized footprint in the default KiCad libraries! Again, the wisdom of other engineers guide me home (when I listen)…

Revising the schematic

The schematic revisions were not done in one go, but as I learned from the PCB layout. I’ll still summarize things in one go for clarity.

Revised ProtoSpring Prototyping Board Schematics (click for full size)

The very first thing I needed to add is the breadboard connectors. KiCad makes it pretty much impossible to create the correct layout, unless they have the logical units assigned to them on the schematic. So I added a new element for each row of the breadboard: 5V/GND on one side, group-of-5 pins, another group-of-5, 3.3V/GND on the other side. That’s the large block on the bottom of the schematic.

Had some typos in the GPIO pins that I realized when wiring up the PCB.

I’ve also redefined the pin numbering on the incoming connectors. Before I used the same number here as it is on the Springboard’s pin definition in the docs for the front panelGPIO, and audio pins, meaning “pin 1” on one side is “pin 1” on the other. This didn’t take into account that one is a source, other is the receiver and their layout is actually mirrored, making the numbers different. I struggled with the PCB layout but I realized because I was trying to “transform” the receiving connector. In the end I went back to their default alignment and redefined the pins instead. Output the netlist, load the netlist again, and everything should be connected correctly. Some of the other connectors were adjusted to be more logical too.

PCB layout

Needed to make some new footprints for the 2mm pin arrays, fortunately that’s pretty easy. Taken the example from the existing pin arrays, matched to their documentation from Mouser, and was done in a short time.

Creating footprint for the 2mm connectors

Placing these connectors is pretty much the only critical alignment issue I had. The locations can be read off the documentation:

Pin positioning for the Springboard (click to enlarge)

The centers of the headers are 11, 75, 87mm  from the left edge. The distance inwards is defined by the size of the pin header assembly, and they list 4.9mm from the front to the first row of pins. I’ve placed it the pin array 3.5mm inwards, leaving a bit of gap. Will see from the first production run whether this needs to be adjusted.

That gap is quite small, though, and I ended up with a Ground pin on the GPIO connector that I couldn’t possible connect to the rest of the ground plane. Fortunately through the other connectors there are 4 other Ground connection between the boards, so I set that Ground to no-connect. Should not affect functionality

PCB layout end result with all layers (click for full size)

In the footprint designer then placed the pins with appropriate spacing between the groups. The sizing and spacing information I got from the Electronics Stack Exchange,  and modified a little to fit on the 100x50mm board that I was aiming for. The pin spacing is 0.1″, and the unit of spacing is 1 pin. There’s a gap of 1 unit between the power pin group and the central group (smaller than the Stack Exchange post), and the middle gap is 2 units.

I’ve set up some custom design rules to help with the layout. The power lines (5/3.3V) had wider trace, and the breadboard pins between themselves too (0.800mm instead of the default 0.254mm).

Most of the routing was done manually. I’ve used FreeRouting autorouter from Github for the GPIO and audio pins. It came up with very similar design than I did first manually, but a bit better distributed – except for 2 cases of design rule violations that I fixed by hand. I know that generally shouldn’t have bunch of parallel lines to avoid crosstalk, In this case I kind of had to, and since most of such lines are used for digital I/O I’m hoping that the crosstalk will have negligible effect.

The unused areas on the front and back were set to be both ground planes. The breadboard pins act like cross-plane vias for most of the board, but I’ve put some vias around the GPIO pins for better cross-plane connectivity and better fill in some areas. This might be overkill for the board, but we’ll see.

I found that KiCad can do 3D rendering of the board as well. Here’s how it looks just for reference.

Fun! 3D rendering of the resulting board, front on top, back below. Note: some 2mm pitch pins don’t have the right pin count on these pictures because I haven’t modified their the 3D file

I’ve added the Open Source Hardware logo to the back, using the scalable KiCad version of the logo I’ve found online. I was thinking to add a “tested” patch because it looks good and it’s good to use, but that these silk screen logos seem to be quite a bit of work. Maybe later…

Next step

Design finished, Gerber files exported, now the design is ready for manufacturing. I was considering OSH Park in the US and Seeed Studio in Shenzen for that that. OSH Park is a community printing service and it’s really cool that I can upload my Gerber files and their site shows how the board and the different layers will look like. Very good for sanity check…

OSH Park rendering of the board Gerber files pre-order

Seeed is closer to here and seems cheaper/faster too. They somehow ask for different Gerber file naming convention (for the drill files and the edge cut in particular). Will have to do a bit more research.

The next step is check everything one more time, submit for manufacturing, and order the components in the meantime. In a future post will show the result and hopefully the boards in use. Now time for coffee…