Component glossary
The essentials of each part: what it's for and how it connects. Every lesson links here to the components it uses.
Board and prototyping
- Arduino Uno
- The course board. It runs the program you upload and has 14 digital pins —6 of them with PWM, marked ~— and 6 analog inputs, A0 to A5.
- Wiring: Over USB to the computer, which programs and powers it. The 5V, 3.3V and GND pins power small circuits, and each signal pin supplies about 20 mA at most.
- Breadboard
- A board for building circuits without soldering. Each column of five holes is connected inside, and the long rows along the edges, marked + and −, are the power rails.
- Wiring: Bring 5V and GND from the board to the rails and plug each leg into a different column. Some breadboards split the rails in the middle: check they run end to end.
- Jumper wires
- Wires with stiff ends to connect the board, the breadboard and the modules. Male-to-male between holes, female-to-male for modules with header pins.
- Wiring: Use colours that mean something —red for 5V, black for GND— and checking the circuit becomes reading it, not guessing.
- Power supply module
- A supply that plugs into the breadboard and gives 5 V or 3.3 V to each rail. You need it when a motor wants more current than the Arduino can give.
- Wiring: It takes a 6.5–12 V adapter on its jack, and a jumper on each side selects 5 V, 3.3 V or off. Its − goes on the breadboard's blue line and its + on the red one.
Basic components
- Resistor
- Limits current. Its value is measured in ohms (Ω) and read from its colour bands. In this course: 220 Ω for LEDs, 1 kΩ and 10 kΩ for signals.
- Wiring: It has no polarity: either way round works. It goes in series with whatever it protects.
- LED
- A diode that emits light when current flows from anode to cathode. Without a series resistor, either the LED or the pin driving it burns out.
- Wiring: Long leg (anode) towards the pin and short leg (cathode) towards GND, with a 220 Ω resistor in series. At 5 V that leaves about 13 mA.
- Potentiometer
- A variable resistor with a knob. It works as a voltage divider: its middle pin gives between 0 and 5 V depending on how far you turn it.
- Wiring: Outer pins to 5V and GND, and the middle pin to an analog input or, on an LCD, to the V0 contrast pin.
- Diode
- Lets current through in one direction only. Next to a coil —a relay, a motor— it absorbs the voltage spike that appears when the current is cut.
- Wiring: The band marks the cathode. To protect a coil it goes in parallel with it, reversed: cathode towards positive.
- NPN transistor
- An electronic switch: a small current into the base lets a much larger one flow between collector and emitter. That's how a pin switches things that need more than 20 mA.
- Wiring: Emitter to GND, collector to the load and base to the pin through a 1 kΩ resistor. The leg order depends on the model: check its datasheet.
- NTC thermistor
- A resistor whose value drops as temperature rises. A 10 kΩ one measures that at 25 °C.
- Wiring: In a voltage divider with a fixed resistor of the same value, with the midpoint to an analog input. It has no polarity.
Integrated circuits
- 74HC595 shift register
- Takes data serially over three pins and presents it on eight outputs at once. It drives many LEDs or segments from few pins.
- Wiring: DS (14), SH_CP (11) and ST_CP (12) to three digital pins; Q0–Q7 are the outputs. VCC (16) and MR (10) to 5V; GND (8) and OE (13) to GND.
- ULN2003 driver
- A board with Darlington transistors to drive loads a pin can't, such as the coils of a stepper motor. Its LEDs show which coil is active.
- Wiring: IN1–IN4 to four digital pins, the white connector to the motor, and + and − to a separate 5 V supply sharing GND with the Arduino.
- L293D H-bridge
- Drives two DC motors in both directions. It has the protection diodes built in: that's the «D» in the name.
- Wiring: Per motor: EN to a PWM pin for speed, two inputs for direction and the motor across its two outputs. VCC1 (16) to 5V logic, VCC2 (8) to the motor supply and the middle pins to GND.
Sensors and inputs
- Tilt sensor
- A tube with a metal ball that joins or separates two contacts depending on the tilt. It tells you whether something is tipped over or moving, not by how many degrees.
- Wiring: Like a push button: one leg to a digital pin with INPUT_PULLUP and the other to GND. It has no polarity.
- HC-SR04 ultrasonic sensor
- Measures distances from about 2 cm to 4 m: it sends a 40 kHz ultrasound pulse and times how long the echo takes to come back.
- Wiring: VCC to 5V, GND to GND, and Trig and Echo to two digital pins.
- Analog joystick
- Two potentiometers, one per axis, plus a button you press by pushing the stick down. At rest, each axis reads around the middle of its range.
- Wiring: +5V and GND; VRx and VRy to two analog inputs; SW to a digital pin with INPUT_PULLUP.
- 4×4 matrix keypad
- Sixteen keys in a grid of 4 rows and 4 columns: pressing one joins its row to its column. Eight wires are enough for 16 keys.
- Wiring: Its 8 wires to 8 digital pins: the first four are the rows and the last four the columns.
- DHT11 sensor
- Measures temperature and relative humidity and sends both over a single data wire. It allows one reading per second at most.
- Wiring: VCC to 5V, GND to GND and DATA to a digital pin. The module already has the pull-up resistor; the bare sensor needs a 10 kΩ one between DATA and VCC.
- Infrared receiver and remote
- The receiver picks up the modulated infrared light of a remote control and outputs it as a digital signal. A library turns it into one code per key.
- Wiring: On the module, S to a digital pin, + to 5V and − to GND. The bare receiver has the same three legs, but their order varies by model.
Displays
- 7-segment display (4 digits)
- Four seven-segment digits plus the decimal point. They share the segment pins, so one digit lights at a time and they alternate so fast the eye sees all four.
- Wiring: On the 12-pin common-cathode one, segments A–G and DP are on pins 11, 7, 4, 2, 1, 10, 5 and 3, and digits 1–4 on 12, 9, 8 and 6. Check your own datasheet.
- 1602 LCD display
- A 16-column by 2-row text display. Its controller, the HD44780, is what the LiquidCrystal library speaks to.
- Wiring: In 4-bit mode six pins are enough: RS, E and D4–D7. VSS and RW to GND, VDD to 5V, V0 to a contrast potentiometer and A/K to the backlight.
Actuators
- SG90 servo motor
- A geared motor with position control: it moves to an angle between 0 and 180° set by the width of a pulse repeated every 20 ms, and holds it.
- Wiring: Brown to GND, red to 5V and orange to a digital pin. One unloaded servo runs from the Arduino; several, or loaded ones, need a separate supply.
- 28BYJ-48 stepper motor
- A motor that moves in exact steps: about 2048 per turn thanks to its gearbox. It's slow but precise, and knows how far it has turned without a sensor.
- Wiring: Its five-wire connector goes to the ULN2003 driver, never straight to the Arduino's pins.
- DC motor
- Spins while current flows. Reversing the polarity reverses the rotation, and PWM sets the speed. Even a small one draws hundreds of milliamps.
- Wiring: Always through a driver, such as the L293D, or a transistor, with the motor on its own supply. Never straight to a pin.
- Relay
- A mechanical switch moved by an electromagnet: a 5 V coil opens and closes a separate circuit, which can use another supply and another voltage.
- Wiring: The coil is driven by a transistor and has a diode across it. The load goes between COM and NO (normally open) or NC (normally closed). Relay modules already include the transistor and the diode.