Introduction: Easy-to-build Digital Thermometer and Hygrometer for Indoor Use
Indoor temperature and humidity level are two key parameters that determine the comfort level for the room occupants. At major work places, these parameters are controlled and maintained at appropriate levels to enhance the efficiency of the workers. These parameters also affect the functioning of indoor electronic equipments, such as computers, which have a limited range of thermal and moisture tolerance. There are a variety of commercial meters available for measuring relative humidity and temperature. This instructable guides you to build a simple digital thermometer and hygrometer that will allow you to monitor these two key environmental parameters at your workstation or in your room. It uses an Arduino Uno or its compatible board, a MAX7219-driven seven segment LED displays, and an inexpensive DHT11 sensor.
Step 1: Things You Need
An Arduino Uno or any other compatible board.
I am using Crowduino Uno SD board from Elecrow. It is an Arduino Uno compatible board with some improvements such as 3.3V or 5.0V power supply select option and micro SD slot on board.
MAX7219 based seven segment LED display module from Elecrow
It is an 8-digit seven segment LED display module with an on board MAX7219 driver chip, which allows you to control individual LED segments through a 3-wire SPI interface. The 8 digits are arranged in two rows of 4 digits, which makes it convenient for displaying two variables simultaneously. The MAX7219 device also support LED brightness control through software.
DHT11 is a very low cost digital temperature and relative humidity sensor that provides calibrated digital outputs. The measurements are read by a host MCU through a single-wire serial interface. The DHT11 sensor can measure temperature ranging from 0-50 degree Celsius, and relative humidity ranging from 20-80%. The accuracy of temperature and humidity measurements are 2 degree Celsius and 5%, respectively.
9V DC wall adapter for powering the project
Few male-to-female jumper cables
Step 2: Wiring the Sensor and the Display to Arduino
To save the jumper wires and give it a neat look , the four pins of the DHT11 sensor are directly inserted into the right female headers of the Arduino Uno board such that the pin 4 (GND) of DHT11 goes in to the GND pin (second pin from top right) of the Arduino header. With this arrangement, the pins 1 (VCC), 2 (Data), and 3 (NC) of DHT11 will be connected to Arduino digital I/O pins 11, 12, and 13, respectively. The DHT11 consumes 2.5mA current at most during operation. Therefore, it can be powered directly through the Arduino I/O pin 11 by setting it to logic high during operation. The Arduino pin 12 is used to read the sensor output.
Connecting the display
The display is powered by 5V and GND supply pins from the left female headers of the Crowduino board. The DIN, LOAD, and CLK signal lines of the MAX7219 chip are connected to the Arduino digital I/O pins 5, 6, and 7, respectively.
Step 3: Arduino Sketch
This project uses the LedControl library for driving the MAX7219-based display and Adafruit's DHT Sensor library for reading the DHT11 sensor outputs. I have slightly modified the LedControl library for displaying the degree symbol and the capital letter 'C'. The temperature is displayed in degree Celsius in the first row, and relative humidity as percentage in the second row of the seven segment display board.
Download the modified LedControl library
Download Adafruit's DHT sensor library
Download the Arduino sketch for this project
Once the libraries are imported properly and the Arduino sketch is loaded up, your digital thermometer and hygrometer is ready to show you the level of thermal comfort you have in your surrounding. You can power it through USB port or using the external DC wall adapter.
If you like this project, vote for me in the ongoing instructables Arduino contest.
We have a be nice policy.
Please be positive and constructive.