Summary

I just spent an hour awkwardly debugging a project before I gave in and hooked up a test harness to it. And of course, once I did so, all of the problems were found in short order, proving once again that once you build the test harness, you don’t need it, and carrying an umbrella prevents it from raining. But seriously, this is a lesson that I seem to learn over and over again. (Or is that fail to learn?) Even if you’re just lashing together something quick and dirty, take a second to make sure that all of the places that you’re going to want to probe later are easily accessible. If this means soldering scrap wire onto important signals like ground and the analog voltage coming in from the microphone, and leaving the op-amp, by all means do it first. You might not need it later, but if you do, you’ll be that much closer to figuring out the glitches. Doing so would have saved me an hour tonight. If you’re ordering a PCB, even if you are an infallible designer, the corollary is to litter it with test points. They are essentially free, taking up only a tiny bit of board space, and they are just so handy down the road, when you need to figure out what’s wrong with the I2C bus, or with the battery charging circuit. So what parts of a design are test-point worthy? This is probably a personal preference issue, but I usually wish I had added them to every kind of data bus, crucial power rails, and any and all spare GPIOs on a microcontroller. You can never tell when you might want to do some toggle-pin debugging – the high-speed analog of the classic printf . You can also put a test point anywhere on the boundary of a functional block, so that you can test one part’s output and the next part’s input easily. If you need sections to be separable, which is also often handy, a zero ohm resistor or jumper between the sections is a nice touch. I’m a big fan of the resistor method, because it’s easy to add and clear from the circuit and its pads are essentially free test points if you need them. You can, of course, also use them for routing hijinks, but that’s another topic. Adding test points is, in my opinion, the equivalent of putting in nice clear comments in your code. It’s maybe a bit of extra time spent now, but it stands to save you so much more time later when you’re inevitably debugging the circuit. You don’t make mistakes, you say? The circuit is so simple? That’s what I said earlier this evening. Just add the test points. I’ve not designed too many PCBs and half expect to make a mistake, so in addition to test points I also tend to make sure my designs have clear points where I can separate my design into blocks. Fo instance when making a design that includes a microcontroller and NFC reader, I make sure that if I screw up the NFC bit I can at least cut a few traces and use v1.0 for validating the microcontroller part before ordering v2.0. That should mean I have less chance of needing a v3.0. I’ve designed plenty of PCBs and I’ll tell you, the more you do the more you expect to make a mistake. So keep doing that. “If you need sections to be separable, which is also often handy, a zero ohm resistor or jumper between the sections is a nice touch” Zero ohm resistors are the way to go, especially because there are test point clips that are sized for resistor pads, so you don’t need the scrap wire. Either that or a through hole. It’s way too easy to pull off something soldered to a single SMD pad when probing. When you really need it, that through-hole via just sitting there, connected to that important line, is a gift of the gods. blah blah blah add the test points, hear me , add the test points ! ….. and not a word about the silkscreen labeling of the test points ??? Touche! And label your test points. :) I’d say that labeling test points shouldn’t need to be called out, as the silkscreen should label everything, but I’ve forgotten to label them more than once, as there was no component associated with them, then had to play hunt the wumpus during debugging. I like to include a LED connected to a GPIO. Adding a bit of code to blink it at strategic times can be very useful. Plus of course allowing for the embedded version of “hello world” when first learning a new micro-controller. I really liked a STM32 board I picked up a long time ago because it had 4 LEDs (different colors).

By Elliot Williams

Original Article