Exploring Temperature and Humidity Sensing with Arduino

Exploring Temperature and Humidity Sensing with Arduino
By Jonathan Acheson 
1 / 17
next
Slide 1: Slide
ArduinoLower Secondary (Key Stage 3)

This lesson contains 17 slides, with text slides.

time-iconLesson duration is: 60 min

Items in this lesson

Exploring Temperature and Humidity Sensing with Arduino
By Jonathan Acheson 

Slide 1 - Slide

Learning Objective
At the end of the lesson you will understand how to use a DHT11 sensor with Arduino to measure temperature and humidity.

Slide 2 - Slide

DHT11 Module Hardware Overview
Want to keep a log of the climate in your greenhouse, build a humidor control system, or track temperature and humidity data for a weather station project? AOSONG’s DHT11 Temperature and Humidity sensor module could be the perfect fit for you!

The DHT11 module is a sensor that can measure temperature and humidity. It consists of a sensor and supporting circuitry.

Slide 3 - Slide

DHT11 Sensor
DHT11 can measure temperature from 0°C to 50°C with a ±2.0°C accuracy,  and humidity from 20 to 80% with a 5% accuracy.




Note that the DHT11 has a sampling rate of 1Hz, which 
means it can provide new data once every second.

Slide 4 - Slide

Inside the DHT11 Sensor
If you remove the sensor’s casing, you will find an NTC thermistor and a humidity sensing component inside.




Slide 5 - Slide

Inside the DHT11 Sensor

Slide 6 - Slide

Inside the DHT11 Sensor
  1. The humidity sensing component has two electrodes with a moisture-holding substrate (usually a salt or conductive plastic polymer) in between.
  2. As the humidity rises, the substrate absorbs water vapor, resulting in the release of ions and a decrease in the resistance between the two electrodes.
  3. This change in resistance is proportional to the humidity, which can be measured to estimate relative humidity.

Slide 7 - Slide

Inside the DHT11 Sensor
DHt11 also includes a NTC thermistor for measuring temperature. A thermistor is a type of resistor whose resistance varies with temperature.

Slide 8 - Slide

Module Pinout
The DHT11 module is relatively simple to connect. There are only three pins:


Slide 9 - Slide

Module Pinout
+ (VCC) pin provides power to the sensor. Despite the fact that the supply voltage of the module ranges from 3.3V to 5.5V, a 5V supply is recommended. With a 5V power supply, the sensor can be placed up to 20 meters away. With 3.3V supply voltage, the sensor can be placed just 1 meter away; otherwise, the line voltage drop will cause measurement errors.

Out pin is used for communication between the sensor and the microcontroller.

– (GND) is the ground pin.




Slide 10 - Slide

Wiring DHT11 Module to Arduino
Now it’s time to connect the DHT11 module to 
the Arduino! Connections are relatively simple. 
 

+ (VCC) pin to the Arduino’s 5V output and 

 – (GND) pin to ground. Finally, 

Out pin to digital pin #8.


Slide 11 - Slide

Installing DHT library
To install the library, navigate to Sketch > Include Library > Manage Libraries… Wait for the Library Manager to download the libraries index and update the list of installed libraries.


Slide 12 - Slide

CODING TIME
READ SHEET!

Slide 13 - Slide

Displaying Readings on Serial Monitor
Once the DHT library is installed, you can display temperature and humidity readings from the DHT11 sensor on the Arduino Serial Monitor.


Slide 14 - Slide

Code Explanation
READ SHEET!

Slide 15 - Slide

Code Explanation
READ SHEET!

Slide 16 - Slide

Project new

Slide 17 - Slide