2011.07.20

Adafruit DHT22 temperature-humidity sensor

Last November one of the Arduino-based projects I started working on was a temperature logger for the office. With winter coming up I wanted to see just how cold it got. (The office is in a converted attic, and the heating and cooling leaves much to be desired.)

I picked up a TMP36 – Analog Temperature sensor and got it wired up and wrote some hacky perl code to read the data and log it. I never really got it out of the experimentation stage, and ended up pulling the Arduino out for another project. (Isn’t that often the case!?)

So last month when Adafruit came out with the DHT22 temperature-humidity sensor I figured I should grab one, and maybe I’d get around to finishing the project.

My temperature (and humidity!) logger is still not done, but I did whip up something to run this week while Wisconsin is having a heat wave. The office has a window air conditioning unit, but it only runs when someone is in the office. When no one is there, it gets hot. How hot? Well, now we know….

Time Humidity Temperature
00:00 50% 89°F
00:30 50% 89°F
01:00 50% 89°F
01:30 49% 89°F
02:00 49% 89°F
02:30 49% 89°F
03:00 48% 89°F
03:30 48% 89°F
04:00 48% 89°F
04:30 48% 89°F
05:00 48% 89°F
05:30 48% 89°F
06:00 48% 89°F
06:30 49% 89°F
07:00 57% 89°F
07:30 58% 89°F
08:00 53% 91°F
08:30 52% 91°F
09:00 52% 91°F
09:30 52% 91°F
10:00 52% 91°F
10:30 52% 91°F
11:00 52% 91°F
11:30 52% 93°F
12:00 52% 93°F
12:30 52% 93°F
13:00 51% 93°F
13:30 51% 95°F
14:00 50% 95°F
14:30 50% 95°F
15:00 50% 95°F
15:30 50% 96°F
16:00 50% 96°F
16:30 50% 96°F
17:00 49% 96°F
17:30 50% 98°F
18:00 48% 96°F
18:30 43% 93°F
19:00 41% 91°F
19:30 40% 89°F
20:00 41% 87°F
20:30 39% 89°F
21:00 37% 89°F
21:30 42% 86°F
22:00 40% 86°F
22:30 39% 86°F
23:00 39% 84°F
23:30 37% 84°F

Chart

The hard part of the code is provided by Adafruit’s DHT-sensor-library and their DHTxx Sensor Tutorial was also useful. And just for fun we dug up another old bit of perl which was wired up to SuperTweet.Net so we could send the data out via the 2XL Networks Twitter account.

2XL Networks - Logging

I should really get around to finishing this project, since I have a spare Seeeduino that would be a good fit for it. I can always feed the data into Pachube or roll my own logging application.

I’m really just hoping the heat wave ends and it doesn’t get up to 98°F in the office again…

Update: See the post: Logging the temperature and humidity (code)

Comments are closed.

« | »


buy the button:

Buy The Button