A bare DHT11 temperature and humidity sensor with 4 pins at 2.54 mm, so it fits a breadboard, stripboard or your own PCB. It sends both readings over one data wire to an Arduino, ESP32 or Raspberry Pi, on 3.3V or 5V. As a bare part it needs a pull-up resistor on the DATA pin, and pin 3 is not connected.
Specifications
Datasheets
What's in the box
Loose sensor in an anti-static bag. The pull-up resistor and wires are not included.
Great for
Wiring & getting started
- Find the pins
Hold the sensor with the grille towards you and the leads pointing down. From left to right the pins are 1 VCC, 2 DATA, 3 NC and 4 GND. Pin 3 is not connected inside, so leave it free.
- Power it from your board's logic voltage
Connect VCC to 5V on an Arduino Uno or Nano, or to 3.3V on an ESP32 or Raspberry Pi, and GND to GND. On 3.3V keep the wires to the sensor under about 1 m.
- Add the pull-up
Fit a 4.7k to 10k resistor between DATA and VCC, then connect DATA to a digital pin, such as D2 on an Arduino or GPIO4 on an ESP32. Our 600pc resistor kit has both values. If you would rather skip the resistor, our DHT22 module has the pull-up fitted.
- Read it
In the Arduino IDE install the DHT sensor library, set the type to DHT11 and open the DHTtester example. In ESPHome use the dht platform with model DHT11. Read every 2 seconds or slower, and ignore the first reading after power-up.
Note: The housing is vented, not sealed. Keep it out of rain, direct sun and condensation, and away from regulators or other warm parts, which push the temperature up and the humidity down.
