Two numbers, one pin
Under the blue grille are a humidity element, a temperature element and a small microcontroller that reads both. That last part is why one ordinary digital pin is enough, and why the numbers arrive already calibrated and already rounded to whole degrees and whole per cent.
The board in your hand

The blue part is the DHT11, made by Aosong. Its leads are bent through 90° and soldered in a column at the right, so it lies flat with its vents facing up. Air gets in through the vents; the two things measuring it stay inside.
What is behind the grille
Aosong's datasheet names three parts. The humidity element is a film whose electrical resistance drops as it takes up water from the air. The temperature element is an NTC thermistor, a resistor whose resistance drops as it warms. The third part is an 8-bit microcontroller that reads both.
Neither element gives a number on its own. Each would need a reference, an amplifier and a calibration table before it meant anything. The microcontroller does all of that inside the cage, applies the calibration stored at the factory, and sends the result as forty bits down one wire.
What that buys you, and what it costs
No analog wiring, no reference voltage, no resistor to calculate and nothing to calibrate. Three wires, one of which carries the answer.
It also fixes the precision. The DHT11 reports whole degrees and whole per cent, and the datasheet gives ±2 °C and ±5 % RH over its range. A reading of 23 °C means somewhere from 21 to 25. Nothing you send it changes that.
| DHT11 on the TK38 | |
|---|---|
| Temperature | 0 to 50 °C, ±2 °C, in steps of 1 °C |
| Humidity | 20 to 80 % RH, ±5 %, in steps of 1 % |
| A new reading | at most once a second |
The humidity range narrows as it warms: 30 to 90 % at 0 °C, 20 to 90 % at
25 °C, 20 to 80 % at 50 °C. The back of the board prints the safe figure,
0-50°C AND 20-80% RH.
What "humidity" means here
The DHT11 reports relative humidity: how close the air is to holding as much water as it can at its current temperature. The limit moves with temperature, so the same air can read 40 % in a warm room and 80 % once it has cooled, without any water arriving or leaving. That is also why a sensor reading two degrees warm reads a few per cent dry.
When the range or the step is not enough, below freezing or for tenths of a degree, the TK39 carries a DHT22 on the same header: DHT11 or DHT22.
When it does not work
No, and there is nothing analog to read. Both elements are wired to the sensor's own microcontroller, not to the header. What comes out of DATA is a digital pattern, so analogRead on it returns whatever the line happened to be sitting at.
No. Each DHT11 is calibrated at the factory and the sensor applies the result before it sends anything. You cannot adjust it from outside. A sensor that reads consistently high is usually sitting next to something warm, which is a placement problem rather than a calibration one.
The DHT11's resolution is 1 °C and 1 % RH, so a room warming slowly shows nothing and then jumps a degree. It is not a fault and there is no setting for it. The DHT22 on the TK39 reports tenths.
No. Relative humidity is how full the air is compared with how much it could hold at its current temperature, so the same air reads differently as it warms and cools. The DHT11 reports the relative figure.
Edit this page — content/books/dht11/two-numbers-one-pin.mdx
Questions about this product
See what other owners have asked, and read their solutions.
DHT11 Temperature and Humidity Sensor
Loading discussions…
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.