Slashdot Mirror


Saving Energy Via Webcam-Based Meter Reading?

squoozer writes "Like many people, I am trying to cut down on the amount of energy my family and I use in order to save both the environment and my pay packet. Since I want to do this in as scientific a way as possible, I'm taking meter readings every day and recording them in a spreadsheet (OOo Calc naturally). Currently, in the UK at least, neither gas nor electricity meters can be hooked up to any sort of device that can query the meter for its current reading. Rather than climb down into the cellar every day to read the meters, it would be great if I could simply position a webcam in front of each meter and have the value logged automatically each day. The problem is that while I am a software developer (Java mostly) I have no experience in image processing (dials from the electricity meter) and don't really know where to start with this project." Does anyone have any advice for analyzing the visual data this reader would be gathering?

26 of 215 comments (clear)

  1. Current reading? by Hatta · · Score: 3, Funny

    My meter reads in kilowatt hours, not amperes.

    --
    Give me Classic Slashdot or give me death!
    1. Re:Current reading? by Billhead · · Score: 2, Funny

      Don't you mean to arm bears?

  2. what's your goal? by gEvil+(beta) · · Score: 4, Insightful

    I'd say your approach completely depends on your goal. If your goal is as stated, then I'd use the webcams to get shots of the meters, then I'd take the 2-3 minutes or whatever it takes a week to pull up those images and transcribe their values into the spreadsheet. If the goal is a programming exercise, then go to town with figuring out some way to automate that few-minutes-a-week task. Of course, in order to do that, you'll expend a whole lot more energy than you'd take to read the meters (via the webcam shots) yourself.

    --
    This guy's the limit!
    1. Re:what's your goal? by greg_barton · · Score: 2, Funny

      Of course, in order to do that, you'll expend a whole lot more energy than you'd take to read the meters (via the webcam shots) yourself.

      You are hereby ordered to report to the home office and turn in your geek card.

    2. Re:what's your goal? by jibjibjib · · Score: 2, Insightful

      He probably has a computer running all the time anyway. And a webcam presumably doesn't consume much power, especially if it's turned off most of the time and just wakes up occasionally to grab a single frame.

    3. Re:what's your goal? by LoRdTAW · · Score: 2, Interesting

      He should just buy a digital watt hour meter that uses 2 piece or clamp type current transducer coils. It might use rs-232 or usb and just read in the values from the device. There are plenty which are commercially available.

      You can make your own using a micro controller with a few A-D channels to read the values of the current transducers and voltage using isolating transformers. Then just read in the two values, figure out the power factor and multiply the volt-amps by the power factor for watts. Then just tell the PMC to stream out the readings at intervals. Then use your PC to read the values from the PMC and your set.

      Image processing is over complicating the entire system. Most of your time and code is going to be spent on "looking" at a meter.

  3. Simple solution by halcyon1234 · · Score: 5, Funny

    Post the images as CAPTCHAs that protect porn pictures. You'll have the values typed in for you in no time.

  4. Possible Implementation by orclevegam · · Score: 2, Insightful

    Depending on the color of the faceplate and the hand, you might be able to mask off everything you don't care about (say everything but a small area around the center of the dial), run it through a hi/low filter to map the faceplate to white and the hand to black, and then just calculate the angle of the hand by searching the edge of the image for black pixels. So long as the cam is fixed and you know the coordinates of the pivot point it should be trivially easy to determine the angle of the hand based on the point at which it crosses the edge of the detection area. Once you've got the angle it should be trivially easy to map that back to a set of values.

    --
    Curiosity was framed, Ignorance killed the cat.
  5. Rubbish by megalomaniacs4u · · Score: 3, Informative

    in the UK at least, neither gas nor electricity meters can be hooked up to any sort of device that can query the meter for it's current reading.

    Rubbish. Look up smart meters gas & electric meters which update the utility company continously on usage which they can provide to you as well. (currently insanely popular after the recent documentry on smart meters)

    If your supplier is reluctant to include you in the trials, for electrical use try "Wattson" or other similar personal wireless power meters (also sold out everywhere, but there a cheaper more functional equivalents around)

    1. Re:Rubbish by camperdave · · Score: 2, Informative

      You have to clip a Wattson transmitter around a single line of the power feed from the pole into the fuse box. Most places I've seen have these wires in a conduit leading from the meter to the fuse panel. In order to clamp it appropriately, you'd need to install the transmitter inside the fuse panel itself. This is not recommended, and may be illegal in certain regions unless you're a licenced electrician.

      --
      When our name is on the back of your car, we're behind you all the way!
  6. Kill-A-Watt? by corsec67 · · Score: 3, Informative

    A Kill-A-Watt might be a better choice for "power trimming", since you can get an instant reading of the power used by anything that plugs in.

    On my website I have a couple of webcams that I grab the image from at a specific interval and store the result. Basically, if you get a Trendnet TV-IP201 and a Pentax 10mm f/1.2 lens with a C-mount to CS-mount adapter, you can just wget the image however often you want. Image processing is another issue, but I don't know anything about that.

    --
    If I have nothing to hide, don't search me
  7. The standards are coming (some already here) by randyest · · Score: 4, Informative

    Your power company is probably already looking into standards like Homeplug (main org site) (wiki link) that provide meter data much more accurately than a webcam and image analysis software. This allows them to save money on paying sneaker-net meter readers, and real-time usage data for load balancing and prediction.

    Whether or not they'll specifically give you access to the data is somewhat moot, since it's network-over-powerline and there are already consumer devices that can access the same network and (eventually if not already) be hacked to reveal the data being sent from your meter.

    It's an exploding industry (like 20-30% CAGR in the US alone, higher in other less-developed areas where the first power meters will be homeplug-capable) so I wouldn't suggest putting too much effort into your image-analysis idea at least for a few months to see what happens in homeplug-world.

    --
    everything in moderation
  8. OCR plugins? by phatvw · · Score: 2, Informative

    There are many open source OCR tools available. Write a script to capture a JPG or PNG image every day from your camera and run it through one of the command-line OCR tools..

    As long as your web cam doesn't get moved, you can set static cropping on the image so only the numbers are in the jpg file without a huge complicated border than might confuse the OCR engine.

    1. Re:OCR plugins? by randyest · · Score: 2, Informative

      Cool. Which one of those can decode the five 10-position analog dials (like clock faces) that he shows in the jog in the summary?

      --
      everything in moderation
    2. Re:OCR plugins? by smellsofbikes · · Score: 4, Informative

      This guy has an algorithm run in matlab to convert dial indicator readings to numbers using MatLab. He claims 99% accuracy over 2000 readings.

      --
      Nostalgia's not what it used to be.
  9. Do what the meter supoorts? by bugg · · Score: 4, Interesting

    Often the meter supports some sort of data export mechanism, and you just need to tie into it. Hacker extraordinaire Poul-Henning Kamp did this with his gas meter.

    --
    -bugg
  10. Re:this is lame by networkBoy · · Score: 2, Insightful

    Dear /.

    Like so many others, I have a project I want to do. The project involves doing X, but alas I can not do X myself. Have any other /.ers done this and have some sample code I can look at and learn how to do this myself?

    regards,

    someGuyWhoWantsToBeABetterGeek

    --
    whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
  11. Re:I don't know if it's anything like in Canada by the_other_one · · Score: 4, Insightful

    But you must not block the meter dials from view. Someone goes to check the values manually, every once in a while (monthly?).

    If you have the same kind of "spinning wheel with a mark" under the small dials, it might be easier to check for the number of revolutions of that wheel.

    Of course your biggest power drain will be from the computer that is always on reading the meter.

    --
    134340: I am not a number. I am a free planet!
  12. One small problem by YrWrstNtmr · · Score: 2, Funny
    Since you are talking about a webcam, that currently means USB. Your spouse will likely throw a fit about yet another set of wires trailing around the house. So unless you intend to splash out for a fully wireless (and expensive, in cost and 24x7 power) camera setup, my suggestion is to abandon this idea completely.

    For the sake of your family sanity.

  13. Orientation analysis in an image by kebes · · Score: 3, Informative

    The image analysis question is interesting. You are trying to read dial positions, so conventional OCR is probably useless (unless there is a package to do exactly that?).

    What you can do is use image processing commands (in your favorite programming language; a shell script, Python, etc.) to crop the image to generate a small image for each dial. Then convert to grayscale (and maybe increase the contrast to highlight the dial). To then calculate the preferred orientation in the image, you calculate gradients along different directions. There will be a much higher value for the gradient along directions perpendicular to the preferred axis. This procedure is described very briefly in this paper:
    Harrison, C.; Cheng, Z.; Sethuraman, S.; Huse, D. A.; Chaikin, P. M.; Vega, D. A.; Sebastian, J. M.; Register, R. A.; Adamson, D. H. "Dynamics of pattern coarsening in a two-dimensional smectic system" Physical Review E 2002, 66, (1), 011706. DOI: 10.1103/PhysRevE.66.011706

    This is easiest to do if you use a graphics package that has directional gradients built-in (but coding it yourself probably wouldn't be too hard). Basically you create copies of the image and on one you do a differentiation in the x-direction, and for the other one a differentiation in the y-direction. Let's call these images DIFX and DIFY. Then you compose two new images:
    NUMERATOR = 2*DIFX*DIFY
    DENOMINATOR = DIFX^2-DIFY^2

    Then you calculate a final image:
    ANGLES = atan2( NUMERATOR, DENOMINATOR )

    (All the above calculations are done in a pixel-by-pixel mode.) The final image will have an angle map (with values between -pi to pi) for the image. It should be easy to then use the avg or max over that image to pull out the preferred direction. You may also improve results by tweaking the initial thresholding, or by adding an initial "Sharpen Edges" step, or by blurring the NUMERATOR and DENOMINATOR images slightly before doing the next step.

    In any case, the above procedure has worked for me when coding image analysis for orientation throughout an image (coding was done in Igor Pro in my case). So maybe it is useful for you.

  14. Re:this is lame by joshuac · · Score: 3, Insightful

    How is it lame to ask other people questions when learning how to do something yourself?

  15. Re:I don't know if it's anything like in Canada by jkerman · · Score: 2, Interesting

    They changed all our electricity meters (madison, WI) to wireless now. they just drive the truck by and read them all instantly.

    I assume it would be getting popular elsewhere too. it would be fun if you could tap into that.....

  16. Re:Check for WiFi by jkerman · · Score: 2, Interesting

    they are wireless, but not wifi

  17. Mechanical? by SuicidalLabRat · · Score: 2, Informative

    Mechanical or Spinning disk type meters can be read optically or magnetically, or if you have a dig meter with LED interface you can monitor the LED frequency; Both allow for real time monitoring of your homes load. Monitoring the aggregate by collecting at all load points would be better, but that's a bit more complicated. try: http://web.archive.org/web/20060509092108/http://www.seanadams.com/pge/ ...for a head start. SLR-

  18. Re:I don't know if it's anything like in Canada by rew · · Score: 2, Interesting

    FYI, here in holland you just pay a guesstimate every month, and they give you a final bill every year.

    They try to get a meter reading every year. They trust you to do it yourself. They send a guy over every once in a while (i.e. every 5 years or so) to keep you honest. All you can do is postpone the stuff for a while. If you move you either have to arrange for an official meter-taking, or you have to sign a common "agreed meter-positions" note with the next inhabitant.

    Apparently they HAVE to check the readings every three years. In practise they don't.

    So, here in the Netherlands, most meters are on the insides of houses, and accessible for home owners to put a camera in front.

  19. ImageJ - open source image analysis tool by dustingrzesik · · Score: 2, Interesting

    Lots of folks have suggested methods for developing an algorithm so I'll point you to some software that is free and very powerful. ImageJ is funded by the National Institutes of health, it is freely available and more than capable of the degree of image analysis you'll require. As others have mentioned image quality and consistency can be a huge hurdle so make life easier by setting everything up with care.