Electronics / Bench / Debugging
Bench 12

Debugging Your first builds will not work. That is normal and not a verdict on you — it is the actual activity. What separates a frustrating evening from a productive one is having a method instead of swapping parts hopefully.

read before every buildchecklist
Tier 0 · Groundprevention

The mistakes everyone makes once

Module 0.1

Twelve failures, ranked by how often they bite

Read this before powering anything up
  1. No current-limiting resistor on an LED. Dead LED, possibly a stressed pin.
  2. Electrolytic fitted backwards. Heat, bulge, bang.
  3. No common ground between two boards or supplies. Nothing works, everything measures fine individually.
  4. Floating input pin. Random readings; needs a pull-up or pull-down.
  5. Driving a motor or relay straight from a pin. A pin gives ~20mA; a motor wants hundreds. Transistor plus flyback diode.
  6. Missing flyback diode on a coil. The transistor dies after some number of switching cycles, which makes the cause hard to spot.
  7. Missing decoupling capacitors. Intermittent faults that feel like software bugs or bad luck.
  8. Brownout under load. The board resets whenever the motor starts. Bigger supply, bulk capacitance, separate ground returns.
  9. Non-logic-level MOSFET on a 3.3V gate. Half-on, hot, and misleadingly almost-working.
  10. Breadboard rail split in the middle, or a component straddling the wrong column.
  11. Reversed supply polarity. Add a series Schottky on anything you care about.
  12. 5V signal into a 3.3V pin. Sometimes survives, sometimes silently degrades the pin, sometimes kills the board.
Pre-power checklist, thirty seconds well spent: polarity of every electrolytic and diode; supply voltage set correctly; no bare leads touching; grounds common; and current limit set on the bench supply if you have one. Most destroyed components die in the first second of the first power-up.
Tier 3 · Buildmethod

An ordered approach

Module 3.1

Four questions, in this order

Components are the last suspect, not the first
1Is there power? Measure the rail at the board, under load. Not the adapter label, not the supply's display.
2Is ground continuous? Beep from every ground point to the supply negative, and between boards.
3Do the node voltages match prediction? Write down what each should be, then measure input to output. The first disagreement locates the fault.
4Only now, suspect a component. Test it out of circuit if you can.

Most faults are wiring, power, or a wrong assumption — not a dead part. Beginners invert this order, replace a transistor that was fine, and end up with two problems.

Techniques that narrow things quickly

  • Halve the problem. Disconnect the circuit into two halves and test each. Two or three halvings localises almost anything.
  • Simplify to the minimum. Strip back to the smallest thing that should work — one LED, no sensors, no radio. Add one element at a time. This is tedious and it is also the fastest route.
  • Change one thing at a time. Two simultaneous changes mean you learn nothing from the result.
  • Compare against a known-good. If you have two identical modules, swapping tells you instantly whether the fault travels with the part or stays with the circuit.
  • Check the current draw against what you expect. Far too high means a short; near zero means it is not running at all.
  • Re-read your own schematic aloud. Absurdly effective. The error is very often in the plan rather than the build.
The tool that changes this most: a bench supply with adjustable current limit. Set it to slightly above expected draw and a wiring mistake causes the supply to politely refuse rather than destroy a component. It converts most destructive errors into informative ones, which is why it is the best second purchase after the meter.
Module 3.2

When something has already failed

Find the cause, not just the casualty
  1. Power off immediately at the first smell, smoke or heat.
  2. Identify the casualty — discoloured, cracked, bulging or too hot to touch.
  3. Ask why it failed. A burnt resistor is a symptom: something upstream drew more current than intended. Replacing it without answering this burns the replacement too.
  4. Check its neighbours. Failures cascade; a shorted transistor often takes a driver pin with it.
  5. Fix the cause, then the casualty, then power up through a current-limited supply.

Damaged components are tuition, not disaster. A resistor costs pennies; understanding why it burnt is worth considerably more than that, and you will not forget the lesson.

Drill 1

Your circuit worked yesterday and does not today. Nothing has been changed. Where do you look first?

Power and mechanical connections. "Worked yesterday" almost always means something physical drifted: a flat battery, a jumper nudged out, a marginal breadboard contact, or a cracked solder joint that has finally opened. Measure the rail, then wiggle-test connections while watching the meter. Rebuilding from scratch discards the evidence and usually reproduces the fault.
Referencesearchable

Glossary