You Want Electronic Components for your project. 

For more information, contact us at: 

Identify and Categorise Common Sensors and Actuators Used in IoT


Lesson 4.1 — Identify and Categorise Common Sensors and Actuators Used in IoT

IoT systems interact with the physical world through two classes of component: sensors that perceive the world, and actuators that act upon it.

What is a Sensor?

A sensor is a device that detects a physical, chemical, or environmental condition and converts it into an electrical signal that a microcontroller can process. Sensors are the IoT system’s perception layer.

KEY
Sensor = Physical input → Electrical output. The electrical output can be digital (on/off), analog (continuous voltage), or a serial protocol (I2C, SPI, OneWire, UART).

Sensor Classification

1. By Measurand (What is being measured)

Category Examples Typical IoT Applications
Environmental Temperature, humidity, pressure, altitude, light, UV radiation, rainfall Weather stations, HVAC, greenhouses
Chemical / Gas CO2, CO, methane, LPG, smoke, air quality index, VOCs Safety alarms, air quality monitors, smart kitchens
Motion / Position Acceleration, gyroscope, orientation, displacement, proximity, distance Wearables, vehicle tracking, robotics, gesture control
Biological Heart rate, SpO2, body temperature, galvanic skin response Health monitoring, fitness bands, patient monitors
Electrical Voltage, current, power, energy consumption Smart meters, solar monitoring, industrial energy management
Mechanical Force, pressure, vibration, torque, flow rate, level Industrial IoT, water management, structural monitoring
Optical Visible light, infrared, colour detection, laser distance Security cameras, gesture sensors, spectroscopy
Acoustic Sound level (dB), ultrasonic distance, seismic activity Noise monitoring, proximity detection, earthquake sensors

2. By Signal Output Type

Output type Description and examples
Digital output Two states only: HIGH or LOW. Examples: PIR motion sensor, reed switch, button, door sensor. Read with digitalRead().
Analog output Continuous voltage proportional to measurand. Examples: LDR, NTC thermistor, soil moisture, potentiometer. Read with analogRead().
Serial — OneWire Single-wire digital protocol. Examples: DS18B20 temperature sensor. Supports multiple devices on one wire.
Serial — I2C Two-wire bus (SDA+SCL). Examples: BME280, MPU6050, SSD1306. Multiple devices share the bus.
Serial — SPI Four-wire bus (MOSI, MISO, SCK, CS). Examples: MAX6675 thermocouple, SD card. Fast and reliable.
Serial — UART Two-wire (TX, RX). Examples: GPS module (NEO-6M), fingerprint sensor, GSM modem.

3. By Power and Sensitivity

Type Description and examples
Active sensors Require their own power supply to operate. Most digital sensors are active. Examples: PIR, ultrasonic, GPS.
Passive sensors Derive energy from the measurand itself. Examples: thermocouple (generates voltage from heat), solar cell.
Contact sensors Must physically touch the subject. Examples: temperature probe, soil moisture probe.
Non-contact sensors Measure without physical contact. Examples: infrared temperature sensor, ultrasonic distance, PIR motion.

Sensor Reference Catalogue

