User Tools

Site Tools


Environmental Sensors

It gets really hot and really cold (depending on the time of year) in my home office, so I wanted something to log the temperature.

I used an Arduino along with a DHT22 temperature-humidity sensor from Adafruit to capture the temperature and humidity, and a bit of code (first written in Perl, and later ported to Processing, and then back to Perl) to do the logging.

It also tweets the data every few hours and the data goes online via Pachube.

I'll also be adding other sensors, probably a PIR sensor to check for humans (or cats) and a photocell to see which lights are on.

There's a few blogs posts with details:

Below I'll post updates to this project as they happen.

Update: 2013-06-19

The system is down because I moved. It may return running on Raspberry Pi…

Update: 2012-07-05

No new updates to report, but it's been interesting seeing the temperature in the office go above 90˚ F lately…

Update: 2012-05-09

Pachube is now known as Cosm. I'm not entirely happy with some of the new interface, but it looks like they've got some cool new things in store for users. I've also come up with a design for the light sensor(s) holder, which is sort of a DIY-gooseneck thing using small PVC pipe.

Update: 2012-02-27

As mentioned in the last update, I've moved the Arduino and code to my home Linux server. The next step will be to write code for the light sensor(s) and PIR.

Update: 2012-02-19

I've managed to move the Arduino and code over to my Eee PC so it's not running on my main home computer. This is useful as I've been meaning to get the Eee PC up to speed for such tasks, but ultimately, I may be better off just connecting the Arduino to my home Linux server. (It's an old PowerBook running Ubuntu.)

Update: 2012-01-21

The previous graph I mentioned required Flash, but this graph builder on the Pachube site does not.

See the actual image this creates, which you can embed in your own page.

Update: 2012-01-20

Oooh, I like this project at LVL1:

Update: 2012-01-15

You can create a live zoomable 30 day graph using the .csv data that the datastream generates. (though Flash is required.)

Here's a screen shot:

Update: 2011-11-28

I eventually want to add two more sensors to this thing.

The first would be a photocell pointed towards my desklamp that will be able to track when I'm at my desk, or at least when the lamp is on, which usually (but not always) means I'm at my desk.

The second would be a PIR sensor to track when there is movement in the office, either of a human, or a cat.

The third would be a microphone to sense sound levels in the room.

Update: 2011-11-16

Pachube also provides an archive of data.

Here are the links for the two items in the feed I've created:

These could be used for external graphing of data, etc.

Update: 2011-11-14

I've started digging into Pachube a bit.

There is now a feed here:

And an iPhone (mobile) view is here:

The code is still janky and needs a lot of cleanup, but I'm going to let it run for a while and see what happens.

Note: Code needs some sanity checks… Every now and then we get a blank value, or it goes from '53' to '3' so something is getting lost.

Update: 2011-11-13

I've picked up this project again, and I've been playing with the Processing code to display data. It's caused two solid lockups on the Mac it's running on, which seems really odd. I'm running it now with the Perl code again, just to make sure it's not the Arduino or serial communication causing it. (I did switch from an Uno to a Seeeduino, but that shouldn't matter.)

I probably need to dig into the graphing code again, or find an elegant data presentation solution, or just try using Pachube (since it's free now.) For now, you may be able to see the data here:

Project Members

projects/temperatureandhumiditylogger.txt · Last modified: 2014/12/27 04:42 by raster