Lesson 3 / 1225%

Lesson 3

Basic Components

20 min

Breadboard, resistor, LED, button and multimeter: discover and use the components.

Definition

An electronic component is a basic element of a circuit that plays a specific role: connecting, limiting current, producing light, controlling or measuring. By assembling a few simple components (breadboard, resistor, LED, push button) and connecting them with wires, you build a circuit that the Arduino board can power and control.

The building blocks of all your circuits

In this lesson, you get to know the components you will meet in almost every project in the course. For each one, remember three things: what it is used for, whether it has a connection direction, and what precaution to take. Now is the time to take out your kit and handle each part as you go.

The breadboard

The breadboard lets you build circuits without soldering: you simply push components and wires into its holes. Under the board, metal strips connect certain holes to each other, which creates the connections.

  • The power rails (the two lines at the top and bottom, marked + and −): on most boards, each line is connected along its entire length. This is where you connect 5V and GND.
  • The center columns: in each column of 5 holes, the holes are connected to each other. The two halves of the board are separated by the center groove.

In practice, if you push an LED leg and one end of a resistor into two holes of the same column, they are automatically connected. If they are in two different columns, there is no contact, unless you add a wire. The center groove, for its part, is used to straddle integrated circuits without connecting their two rows of pins.

Diagram: a breadboard with the internal connections highlighted (power rails running lengthwise, columns of 5 holes in the center, center groove).

Jumper wires

Jumper wires connect the different points of the circuit. To keep track of everything, adopt a simple habit: always use a red wire for positive (5V) and a black wire for ground (GND), and other colors for signals. A well color-coded circuit is much easier to check.

The resistor

The resistor limits the current flowing through a circuit. It has no connection direction. Its value is read from colored bands: each color corresponds to a digit. The values used most in this course are 220 ohms (red, red, brown) and 10 kΩ (brown, black, orange).

Here is how to read the bands: the first two give the digits, the third indicates the number of zeros to add (the multiplier), and the last one, set slightly apart, gives the tolerance. For a "brown, black, orange" resistor: brown is 1, black is 0, orange means "times one thousand". You get 10 × 1,000 = 10,000 ohms, or 10 kΩ.

  • The digits: black 0, brown 1, red 2, orange 3, yellow 4, green 5, blue 6, violet 7, gray 8, white 9.
  • Reading direction: start from the side where the bands are grouped together; the last band is the one set furthest from the others.
Diagram: the resistor color code, with a 220-ohm and a 10-kilohm resistor read step by step as examples.

The LED

An LED (light-emitting diode) lights up when current flows through it. Unlike the resistor, it has a direction: theanode (+, the longer leg) connects to the positive side, and the cathode (−, the shorter leg, on the flat-edge side) connects to the GND side.

An LED is a diode: it only lets current through in one direction. If you connect it backwards, it won't light up, but it is usually not damaged: just flip it around. It comes in many colors, and each color requires a different voltage across its terminals (about 2 V for red, 3 V or more for blue and white).

Always use a resistor with an LED

An LED has almost no internal resistance: connected directly to 5 V, it lets an excessive current through and burns out within moments. Always place a resistor in series with it.

Photo or diagram: an LED with the anode (long leg) and cathode (short leg, flat side) labeled, and its electronic symbol.

Calculating an LED's resistor

A red LED uses about 2 V across its terminals for a current of about 20 mA. With a 5 V supply, the resistor must "absorb" the remaining 3 V. We apply Ohm's law:

resistor calculation
Voltage across the resistor = 5 V − 2 V = 3 V
Desired current = 20 mA = 0.02 A

R = U / I = 3 / 0.02 = 150 ohms

150 Ω is a standard value, but it gives exactly 20 mA,
the LED's limit. We choose the next standard value up: 220 Ω
(the LED will be slightly dimmer, but protected)

Why choose the higher value rather than the lower one? Because a smaller resistor would let more current through than planned, and could damage the LED. With 220 ohms, the current drops to about 14 mA: the LED still shines very well, and it lasts longer.

The method comes down to three steps: subtract the LED's voltage from the supply voltage, divide the result by the desired current, then round up to the next standard value.

The push button

A push button works like a temporary switch: it closes the circuit for as long as you press it. Models with 4 legs have the legs connected in pairs; pressing connects the two pairs together.

To avoid wiring mistakes, place the button on the breadboard so that itstraddles the center groove: that way, the two sides of the button end up in different columns, and pressing it creates the intended connection. In an upcoming lesson, you will see how the Arduino board reads the state of this button.

The multimeter

The multimeter is the electronics technician's measuring tool. It can measure a voltage (in volts), a resistance (in ohms), or check the continuity of a wire. It is an excellent ally for understanding why a circuit doesn't work.

  • Measuring a voltage: set the multimeter to DC volts and place the two probes on either side of the component, with the circuit powered.
  • Measuring a resistance: set it to ohms and measure the component on its own, with the circuit unpowered.
  • Testing continuity: in continuity mode, it beeps when two points are properly connected, which is handy for checking a wire.
Screenshot or photo: a multimeter measuring the 5 V voltage between the + and − rails of a breadboard powered by the Arduino.

A first circuit to picture

To put all of this together, here is the simplest circuit: an LED powered by the board. Connect the 5V pin to a 220-ohm resistor, the resistor to the LED's anode, and the cathode toGND. The circuit is then closed, current flows, and the LED lights up. There is no program yet: the board is only used as a power source.

  • Before connecting: unplug the USB cable and re-read your diagram.
  • While building: check the LED's direction and make sure the resistor is there.
  • After connecting: if the LED doesn't light up, check the columns and measure the voltage with the multimeter.

Common mistakes

  • Connecting an LED without a resistor: it heats up and burns out almost instantly.
  • Swapping the anode and the cathode: the LED stays off until you flip it around.
  • Using the wrong column: two components placed in two different columns are not connected.
  • Forgetting that rails are sometimes split: on some boards, the rails are interrupted in the middle; check with the multimeter.
  • Measuring a resistance while powered: always cut the power before using ohms mode.

Key takeaways

  • The breadboard connects the holes of the same column of 5 and those of the same rail.
  • The resistor has no direction; its value is read from the colored bands.
  • The LED has a direction (anode +, cathode −) and requires a series resistor.
  • To calculate an LED's resistor: R = (5 − LED voltage) / current, then round up.
  • The multimeter helps check voltages, resistances and continuity.

Exercise

Read the value of three resistors from your kit using the color code, then check with the multimeter in ohmmeter mode. Finally, calculate the resistor needed for a green LED (about 2 V, 15 mA) powered from 5 V.