Lesson 2 / 1217%

Lesson 2

Basic Electricity Concepts

18 min

Voltage, current, resistance and Ohm's law: the basics to understand a circuit.

Definition

An electric current is an orderly movement of electric charges (electrons) through a conducting material. It is described by three related quantities: voltage (in volts),current (in amperes) and resistance(in ohms). The relationship that links them, Ohm's law, lets you calculate any one of them from the other two and size a circuit correctly.

Why learn about electricity?

Before connecting an LED or a sensor, you need to understand what happens inside a circuit. Without these basics, you wire things at random, you risk damaging components and, above all, you can't tell why a circuit doesn't work. Don't worry: the notions you need come down to a few simple ideas, which you will use in every lesson that follows.

Electric current

An electric current is a movement of charges (electrons) through a conducting material, such as a copper wire. For it to flow, you need aclosed circuit: a continuous path that starts at the power source, passes through the components, then returns to the source. If the circuit is open (a disconnected wire, an open switch), nothing flows.

A switch is nothing more than a way to open or close the circuit at will. When you press a push button, you briefly close the circuit: current flows, and your Arduino board can detect that event.

Diagram: a simple closed circuit (battery, switch, bulb) with the direction of current shown by an arrow, then the same circuit open.

Conductors and insulators

Not all materials let current through in the same way. They fall into two main families:

  • Conductors let current flow easily: copper (wires), aluminum, silver, tap water.
  • Insulators block current: the plastic around wires, rubber, glass, dry wood.

That is why electrical wires are made of copper on the inside (to conduct) and plastic on the outside (to insulate and prevent accidental contact).

The three fundamental quantities

To understand electronics, you can compare a circuit to a water system: voltage is the pressure, current is the flow rate, and resistance is a narrowing of the pipe.

  • Voltage (U), in volts (V): the "push" that sets charges in motion. A battery provides 1.5 V, and the Arduino board runs on 5 V.
  • Current (I), in amperes (A): the amount of current flowing. In electronics, we mostly talk in milliamperes (mA), one thousandth of an ampere.
  • Resistance (R), in ohms (Ω): what opposes the flow of current. The higher it is, the less current gets through.

In the water analogy, a tank placed up high creates strong pressure (high voltage). If the pipe is wide, a lot of water flows out (high current). If you pinch it (high resistance), the flow decreases, even though the pressure stays the same. This is exactly what happens in an electrical wire.

Diagram: the hydraulic analogy (tank and pressure = voltage, flow in the pipe = current, narrowing = resistance) next to the equivalent electrical circuit.

Units and their multiples

In electronics, values are often very small or very large. We therefore use prefixes to avoid writing too many zeros:

  • milli (m): one thousandth. 1 mA = 0.001 A.
  • kilo (k): one thousand times. 1 kΩ = 1,000 Ω.
  • mega (M): one million times. 1 MΩ = 1,000,000 Ω.

So the 10-kilohm resistor in your kit is worth 10,000 ohms, and a current of 20 mA is 0.02 A. Remember to convert before doing a calculation.

Ohm's law

These three quantities are linked by Ohm's law, the most important formula in basic electronics:

Ohm's law
U = R × I

U: voltage in volts (V)
R: resistance in ohms (Ω)
I: current in amperes (A)

So:  I = U / R   and   R = U / I

Example: a 220-ohm resistor subjected to a voltage of 5 V carries a current I = 5 / 220, which is approximately 0.023 A, or 23 mA.

How to use the formula

Just identify what you are looking for and what you already know. If you know two quantities, you can always calculate the third:

  • You want the current: divide the voltage by the resistance, I = U / R.
  • You want the resistance: divide the voltage by the current, R = U / I.
  • You want the voltage: multiply the resistance by the current, U = R × I.

A useful example: protecting an LED

An LED can only withstand a limited current, on the order of 20 mA. Without a resistor, it would receive too much current and burn out. A red LED "uses up" about 2 V across its terminals, so 5 − 2 = 3 V remain to be absorbed by the resistor. With a 220-ohm resistor, Ohm's law givesI = 3 / 220, or about 0.014 A, i.e. 14 mA: the LED shines brightly, with no risk. That is why you will use 220-ohm resistors in the upcoming circuits.

Current direction and ground

By convention, current flows from the positive (+) terminal to the negative (−) terminal. On an Arduino board, the positive terminal is called 5V and the negative oneGND ("ground"). Every circuit will need a component connected to GND to close the circuit.

On your board, you will find the 5V andGND pins in the power header. Some components, such as LEDs, only work in one orientation: an LED connected backwards won't light up. Such components are called polarized.

Series or parallel

  • In series: components are placed one after another, and the same current flows through all of them. Resistances add up.
  • In parallel: components are placed on separate branches, they receive the same voltage and the current is split between them.

Two worked examples. In series, a 220-ohm resistor followed by a 330-ohm one is equivalent to a single resistor of 220 + 330 = 550 ohms. In parallel, two identical 220-ohm resistors share the current and are equivalent to a 110-ohm resistor: the more paths there are, the more easily current flows.

Diagram: two resistors connected in series, then two resistors connected in parallel, with the associated formulas.

The short circuit

Connecting + directly to − with no component in between is ashort circuit: the resistance is almost zero, the current becomes huge, and you risk damaging your board. A component must always limit the current.

Common mistakes

  • Forgetting to close the circuit: without a return path toGND, no current flows and nothing lights up.
  • Connecting an LED without a resistor: it receives too much current and can burn out very quickly.
  • Mixing up milliamperes and amperes: 20 mA is 0.02 A, not 20 A. Always convert before calculating.
  • Reversing a polarized component: an LED connected backwards won't work, and some components can be damaged.
  • Connecting 5V directly to GND: this is a short circuit. Unplug the USB cable immediately.

Key takeaways

  • Current only flows in a closed circuit.
  • Voltage (V), current (A) andresistance (Ω) are linked byU = R × I.
  • Current flows from + (5V) to− (GND).
  • In series, resistances add up; inparallel, the current is split.
  • There must always be a component that limits the current, otherwise it is a short circuit.

Exercise

Calculate the current flowing through a 1,000-ohm (1 kΩ) resistor at 5 V, then through a 10,000-ohm (10 kΩ) resistor at 5 V. What do you notice as the resistance increases?