Humidity Sensor (DHT etc)
Sensor
A sensor that measures the amount of water vapor in the air. Commonly used for weather stations, HVAC systems, and environmental monitoring.
What it looks like
Humidity Sensor (DHT etc)
A typical sensor — exact shape, colour and markings vary between manufacturers.
Types & variants
Key specs
Relative humidity range
% RHMinimum to maximum humidity it can measure accurately (e.g., 20-80% RH for DHT11, 0-100% for DHT22).
Accuracy
% RHHow close the reading is to actual humidity (e.g., ±5% for DHT11, ±2% for DHT22).
Temperature range
°COperating temperature range (e.g., 0-50°C for DHT11, -40 to 80°C for DHT22).
Response time
secondsTime to stabilize after environment change (typically 1-2 seconds).
Interface
protocolCommunication protocol (digital: I2C or single-wire, analog: voltage output).
Markings
Most sensors have part number printed on the module (e.g., 'DHT11', 'AM2302'). Pin 1 is usually marked with a notch, square pad, or beveled edge.
Standard values
Relative humidity readings: 0-100% RH. Output voltage: typically 0-3V or 3-5V depending on supply voltage. Digital output varies by model.
How to choose
1) Determine required accuracy and range. 2) Check temperature operating range. 3) Select interface (digital/analog). 4) Consider power consumption. 5) Choose based on budget (DHT11 cheapest, BME280 most feature-rich).
Pinout & package
DHT11/DHT22 bare sensor — grille toward you, pins down
Check first: The bare sensor has 4 pins with pin 3 unused; breakout modules drop it and expose only VCC/DATA/GND. DATA needs a 4.7–10 kΩ pull-up to VCC unless the module already has one.
3 or 4-pin modules: VCC (power), DATA (signal), GND (ground). Some include NC (no connect). Packages vary: TO-46 metal can, plastic modules with PCB pins.
Example circuits
- Weather station with temperature and humidity display
- HVAC system control based on humidity levels
- Greenhouse monitoring and automated watering
- Data logger for environmental conditions
- Humidity-triggered dehumidifier
Common failures
Sensor drift over time (readings become inaccurate), condensation on sensor causing errors, physical damage to sensing element, corrosion on pins, failure of onboard electronics.
How to test
1) Connect to microcontroller and run example code. 2) Compare readings with known accurate device. 3) Place in environment with known humidity (e.g., sealed bag with damp cloth). 4) Check for stable readings. 5) Test temperature reading if available.
Substitutes
DHT11 can be replaced with DHT22 for better accuracy. Si7021 can replace DHT22 with I2C interface. BME280 adds pressure measurement. Analog humidity sensors (HM1500) can be used with ADC.