Just wanted to share my current project on electricity monitoring. The thought of monitoring my electricity consumption always fascinated me. After bumping into Bwired's site, I knew I had to have mine [:)]
My electricity meter is the traditional one with a spinning disk. So all I need to do is setup a photo diode, a light source, then some 1-wire components, right? So i thought...
I hit my first hurdle right away. The parts needed to build the pulse sensor is kinda hard to come by here in the Philippines. Also, apart from minor soldering skills, I couldn't tell a resistor from a transistor even if my life depended on it [:(]
So I did some hard thinking. And some more. Then it hit me - what if I can monitor the spins (the small, black stripe on the disk) with a webcam mounted below the meter and focused on the spinning disk.
All I needed then was a motion detection software which focused on a small area on the image and watch for black stripe to pass by. Once it passes (and motion is detected), the software then launches a batch script which inserts a timestamp record into MySQL database. It will do this everytime the disk makes one full spin.
I set to work and mounted the camera, configured the motion detection software, setup MySQL, cooked up a VBscript to log the spins and finally created some sort of a dashboard to monitor the statistics in VB6.
I got everything online last week and I'm now able to monitor my elecric consumption to my great delight
![Smile :)](./images/smilies/icon_smile.gif)
I still get some false positives from time to time though - especially with sudden changes in image lighting which the motion detection software interprets as motion. I'm still trying to find a way to remedy this...
I know, I know, my setup is far from ideal and what I would give to be able to setup a photo diode sensor with the 1-wire thingy but this wil have to do for the time being
![Smile :)](./images/smilies/icon_smile.gif)
Attached is the dashboard (work in progress) I created which indicates the KwHr consumption per hour and the rate (in pesos) which is based on the same convoluted computation our local electic company uses. It also gives you an actual picture of the spinning disk refreshed every second.
It also features a real time graph and some bar charts for hourly, daily and monthly trending.
Well I hope I've been able to share my own mediocre way of doing the monitoring and who knows, this might be a good example on how NOT to do this. But it sure was a LOT OF FUN to do it
![Smile :)](./images/smilies/icon_smile.gif)
Best regards,
Aris
[img]uploaded/aris_coronel/20071171045_dashboard.jpg][/img]