Electronic – How to attack a new board

debuggingpcbpcb-assembly

You get your PCB back from the manufacturer. It is a new design, you have of course bread-boarded all the major parts, but you know there are going to be problems. There are just too many things that can cause problems, e.g.:

  • Errors in the schematic
  • Errors in the layout, not found by the ERC/DRC
  • Misplaced parts during soldering
  • Shorts and the like during soldering
  • any combination of the above

I've had two relatively complex boards lately where I've basically had to de-populate the entire boards after assembly in order to locate the error. I found the errors, but the boards were scrap.

I've tried to start with the bare minimum of parts and the parts that can't be hand-soldered (I'm using paste, stencil and toaster). Typically this would be the MCU, the JTAG connector and a few capacitors. Then I'm gradually populating other areas while checking them for problems.

This approach works, but is really slow. I also have to comment out/comment in any code that assumes the presence of some particular hardware.

Does anyone have tips/suggestions on how to approach newly designed PCBs?

EDIT: I'm mainly thinking about the kind of problems that leaves your board dead, like hidden power rail shorts, or anything that bricks the MCU.

Best Answer

I've decided that breadboarding ahead of time is a waste of time unless there are aspects of a part's performance that you need to measure yourself.

I even think building the board in pieces is a waste of time. The initial hardware debug just takes a day or two. Any subtle issues won't show up until software integration anyway. I'd rather debug one circuit (the complete one) than several ad-hoc reductions of the circuit.

Just build the thing! Assemble the whole board and power it up. Look at the supply voltage. How many mA does it draw? Which part is burning hot? Which part is warm? Then try to burn firmware on to whatever microcontroller is on the board. Then start writing firmware. Get the clock going and toggle a pin. Get serial (or whatever) communication up. Now write test programs for each peripheral. Then build the production test fixture and start writing the "real" firmware.


Edit:

On finding stuck rails

If a supply rail is stuck to ground, (measures 0 ohms with an ohmmeter), power it up on a bench supply. Set the voltage normally and the current limit to a few hundred mA. Print out the PCB design on paper, and find a DMM that measures microvolts. Measure microvolts starting at the supply terminals, and write down the voltage drops on the PCB printout. By looking at microvolt differences, you can trace exactly where the current is going without depopulating or chopping up the PCB. This technique is a better than using an ohmmeter because you can pump a lot of current through the circuit, more than any normal ohmmeter will supply.

A similar technique works for finding shorted traces on an otherwise populated board. Run the board a use a scope to find "digital" traces that are in an in-between voltage range.