🔌 IoT Sensors – Complete Guide

18 essential sensors every maker needs to know — from beginner to advanced

🌐 IoT 📡 Sensors ⚡ ESP32 📟 Arduino 🛠️ Projects 🍇 Pi Project 🖥️ Raspberry Pi 💀 Kali Linux
🌡️ 1. Temperature & Humidity Sensors
Beginner

#1 DHT11 / DHT22

✅ Measure temperature & humidity

  • Room weather monitoring system
  • Smart fan controller
  • IoT climate monitoring

💡 Better accuracy → DHT22

Intermediate

#2 LM35 Temperature Sensor

✅ Accurate analog temperature measurement

  • Body temperature monitor
  • Overheat detection system
🌞 2. Light Sensors
Beginner

#3 LDR (Photoresistor)

✅ Detect light intensity

  • Automatic street light
  • Solar tracking system
Advanced

#4 BH1750 (Digital Light Sensor)

✅ Accurate lux measurement

  • Smart farming
  • Indoor light monitoring system
📏 3. Distance Sensors
Beginner

#5 HC-SR04 Ultrasonic Sensor

✅ Measure distance using sound waves

  • Obstacle avoiding robot
  • Smart parking system
  • Water level indicator
Intermediate

#6 IR Sensor

✅ Object detection

  • Line follower robot
  • Automatic door
🚶 4. Motion & Human Detection
Intermediate

#7 PIR Sensor

✅ Detect human motion

  • Security alarm system
  • Automatic light control
Advanced

#8 Accelerometer (MPU6050)

✅ Detect movement & tilt

  • Fall detection system
  • Drone stabilization
  • Step counter
💨 5. Gas & Environmental Sensors
Intermediate

#9 MQ-2 Gas Sensor

✅ Detect LPG, smoke, methane

  • Gas leakage alarm
  • Smart kitchen safety system
Advanced

#10 BMP280 (Pressure Sensor)

✅ Measure atmospheric pressure & altitude

  • Weather station
  • Altitude measurement
💓 6. Biomedical Sensors
Intermediate

#11 Pulse Sensor

✅ Measure heart rate

  • Wearable health monitoring system
Advanced

#12 MAX30100 / MAX30102

✅ Heart rate + SpO2 measurement

  • Smart health band
  • Patient monitoring device
💧 7. Liquid & Water Sensors
Beginner

#13 Water Level Sensor

✅ Detect water presence or level

  • Tank overflow alert
Intermediate

#14 Soil Moisture Sensor

✅ Measure soil water content

  • Smart irrigation system
🔊 8. Sound Sensors
Beginner

#15 Microphone / Sound Sensor Module

✅ Detect sound intensity

  • Clap switch
  • Noise monitoring system
🧭 9. Magnetic & Position Sensors
Intermediate

#16 Hall Effect Sensor

✅ Detect magnetic field

  • Speed measurement
  • Door open/close detection
🔥 10. Touch & Force Sensors
Beginner

#17 Capacitive Touch Sensor

✅ Detect human touch

  • Touch-based switch panel
Intermediate

#18 Force Sensitive Resistor (FSR)

✅ Measure pressure

  • Smart weighing system
  • Medical pressure monitoring
🎯 Important Sensors for IoT Projects
SensorBest Use Case
DHT22Weather Station
LDRSmart Lighting
PIRHome Security
Ultrasonic (HC-SR04)Robotics
Soil MoistureAgriculture
MAX30102Health Monitoring
MQ-2Safety Systems
🏆 Beginner → Advanced Sensor Path

🟢 Beginner

  • LDR
  • DHT11
  • Ultrasonic (HC-SR04)

🟡 Intermediate

  • PIR
  • MQ-2
  • Soil Moisture

🔴 Advanced

  • MPU6050
  • MAX30102
  • BMP280

🌡️ DHT11 Temperature & Humidity Sensor – Full Details

The DHT11 is a low-cost digital sensor used to measure temperature and relative humidity. It is commonly used in beginner electronics and IoT projects with microcontrollers like Arduino Uno, ESP8266, and Raspberry Pi.

📌 1. Basic Overview

FeatureDescription
Sensor TypeDigital Temperature & Humidity Sensor
OutputDigital signal (Single-wire protocol)
Operating Voltage3.3V – 5V
Temperature Range0°C to 50°C
Humidity Range20% to 90% RH
Accuracy±2°C (Temp), ±5% RH
Sampling Rate1 reading per second
CostVery low (₹50–₹150 approx.)

📌 2. Pin Configuration

DHT11 has 4 pins (when looking at the front grill side):

PinNameDescription
1VCC3.3V or 5V supply
2DATASerial Data output
3NCNot Connected
4GNDGround

⚠️ Important: If using the bare sensor (not module), you need a 10kΩ pull-up resistor between VCC and DATA.

📌 3. Working Principle

The DHT11 contains:

  • 🧪 Capacitive Humidity Sensor
  • 🌡️ NTC Thermistor (Temperature Sensor)
  • 🔄 8-bit Microcontroller inside

🔹 Humidity Measurement

Uses a capacitive humidity sensing element.
Changes in humidity → change in capacitance → converted to digital signal.

🔹 Temperature Measurement

Uses an NTC thermistor.
Temperature change → resistance change → converted to digital signal.

The internal microcontroller processes both values and sends 40-bit digital data.

🔌 How to Connect with Arduino

DHT11 Arduino ┌───────┐ │ VCC │ ──────────▶ 5V │ DATA │ ──────────▶ Digital Pin 2 │ NC │ (not connected) │ GND │ ──────────▶ GND └───────┘ │ 10kΩ Pull-up (VCC ↔ DATA)
DHT11 PinArduino Pin
VCC5V
GNDGND
DATADigital Pin 2

💻 Sample Arduino Code

#include <DHT.h>

#define DHTPIN 2
#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(9600);
  dht.begin();
}

void loop() {
  float h = dht.readHumidity();
  float t = dht.readTemperature();

  Serial.print("Humidity: ");
  Serial.print(h);
  Serial.print(" %  Temperature: ");
  Serial.print(t);
  Serial.println(" °C");

  delay(2000);
}

📦 You must install DHT sensor library from Arduino Library Manager.

📌 Advantages

  • ✅ Very cheap
  • ✅ Easy to interface
  • ✅ No ADC required (digital output)
  • ✅ Good for beginners

📌 Limitations

  • ❌ Low accuracy
  • ❌ Slow response
  • ❌ Small temperature range
  • ❌ Not suitable for industrial use

⚖️ Comparison: DHT11 vs DHT22

FeatureDHT11DHT22
Temp Range0–50°C-40–80°C
Humidity Range20–90%0–100%
Accuracy±2°C±0.5°C
CostCheapSlightly expensive

💡 If you need better accuracy → choose DHT22.

🚀 Applications

🌡️ Weather monitoring systems
🏠 Smart home automation
🌱 Greenhouse monitoring
🖥️ IoT projects
🧪 Basic lab experiments

🛠️ Real-Life Example Projects

📺 Room temperature display
🌐 IoT weather station using ESP32
🌀 Smart fan controller
☁️ Cloud data logging system