Education › Robotics › Stage 1: Foundations — get started

The electronics you actually need

Voltage, current, Ohm's law, breadboards, resistors and reading a circuit — the survival basics.

Beginner ~35 min read Module 2 of 16

You do not need an electrical engineering degree to build robots, but you do need a handful of survival basics — enough to wire things up without releasing the magic smoke. This lesson covers what voltage, current and resistance actually are, the one equation you will use constantly, how a breadboard works, why an LED always needs a resistor, and how to power things safely. Master this and the rest of robotics stops feeling like guesswork.

After this module you can
  • Explain voltage, current and resistance with a mental model you can reason from
  • Use Ohm's law to size a resistor and predict what a circuit will do
  • Wire a simple circuit on a breadboard and read it back
  • Avoid the beginner mistakes that fry components — reversed polarity, missing resistors, wrong voltage

Voltage, current and resistance

Electricity is easiest to reason about with a water analogy. Voltage (volts, V) is like water pressure — the push that wants to move charge. Current (amps, A) is the flow rate — how much charge is actually moving. Resistance (ohms, Ω) is how much the pipe restricts that flow. A component with high resistance is a narrow pipe: for the same pressure, less flows. This picture is not perfect, but it will carry you a long way.

Two rules follow that you must internalise. First, current only flows in a complete loop — from the supply's positive terminal, through your components, back to the negative (called ground, or GND). Break the loop and nothing happens. Second, components care about different things: a motor cares about current, a logic pin cares about voltage, and getting either wrong is how things break. Most beginner failures are one of these two — an open loop, or a voltage or current a part could not handle.

Note

Ground (GND) is the shared reference everything measures against. A frequent beginner bug: two boards that never share a ground, so their signals mean nothing to each other. When in doubt, connect the grounds.

Ohm's law — the one equation

The relationship between the three is Ohm's law: voltage equals current times resistance, V = I × R. Rearranged, I = V / R and R = V / I. That is the whole thing, and you will use it every time you connect a component. The classic use is sizing the resistor for an LED. An LED drops a roughly fixed voltage (about 2 V for a red one) and wants a small current (about 10–20 mA); connect it straight to 5 V and the current spikes and it burns out. A resistor absorbs the difference.

python
# Size the resistor for an LED on a 5V pin.
supply = 5.0        # volts from the board
led_drop = 2.0      # volts the red LED drops
target_current = 0.015  # 15 mA, a safe brightness

resistance = (supply - led_drop) / target_current
print(f"Use about {resistance:.0f} ohms")   # ~200 ohms; a 220-ohm resistor is standard

# Same law tells you the actual current with a 220-ohm resistor:
actual = (supply - led_drop) / 220
print(f"With 220 ohms: {actual*1000:.1f} mA")

Run the numbers once and the mystery disappears: (5 − 2) / 0.015 = 200, so a standard 220 Ω resistor is perfect, giving a safe ~14 mA. This is why kits ship a bag of 220 Ω resistors — they are the LED workhorses. The habit to build is: before connecting anything to a pin, ask 'what voltage and what current will this see?', and use Ohm's law to check it is safe.

The breadboard

A breadboard lets you build circuits by pushing wires and components into holes — no soldering, fully reusable. Its magic is the hidden metal strips underneath that connect certain holes together, so you must know the pattern. The long rails down each side (the power rails, usually marked + and −) are connected all the way along; you feed them 5 V and ground once and tap them anywhere. The main area's holes are connected in short columns of five, and the gap down the middle separates the two halves.

  • The two long side rails carry power (+) and ground (−) along the whole board — wire these first.
  • In the main grid, each column of five holes is joined together vertically, on each side of the centre gap.
  • The centre gap is a break; a chip straddles it so each of its pins lands in its own column.
  • Nothing is connected across the gap, and rows are not joined to each other except through your wires.
Tip

Adopt a colour convention and never break it: red wires for power, black for ground. Ninety per cent of breadboard debugging is finding a wire in the wrong hole, and consistent colours make that instant.

Powering things without frying them

The most common way to destroy a component is giving it the wrong voltage or connecting it backwards. Logic parts run at 3.3 V or 5 V; connect a 3.3 V sensor to 5 V and you may kill it. Many parts are polarised — they have a correct orientation — and reversing power across them is often fatal. LEDs, capacitors, motor drivers and the boards themselves all care about polarity. Slow down and check the plus and minus before you power on.

The other trap is current. Your microcontroller board can only supply a small current from its pins — typically 20–40 mA per pin. A motor wants hundreds of milliamps to several amps. Drawing that through a pin browns out or destroys the board, which is why motors always go through a separate driver with their own power supply (a whole later lesson). The rule of thumb: pins are for signals and tiny loads like LEDs; anything that moves gets its own power path.

SymptomLikely cause
Nothing happens at allOpen loop — a missing wire or no shared ground
Component runs hot then diesNo current-limiting resistor, or wrong voltage
Board resets when motor startsMotor drawing current through the board — needs its own supply
Hands-on practice

Wire and reason about an LED circuit

  1. On a breadboard, wire the board's 5 V to the + rail and GND to the − rail; use red and black wires.
  2. Put an LED and a 220 Ω resistor in series between the + rail and the − rail, resistor first.
  3. Note the LED's orientation (long leg to +) and predict what happens if you reverse it.
  4. Use Ohm's law to compute the current through your LED, then change the resistor to 1 kΩ and predict the new current and brightness.
  5. Deliberately remove the ground wire and explain, in terms of the loop, why the LED goes dark.
Cheat sheet

The electronics you actually need — at a glance

Main things to focus on

  • Voltage pushes, current flows, resistance restricts — the water analogy.
  • Current only flows in a complete loop back to ground.
  • Ohm's law V = I × R sizes resistors and checks safety.
  • An LED always needs a series resistor (220 Ω on 5 V).
  • Board pins supply tiny current — motors need their own power path.
  • Reversed polarity and wrong voltage are the top killers of components.

The quantities

Voltage (V)the push; measured in volts across two points
Current (I)the flow; measured in amps through a path
Resistance (R)the restriction; measured in ohms (Ω)
Ground (GND)the shared 0 V reference; complete the loop here

Ohm's law

V = I × Rvoltage from current and resistance
I = V / Rcurrent from voltage and resistance
R = V / Iresistance you need for a target current

Breadboard

Side railspower (+) and ground (−) run the full length
Columns of 5joined vertically, each side of the centre gap
Centre gapa break; straddle it with chips
Red/blackconvention: red = power, black = ground

Common parts

Resistorlimits current; no polarity, any way round
LEDone-way light; long leg to +, needs a resistor
Jumper wireconnects holes; your circuit's plumbing
Multimetermeasures volts, ohms and continuity; your debugging tool

Common pitfalls

  • Connecting an LED with no resistor — it draws too much current and burns out.
  • Forgetting a shared ground between two boards, so their signals are meaningless.
  • Feeding a 3.3 V part 5 V, or reversing polarity on a polarised component.
  • Pulling motor current through a board pin, causing brownouts or damage.
  • Assuming a breadboard row is connected when it is on the wrong side of the centre gap.
Quiz

Check your understanding

5 questions · 4 to pass · answers are explained as you go. Your best score is saved on this device only.

Progress and quiz scores are saved in this browser only. Back up or restore on the hub.

Was this lesson useful? Tell me what to improve →