The DHT11 is a basic, low-cost digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air and outputs a digital signal on the data pin (no analog input needed).
| Feature | Details |
|---|---|
| Temperature Range | 0 to 50°C (±2°C accuracy) |
| Humidity Range | 20% to 90% RH (±5% accuracy) |
| Operating Voltage | 3V to 5.5V |
| Signal Type | Digital (single-wire serial) |
| Sampling Rate | 1 Hz (one reading per second) |
| Size | Small and lightweight |
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply (3.3V or 5V) |
| 2 | Data | Serial data output |
| 3 | NC | Not connected |
| 4 | GND | Ground |
(Sometimes it comes in a 3-pin module: VCC, DATA, GND)
Humidity Measurement: It uses a capacitive sensor to measure humidity.
Temperature Measurement: A thermistor changes resistance with temperature.
The sensor has a built-in microcontroller that converts analog signals to calibrated digital signals, sent to the microcontroller via one wire.
Weather stations
HVAC systems
Greenhouse monitoring
Home automation
IoT-based climate monitoring
ESP32
DHT11 sensor module
10kΩ pull-up resistor (if required)
Jumper wires
Breadboard
#include <DHT.h>
#define DHTPIN 2 // Pin where the DHT11 is connected
#define DHTTYPE DHT11 // Define the type of DHT sensor
DHT dht(DHTPIN, DHTTYPE); // Create DHT object
void setup() {
Serial.begin(9600);
dht.begin();
}
void loop() {
float h = dht.readHumidity();
float t = dht.readTemperature(); // Celsius
if (isnan(h) || isnan(t)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
Serial.print("Humidity: ");
Serial.print(h);
Serial.print(" %\t");
Serial.print("Temperature: ");
Serial.print(t);
Serial.println(" °C");
delay(2000); // Wait 2 seconds between readings
}
The DHT11 can only read once every 1 second (slow response rate).
Use a pull-up resistor (around 10kΩ) between the DATA and VCC lines if needed.
Avoid long cables to prevent signal degradation.
As per official documentation Step by step process for pico program run after power on:Save your pyt...
ESP32 Board are so popular? Mainly because of the following featuresLow-costBluetoothWiFiLow PowerDu...
Node MCU ESP8266 Board are so popular? Mainly because of the following features.Its true Arduino Kil...
π§ Basic IntroductionL298N is a dual H-Bridge motor driver IC that allows controlling the direction...
π§ Components Needed:ComponentQuantityESP32 Dev Board1L298N Motor Driver Module1DC Gear Motors (TT o...
The ADXL335 is a small, thin, low-power 3-axis analog accelerometer manufactured by Analog Devices....
π§ What is an Ultrasonic Sensor?An ultrasonic sensor is a device that uses sound waves to detect how...
π₯ FIRE BOT β Bluetooth Controlled Fire Extinguisher RobotWelcome to the FIRE BOT project! This robo...
BMP180 Sensor: Digital Barometric Pressure SensorThe BMP180 is a digital barometric pressure sensor...
π§ 1. Hardware Overview: 1.8" TFT DisplayMost 1.8" TFT modules are based on the ST7735 driver and co...
The SSD1306 is a popular controller used in OLED (Organic Light Emitting Diode) displays, most commo...
A servo motor is a type of motor designed for precise control of angular position, making it ideal f...
The Gravity Voice Recognition Module is a user-friendly module developed by DFRobot that allows micr...
The APDS-9960 is an advanced, compact sensor from Broadcom (formerly Avago Technologies) that offers...
π What is the 28BYJ-48 Stepper Motor?The 28BYJ-48 is a 5V unipolar stepper motor with a built-in re...
How Soil Moisture Sensor Works and Interface it with Esp32Β When you hear the term βsmart garden,β on...
π§ What is an Analog Joystick?An analog joystick typically has:2 potentiometers (one for X-axis, one...
π‘ What is the NEO-8M GPS Module?The NEO-8M is a high-precision GNSS GPS receiver by u-blox, capable...
π§ What is a NeoPixel?NeoPixel is Adafruitβs name for individually addressable RGB LEDs using the WS...
π§ What is a PIR Sensor?PIR = Passive Infrared SensorA PIR sensor detects motion by measuring change...
β What is AI Thinker GP-02?The AI Thinker GP-02 is a GNSS (GPS) module, designed to work with satel...
π‘ What is SIM900?The SIM900 is a GSM/GPRS module from SIMCom. It allows microcontrollers like ESP32...
π§ What is a Push Button?A push button is a simple mechanical switch that connects two points in a c...
π€ What is a Tilt Sensor?A tilt sensor (also called a ball switch or mercury switch) is a digital sw...
π¨ What is the TCS34725?The TCS34725 is a color sensor made by AMS (now part of Renesas).It detects...
π What is an I2C LCD?An I2C LCD is a Liquid Crystal Display that uses the I2C communication protoco...
π§ What is MPU6050?The MPU6050 is a 6-axis motion tracking device made by InvenSense. It combines:β ...
π‘οΈ What is DS18B20?The DS18B20 is a digital temperature sensor from Maxim Integrated (now Analog Dev...
β° What is DS1307 RTC?The DS1307Β is a real-time clock IC by Maxim Integrated that keeps track of:Sec...
π΅ What is DFPlayer Mini?The DFPlayer Mini is a tiny, standalone MP3 audio player module. It can pla...
π‘ What is an IR Receiver?An IR (Infrared) Receiver module receives signals from an IR remote contro...
π What is a Rotary Encoder?A rotary encoder is an electro-mechanical sensor that converts the angul...
π What is the Dot Matrix Display with MAX7219?A Dot Matrix Display is an arrangement of LEDs in a g...
π What is ESP-NOW?ESP-NOW is a wireless communication protocol developed by Espressif, allowing ESP...
π€ ESP32 Joystick Controlled Robot Using ESP-NOW Protocol & L298N Motor DriverWireless bot control w...
β€οΈ Heart Rate & SpOβ Sensor (MAX30100/MAX30102)π¬ Pulse Sensor | SpOβ Monitor | Wearable Health Tech...