DanielW’s Blog

September 28, 2008

Gas measuring: Source, some charts, accuracy

Filed under: Energy-saving — Tags: , , , , , — DanielW @ 12:48 pm

There was quite a lot of interest in my gas measuring project using a mobile phone. Thanks for that. For all who requested the source: I packed it together and wrote a small readme. You can download it now.

There were doubts about the accuracy and if it will work at all. It is running for over a week now without any crash or other problems. It measured a gas usage of 14.81 m³ while the gas meter is showing 13.85 m³. That is a difference of 6.9%. Not perfect, but i can live with that and can try to reset the “burning duration -> volume” factor to reflect the difference.

I also have first usage graphs:

Gas usage for September 2008

Gas usage for September 2008

Day of month on x axis and used energy in kWh on y axis.

Does it mean a lot: No, not yet. Not enough days and also to much playing around with settings (temperature on thermostat in the kitchen, setting on the radiators).

One interesting fact is that it will always do exact 11 “burning sessions” every hour as long the temperature in the room with the thermostat has not reached the target temperature. But the duration of each of those sessions depends on the real needed energy from the radiators. Even if they do not request any energy it will do 11 burning starts but all of them very short.

That means: At least here is quite some room for optimization. I need to make sure that it only starts when at least one room requests energy. That is quite hard to achieve because there is only a thermostat for controlling it in one room.  :-(

Here a chart for an average day:

Gas usage graph for 2008/09/21

Gas usage graph for 2008/09/21

Hour of the day on x, burning duration in seconds on y

The two peaks are from the warm water heating. That starts about two times a day and takes about 250 seconds or 0.7 kWh each, means about 2 kWh (ca. 0.15 EUR ) a day for warm water.

Anyone still reading? ;-)

September 21, 2008

It’s getting cold: Measuring gas usage with S60 camera phone

Filed under: Energy-saving — Tags: , , , , , , — DanielW @ 6:06 am

The last two weeks I haven’t done anything on KDE/Nepomuk/Amarok (Does that statement qualify for posting this on planetkde? ;-) ), but for a good reason: It’s getting cold outside.
So time to get back to an old project of me: I wanted to measure the gas usage of my gas heating in real-time and come up with the idea to use a mobile phone with a camera for that. The plan was to have the camera of a mobile phone looking on the burner and recognize if the flame is there or not. That should work under the assumption, that the burning duration is directly related to the used gas volume.

So I picked my old Nokia 6680 (Symbian S60 2nd FP2) (oh I am glad that you can now program it in Python using PyS60) and started work on a proof of concept.

To make it short: After not working on it for about 10 month, I manged to get it to work.

A small Python program calculates the amount of blue in a section of the camera view once every second and if it gets above some threshold it assumes the flame to be on and writes a record to a SQL DB on the phone. It also calculates the current gas meter reading and makes all that data available over Bluetooth on request.

Now a picture of the setup:

The gas heating with the phone looking on it (door open)

The gas heating with the phone looking on it (door open)

If the isn’t the coolest usage of a mobile phone ;-) And now a picture of what the phone is seeing when the flame is burning:


A am pretty satisfied with the accuracy of the measuring. The last day I had a measuring error of about 1,3%.

I also wrote a small Qt application to get the data from the phone (over a bluetooth spp connection) and visualize it. Also a screenshot:

Screenshot of gas monitor app

Screenshot of gas monitor app

The next months it will be fun (OK, only energy saving addicts like me will consider this fun) to analyze the usage and see how it relates to the temperature. Hopefully it helps to save energy (and money ;-)). If someone is interested to build something similar, just ask me for the source. (But don’t expect it to be well written…)

Oh, and to somehow justify the syndication to the planet: I am back to work on the Nepomuk music service to hopefully get it into KDE 4.2 (the next post will be about that) so that it can get used in the first Amarok 2 feature release after KDE 4.2 (2.1 or 2.2)

Powered by WordPress