DHT 22 Thermometer

Updated 08 October 2019

This thermometer idea came to me when my little sister asked me “Vince, what’s the temperature?” Answering I said, “Well, I’ll look it up.” So I looked it up but that wasn’t enough for her, This continued for a few days. She then wanted the humidity as well as the temperature and so I decided to build this. A very basic, but effective ‘meter’ that can measure temperature and humidity with a refresh rate of 2 times per/second. It uses the DHT22 sensor for its accuracy and easy to use libraries.

Parts Required

  • 2 x M3 10mm bolts

  • 2 x M3 14mm Bolts

  • 1 x M3 7mm Bolt (Optional - you can use any other size above 7mm)

The Build

Follow the Fritzing diagram below for the breadboard circuit.

DHT22 Thermometer Wiring Diagram

NOTE: You’ll notice in the Fritzing diagram that the DHT22 sensor has only 3 of the 4 leads connected to the circuit; this isn’t a mistake it is by design.

The Code and Library

You can download the code from my Github page.

You will also need to install one library called “ABlocks_DHT.h”. This library makes it easy to read the temperature and humidity without too much trouble. You can download this library from the link above.

Installing the Library

Once you have downloaded the library from the link you can go ahead and install it.

1.     In the Arduino IDE (Integrated Development Environment) go to: Sketch> Include Library> Add .ZIP Library… 

2.     Click on the “Add .ZIP Library…” Button

3.     This should bring up a menu saying to add a ZIP file.

4.      Navigate to the directory where the ZIP library is and click on the button “Choose”

5.      The progress bar should display “Library added to your libraries. Checkinclude librarymenu

Your library should now be installed.

Main Build

There isn’t much difference between the main build and the prototype the only difference being that we solder the whole project onto an Adafruit Half-sized Breadboard PCB and house it in a 3d printed case. 

Solder all the components to the Breadboard PCB following the same circuit as the prototype (the LCD and DHT22 sensor need to be attached to the PCB via jumper wires so it can be mounted in the case.

Note: The 9 volt battery clip wires and switch/pushbutton need to be soldered as in the fritzing diagram below:

DHT22 Thermometer 9V Battery Wiring

 When you've soldered up the Breadboard PCB you can continue onto the enclosure.

 

Enclosure

For the enclosure, you will need the M3 nuts and bolts listed above as well as your 3d printed enclosure and soldered up breadboard PCB.

  1. Start by removing supports from the 3d printed case

  2. Then mount the LCD display inside front of the case

  3. Tighten the bolts and nuts.

  4. Mount the DHT22 sensor on the side of the case with an M3 bolt and nut.
  5. Mount the switch/pushbutton on the opposite side to the DHT22 sensor
  6. Add the PCB, Battery, ETC, to the inside of the case. (NOTE: I put a piece of paper on top of the battery to stop shorts amongst the pins on the PCB)
  7. Put the lid/bottom on the top of the case so it looks like this (NOTE: My Base_4_case.stl part didn’t stay in place well so I added a few pieces of Blu-Tack the edges of the part to hold it in place better. Whether you need this will depend on the tolerances of your 3d printer.)

Have a question? Ask the Author of this guide today!

Please enter minimum 20 characters

Your comment will be posted (automatically) on our Support Forum which is publicly accessible. Don't enter private information, such as your phone number.

Expect a quick reply during business hours, many of us check-in over the weekend as well.

Tags:
Feedback

Please continue if you would like to leave feedback for any of these topics:

  • Website features/issues
  • Content errors/improvements
  • Missing products/categories
  • Product assignments to categories
  • Search results relevance

For all other inquiries (orders status, stock levels, etc), please contact our support team for quick assistance.

Note: click continue and a draft email will be opened to edit. If you don't have an email client on your device, then send a message via the chat icon on the bottom left of our website.

Makers love reviews as much as you do, please follow this link to review the products you have purchased.