Learning through Failure: KiCad Edition

So this isn’t the post I thought I’d be writing tonight. Flushed with success after neatly soldering 66 resistors to a my new PCB last night with the help of my resistor bending guide, I thought I’d be showing some shots of my new LED display board in action. After all, this isn’t the first PCB I’ve designed and had made. It is the second – but the first (subject of an upcoming post) was perfect first time out. So I’m an old pro, right?

Oh well. This is how we learn. After getting all of the connectors and the first 14-segment display soldered on, I thought I’d give it a quick sanity test. And immediately I found several problems. There was a dead pin, multiple segments lighting when only one pin was powered (x2), and in one case, a green segment appearing yellow – a pretty good sign that the segment was getting power that was bypassing the current-limiting resistor. I hopefully scanned my soldering work with a magnifier, looking for solder bridges and bad solder joints. Sadly, my soldering looked great, which meant that the issue was probably the board.

Only, this wasn’t the first problem I’d found with the board. First I noticed that the mounting holes (or “Non-plated through holes”) were too small for the fasteners I’d planned to use. Next, while mounting the LED displays for soldering, I’d discovered that the holes for the 14-segment displays were a little too close together – about 1/20 of an inch. KiCad, amazing, open-source, frustrating KiCad, didn’t have a footprint for the Kingbright display I’m using, so I built my own. I chose not to align one of the pins on the origin, as I needed to model the center-line of the display to ensure the board was aligned with the 7-segment displays correctly, as the 14-segment displays are larger than the 7-segment displays. I modeled the part using the measurements in the datasheet, but this meant that the pins were at an unusual offset from the origin. Apparently I had the spacing grid too large, and so when I checked the distance between pads using the hover/press-space-to-reset-the measuring-tool/hover-over-point-two method, it reported 0.300″ because it was snapping to my grid sizing, even though the pads were not aligned with the visible grid and the actual distance was around 0.256″. When this occurred, I decided to take a page from the “cut it large and kick it into place” school of engineering, and bent the pins a bit and pushed. It worked well enough to proceed, and I made a mental note to fix the footprint in Rev 2.

Which brings us back to the probable trace routing issue I’d found earlier. After (visually) eliminating bad solder joints, I had to suspect my board. Since OSH Park sells boards in sets of 3 copies, I had an unpopulated board at hand. With the multimeter set to continuity (a.k.a “annoying beep”) mode and the board layout on the computer for reference, I started probing, and immediately discovered problems. Like the following.

Note the highlighted traces in each. Don’t look like the belong, do they? That’s because they don’t. Sure I should have caught them, and one of them looks familiar; I thought I’d found and removed it. But I probably got overzealous with the undo button at some point. Also, with a long board (7.5″ x 0.95″) in KiCad, there’s a lot of zooming in and out, and it can be easy to miss small details. However, overlooking small mistakes wasn’t my big mistake, it was forgetting to run DRC – the Design Rule Checker. For all of it’s flaws, KiCad has a built in tool that looks for these kinds of issues. When I ran it today, it found both of the above errors, plus others. In the end, I’ve been unable to fix all of the issues with a hobby knife and hookup wire, so looks like I’ll be designing and ordering Rev 2.

So the big takeaways:

  1. After you’ve finished designing your board in PCBNew (KiCad’s PCB layout tool), run DRC (Tools->DRC->Start DRC), and fix anything you find. Ok, ready to send it to fab? No you aren’t, go run DRC again. Be sure you get a completely clean bill of health before proceeding.
  2. When designing your own footprints, double-and-triple-check your dimensions. These are physical dimensions determining where through-holes or solder pads will be located, so “Measure twice, Cut once” applies. Change the grid spacing to something really small. Use a small mils spacing if your part has pin spacing in fractional inches, as most through-hole parts do. Use a small fractional-mm spacing if your pins are laid out in metric dimensions. Now check them again. You can print out your PCB layout and inspect it that way, even laying parts on it, though this isn’t foolproof- I did just that and still missed the 0.05″ error in my pin spacing.
  3. Mistakes happen. When you fail, spend some time figuring out why. Talk about it with some one (or write about it) and figure out how you can avoid those and similar mistakes in the futures. Then go give it another whirl.

Both comments and pings are currently closed.

Comments are closed.