Introduction

Arduino and ESP32 starter kits often come with a few common sensors that are popular among beginners. These sensors are easy to use and can be found in many beginner projects, but they are also highly unreliable. This article will explore the issues with these sensors and why they should be used with caution for real projects.

These 5 sensors come in every starter kit — and I don’t trust any of them

DHT11 Sensor

The DHT11 is one of the most popular first sensors you might use with an Arduino or ESP32 project. It is cheap, easy to wire, but utterly mediocre. It is rated for just 20 to 80% relative humidity with ±5% accuracy and ±2°C on temperature, and it refuses to read below 0°C or under 20% humidity. Independent testing backs up this issue, with one long-term study finding that 38% of a DHT11's humidity readings fell outside its own specified range, and it reported those bad numbers with the same confidence as the good ones. Another accuracy study measured DHT11 error bands of 1 to 7% for temperature and a staggering 11 to 35% for humidity.

The DHT22 is better on paper, but in actuality, it can still be off by 20% or more. It is usable for a basic project where you don't need pinpoint accuracy or if you are learning about microcontrollers and sensors, but the data you are getting from these sensors is a suggestion at best.

The HC-SR04 is another extremely popular Arduino sensor that measures distance by timing an ultrasonic echo and dividing by the speed of sound. However, the speed of sound is not a constant, shifting about 2. 6% for every 10°C increase in air temperature, with humidity and air pressure further adding to the increase. These sensors are often measuring against a wildly wrong assumption before ever sending a ping.

Infrared Sensors

Infrared sensors that measure reflectivity, not distance, work very similarly to HC-SR04 ultrasonic sensors, except they use infrared light instead of sound. However, they also run into the same problems, they don't measure distance; they measure a proxy for it. That proxy falls apart fast. Black or dark, matte surfaces absorb infrared instead of reflecting it, so the sensor's effective range can drop from the rated 20 a 30 cm down to almost nothing. Bright ambient light or direct sunlight can also saturate the receiver, trigger false detections, or even wash out the real ones entirely.

Photoresistors

Photoresistors, also called LDRs, are cheap because manufacturing tolerance is loose, and that looseness shows up directly in your readings. These resistors can vary wildly between units, meaning one sensor can produce a completely different resistance value compared to another under the same lighting conditions. This happens because of manufacturing differences in the cadmium sulfide film used in these resistors. Even a strong overall correlation between resistance and light level (R² above 0. 99 in most studies) doesn't save you, because that curve shifts unit to unit. This means that a calibration you did on one photoresistor won't transfer to the next one out of the same bag. If you need anything more precise than a suggestion about the light level around the sensor, you need manual and tedious per-sensor calibration.

PIR sensors only work when you are moving. Sit still long enough, and the lights turn off. They are prone to false triggers from sudden temperature shifts, HVAC vents, or even bright sunlight moving across a window. Not to mention their accuracy significantly degrades in hot, humid conditions where ambient heat gets closer to human body temperature.

Conclusion

None of these sensors are useless. They are excellent teaching tools and, if you are willing to live with the quirks and unreliable data, a cheap way to add a physical interface to your project. They'll get you comfortable with GPIO pins, ADC readings, and basic signal processing, but that's about it. The mistake, however, is trusting their raw output as anything more than a suggestion. Any serious project needs averaging, outlier rejection, environmental compensation, or, frankly, a better sensor entirely, like an SHT31, a time-of-flight VL53L0X, or a proper lux meter IC such as the BH1750 to get accurate readings.

Comments