Sunday, February 1, 2009

More on the consumption


The progress on the light to indicate energy consumption is going steady, but the camera ran out of juice, so I can't put a picture online. Maybe tomorrow.
So I decided to report to you about the consumption curves.
In the picture you can see a plot of the gas consumption versus the average monthly temperature for the last 3 years - 2006, 2007 and 2008. The "trendlline" is a excel computed trendline, and its equation for 2006 is my basis for the energy saving calculations.
In 2006 I did' have in place any energy saving measures for the heating, and a sinple manual thermostat, so I consider that to be the baseline against which all gains are to be measured.
I think the line approaches quite well the measured results. It is a second order polynomial equation.
Also in the graphic is the date for 2007, when my automated zone controlled system was already in place.it;s line is quite deviated from the line of 2006, so I can safely assume that there have been some considerable savings, and that my calculations might be close to the real thing.
As for the data points referring to 2008, these come quite close to the predication from the trendline for 2007, apart from the 2 slightly removed dots at the right. These correspond to February, when we spent a week off and therefore saved quite a bit on the heating bill, and December, when most of the roof insulation was already in place! Which makes me very hopeful that the insulation really is doing its job and saving quite some gas and CO2 from going up into the atmosphere!
Byt the way, for January, which just finished, I got a saving of 40% with respect to the 2006 equation, whereas in January 2008 and 2007 the saving in January was only about 12%.
I am hopeful to see what the coming months bring, with the added sun exposure hours (they do make a difference)!
I'll keep posting about it!

Thursday, January 29, 2009

Log rotation

The heating system of my house creates a log file per week, per zone ( currently 3 zones: living room, kitchen and sleeping room). Every week, and on the same day of the week as the first day of the year, it starts a new log file. So to see the nice little graphs plotting temperature - actual and desired - and valve state, once a week, I have to ssh onto the server, manually adapt a little script and run it.
Until today!
I finally beat my laziness, and wrote a php script, took about 5 minutes to write. It is a brute force script just to get the job done. This to prove that a lot of time is wasted in activities that can very easily be automated and are of no interest to be kept manual.
So here is my script.
All, or almost all of my home automation run on php scripts being executed by a crontab.
Now, once a year I'll have to adapt the crontab file...maybe I should think about automating that also..

$comand = "rm kitchen.log livingRoom.log sleepRoom.log";
exec($comand);
$comand = "ln -s kitchen-";
$comand = $comand . date("Y-W");
$comand = $comand . ".log kitchen.log";
exec($comand);
$comand = "ln -s livingRoom-";
$comand = $comand . date("Y-W");
$comand = $comand . ".log livingRoom.log";
exec($comand);
$comand = "ln -s sleepRoom-";
$comand = $comand . date("Y-W");
$comand = $comand . ".log sleepRoom.log";
exec($comand);

and the crontab line

#once per week, for 2009 on thursday, first thing in the day, rotate the logs
15 0 * * thu /usr/bin/php /tmp/automate_log_change.php

Wednesday, January 28, 2009

New developments!

I decided that all the effort in measuring electricity and gas shouldn't go unnoticed in the house, so I decided to make a light indicating the status of the house. Furthermore, when arriving home, the only way to know if someone had rang he door was to check my intranet (on the iPod Touch), although, at work I can see it in twitter anyway.

So, I bought an RGB led, one with 6 legs - strange - the pinout is in the image. Some simple connections to the Arduino and a small fading program later, and I had an initial prototype.


My idea is to have a small switch connected to it to reset the doorbell indicator.

So on to the enclosure.
I had laying around a ball from some promotional thing, which splits in 2 halves. The ball is rather big - about 7cm in diameter - which makes it look good, and has a rough finish which is also good to difuse the light...although not good enough. So I tried roughing it further with sandpaper and some other mechanical tools, but no good result. The solution appears to be paint! - A light cover of white paint from a can.



I made all these experiments in one of the halves, now i have the other half to do the real thing. Hopefully soon!

Tuesday, January 20, 2009

3 years of gas consumption logging

For the last 3 years, since we have been in our current house, I have been taking very regular readings of the gas and electricity meter, usually daily, sometimes, skipping a day or 2. Recently, I have automated that process with the help of an Arduino and some additional electronics. That has removed the burden of collecting the data, and allows to see the evolution of the consumption to the minute! (note to self, explain the circuit to collect gas data!)
But all this accumulated data also has a good purpose, besides making nice graphics. It allows me to evaluate the measures I put in place to reduce the overall energy consumption.
In the first year, we only had an old Honeywell thermostat, manually operated. That was replaced in the second year by a fully automated system (see post regarding the uptime of the server). In the 3rd year nothing changed, but now that the 4th year is about to start, I am about to finish the roof insulation. All the accumulated data allows me to compare the increase in performance.
So here is a graphic of the monthly gas consumption for the last 3 years, along with the average temperature for that month as reported by the KNMI (dutch meteorologic institute) for Holland.

