Categories
Uncategorized

Logging the temperature and humidity

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)

Categories
Uncategorized

gnuplot

gnuplot

I’ve started to use gnuplot, which is a “command-line driven graphing utility.” It’s not open source but it is freely available (under some other license) and it’s been around since 1986. I don’t think it’s going to “go commercial” any time soon…

It’s proving challenging to understand gnuplot and get it to do what I want it to do, but I’ve tried using OpenOffice and Numbers and neither one can seem to plot 24,000+ data points. I considered updating my Perl code to write SVG files (and I may revisit that) but gnuplot seems to be the tool to use in this case…

Hopefully by the time I’ve collected a few more weeks worth of data I’ve got a better idea how to use gnuplot… but if you’ve got any pointers, I’d love to hear them.

Categories
Uncategorized

Fitbit… getting closer!

Fitbit API

I originally thought the Fitbit looked awesome, but in digging into things, I found a few issues I didn’t like. (See Fitbit Improvements.) While it looks like they’ll never go the route of sending your own data to your own computer without first sending your data to the cloud, their official API is out (in beta) and should at least offer an improvement over the “unofficial” APIs people had been working on.

Over at dev.fitbit.com you can read up on the details, and get some example code (none in Perl yet though!) It’s good for the Fitbit ecosystem, as more applications may come out that make use of the data. If anything, I’d like to see something like what I created for Last.fm in Heard, an application that syncs your data back to your own server from the cloud.

I also noticed that Fitbit got a mention on the Arduino blog, which amuses me for a few reasons. First, if the Fitbit had been more open I probably would have looked more seriously into getting one last year. (Open source hardware would have been awesome, but I can live with closed, though it is interesting that they use the open source Arduino for rapid prototyping.) Second, I actually got into working with the Arduino partly to try to do some of the sleep monitoring functions that the Fitbit does. (Yes, that’s another project I got sidetracked on.)

Depending on how our research funds shake out this year, the Fitbit may still be on our list. As I’ve said before, I’m the type of person who needs to collect data, and analyze it, and chart it out, in order to find more value in it. Meanwhile, I’ll be in the lab working on my Arduino-based sleep monitor…

Categories
Uncategorized

Visitor Stats

For some reason (probably the whole “end of one year, beginning of another” thing, I felt like grabbing the visitor stats for this site.

I hadn’t realized that it was only about 6 months since the last time I did this. Even better, now we can compare! See the July 2010 stats if you want to review.

Visitor Stats

Compared to last time, Firefox is down, while Chrome is up. I guess that’s not surprising. Chrome is gaining in popularity. As for this site, I write about Firefox and Mozilla a lot more than I write about Chrome, so I’d still expect some good Firefox numbers.

Internet Explorer is down (thank goodness!) but so is Safari. I’d almost expect Safari to go up a bit due to the iOS… but I guess not.

Visitor Stats

Windows went up slightly, while the Mac stayed about the same. iPad went from less than 2% to over 11%. I really didn’t write much about the iPad until the end of December, of course, a lot more iPads are out there now.

Visitor Stats

The interesting number here is the second one, 768×1024, which I believe correlates to iPad in portrait mode. Very interesting! The other numbers are all pretty close. Do I really have that many visitors to this site using iPads?

I’ll have to remind myself to check the numbers again in 6 months…

Categories
Uncategorized

Twitter vs. Blogging

Blogging in the House!

On Anil’s piece titled If You Didn’t Blog It, It Didn’t Happen, I left the following comment:

Twitter is like going to a restaurant. Blogging is like buying a house.

I thought I should expand on that… and what better place than right here, on my own blog, where I’m allowed to.

As I’ve said before (in fact, I said it just yesterday) there are things I don’t like about Twitter, but my not liking these things, or complaining about them probably isn’t going to change them. That’s OK… I don’t own Twitter, I don’t control Twitter, I just visit Twitter.

Twitter is like going to a restaurant. You can talk to people you know, and people you don’t know. They can talk to you. You can overhear conversations. You’re at the mercy of the management. They can kick you out.

Blogging is like buying a house. It requires maintenance and upkeep. You’re free to do what you want, you can redecorate, or hang some pictures, or ramble on as long as you want. It’s your home, you own it, and you make the rules.

Anyway, that’s how I see it. I’ve had this blog since 1997. I’ve been using Twitter since 2006. I can still get to every single blog post I’ve written here (and so can you) while Twitter only lets me see a portion of the content I’ve put into it. I’ve started archiving as much of it as I can over here… on my own site, because I don’t trust Twitter with my data the way I trust myself with my data.