IOT & Robotics
September 5, 2026 7 min read

Basic Electronic Components for Arduino and IoT

Hs
Hemant singh
Technical Writer & Educator

After learning the basic concepts of voltage, current, resistance, power, and circuits, the next step is to understand the common electronic components that we will use in Arduino and IoT projects.

These components are the building blocks of many electronic circuits.

In this tutorial, we will learn about:

  1. Resistor
  2. LED
  3. Push Button
  4. Potentiometer
  5. Capacitor
  6. Diode
  7. Transistor
  8. Relay
  9. Buzzer
  10. Breadboard

1. Resistor

A resistor is an electronic component that limits or controls the flow of electric current in a circuit.

Resistance is measured in Ohms (Ω).

Why Do We Use Resistors?

Resistors are commonly used to:

  1. Limit current
  2. Protect LEDs
  3. Divide voltage
  4. Set input values
  5. Control signals
  6. Pull a signal HIGH or LOW

Example

When connecting an LED to an Arduino, we normally use a resistor:

Arduino → Resistor → LED → GND

The resistor limits the current flowing through the LED.

Common Resistor Values

Some commonly used resistor values are:

  1. 220Ω
  2. 330Ω
  3. 1kΩ
  4. 4.7kΩ
  5. 10kΩ
  6. 100kΩ

For beginners, 220Ω, 330Ω, 1kΩ, and 10kΩ are particularly useful values to keep available.

Important Point

Resistors are not directional. This means they normally can be connected in either direction.

2. LED

LED stands for Light Emitting Diode.

An LED is a semiconductor component that produces light when current flows through it in the correct direction.

LEDs are commonly used as indicators in Arduino projects.

For example:

  1. LED ON → Sensor is active
  2. LED OFF → Sensor is inactive
  3. Blinking LED → System is working
  4. Red LED → Warning
  5. Green LED → Normal condition

LED Polarity

An LED has two terminals:

  1. Anode (+)
  2. Cathode (−)

For a typical through-hole LED:

  1. Longer leg → Anode
  2. Shorter leg → Cathode

Many LEDs also have a flat edge on the body that indicates the cathode side.

LED with Arduino

A typical connection is:

Arduino Digital Pin → Resistor → LED → GND

The resistor is important because it limits the current through the LED.

Important Point

An LED is a polarized component. It normally needs to be connected in the correct direction.

3. Push Button

A push button is an input component that allows a user to send a signal to a microcontroller.

When the button is pressed, the electrical connection changes.

Common Uses

Push buttons can be used for:

  1. Turning an LED ON or OFF
  2. Starting a program
  3. Stopping a motor
  4. Selecting a mode
  5. Sending commands
  6. Resetting a system

Example

We can create a simple circuit:

Push Button → Arduino Digital Pin

The Arduino can detect whether the button is pressed.

For example:

Button pressed → LED ON

Button released → LED OFF

Pull-Up and Pull-Down Resistors

A digital input should not be left floating.

We commonly use:

  1. Pull-up resistor
  2. Pull-down resistor

Arduino also provides an internal pull-up resistor that can be enabled in software.

This makes push-button projects easier to build.

4. Potentiometer

A potentiometer is a variable resistor.

Unlike a normal resistor, its resistance can be changed by turning a knob or shaft.

A typical potentiometer has three terminals.

Potentiometer Terminals

The two outer terminals are connected to the ends of the resistive element.

The middle terminal is connected to the wiper.

The wiper position changes as the knob is rotated.

Common Uses

Potentiometers are used for:

  1. Volume control
  2. Brightness control
  3. Speed control
  4. Setting thresholds
  5. Reading user input
  6. Adjusting sensor values

Arduino Example

A potentiometer can be connected like this:

5V → Potentiometer → GND

The middle pin goes to an Arduino analog input.

The Arduino reads the changing voltage and converts it into a numerical value.

For example:

Turn knob → Voltage changes → Analog reading changes

This is one of the easiest ways to learn about analog input.

5. Capacitor

A capacitor is an electronic component that stores electrical energy temporarily.

Capacitance is measured in Farads (F).

Common capacitor units include:

  1. µF (microfarad)
  2. nF (nanofarad)
  3. pF (picofarad)

What is a Capacitor Used For?

Capacitors are commonly used for:

  1. Smoothing voltage
  2. Reducing electrical noise
  3. Filtering signals
  4. Temporary energy storage
  5. Stabilizing power supplies
  6. Timing circuits

Example

