The Real $5, Web Based Power and Gas Meter
by mark.duyvesteyn in Workshop > Energy
9395 Views, 26 Favorites, 0 Comments
The Real $5, Web Based Power and Gas Meter
This instructable is a work in progress, will add more as i have time over the next week or so.
In this instructable i will go through the steps i used to make a web based, real time, electricy and gas meter, for about $5. I saw the google power meter online a while ago and really wanted it, but i knew that i would be ages away from getting it, even more so living in New Zealand. So i went about making my own version, and in some ways it is beter than it i think.
The link to my website is www.sites.google.com/site/19acussen
There are a couple of things you need to have to be able to make this work for less than $5.
1) An electricity meter that has a flashing light on it, instead of the rotating disc. The flashing light flashes 1 for every unit of energy used. If you want to add a gas meter then your gas meter has to have a magnet pick up on it - will explain later.
2) A computer with a serial port that is always on - i use a mac mini that is connected to my TV for movies e.t.c. This draws about 30w, which is not much.
3) Basic soldering skills, computer skills and lots of perseverance. You will need to be able to program a picaxe or similar as well - very simple to do.
4) A free google account (gmail, google docs e.t.c)
And thats about it, it took me a few hours to make the electronics, and a very long time to get all of the uploading, filtering and publishing to a website sorted. I have done the ground work for this so it will be easy for you.
The Electronics..
The electronics are very simple.
You need a few resistors, an LDR and a 08m picaxe chip. Steps as follows
1) Construct a stanadard picaxe download circuit.
2) Add an LDR input to that cuircuit. Put the LDR on a lenght of wire so that it can reach from your power meter to your computer.
3) If required the gas meter can be added as well, all this is a switch input, held high with a 10k resistor to one of the inputs. The switch is a magnetic reed switch.
This above steps are very easy to do, for more infomation look at the manuals here,
http://www.rev-ed.co.uk/picaxe/
They explain everything in lots of detail and a lot beter than i can explain here.
If required the gas meter can be added as well, all this is a switch input, held high with a 10k resistor to one of the inputs.
The Software
There is a 7 step process to get the data from your power and gas meter to be displayed on a website.
1) data is collected by the picaxe, this counts the rotations of the gas meter, and the pulses of the electricity meter. This uploads the total of each via the serial out comand every 5 minutes or so.
2) On the computer, a python script is running, this is always looking for serial data coming into the serial port. Once it sees this data it uploads it to the web.
3) The python script on the computer uploads the data to a google spreadsheet
4) The goolge spreadsheet takes that data and sorts it, and makes pretty graphs and gauges.
5) the google spreadsheet publishes the data feeds for the graphs.
6) a google website gets the published data from the spreadsheet and displays it.
7) as an added step i used software on the mac mini to display the website as the desktop back ground (hence the website being 1920 wide)
1) data is collected by the picaxe, this counts the rotations of the gas meter, and the pulses of the electricity meter. This uploads the total of each via the serial out comand every 5 minutes or so.
2) On the computer, a python script is running, this is always looking for serial data coming into the serial port. Once it sees this data it uploads it to the web.
3) The python script on the computer uploads the data to a google spreadsheet
4) The goolge spreadsheet takes that data and sorts it, and makes pretty graphs and gauges.
5) the google spreadsheet publishes the data feeds for the graphs.
6) a google website gets the published data from the spreadsheet and displays it.
7) as an added step i used software on the mac mini to display the website as the desktop back ground (hence the website being 1920 wide)
Picaxe Code
The Python Script
The Google Docs Spreadsheets
This is where the data gets uploaded to. It's an online free spreadsheet powered by google docs.
1) Create a new google account. i used mark.duyvesteyn.powermeter@gmail.com
2) click on this link
http://spreadsheets.google.com/ccc?key=0AnIVnWY0exTWdGdTUE5UUHRob21ISmx3d1V3M3E2ZkE&hl=en
This is my spreadsheet where i have made formulars e.t.c. to make the graphs e.t.c.
3) Click file, save as copy rename it to "mydata"
The spreadsheet will be a good starting point for you, and will make pretty graphs but will need to be calibrated to your picaxe code and to your meter to get accurate data.
The pyhton script will upload the data into the data worksheet. The other worksheets pull the data from there and manipulate it into graphs e.t.c.
1) Create a new google account. i used mark.duyvesteyn.powermeter@gmail.com
2) click on this link
http://spreadsheets.google.com/ccc?key=0AnIVnWY0exTWdGdTUE5UUHRob21ISmx3d1V3M3E2ZkE&hl=en
This is my spreadsheet where i have made formulars e.t.c. to make the graphs e.t.c.
3) Click file, save as copy rename it to "mydata"
The spreadsheet will be a good starting point for you, and will make pretty graphs but will need to be calibrated to your picaxe code and to your meter to get accurate data.
The pyhton script will upload the data into the data worksheet. The other worksheets pull the data from there and manipulate it into graphs e.t.c.