Arduino Uno: Electronics Fundamentals – LED, Resistor, and Breadboard Explained
Arduino Uno R3 PhotosAfter successfully uploading your first sketch, it’s time to move your projects off the Arduino board. This detailed, step-by-step guide will teach you how to safely use a breadboard and how to calculate and connect the necessary current-limiting resistor to protect both your LED and the Uno itself. Mastering these fundamentals is the key to building robust and correctly functioning electronic circuits.
I. The Breadboard – The Foundation of Your Lab
What is a Breadboard
A breadboard is the foundation of every electronic workshop. It is a solderless solution that allows you to quickly connect electronic components for easy testing and modification of circuits.
Internal Structure and Connection Rules
A breadboard has two main areas that differ in their internal connection method:
| Power Rails (Side Buses) | Usually marked red (+) and blue/black (-). These columns are connected vertically. We use them to bring Power (5V) and Ground (GND) from the Arduino to the entire board. |
| Component Area (Work Holes) | These holes are connected horizontally in rows of five. Any components inserted into the same row (e.g., A1, B1, C1) are electrically connected to each other. The central trench separates the upper and lower parts, which is useful for mounting integrated circuits. |
Tip: Always use a red wire for 5V (Power) and a black/brown wire for GND (Ground) to maintain organization and safety.
II. The LED – How It Works and Why You Must Protect It
Structure and Polarity
The Light-Emitting Diode (LED) is a polarized component. This means current must flow in only one direction for it to light up:
| Anode | The longer leg (connects to positive / voltage). |
| Cathode | The shorter leg or the leg next to the flat edge of the housing (connects to negative / ground, after the resistor!). |
Why Current Limiting is Necessary
LEDs operate at a specific, low current (typically 10 mA to 30 mA). Connecting it directly to the 5V pin on the Arduino will cause too much current to flow. The result - Rapid damage (burning out) of the LED and potential damage to the digital pin on the Uno itself.
III. Resistors – Your Circuit Defender and Value Calculation
Function of the Resistor in the Circuit
The resistor in this circuit acts as a "defender" by providing electrical resistance. It limits the current flowing from the Arduino digital pin to the LED to a safe level.
Calculating the Resistor Value (Ohm's Law)
To calculate the ideal resistor value (R), we must use the simplified Ohm's Law (R = V/I).
In our case, the voltage (V) is the difference between the supply voltage (V_supply) and the LED's forward voltage (V_LED):
- V_supply: 5V (from the Arduino pin).
- V_LED: The LED's forward voltage (typically 2V for red/green, 3.2V for blue/white). Let's assume 2V.
- I_LED: The desired current (typically 20 mA). Remember that 20 mA = 0.02 A.
Calculation Example:
Since 150 Ω resistors are not always available, and it is safer to use a slightly higher value, the standard in Arduino projects is the 220 Ω resistor. This ensures safety and adequate brightness for the LED.
Reading the Value (Color Code)
The resistor value is read from its colored bands. You can use online calculators, but knowing the color code is a fundamental skill for an electronics enthusiast.
IV. Building Your First Breadboard Circuit
Follow these steps to build the circuit on the breadboard:
- Powering the Breadboard: Connect the 5V pin from the Arduino to the red (+) rail on the breadboard and the GND pin to the blue (-) rail.
- Connecting the LED Anode: Connect the longer leg (Anode) of the LED to an Arduino digital pin (e.g., Pin 7) using a jumper wire.
- The Resistor: Insert one end of the resistor (e.g., 220 Ω) into the same row as the shorter leg (Cathode) of the LED, and the other end of the resistor into the Ground rail (blue -).
-
The Code:
Use the Blink sketch,
changing the pin from
LED_BUILTINto Pin 7 (or your chosen pin).
void setup() {
// Configure Pin 7 as OUTPUT
pinMode(7, OUTPUT);
}
void loop() {
digitalWrite(7, HIGH); // Turn the LED ON (Pin 7 to 5V)
delay(1000); // Wait 1 second
digitalWrite(7, LOW); // Turn the LED OFF (Pin 7 to 0V)
delay(1000); // Wait 1 second
}
Arduino Uno R3 Photos
👇
▒ Blog Guide: All Programming Posts in One Place. ▹ See