Skip to main content

Breadboard and wiring

Most "my code is wrong" problems with the Arduino are actually wiring. This page explains how a breadboard connects things and how to check a circuit.

How a breadboard is connected inside​

+ + + + + + + + + + + + <- power rail: the whole row is connected
- - - - - - - - - - - - <- ground rail: the whole row is connected

a b c d e f g h i j
o-o-o-o-o o-o-o-o-o 1 <- each row of 5 (a-e) is connected
o-o-o-o-o o-o-o-o-o 2 a-e and f-j are NOT connected to each other
o-o-o-o-o o-o-o-o-o 3 (the gap in the middle separates them)
  • The 5 holes a–e in one numbered row are connected. So are f–j. The middle gap separates the two halves.
  • The long + and − rails along the edges are connected along their length.
  • On many long breadboards the rails are split in the middle (look for a gap in the red/blue line). Power on the left half does not reach the right half until you bridge it with a wire.

Power rails​

Connect the Uno's 5V to a + rail and GND to a − rail once, then take power for every component from the rails. That keeps wires short and tidy.

Every part must share GND with the Arduino. A sensor powered from somewhere else with no common ground gives random readings.

Components that only work one way round​

PartWhich way
LEDLong leg (+, anode) toward the pin/5V, short leg (flat side of the rim) toward GND
Push button (4 legs)Legs on the same side are always connected; the button connects one side to the other. Place it across the middle gap.
Electrolytic capacitorThe stripe marks the − leg
Grove modulesGrove cable only fits one way

Grove cable colours​

ColourWire
RedVCC (5V)
BlackGND
YellowSignal (SIG). On I2C modules: SCL
WhiteSecond signal or not used. On I2C modules: SDA

For the Grove LCD (I2C): yellow → A5 (SCL), white → A4 (SDA).

Resistor colour codes you will meet​

ValueBands
220 Ωred, red, brown
330 Ωorange, orange, brown
1 kΩbrown, black, red
10 kΩbrown, black, orange

(followed by gold for ±5%). An LED always needs a resistor of about 220–330 Ω in series.

Checking a circuit​

  1. Unplug the USB before changing wires.
  2. Follow each wire with your finger from the Arduino pin to the part. Say out loud where it goes.
  3. Check the part sits in different rows for each leg (an LED with both legs in the same row is shorted).
  4. Check the pin number in the code matches the pin the wire is in.
  5. Test the part on its own with the simplest sketch (blink, or the library example).
  6. Swap the jumper wire: broken jumpers are common.

Danger signs​

Unplug the USB immediately if:

  • the Uno's power LED goes off or dims when you plug something in,
  • a part gets hot,
  • the PC says "USB device has malfunctioned" / "power surge on the USB port".

These mean a short circuit: usually 5V wired straight to GND, often through a misplaced jumper on the rails.