Setting up a DHT22 Temperature and Humidity sensor with the Raspberry Pi.

During the internship, bored out of mind, I was looking at a few cool Raspberry Pi related instructables on Instructables, and I found one particularly awesome one. The guy who made it hooked up a DHT11 sensor with a photoresistor and set that up in his basement, and then he made it upload the data read by the sensors to a website called ThingSpeak, which anyone can access and read. This seemed like it was pretty fun.

For one thing, Kolkata is a really humid place, so naturally I was excited about testing it out and see what kind of data I could take out of it.

And maybe after collecting enough data, I could use my sick data analysis skillz and maybe set up a regression model to predict the next day’s temperature and humidity?

With these thoughts in mind, I went ahead and

  1. Bought a DHT 22 sensor.
  2. (Almost) bought a BMP180 pressure sensor.
  3. Followed this instructable, and set everything up nice and sweet.

Here’s a pic.


And here is the data I managed to collect.

It was pretty good fun doing it. Thingspeak allows you to download the data in CSV format and then from there you can do all sorts of magic with it using SAS or something else. Infact, you can directly work on  your data using MATLAB in ThingSpeak itself. So that’s pretty awesome.

The Raspberry Pi foundation recently came up with a new tiny little add-on board for the Raspberry Pi, which they call the Raspberry Pi SENSE hat.

This add-on board has a temperature humidity sensor, a pressure sensor, an orientation sensor, a tiny joystick and an 8×8 LED matrix grid, all put into one. Buying this one thing can get rid of the need for buying everything else at once. I can’t wait to get my hands on one.