Sensors are the eyes and ears of any IoT project. They convert physical quantities (temperature, distance, light, gas concentration) into electrical signals that a microcontroller can read. Choosing the right sensor—and understanding how it works—is critical for accurate, reliable IoT systems.
| Sensor | Measures | Output | Interface | Price | |--------|---------|--------|-----------|-------| | DHT11 | Temp, humidity | Digital | Single-wire | ₹60 | | DHT22 | Temp, humidity (higher accuracy) | Digital | Single-wire | ₹200 | | MQ-2 | LPG, smoke, methane | Analog | ADC | ₹100 | | MQ-135 | CO2, NH3, benzene | Analog | ADC | ₹120 | | HC-SR04 | Distance (2–400 cm) | Digital (pulse) | Trigger/Echo | ₹60 | | PIR (HC-SR501) | Motion | Digital (HIGH/LOW) | GPIO | ₹50 | | Soil moisture | Water content | Analog | ADC | ₹40 | | BMP280 | Pressure, altitude, temp | Digital | I2C/SPI | ₹150 | | LDR | Light intensity | Analog | Voltage divider | ₹10 |
Uses a capacitive humidity element and a thermistor. Sends data as a 40-bit digital signal on a single wire. The DHT22 is more accurate (±0.5°C vs ±2°C) and has a wider range (-40 to 80°C vs 0 to 50°C). Use a 10kΩ pull-up resistor on the data line.
Contain a tin dioxide (SnO2) semiconductor that changes resistance when exposed to target gases. Require a preheat time of 24–48 hours for accurate readings. Output an analog voltage proportional to gas concentration. Use the analog pin for precise readings or the digital pin for threshold-based alarms.
Sends a 40 kHz ultrasonic pulse from the Trigger pin. The Echo pin goes HIGH for a duration proportional to the distance. Calculate distance using: Distance = (echo time × 0.034) / 2 (in cm). Effective range: 2 cm to 400 cm. Accuracy: ±3 mm.
Detects changes in infrared radiation caused by moving warm bodies (humans, animals). The HC-SR501 module has adjustable sensitivity and delay time via onboard potentiometers. Outputs HIGH when motion is detected. Ideal for security and automatic lighting.
Two probes measure the resistance of soil—wet soil conducts better than dry soil. Output decreases as moisture increases. Prone to corrosion over time; consider capacitive soil moisture sensors for long-term outdoor use.
All sensors output analog or digital signals read by Arduino/ESP32. Browse Sensor Projects.
Explore our collection of DIY kits and components. All project components mentioned in this guide are available in our store.
Browse All Projects