T11 and DHT22  are both temperature and humidity sensors, then what’s the difference between the two? Let’s go through the important differences and how they may affect which one you choose for your next project. These sensors are very basic and slow, but are great for hobbyists who want to do some basic data logging. The DHT sensors are made of two parts, a capacitive humidity sensor and a thermistor. There is also a very basic chip inside that does some analog to digital conversion and spits out a digital signal with the temperature and humidity. The digital signal is fairly easy to read using any microcontroller.

DHT11 vs DHT22
There are two versions of the DHT sensor, they look similar and have the same pinouts, but have different characteristics.

DHT11

  •     Ultra low cost
  •     3 to 5V power and I/O
  •     2.5mA max current use during conversion (while requesting data)
  •     Good for 20-80% humidity readings with 5% accuracy
  •     Good for 0-50°C temperature readings ±2°C accuracy
  •     No more than 1 Hz sampling rate (once every second)
  •     Body size 15.5mm x 12mm x 5.5mm
  •     4 pins with 0.1″ spacing

DHT22

  •     Low cost
  •     3 to 5V power and I/O
  •     2.5mA max current use during conversion (while requesting data)
  •     Good for 0-100% humidity readings with 2-5% accuracy
  •     Good for -40 to 80°C temperature readings ±0.5°C accuracy
  •     No more than 0.5 Hz sampling rate (once every 2 seconds)
  •     Body size 15.1mm x 25mm x 7.7mm
  •     4 pins with 0.1″ spacing

DHTxx Pinouts


DHT11 Sensor and Module Pinouts


DHTxx Data Format

When Humidity and Temperature sensor from sends data, it sends the MSB first. The 40bits of data is divided into 5 bytes. For DHT11 sensor 2nd and 4th byte is always Zero. The significance of these bytes is as follows:

  •     1st Byte: Relative Humidity Integral Data in % (Integer Part)
  •     2nd Byte: Relative Humidity Decimal Data in % (Fractional Part) – Zero for DHT11
  •     3rd Byte: Temperature Integral in Degree Celsius (Integer Part)
  •     4th Byte: Temperature in Decimal Data in % (Fractional Part) – Zero for DHT11
  •     5th Byte: Checksum (Last 8 bits of {1st Byte + 2nd Byte + 3rd Byte+ 4th Byte})


Purchase here:

DHT11 SENSOR

DHT11 MODULE