Connect a Temperature and Humidity Sensor with Raspberry Pi

Difficulty
Very easy
Steps
6

The DHT22 sensor is a useful little component that is ideal if you require reading the temperature or humidity of your surroundings. It has a chip inside that does analogue to digital conversion.

In this guide, you will learn to connect a DHT22 to a Raspberry Pi on a breadboard. 

Step 1  Meet the DHT22

The DHT22 is a Temperature and Humidity Sensor. The DHT22 is a basic, low-cost digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and spits out a digital signal on the data pin (no analog input pins needed).

In this guide we'll use a DHT22 breakout board  (DF-SEN0137) from DFRobot.  This breakout board is handy because it has all the passive components built onto it (hear we don't need any other resistors in our circuit).

Step 2  Connect the Wire to the DHT22

  • Connect the Wire to the DHT22 (it can only go in one way).

Step 3  Connect male to male jumper wires to the cable

  • Connect a Black, Red and Green Jumper Wire to the Cable (matching the colour of the Cable's wires)

Step 4  Connect the Red Jumper to 5V

Connect the Red Jumper to J2 to access the Raspberry Pi's 5V Pin.

Step 5  Connect the Black Jumper to Ground

  • Connect the Black Jumper to J3 to Ground.

Step 6  Connect the Green Jumper to GPIO21

  • Connect the Green Jumper to tie point J20 to access the GPIO21.