It is funny to see the relation to the temperature. In fact, from the data of the first year, I have managed to calculate a second order curve which relates temperature to gas consumption, so for a given monthly average, I can calculate how much the consumption would be. It is using this curve that I calculate my savings. I'll elaborate more on that soon.

Worth noticing is also the fact that December 2008 was much colder than December 2007, yet the gas consumption remained similar. I attribute that to the roof insulation, which I did mostly during November (not yet 100% finished).

Saturday, January 17, 2009

More tablet news


Continuing, or better resuming, my activities with the tablet, I installed the bundled ArtRage, and I must admit I really like it...it is just a pity that I can't draw...But I'll use it for the future sketches of circuits.
I used it to make an icon for my twitter feed. I think it came out pretty good!

Hopefully more posts this weekend about the insulation and temperature controls!

Tuesday, January 13, 2009

4 months non-stop temperature control


As I mentioned briefly before, the heating in my house is controlled by a server, running linux, obviously.
I use the devices from elv.de to control the temperature in the rooms, but, when I started the system there was no way to turn the boiler on and off according to the need for heat in the house, so I developed a script myself, in php, using the FHZ1000 linux server available from here (I haven't upgraded to the FHEM yet, still in the previous version), which reads all data from the system and decides if we need to turn the boiler on or off. I then use an FS20 Switch to control it. But I'll elaborate on that one of these days.
The system has been setup for more than 2 years now, with no major glitches or problems, and heating consistently and comfortably. Furthermore, according to my calculations, the system already payed for itself.
Of course, I turn the server down every once in a while for maintenance or upgrades, but it is now 122 days, or 4 months since it was last turned on! that means that the whole heating seasons it has been on! I'll try to go up until April when I usually turn the boiler off, without rebooting the server!

For the technically minded, the server is a Jetway MiniITX board, with 512Mb of RAM, a TinyPSU and a 2.5" hard disk, running OpenSuse 10.3. It consumes only 25W of power, in an enclosure made by myself.

I'll keep you posted!

Tuesday, December 30, 2008

Results! and progress in the logging!


So finally I managed to write about the results of my logging experiment!

I didn't get to collect much data before a considerable portion of the attic was insulated, but nevertheless I guess it is enough to get a rough idea that the stuff is at least doing something to prevent heat from escaping - at least it prevents drafts in the attic, which I guess is half way to improvement!

So here is a rundown of the results:

before the insulation: average of 4.8 degrees C difference between inside and outside
more than half installed: average of 6.5 degrees C difference between inside and outside
almost all of it installed: average of 8 degrees C difference between inside and outside

The split in the graphic corresponds to the moment when more than half the stuff was installed, so before the split is before the insulation, after the split is more than half installed. One can see that the graphic for the inside temperature in the second part is smoother than in the first part, even as outside temperatures drop further down!

These results have to take into account that the house below the attic is warmed up regularly (although to a low setting of 18 degrees C), but nevertheless, for the same outside temperature before and after I do see that the inside temperature is higher now. Also the variance of the inside temperature is much lower than the variance of the outside temperature, which was not the case before the insulation was applied.

Overall, I think it was worth the money and work invested.

Furthermore, and as an additional proof of the worthiness of the investment, I verified that I spent an amount of gas in December 2008 identical to December of 2007, while the average month temperature was 1.4 degrees Celsius lower, and I spent the whole month of December 2008 at home, whereas in 2007 we took 4 days of holiday.
My estimate is that the extra insulation gives me an extra 10% savings in gas consumption compared to the situation without.
Next Spring - Insulate the floor of the ground floor of the house!

On another subject, I was finding it strange that the temperature logger was not going below 0 degrees, so I decided to investigate. I placed the sensor in the freezer, and it did go to -16 before I took it out. I then figured that due to rounding, the temperature would need to be below -1.45 before the sensor and the arduino code would register a negative temperature of -1. All this due to the quantification in the A/D converter and integer logic.
SO I have decided to adapt the code to include a true low pass software filter (and an efficient one also, from the computational point of view) and work with one decimal place, so I managed to get better results! Send me a note if you are interested in the arduino code to do it.
It also includes 2 keys - Select and Reset - which allow you to navigate in a small menu showing the maximum and minimum temperatures, reset the max min log, and see how full the inside EPROM is.

I also included a low pass hardware filter - RC - but somehow it prevented the sensor from registering values below 0, so I took it off for the outside sensor. Still must investigate what went wrong!

There are some more news, but I'll keep that for the next post!