AM2301 (DHT21) wired temperature + humidity with ESP32
Supply 3.3-5 V
Bus ONEWIRE
Measures temperature, humidity
Pins and ESP32 wiring
| Pin | Role | ESP32 pin | Notes |
|---|---|---|---|
| VCC | Power | 3V3 | Red wire |
| GND | Ground | GND | Black wire |
| DATA | One-wire data | D25 | Yellow wire. Add a 4.7 to 10 kΩ pull-up to 3.3 V if readings fail |
Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.
Sources
- Aosong AM2301 datasheet, Wires: red VDD, yellow data, black GND; supply 3.3 to 5.2 V; single-bus protocol like DHT22
Try it in 3D in BoardPilot
Related parts
DHT11 temperature + humidityDHT22 (AM2302) temperature + humidityDS18B20 module (KY-001 style)DS18B20 temperature sensor (TO-92)DS18B20 waterproof temperature probe
Part data: CC BY 4.0, free to reuse with credit to BoardPilot.