DHT22 — Temperature & Humidity Sensor
Measurand Temperature: −40 to +80°C (±0.5°C)  |  Humidity: 0–100% RH (±2%)
Signal type Digital single-wire (proprietary protocol) — read with DHT library
Voltage 3.3–5 V
Sampling rate Max 1 reading per 2 seconds
IoT use cases Weather stations, HVAC systems, greenhouse monitoring, cold chain tracking
Key library Adafruit DHT (Arduino) | Built-in dht module (MicroPython)
HC-SR04 — Ultrasonic Distance Sensor
Measurand Distance: 2 cm – 400 cm (±3 mm accuracy)
Signal type Digital trigger pulse (TRIG) → echo pulse (ECHO). Measure echo pulse width = distance
Voltage 5 V (use voltage divider on ECHO pin if connecting to 3.3 V ESP32!)
Working principle Emits 40 kHz ultrasonic burst; times the echo return
IoT use cases Bin fill-level detection, water tank level, obstacle avoidance, parking sensors
Formula Distance (cm) = pulseIn(ECHO, HIGH) × 0.0343 / 2
HC-SR501 — PIR Motion Sensor
Measurand Human/animal motion via infrared radiation change
Signal type Digital output: HIGH when motion detected, LOW when idle
Voltage 5–12 V (onboard regulator)
Detection range Up to 7 m, 120° cone angle. Two potentiometers: sensitivity + time delay.
IoT use cases Security alarms, automatic lighting, occupancy detection, power-saving (wake-on-motion)
Warm-up time 60 seconds after power-on before reliable detection begins
MQ-2 — Gas / Smoke Sensor
Detects LPG, propane, methane, hydrogen, smoke, alcohol vapour
Signal type Analog output (AO) and digital output (DO with adjustable threshold)
Voltage 5 V. Sensor element gets HOT during use — do not touch!
Warm-up time 20–48 hours for first use; 2–5 minutes for subsequent uses
IoT use cases Kitchen gas leak alarms, fire detection, industrial safety, smart ventilation
LDR — Light Dependent Resistor
Measurand Ambient light intensity (lux)
Signal type Resistance varies inversely with light. Use in voltage divider for analog output.
Circuit VCC → LDR → junction (analog pin) → 10 kΩ resistor → GND
IoT use cases Automatic street lights, display brightness control, plant light monitoring, day/night detection
Limitation Not calibrated in lux. For accurate lux measurements use BH1750 (I2C dedicated light sensor).
DS18B20 — Waterproof Temperature Probe
Measurand Temperature: −55°C to +125°C (±0.5°C accuracy)
Signal type 1-Wire digital protocol. Unique 64-bit address per sensor. Multiple on one wire.
Voltage 3.0–5.5 V. Pull-up resistor: 4.7 kΩ between DATA and VCC.
IoT use cases Water temperature, pipeline monitoring, food storage, soil temperature, cold chain
Key library DallasTemperature + OneWire (Arduino)
Advantage Waterproof probe — can be submerged directly in water, soil, or food.
MPU-6050 — 6-Axis IMU (I2C)
Measurand 3-axis acceleration (m/s²) + 3-axis angular velocity (deg/s)
Signal type I2C (address 0x68 or 0x69)
Voltage 3.3–5 V
IoT use cases Fall detection (elderly care), vehicle tracking, vibration monitoring, gesture control, drone stabilisation
Key library Adafruit MPU6050 or MPU6050 by Electronic Cats (Arduino)
BH1750 — Ambient Light Sensor (I2C, calibrated lux)
Measurand Illuminance: 1–65535 lux (±20% accuracy)
Signal type I2C (address 0x23 or 0x5C)
Advantage Returns calibrated lux values directly — no voltage divider or manual calibration needed
IoT use cases Smart lighting control, plant growth optimisation, building energy management
Key library BH1750 by Christopher Laws (Arduino)

What is an Actuator?

An actuator is a device that converts an electrical signal into a physical action. It is the IoT system’s output layer — the component that affects the physical world in response to processed sensor data.

KEY
Actuator = Electrical input → Physical output. Types include: light, sound, motion (rotation, linear, vibration), fluid control (valves, pumps), thermal (heaters, fans), and electromagnetic (relays, solenoids).

Actuator Classification and Reference Catalogue

Actuator Output type Control Key notes
LED Visible light Digital on/off or PWM brightness Standard 5mm LED: 20 mA max. Always use series resistor.
Relay Module Mains switching (230 V AC / high DC) 3.3–5 V digital signal. Most modules are active-LOW. NO / NC / COM contacts. Galvanic isolation from mains. NEVER touch mains connections.
Buzzer Sound output Active: digitalWrite(HIGH). Passive: tone(pin, freq) Active buzzes at fixed frequency; passive needs PWM tone signal.
DC Motor + L298N Continuous rotation ENA: PWM speed. IN1/IN2: direction. Motor supply: 5–35 V Always add flyback diodes. Use separate motor power supply from MCU.
Servo Motor Positional rotation 0–180° PWM 50 Hz, 1–2 ms pulse. servo.write(angle) Power from 5 V dedicated supply. SG90: 1.8 kg·cm. MG995: 13 kg·cm.
Solenoid Valve Fluid flow control (open/close) 12 V coil via relay or MOSFET. Too much current for direct GPIO. ALWAYS add flyback diode across coil. Use external 12 V supply.

Sensor vs Actuator Summary

Property Sensor Actuator
Direction Input → MCU (perceives the world) MCU → Output (acts on the world)
Signal Provides data (voltage, digital state, serial packet) Receives command (digital, PWM, relay trigger)
Power role Usually low current (≤ 20 mA GPIO) Often high current (may need driver circuit)
MCU protection Pull-up/pull-down resistors for digital inputs Flyback diodes, optocouplers for inductive loads

Check Your Understanding — Lesson 4.1

?
1. A smart greenhouse needs to monitor temperature, humidity, CO2 level, soil moisture, and light intensity. For each measurand, name a suitable sensor, its output type (analog/digital/serial), and its communication interface.

?
2. Explain why a relay module is needed to control a 230 V AC water pump from an ESP32, rather than connecting the pump directly to a GPIO pin.

?
3. What is the difference between an active buzzer and a passive buzzer? Write the single line of Arduino code needed to activate each type on pin 8.

I'm an Embedded & AIoT Systems Engineer and the Founder & CEO of Nyereka Tech, a Rwanda-based startup enabling access to STEM tools, training, and innovation. I'm passionate about empowering young innovators through practical technology education and local manufacturing solutions.