The DHT22 (also sold as AM2302) is the digital sensor at the heart of this garage build. It reports relative humidity and air temperature over a single data line, which keeps wiring simple when you need multiple zones. Understanding its behavior helps you interpret noisy readings and set realistic expectations compared with lab-grade equipment.
What the DHT22 measures
Each read returns humidity (0–100 %RH) and temperature (typically −40 to 80 °C spec range). The firmware converts values to Fahrenheit for JSON consumers while the LCD may show either scale. Readings represent the air pocket around the sensor body—not surface temperature of a pipe or concrete slab unless you mount the probe against that surface intentionally.
Datasheet accuracy is roughly ±0.5 °C and ±2–5 %RH under stable conditions. In drafty garages, rapid door openings can produce short spikes that are real air movement, not sensor failure. Compare with probe placement guidance before replacing hardware.
Timing and bus behavior
DHT22 sensors enforce a minimum interval between reads—often two seconds. The sketch polls on a timer and skips overlapping requests. Violating the interval returns stale or error values, which is why firmware includes retry logic described in DHT22 read errors and retries.
- Power: 3.3–5 V DC; share ground with the Arduino.
- Data: One GPIO per sensor with a pull-up resistor on the line.
- Cable length: Keep runs modest; long unshielded wires pick up noise.
- Enclosure: Ventilated housing avoids sun-heated stale air—see the mounting guide.
Where it fits in the stack
Probes feed the Arduino sketch, which publishes JSON consumed by the website. Follow the end-to-end data flow when debugging mismatches between LCD and web values. Pin-level wiring is documented in DHT22 data line wiring.