Arduino troubleshooting: fix common circuit faults — Random changes waste time. A repeatable sequence — power, wiring, code, component — finds most faults in a few minutes.

Troubleshooting

Arduino troubleshooting: fix common circuit faults

Arduino troubleshooting: fix common circuit faults — Random changes waste time. A repeatable sequence — power, wiring, code, component — finds most faults in a few minutes.

Random changes waste time. A repeatable sequence — power, wiring, code, component — finds most faults in a few minutes.

22 November 20267 min read
A simple Arduino button and LED circuit on a breadboard used to demonstrate systematic fault finding
Start with the simplest circuit that still shows the problem, then add parts back one at a time.

Bu projeyi gerçekten kurmak istersen parçaları hobidevre.com'dan temin edebilirsin →

Build it for real

To build this project for real, get the parts from hobidevre.com → hobidevre.com →

More build guides: hobidevre.com/blog

Use a fixed order

Work through four layers in the same order every time: power, wiring, code, then component. Do not jump to replacing parts until the first three are confirmed. Each layer has a cheap test that needs no special equipment.

Change one thing at a time and write down what you changed. If a fix works, you know exactly what caused the problem; if it does not, you can undo it cleanly.

Layer 1: power

  • Is the board power LED on? If not, check the USB cable — some cables carry data but are loose on power contacts, and others are charge-only.
  • Measure between the 5 V and GND rails with a multimeter. You should see close to 5 V.
  • On a breadboard, confirm the rail is actually powered where your circuit sits; some rails are split in the middle.
  • If an external supply is used, confirm its polarity and that grounds are joined.

A board that resets when a load starts almost always has a supply problem, not a code problem.

Layer 2: wiring

  • Trace the current path with your finger from positive to negative, checking that each component sits in the intended row group.
  • Confirm LED polarity and that a resistor is in series.
  • Check that signal wires land on the pin numbers used in the sketch — off-by-one pin errors are extremely common.
  • Look for a floating input: a button input without a pull-up or pull-down returns random values.
  • Wiggle each jumper gently. An intermittent fault that appears when the board is touched is a loose contact.

Layer 3: code

Add Serial.begin(9600) in setup() and print the values you suspect. Set the serial monitor to the same baud rate or the text will be unreadable. Printing a variable once per second tells you far more than staring at an LED.

The built-in LED on pin 13 is a free diagnostic: make it blink at the start of loop(). If it stops, the sketch has hung or crashed — often because a function is waiting for a sensor that never answers. Always give sensor waits a timeout.

Verify the selected board and port in the IDE. A sketch compiled for the wrong board can compile cleanly and still behave incorrectly.

Layer 4: component

Only now swap a part. Test the suspect component in the smallest possible circuit: one LED and one resistor, or one sensor with a known-good sketch. If the part works there, the fault is in the original layout.

Remember that a damaged part often fails in an obvious way — a shorted component gets warm, a cracked solder joint looks dull, a corroded pin is discoloured. Use your senses before reaching for the multimeter.

Three frequent cases

  • LED never lights: wrong polarity, missing resistor connection, pin not set as output, or the sketch never reaches the write call.
  • Sensor returns zero: no shared ground, wrong pin, or a request sent too soon after power-up. Add a short start-up delay and a timeout.
  • Upload fails: check the port, close other programs using it, try a different cable, and press reset just as the IDE begins uploading if automatic reset is unreliable.

When you are stuck, reduce the circuit to its smallest working version and add parts back one at a time. The step that breaks it again is the one worth examining.

Get the parts

If you want to build this project in real life, you can get the parts from hobidevre.com.

Frequently asked questions

Why does my circuit work only when I touch it?

A loose jumper or a poor breadboard contact. Wiggle each wire one at a time to find it.

Why are my button readings random?

The input is floating. Add a pull-down (or use the internal pull-up with active-low logic).

When should I replace a part?

After power, wiring and code are confirmed good and the part fails in a minimal test circuit.

Related reading

Practise in the browser

Open the same layout in the simulator and follow the steps. Sign in to save your work.