DanielW’s Blog

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)

22 Comments »

  1. Cool! :-)

    Comment by AdeBe — September 21, 2008 @ 9:43 am

  2. I’m glad this got syndicated or I would have never actually got to read it and I found your gas saving idea pretty awesome.

    Comment by leorockway — September 21, 2008 @ 10:23 am

  3. How does it read the gas meter?

    Comment by john — September 21, 2008 @ 12:15 pm

  4. Nice project! This is one of the *coolest* usage of mobile phone indeed ;)

    Comment by Gopala Krishna — September 21, 2008 @ 12:26 pm

  5. john:

    It doesn’t. It looks at the flame of the gas burner. And recognizes it in the picture from the camera on the phone. It then gets the times when the flame was bruning and so duration of that.

    As the amount of gas used per second I stable you could calculated the gas meter reading with that. (That is it what the phones does)

    Comment by DanielW — September 21, 2008 @ 12:56 pm

  6. Do you also monitor the amount of electricity your phone and computer use to get these measurements? If you are talking about energy saving these parameters must also enter the count.

    Comment by Mamarok — September 21, 2008 @ 2:23 pm

  7. Can you publish the Python code? I would be interested in see it for an idea of mine.

    thanks

    Comment by Michael — September 21, 2008 @ 2:46 pm

  8. Mamarok:

    Really good point :-) I should have mentioned that in the post.

    First the phone:

    It is the only thing here which needs to run 24/7. Mobile phones are designed for minimum power usage (they only have a 2-4 Wh battery after all). I haven’t measured it yet, but from past expericne with similar phones I expect it to be less than 1 Watt. (means 24 Wh a day, compared to the 2400 Wh of gas a day even in the sommer months, that is “nothing” (although worth 1.70 EUR a year).

    Some suggested to just use a webcam + some small pc/netbook. But that would in best case take more than ten times the energy than my solution.

    The computer:

    That is only needed to get the data from the phone to analyze it. That can be done every week, every month or how ever I want it to. Sure that also needs energy, but I do not expect to have an impact on my average computer use/run time.

    The biggest factor which will really make this whole thing pointless in terms of energy saving is the energy needed for producing the mobile phone in the beginning. But: It was laying arround here anyway.

    At the end:

    This is about fun and learning about my energy usage about time. I think it will really help if we all get a better experince of how hour habits with using energy (electic and heating) in our homes influeneces the energe consumption. Most people get their bill at the end of the year.

    That doesn’t help at all to get a felling for it. Having instant information will in the end help to bring us to carefully use energy.

    But this is more about “I had this funny idea to do this with a phone and lets see if I can make it reality”. Though I hope that better understanding of my heating system and the impact of settings and so on will help to at least reduce my gas usage about 10%. Means 500 kWh. (to compare: my complete electrical energy use is about 800 kWh a year).

    Well to sum up: It will hopefully (that has to be proven) reduce my gas usage at the costs of a minimal increase in electrical energy use.

    But on top on that I will gain: Experince about energy usage, learning how to do development for these phones and fun :-)

    Oh that is a very long answer.:-/ Well, I really like this topic, so I can not answer short *G*

    Comment by DanielW — September 21, 2008 @ 3:06 pm

  9. The results will be shocking. The gas consumption is directly correlating to outside temperature! There, could have saved you hours of free time :)

    Comment by Jakub Steiner — September 21, 2008 @ 3:18 pm

  10. You could include Nepomuk as soon as want; just conditionally compile it.

    Neat project!

    Jakub: that’s hardly the only factor…

    Comment by Ian Monroe — September 21, 2008 @ 7:31 pm

  11. sourcecode?

    Comment by jason — September 22, 2008 @ 12:49 am

  12. You should definitely submit this to the Eco Challenge in the Nokia contest! http://www.callingallinnovators.com/.

    Comment by Janaina — September 22, 2008 @ 12:14 pm

  13. Wouldn’t it be better to track the boiler usage via the relay? You could differentiate between heating and domestic hot water production this way, and avoid trying to recognize what the camera sees. Maybe it would take more than a cellphone, but easier in the long run

    Comment by Eric — September 23, 2008 @ 12:16 am

  14. Hi, Great idea. i would love to get my hands on the source code to have a mess myself. thanks.

    Comment by Brian — September 24, 2008 @ 5:44 pm

  15. Really nice :) I like the Qt program :)

    Comment by Richard — September 26, 2008 @ 5:13 pm

  16. [...] gas companies naturally dubious of home hacking efforts. Variety of workarounds discussed, such as measuring the size of a gas boiler’s flame, using a photo-transistor to notice each time the gas meter reading changes and generate a pulse [...]

    Pingback by HomeCamp « dale lane — March 13, 2009 @ 11:00 pm

  17. Engaging page, hope to visit once more…

    Comment by Tizaffotova — May 20, 2009 @ 4:32 pm

  18. Why not just tap into the wiring and detect if the gas valve is on. or if the furnace is asking for heat.

    There are insanely easier ways of doing this with just a simple relay.

    Comment by Stinky McWitherTeats — June 10, 2009 @ 7:38 pm

  19. Amazing stuff, Will come back again..

    Comment by home made wind generators — June 27, 2009 @ 12:10 pm

  20. Very nice.
    I could tell you similiar story.
    Will you look at metheor shower this night?
    I read it will be great show.

    Comment by Watch Metheor Shower — August 13, 2009 @ 8:48 am

  21. Great idea, but will this work over the long run?

    Comment by Birgit-Tiez — August 24, 2009 @ 7:05 pm

  22. ,..] blog.danielwinter.de is one great source of tips on this topic,..]

    Comment by Trackback - Free Internation Call >> How to make free international call — November 19, 2009 @ 11:55 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress