The Temperature Monitor DHT11 project teaches you one of the most common sensor applications in embedded systems: measuring environmental conditions.
In this project, a DHT11 temperature and humidity sensor continuously reads the surrounding air temperature and humidity levels. The Arduino processes the sensor data and displays accurate readings on the Serial Monitor in real-time.
When the temperature or humidity changes, the sensor instantly detects the variation. The Arduino calculates and displays the values with proper formatting, creating a complete environmental monitoring system for weather tracking or climate control applications.
This project teaches DHT11 Sensor Operation, Temperature and Humidity Reading, Sensor Data Processing, Serial Data Display, and Environmental Monitoring Techniques.
By finishing this project, you’ll understand how temperature sensors work in thermostats, weather stations, HVAC systems, and smart home automation devices.
To build this circuit, collect these specific items from your kit:
Arduino Uno × 1, Breadboard × 1, DHT11 Temperature and Humidity Sensor × 1, 10kΩ Resistor × 1, Jumper Wires × 3, USB Cable × 1
Connect the Arduino GND pin to the negative rail of the breadboard. This creates a shared ground connection for your circuit.
Place the DHT11 sensor onto the breadboard. The sensor has three pins that require careful connections. Ensure the sensor is positioned upright with the vented side facing outward.
Connect the VCC (power) pin of the DHT11 to Arduino 5V. This provides power to the temperature and humidity sensor module.
Connect the GND (ground) pin of the DHT11 to the breadboard negative rail. This completes the power circuit for the sensor.
Connect the DATA pin of the DHT11 to Arduino Pin 7. This pin receives the temperature and humidity measurements from the sensor.
Connect one end of the 10kΩ pull-up resistor to Arduino Pin 7 and connect the other end to Arduino 5V. This resistor helps stabilize the data signal from the DHT11.
Double-check all three sensor pins before uploading your code. Ensure VCC and GND are properly connected and verify the data pin and pull-up resistor are correct.
Important: The DHT11 sensor requires a pull-up resistor on the data line to function properly. The sensor communicates using a single-wire digital protocol that needs this resistor for stable operation.
In setup(), Arduino initializes the DHT11 library and sets Pin 7 as the sensor data pin. The Serial Monitor is started at 9600 baud to display temperature and humidity readings.
The Arduino continuously reads temperature and humidity values from the DHT11 sensor using the dht.readTemperature() and dht.readHumidity() functions. These functions communicate with the sensor using a specialized digital protocol.
The program verifies that the sensor readings are valid before displaying them. If the sensor fails to read or returns impossible values, the program displays an error message instead of false data.
The temperature and humidity readings are printed to the Serial Monitor every 2 seconds. The program continuously updates the readings inside the loop() function, allowing users to monitor environmental conditions in real-time.
After uploading your code, here is what happens.
Open the Serial Monitor at 9600 baud rate to see the temperature and humidity readings. The display shows Temperature in Celsius and Humidity as a percentage. Hold your hand near the sensor and watch the humidity reading increase. Move away and the humidity drops back to room level. Breathe warm air toward the sensor and both temperature and humidity readings increase. The sensor provides continuous updates every two seconds showing real-time environmental changes.
No Data Displayed :- Verify that the DHT11 library is installed in your Arduino IDE. Check that Pin 7 is correctly connected to the sensor data pin and confirm the Serial Monitor is open at 9600 band.
Readings Show Error Messages :- Check the pull-up resistor connection and ensure it connects between Pin 7 and 5V. Verify the DHT11 sensor is receiving proper power at 5V on the VCC pin.
Temperature Readings Are Inaccurate :- Ensure the sensor is not exposed to direct sunlight or heat sources. Allow the sensor to stabilize for a few minutes after power-up before trusting the readings. Check that the sensor is calibrated correctly.
Humidity Readings Are Stuck :- Move the sensor to a location with varying humidity levels. Check that the vented side of the sensor is exposed to air and not blocked by other components.
Sensor Not Responding :- Verify that all three sensor pins are correctly wired. Check that the DHT11 library is properly installed and imported in your code. Try uploading a simple test sketch to confirm communication.
By finishing this project, you now know :-
How DHT11 sensors measure temperature and humidity, how to use specialized sensor libraries in Arduino, how to process and display sensor data, how environmental monitoring systems work, and how to create applications that respond to temperature and humidity changes.
In Day 12, you’ll learn how to use a PIR motion sensor to detect movement and trigger alerts, creating a complete motion detection security system for your projects.