Electricity Basics
Basic Electronics
Course 1 · Chapter 1 · Electricity Basics
Every robot, from a line-following buggy to a walking quadruped, is a collection of circuits: sensors that turn the world into voltages, logic that decides, and drivers that push current into motors. This course builds that picture one component at a time. This first chapter gives you the four ideas everything else rests on (charge, voltage, current and resistance), the one equation that ties them together (Ohm's law), and ends with a circuit you can build in ten minutes: a battery, a resistor and an LED.
No background is assumed. You will need a calculator and, ideally, a cheap multimeter, but you can do every exercise in this chapter in a free browser simulator if you have no hardware yet.
1. The four quantities
Charge and current
Matter contains charged particles. In a metal wire, some electrons are free to drift between atoms. Current is the rate at which charge flows past a point. It is measured in amperes (A), and one ampere is one coulomb of charge per second:
One coulomb is about 6.24 × 1018 electrons, so even a tiny current is an enormous number of moving electrons.
Conventional current
Early scientists guessed that current flowed from the positive terminal of a battery to the negative. We now know that in wires it is electrons moving the other way, but the convention stuck. Conventional current flows from + to −, and every schematic, datasheet and arrow symbol (such as the one inside a diode) uses it. The maths comes out identical, so use it and ignore the electron direction.
Voltage
Voltage (potential difference) is the energy given to each coulomb of charge as it moves between two points. It is measured in volts (V): one volt is one joule per coulomb.
Voltage is always measured between two points. A battery marked 9 V has 9 V between its terminals; there is no such thing as "the voltage at one point" without a reference. In circuits that reference is called ground (0 V), usually the battery's negative terminal.
Resistance
Resistance measures how much a component opposes current. It is measured in ohms (Ω). A thick copper wire has almost none, rubber has almost infinite resistance, and a resistor is a part built to have an exact value.
Units and prefixes
Electronics constantly uses very small and very large numbers, so you must be fluent in the prefixes:
| Prefix | Symbol | Multiply by | Example |
|---|---|---|---|
| mega | M | 1,000,000 | 1 MΩ = 1,000,000 Ω |
| kilo | k | 1,000 | 4.7 kΩ = 4,700 Ω |
| (none) | 1 | 9 V, 220 Ω, 2 A | |
| milli | m | 0.001 | 20 mA = 0.020 A |
| micro | µ | 0.000001 | 150 µA = 0.000150 A |
The most common beginner error is forgetting to convert. If you put 10 mA into a formula, write 0.010 A, or keep everything in volts, kilohms and milliamps (the three are consistent: V = kΩ × mA).
2. Ohm's law
In 1827 Georg Ohm found that for most conductors the current is proportional to the voltage across them. Doubling the voltage doubles the current. The constant of proportionality is 1/R, so:
Worked example. A 1 kΩ resistor has 5 V across it. Then I = 5 / 1000 = 0.005 A = 5 mA. Put 10 V across the same resistor and the current doubles to 10 mA.
3. Power
Power is the rate at which energy is converted, measured in watts (W). Since voltage is energy per coulomb and current is coulombs per second, multiplying them gives joules per second:
All three forms are the same law; choose whichever uses the two numbers you already know.
Worked example: why power ratings matter. Suppose you wire a 100 Ω resistor straight across a 9 V battery. I = 9 / 100 = 0.09 A (90 mA). P = V × I = 9 × 0.09 = 0.81 W. A common resistor is rated 0.25 W (1/4 W). It is dissipating more than three times its rating, so it will get too hot to touch and can burn. Always check P against the rating, and leave margin: aim for at most half the rating.
4. DC and AC
Direct current (DC) flows one way at a steady value: batteries, USB chargers and the supply rails inside every robot. Alternating current (AC) reverses direction continuously. UK mains is AC at 230 V RMS and 50 Hz, so the voltage swings 50 times per second between about +325 V and −325 V.
The "230 V" is an RMS value, defined as the DC voltage that would heat a resistor equally. For a sine wave, Vpeak = VRMS × √2, giving 230 × 1.414 ≈ 325 V. Robot electronics works almost entirely in DC; AC appears in this course in power supplies (rectifiers, Basic Electronics 5) and in signals such as audio and motor drive waveforms.
| DC | AC | |
|---|---|---|
| Direction | Constant | Reverses periodically |
| Typical sources | Batteries, USB, solar cells, regulators | Mains sockets, generators, signal sources |
| Described by | A single value (e.g. 5 V) | RMS (or peak) value and frequency |
| In this course | Nearly everything | Filters, rectifiers, signals |
5. Safety: what is safe to touch
The danger to your body is current through it, but current is driven by voltage, so voltage is the practical guide. Dry skin has a resistance of tens of kilohms or more, so low voltages cannot push a dangerous current through you.
| Source | Voltage | Risk |
|---|---|---|
| AA/AAA cells, coin cells, USB, Arduino/Pico/Pi boards | 1.5 to 5 V | Safe to touch. The risk is to the components, and to wires if you short a battery. |
| 9 V PP3 battery, 12 V lead-acid, hobby 3S LiPo (11.1 V) | 9 to 12 V | Safe to touch, but can deliver large currents if shorted: hot wires, burns. LiPo cells can catch fire. |
| Mains outlets and anything plugged into them | 230 V AC (UK) | Can kill. Do not open, modify or probe mains equipment, and do not build mains circuits on a breadboard. |
- Only build from batteries or a low-voltage (5 V to 12 V) supply. Never from the mains.
- Never connect a battery's + terminal directly to its − terminal. A short circuit makes the wire and battery hot within seconds.
- Disconnect the battery before changing the wiring.
- Do not charge or puncture LiPo or lithium cells without a proper charger and a fireproof bag. This chapter uses neither.
- Wear eye protection when trimming component legs: the offcuts fly off at speed.
- Hot resistors and soldering irons burn. Check with the back of a finger first.
6. First circuit: battery, resistor, LED
An LED (light-emitting diode) lights when current flows through it in one direction only. It has a roughly fixed voltage drop across it when lit (its forward voltage, VF) and no resistance worth speaking of, so connected straight to a battery it would try to draw as much current as the battery could give, and burn out in a moment. A series resistor sets the current.
Parts list
| Part | Value | Notes |
|---|---|---|
| Battery | 9 V (PP3) with snap clip | Or a 3 x AA pack (4.5 V) with a different resistor: see Challenge 1 |
| R1 | 820 Ω, 1/4 W | Colour code grey-red-brown (an E12 series value) |
| D1 | Standard 5 mm red LED | VF about 2.0 V at 10 mA; absolute maximum about 20 to 30 mA |
| Breadboard | Half size or larger | Plus 3 jumper wires |
| Multimeter | Any digital | Optional but strongly recommended |
Choosing R1: worked calculation
Aim for a comfortable 10 mA: bright for an indicator LED and safely below its limit. In a series loop, the battery voltage is shared between the resistor and the LED, so the resistor gets whatever the LED does not:
With 680 Ω the current would be 10.3 mA, also fine; 820 Ω just gives a little more margin and the brightness difference is barely visible. Round the resistor up when in doubt: a dimmer LED is harmless, a hot one is not.
Schematic
A schematic shows how parts connect, not where they sit physically. The resistor is the zigzag (or a rectangle); the LED is a triangle pointing in the direction of conventional current, with a bar at the cathode.
Breadboard version
A breadboard has short rows of five connected holes (a to e connected together, f to j connected together, with a gap down the middle) and long power rails down the sides. Basic Electronics 2 covers the layout in detail; for now follow this recipe, using one numbered column of the board for each connection.
- Disconnect the battery. Place the LED with its longer leg (anode, +) in column 10 and its shorter leg (cathode, next to the flat edge of the plastic rim) in column 12, both in rows a to e.
- Place R1 with one leg in column 5 and the other in column 10, so it shares column 10 with the LED anode.
- Run a jumper wire from the LED's cathode column (12) to the board's − rail (blue line).
- Run a jumper from column 5 (R1's free end) to the + rail (red line).
- Clip the battery on: red lead to the + rail, black lead to the − rail. The LED lights.
Simulator version (no hardware needed)
Falstad Circuit Simulator (falstad.com/circuit, runs in the browser):
- Right-click the canvas and add a Resistor (Passive Components), an LED (Active Components, under Diode) and a DC Voltage Source (Inputs and Sources).
- Wire the three in a loop, battery to resistor to LED to battery, with the LED's anode (the triangle's flat base) towards the resistor.
- Double-click the voltage source and set it to 9 V; double-click the resistor and set it to 820 Ω.
- Hover over or click a component to see its voltage and current. The moving dots show current direction (+ to −).
Tinkercad Circuits (tinkercad.com, free account): create a new circuit and drag in a 9 V battery, a resistor, a red LED and a multimeter. Set the resistor to 820 Ω in its panel and wire the same loop. Click Start Simulation. Place the multimeter across (in parallel with) a part to read volts, or in series to read current, and select the mode in its panel.
Expected meter readings
| Measurement | Calculated | Real circuit | Simulator |
|---|---|---|---|
| Battery terminals (DC V) | 9.0 V | 9.3 to 9.6 V fresh; 8 V or less when tired | The value you set |
| Across R1 (DC V) | 7.0 V | 7.2 to 7.6 V | About 7.0 V (depends on the LED model) |
| Across LED (DC V) | 2.0 V | 1.8 to 2.1 V (red) | About 1.8 to 2.1 V |
| Loop current (DC mA, meter in series) | 8.5 mA | About 8 to 9 mA | About 8 to 9 mA |
Expect real values to differ by a few percent: the battery voltage is not exactly 9 V, E12 resistors are typically ±5% (or ±1% for metal-film types), and each LED's VF varies. What matters is that the two voltages add up to the battery voltage (7.4 + 2.0 = 9.4 V, say) and that R1's voltage divided by 820 gives the measured current. That is Kirchhoff's voltage law, covered in Basic Electronics 2.
7. Series and parallel resistance
There are two ways to connect resistors, and the rules for them will be used constantly.
Series: one path, same current
The same current passes through each resistor, and the voltages across them add up to the supply. Using V = IR for each:
Parallel: several paths, same voltage
The same voltage is across each branch, and the branch currents add. Using I = V/R for each:
Adding a branch in parallel always lowers the total resistance (there are more paths for current), and the result is always smaller than the smallest branch (193.9 Ω is below 330 Ω). That is a quick sanity check on any calculation. Voltage dividers (series pairs used to scale a voltage) are the subject of Basic Electronics 3.
| Series | Parallel | |
|---|---|---|
| Current | Same through each | Splits between branches |
| Voltage | Splits between parts | Same across each branch |
| Total resistance | Sum (larger than any one) | Reciprocal sum (smaller than any one) |
| If one part fails open | Everything stops | Other branches keep working |
8. Challenges
Quick reference
- Current: I = Q / t (amperes); conventional current flows + to −
- Voltage: V = E / Q (volts); always measured between two points
- Ohm's law: V = I × R, so I = V / R and R = V / I
- Power: P = V × I = I²R = V²/R; keep P below half the rating
- Series: R = R1 + R2, same current. Parallel: R = R1R2 / (R1 + R2), same voltage
- LED resistor: R = (Vsupply − VF) / I, rounded up to the next E12 value
- Safety: low-voltage batteries only; never short a battery; never touch mains
Next, Basic Electronics 2 turns to circuits and measurement: Kirchhoff's laws, the breadboard layout in full, and how to use the multimeter properly to check what you have built.