Top 10 sensor projects with Arduino and ESP32
The 10 best sensor projects: min-max thermometer, ultrasonic tape measure, air quality monitor, spirit level, RPM meter, weighing scale and a dust monitor, with code.
What are the best sensor projects?
Sensor projects teach you to turn a physical quantity into a number. The easiest are the min-max thermometer with LCD, the ultrasonic tape measure and the NTC thermistor thermometer. After those, try the MQ-135 air quality monitor, MPU6050 spirit level, optical tachometer and HX711 weighing scale.
- Projects
- 10 guided builds
- Levels
- Beginner, Intermediate
- Build time
- 45 min to 2 h
The 10 projects
We picked ten builds that each centre on a different sensor type (temperature, distance, gas, motion, speed, weight, pulse, dust).
Min-max thermometer with LCD
A DS18B20 probe shows the current temperature on a 16x2 LCD, along with the lowest and highest since reset.
Ultrasonic tape measure
An ultrasonic sensor and a button measure the distance to a wall and show it in centimetres and inches on an LCD.
Indoor air quality monitor with MQ-135
An MQ-135 gas sensor gives a relative air quality level on an OLED, with Good, Moderate and Poor bands against clean-air readings.
Digital spirit level with MPU6050
An MPU6050 accelerometer measures tilt in two axes and an OLED shows a bubble and the angles, like a spirit level.
Optical tachometer
Point an IR sensor at a reflective strip on a spinning shaft to read RPM.
Digital weighing scale
A 5 kg load cell and HX711 amplifier weigh objects to about a gram, with a tare button and readings on an LCD.
NTC thermistor thermometer
A thermistor in a divider gives a temperature reading that you calibrate against a known thermometer.
Bidirectional visitor counter with room light
Two IR sensors at a doorway tell whether someone walked in or out, count the people inside on an LCD, and switch a light on while the room is occupied.
Heart rate monitor with OLED
A MAX30102 sensor reads your pulse from a fingertip and an ESP32 shows beats per minute on an OLED.
PM2.5 dust monitor with PMS5003
A PMS5003 laser sensor measures PM1, PM2.5 and PM10 in µg/m³, and an ESP32 shows them on an OLED with India's AQI band for PM2.5.
Before you start
Every build has the full parts list, wiring table, tested code and troubleshooting. Check the circuit or sketch first in the code space or the circuit builder, then order parts with the Buy at Geekobot links on each project page. ElectroLark does not sell parts.
New to the basics? Take the free sensors actuators course, or browse all projects and final-year project briefs.
sensor projects: common questions
Which sensor is best to start with?
A temperature sensor or the HC-SR04 ultrasonic distance sensor. Both give clear readings and need only a few wires.
How accurate are hobby sensors?
Accuracy varies a lot. Always check the datasheet and, where it matters, compare against a known reference such as a multimeter or a thermometer.
What is the difference between analog and digital sensors?
An analog sensor gives a voltage you read with the ADC; a digital sensor sends the value over I2C, SPI, one-wire or serial. The component pages show which is which and how to wire them.
Can I use these for lab or mini projects?
Yes. They suit sensors and instrumentation labs and mini projects. Record readings, plot them and compare against a reference.
Where can I read how each sensor works?
Open the component library for pinouts, specs and example code for each sensor used.