When a microcontroller circuit is powered, electrical noise can sometimes appear on the power supply.

A capacitor placed near the power pins can help reduce this noise.

Common Capacitor Values

Some common values include:

  1. 100nF
  2. 1µF
  3. 10µF
  4. 100µF

Important Point

Some capacitors are polarized.

Electrolytic capacitors commonly have a positive and negative side, so they must be connected correctly.

6. Diode

A diode is a semiconductor component that mainly allows current to flow in one direction.

It can be thought of as an electrical one-way valve.

Diode Terminals

A diode has two terminals:

  1. Anode
  2. Cathode

Current can normally flow from the anode toward the cathode when the diode is forward biased.

Common Uses

Diodes are used for:

  1. Protecting circuits
  2. Rectification
  3. Preventing reverse current
  4. Signal processing
  5. Protecting microcontrollers from inductive voltage

Flyback Diode

A diode is especially important when controlling components such as:

  1. Relays
  2. Motors
  3. Solenoids

These components are inductive and can generate a voltage spike when switched off.

A flyback diode can help protect the switching component from this spike.

7. Transistor

A transistor is a semiconductor device that can be used for switching or amplifying electrical signals.

In Arduino and IoT projects, one of the most common uses is switching a load that the microcontroller cannot drive directly.

Why Do We Need a Transistor?

An Arduino or ESP32 GPIO can provide only a limited amount of current.

Suppose we want to control:

  1. A motor
  2. A pump
  3. A buzzer
  4. A strip of LEDs

The microcontroller may not be able to power the load directly.

A transistor can act as an electronic switch.

Basic Concept

Arduino GPIO → Transistor → Load

The Arduino controls the transistor, and the transistor controls the larger load current.

Common Types

Two common transistor families are:

  1. BJT
  2. MOSFET

For many modern IoT projects, MOSFETs are particularly useful for efficiently switching DC loads.

Important Point

The exact transistor circuit depends on the type of transistor and the load being controlled.

8. Relay

A relay is an electrically controlled switch.

It allows a low-voltage control circuit to switch another electrical circuit.

Why Do We Use a Relay?

Relays can be used to control:

  1. Water pumps
  2. Motors
  3. Lights
  4. Fans
  5. Solenoid valves
  6. Other electrical loads

For example:

ESP32 → Relay → Water Pump

The ESP32 controls the relay, and the relay switches the pump circuit.

Relay Module

For Arduino projects, we commonly use a relay module instead of connecting a bare relay directly.

A relay module often includes supporting components such as a transistor driver and protection diode.

Relay Terminals

A typical relay has:

  1. COM → Common
  2. NO → Normally Open
  3. NC → Normally Closed

Understanding NO and NC

Normally Open (NO) means the connection is open when the relay is not activated.

Normally Closed (NC) means the connection is closed when the relay is not activated.

Important Safety Note

Relays are sometimes used to switch high-voltage AC loads.

Never connect household mains voltage to a relay circuit as a beginner. High-voltage wiring requires appropriate training, isolation, protection, and supervision.

9. Buzzer

A buzzer is an output component that produces sound.

Buzzers are commonly used to provide audio indications.

Common Uses

A buzzer can be used for:

  1. Alarm systems
  2. Warning notifications
  3. Button feedback
  4. Sensor alerts
  5. Security systems
  6. Timer notifications

Example

In a soil monitoring project:

Soil is very dry → Buzzer ON

Soil has enough moisture → Buzzer OFF

Types of Buzzers

There are two common types:

  1. Active buzzer
  2. Passive buzzer

An active buzzer generally produces a tone when suitable DC power is applied.

A passive buzzer can be driven with a changing signal to produce different tones.

This makes passive buzzers useful for generating melodies or different sound frequencies.

10. Breadboard

A breadboard is a tool that allows us to build electronic circuits without soldering.

It is extremely useful when learning Arduino and electronics.

Why Do We Use a Breadboard?

A breadboard allows us to:

  1. Connect components quickly
  2. Test circuits
  3. Change wiring easily
  4. Experiment with different components
  5. Build temporary prototypes

Breadboard Structure

A typical breadboard contains groups of connected holes.

The holes in the central area are internally connected in small groups.

The side power rails are commonly used for:

  1. VCC / positive supply
  2. GND / negative supply

However, the exact internal layout can vary between breadboard models, so it is important to understand the particular breadboard you are using.

Important Point

The holes in a breadboard are not all connected together.

Understanding which holes are electrically connected is very important when building a circuit.