Specifications
| Type | Aosong DHT11 temperature and humidity sensor on a TinkerBlock board, with its pull-up fitted |
|---|---|
| Temperature | 0 to 50 °C, ±2 °C, in steps of 1 °C |
| Humidity | 20 to 80 % RH, ±5 %, in steps of 1 %. The datasheet allows 20 to 90 % at 25 °C, narrowing to 20 to 80 % at 50 °C |
| Supply voltage | 3 to 5.5 V. Whatever you feed VCC is what the data line idles at |
| Sample rate | One reading a second at most (datasheet); one every 2 s through Adafruit's library, which answers from memory in between |
| Response time | 6 to 30 s for temperature to get two thirds of the way after a change; 6 to 15 s for humidity (datasheet) |
| Current | 0.5 to 2.5 mA while measuring, 100 to 150 µA on standby |
| Interface | Aosong's single-wire protocol: an 18 ms start pulse, then forty bits. No addresses, so not I2C and not Dallas 1-Wire; one pin per sensor |
| Pull-up resistor | 10 kΩ from VCC to DATA, fitted |
| Pins to wire | 3 of the 4: GND, VCC and DATA. NC is connected to nothing on the board |
| Header | 4-pin right-angle male, 2.54 mm pitch: GND, VCC, NC, DATA, with GND on the square pad. A second row of 2.0 mm holes carries the same nets |
| Board | 22.4 × 30.4 mm, two 4.8 mm mounting holes 16 mm apart. The DHT11 lies flat, grille up. The back prints TK38 DHT11 and 0-50°C AND 20-80% RH |
| In the box | 1 × TK38 block. It also ships in the DHT sensor kit and the TinkerBlock kits |
What it does
Two numbers on one wire. The blue DHT11 holds a humidity element, a thermistor and a small microcontroller that reads both, applies its factory calibration and sends the result as forty bits when your board asks. There is nothing analog to wire and nothing to calibrate.
It reports whole degrees from 0 to 50 °C, to ±2 °C, and whole per cent from 20 to 80 % RH, to ±5 %. That suits a room, a greenhouse bench or a first project on the protocol. For tenths of a degree or anything below freezing, the TK39's DHT22 takes the same wiring.
The board


Three nets. GND and VCC go to the sensor; DATA goes to the sensor and to R1, a 10 kΩ pull-up from VCC that is already fitted. NC is in no net. The row of 2.0 mm holes above the header carries the same nets for a cable.
Wiring, in four lines
- GND to your board's GND.
- VCC to 3V3 on an ESP32, ESP32-S3 or Pico; to 5V on an Uno.
- DATA to D2 on an Uno, GPIO 18 on an ESP32, GPIO 4 on an ESP32-S3, GP2 on a Pico.
- NC to nothing: it is connected to nothing on the board.
Example
Install DHT sensor library by Adafruit from the Library Manager, and accept Adafruit Unified Sensor with it. MicroPython has a DHT11 driver built in.
#include <DHT.h>
// Uno: 2. ESP32: 18. ESP32-S3: 4. Pico: 2.
#define DHT_PIN 2
#define DHT_TYPE DHT11 // the TK38 is a DHT11
DHT dht(DHT_PIN, DHT_TYPE);
void setup() {
Serial.begin(115200);
dht.begin();
delay(1000); // nothing for 1 s after power-up
}
void loop() {
float humidity = dht.readHumidity();
float celsius = dht.readTemperature();
if (isnan(humidity) || isnan(celsius)) {
Serial.println("read failed");
} else {
Serial.print(celsius, 0);
Serial.print(" C ");
Serial.print(humidity, 0);
Serial.println(" %");
}
delay(2000); // the library answers from memory inside 2 s
}import dht, machine, time
# ESP32: 18. ESP32-S3: 4. Pico: 2.
sensor = dht.DHT11(machine.Pin(4))
time.sleep(1)
while True:
try:
sensor.measure()
print(sensor.temperature(), "C ", sensor.humidity(), "%")
except Exception: # no answer, or a bad checksum
print("read failed")
time.sleep(2)Where to start
The handbook below is nine short articles, each with a working figure. The first reading is the whole build, and the four pins is the one page about the header.
For how it works, read the start and the answer and forty bits and a checksum. Before wiring VCC beside a 3.3 V board, 3.3 V or 5 V. If it prints nothing useful, when every reading is nan.
When it doesn’t work
- Every reading is nan.
- Nothing answered. Count the header from the square pad, GND, VCC, NC, DATA: the third pin is connected to nothing, and one place out looks exactly like a dead sensor. Then check the sketch says DHT11. Declared as a DHT22, the DHT11 gets a start pulse about eighteen times too short and usually never wakes.
- It prints numbers in the hundreds.
- The wiring is right and the sketch says DHT22. The DHT11's bytes pass their checksum and are decoded as a DHT22's, so 23 °C prints as 588.8. Change DHT_TYPE to DHT11.
- Should VCC go to 3V3 or 5V?
- To whatever your board's pins run at: 3V3 on an ESP32, ESP32-S3 or Pico, 5V on an Uno. The board's 10 kΩ pull-up ties DATA to VCC, so from 5 V the data line idles at 5 V against a 3.3 V pin. The DHT11 runs anywhere from 3 to 5.5 V.
- The temperature only changes in whole degrees.
- That is the DHT11's resolution, 1 °C and 1 %. For tenths, and for readings below 0 °C, the TK39 carries a DHT22 on the same header.
- The reading never changes.
- Either you read faster than every two seconds, and Adafruit's library hands back its stored value, or the room has not moved a whole degree. Read on a millis() timer, and breathe on the sensor to check: the humidity climbs within ten seconds or so.
- It reads two degrees higher than my thermometer.
- The sensor is measuring what it is plugged into. Move the block away from regulators and USB sockets on three long wires and give it a few minutes. The DHT11 is also only good to ±2 °C.

