ElectronLab Project Lab
Environmental IoT Arduino & DHT11 LCD Readout

IoT Temperature & Humidity Monitoring Station with DHT11 & 16x2 LCD

Build a digital ambient climate monitor with an Arduino Uno, DHT11 capacitive humidity and thermistor sensor, and an I2C LCD screen with real-time heat index computation.

Reading Time 7 Minutes
Difficulty Level Beginner
Hardware Platform Arduino Uno & DHT11

1. Aim of the Project

Project Objective

The aim is to assemble a standalone climate monitoring device that samples ambient temperature in Celsius/Fahrenheit and relative atmospheric humidity (% RH), calculates the apparent feel temperature (Heat Index), and outputs the formatted telemetrics to a 16x2 I2C LCD display and serial console.

2. Interactive 3D Assembly & Circuit Wiring Model

Rotate the 3D model 360 degrees, zoom in/out, disassemble/explode parts to inspect individual hardware layers, toggle realistic circuit wires, and click any component to inspect its engineering specifications.

3D Hardware Simulation & Assembly Lab
Left Click + Drag: Rotate Orbit (360°)
Right Click + Drag: Pan Scene
Scroll: Zoom In / Out
Click Component: Inspect Hardware Details
Hovered Component

3. Laboratory Video Masterclass Tutorial

Step-by-step video walkthrough covering breadboard circuit assembly, wiring verification, and testing. Enrolled students and instructors can access video streaming below.

2. Learning Outcomes

Capacitive Humidity Sensing

Understand how moisture alters dielectric constants in polymer substrates to measure relative humidity.

NTC Thermistor Physics

Learn how negative temperature coefficient (NTC) ceramic semiconductors change electrical resistance with thermal fluctuations.

Single-Wire Protocol

Capture 40-bit custom digital communication frames transmitted over a single GPIO data line.

3. Required Components

Component Name Quantity Specification Interface
Arduino Uno 1 ATmega328P microcontroller USB / 5V DC
DHT11 Sensor Module 1 Digital temp & humidity sensor (0-50°C, 20-90% RH) Single-Bus (Pin D2)
16x2 I2C LCD Display 1 PCF8574 I2C adapter (Address 0x27) I2C (A4, A5)
10k Ohm Pull-Up Resistor 1 Required if using bare 4-pin DHT11 Passive

4. Circuit Connections

Component Pin Arduino Pin Description
DHT11 Data (OUT) Pin D2 Single-wire digital data signal
DHT11 VCC / GND 5V / GND Rail Power Supply
LCD SDA / SCL Pins A4, A5 I2C Data & Clock lines

5. Complete Arduino Source Code

dht11_temperature_station.ino
/*
 * Project: IoT Temperature & Humidity Monitoring Station
 * Author: ElectronLab STEM Curriculum
 */

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <DHT.h>

#define DHTPIN 2
#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE);
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {
  Serial.begin(9600);
  dht.begin();
  
  lcd.init();
  lcd.backlight();
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Climate Monitor");
  lcd.setCursor(0, 1);
  lcd.print("Initializing...");
  delay(1500);
  lcd.clear();
}

void loop() {
  // Reading temperature or humidity takes about 250 milliseconds
  float humidity = dht.readHumidity();
  float tempC = dht.readTemperature();
  float tempF = dht.readTemperature(true);

  // Check if any reads failed and exit early (to try again)
  if (isnan(humidity) || isnan(tempC)) {
    Serial.println("Failed to read from DHT sensor!");
    lcd.setCursor(0, 0);
    lcd.print("Sensor Read Err ");
    delay(2000);
    return;
  }

  // Compute Heat Index in Celsius
  float heatIndexC = dht.computeHeatIndex(tempC, humidity, false);

  // Print to Serial Monitor
  Serial.print("Humidity: ");
  Serial.print(humidity, 1);
  Serial.print("% | Temp: ");
  Serial.print(tempC, 1);
  Serial.print(" C | Heat Index: ");
  Serial.print(heatIndexC, 1);
  Serial.println(" C");

  // Display on 16x2 LCD
  lcd.setCursor(0, 0);
  lcd.print("Temp: ");
  lcd.print(tempC, 1);
  lcd.print((char)223); // Degree symbol
  lcd.print("C   ");

  lcd.setCursor(0, 1);
  lcd.print("Humidity: ");
  lcd.print(humidity, 1);
  lcd.print("%  ");

  delay(2000); // Sample rate 0.5 Hz
}

6. Working Principle

The DHT11 sensor incorporates a resistive humidity sensing component and an NTC thermal resistor. A dedicated 8-bit onboard microprocessor reads both internal analog sensors, performs calibration adjustments, and outputs a 40-bit data packet (16 bits humidity, 16 bits temperature, 8 bits checksum) whenever triggered by the Arduino host.

7. Troubleshooting Guide

Nan (Not a Number) Error on Screen

The DHT11 cannot be sampled faster than once every 2 seconds. Ensure the delay(2000) is maintained in your main loop.

Temperature Reads 0.0 C Constantly

Verify that your DHT data wire is connected securely to Pin 2 and not inverted with the GND pin.