House Power monitoring - Page 1
Forum section: electronics / projects

author: wemme
author_rank: Regular Contributor
timestamp: July 11, 2013, 12:44:29 am
content: Greetings all.First time post.Our house hold has extremely high power usage and so recently decided to get a Watts Clever ew4008 from our local Jaycar supplier to check our power meteris working correctly and to monitor and track power consumption on various load points.The basic kit is a single CT clamp with a 433Mhz transmitter module and a receiver unit, proprietary pin-out prolific 3v3 serial to USB converter 5v out smps plug pack batteries and that is about it. All and all everything looks all nicely packaged etc.each transmitter has a fixed CT with provision for plunging two more CTs in for 2 or 3 phase measurement.As the unit only measures current it can only do apparent power not real power which was a little annoying to discover after buying.the units are available in a small clamp and large clamp however i am only able to get the large clamps. the large clamps are so largeits practically impossible to clip them on anything inside a din rail breaker box. I had to cut the plastic thumb leaver off the one forthe heat pump TX to even remotely get it to fit. However I was quickly able to verify that my power meter was reading about right and being able to monitor my power real time (well on a 6 second polling loop) managed to shed a few 100s W/h base load or so from around the property.However I wasn't able to see what was going on with our heat pump or hot water to determine if there was any obvious issues with these.I ordered a couple more TX modules from watts clever Australia and soon had these connect to my hot water feed, heat pump and themain distribution board to the sheds out back. the main unit doesn't work that well with multiple input and the documentation is ratherlimited and software a bit of a joke. I also found a few open source projects that ran on PCs for logging consumption, graphing etc but the main objective here is to reduce power not use more keeping a computer running all the time.For some time I have been meaning to have a go at using a raspberry pi and thought now would be as good as any to get one and see if i can get this to do my donkey work. The next day it arrived and soon had it connected to my TV and USB wireless mouse and keyboard . After a quick google I found a protocol document from watts cleaver which is also pretty poorly written and has even some amusing fundamental errors in it however it was ruff enough to figure out what was going on.Running Raspbian (Debain distro for Rpi) the kernel loaded the USB serial drivers and soon with a bit of python code i was receiving data fromthe receiver module. I am all new to this however i now have my power usage being logged into a SQLite data base every 10 seconds and graphs beinggenerated from RRDtools every 15 minutes and being severed up on my raspberry pi through a Lighttp server.When I get home at the end of the day I can load the page on my cell phone or tablet and see what has been going on along with real timepower usage and stats which are updated every 10s.From the graphs I can see clearly what is going on so i hope to be able to conserve energy. however with a young family this is not going to be easy.Also from the Graphs I can see that the clamps are also picking up noise from adjacent cabling which is a bit arse.I have pulled apart the Receiver and had a look.There is nothing fancy about itThe micro is a Renesas LCD micro controller R5F2L38ACDFPRF modules in both the Tx and Rx units appear to be hopeRF RFM01 and RFM02.I still want to pull apart the TX modules and see what is inside them.My next project is to connect a RFM12 to the Rpi using a micro and hopefully reverse engineer the RF protocol and get rid of the receiver module.this interface board will also have a Rs422 bus for home automation logging similar to the Elektor bus project.Will post some graphs later in the day.RegardsWemme

author: wemme
author_rank: Regular Contributor
timestamp: July 11, 2013, 12:53:14 am
content: Opps had to resize all the photos

author: GeoffS
author_rank: Unknown
timestamp: July 11, 2013, 03:12:16 am
content: Having just received my quarterly power bill, I'm keen to do the same to monitor my power.I'd been looking at the open system fromhttp://openenergymonitor.org/emon/Biggest issue I have is getting an electrician to install them. Most wont, and those who will, want a lot of money for 5 minutes work!

author: wemme
author_rank: Regular Contributor
timestamp: July 11, 2013, 08:52:17 pm
content: Hi Scott,As your not doing any wiring I am surprised you need a sparky however I don't live in Australia so can't fully comment on this.

author: wemme
author_rank: Regular Contributor
timestamp: July 11, 2013, 08:55:13 pm
content: Here are some Graphs automatically generated and hosted on the Raspberry pi.

author: cosmos
author_rank: Regular Contributor
timestamp: July 11, 2013, 09:37:19 pm
content: Nice project, I am doing something similar but not using the Raspberry Pi, but maybe interesting still.My power monitoring consist of a old ASUS router with a USB connected uart.The uart is feed by a photo transistor and detects the light pulses (600 per kWh) from our meter.The router runs a short linux script counting pulses (characters with stop bit errors) and dumping the count every 60 seconds (on a count).I could have written it all to a remote disk but instead have USB hub + memory stick for local storage.It is not hard to pick out the large current consumers and remove them when plotting in a spreadsheet.You can see when someone got up and if they had a cup of coffee in the morning from the consumption patterns.

author: Jon Chandler
author_rank: Frequent Contributor
timestamp: July 11, 2013, 09:54:55 pm
content: I used a couple current clamps to monitor the energy for a while in my apparent and it's surprising what you can learn just from monitoring the total power used. I'm in the US where we have two 120 volt legs to ground. Small loads are connected between 120v and ground (more correctly called neutral) and larger loads like the stove, water heater and electric space heaters are connected between the 120v legs to operate on 240v.Looking at the traces of current vs time, you can see:1. Regular repeating load on one 120v line – the refrigerator cycling on and off2. Somewhat regular cycling loads on both 120v lines – electric space heaters cycling on and off3. Simultaneous increase on both 120v lines immediately after starting a shower and continuing for a period of time after the shower is completed – electric water heaterI was truly surprised by how much could be reasonably determined from two measurements. While you can't isolate a particular circuit, by noting where a spike occurs and the activity going on or even just knowing the time, you can make some good guesses as to the cause.

author: woodchips
author_rank: Frequent Contributor
timestamp: July 12, 2013, 06:09:35 pm
content: That is good, well done. Been meaning to do the same but not actually done it. The idea of counting the LED flashes from the meter is a good one, hadn't thought of that.

author: wemme
author_rank: Regular Contributor
timestamp: July 12, 2013, 08:36:43 pm
content: Counting pulses from the power meter is probably the easiest and most accurate way of doing so.Also you dont have any isolation issues which is always nice :-)In a normal house hold monitoring the total power in is adequate to determine whats what. however ours is far from normal.Also i am more interested in the long term trends of particular items that are hard wired.Nice job on the linux router monitor :-)

author: cosmos
author_rank: Regular Contributor
timestamp: July 12, 2013, 10:26:49 pm
content: This is the script I use. It is working here as it is but I am only occasionally writing stuff like this so be warned it could have ugly WTFs in it.Router is an ASUS WL500g with latest working FW from here (note WL500g support stopped at an earlier number)http://wl500g.info/forumdisplay.php?11-WL-500g-Firmware-Releases.Script and USB handling should be general so nearly any linux router with USB should work with a little bit of tweaking. (I am setting up to try it on a TP-WL703N when I get a bit more time)Script takes filename as argument and adds the date to it every day at midnight to get one file per day.Code:#!/bin/shstty -F /dev/usb/tts/0 50 raw pass8start=$(date +%s)count=0startcount=0remainder=0pulsesperkWh=600Joules_perpulse=$((1000*3600/$pulsesperkWh))fname=$1'-'$(date '+%F')test_fname=$1'-'$(date '+%F')echo 'logging to '$fnamewhile true;do#detect the next pulse(head -c 1 /dev/usb/tts/0)stop=$(date +%s)count=$(($count + 1))#echo $count#last minute handlingdelta=$(($stop - $start))#echo $deltadelta_adjusted=$(($delta+$remainder))if [ "$delta_adjusted" -ge 60 ]; then#process power for this minute and print it to file and displayremainder=$(($delta_adjusted - 60))deltacount=$(($count - $startcount))#echo $deltacountstartcount=$countstart=$stoppower=$((($Joules_perpulse * $deltacount) / $delta))echo ' : '$power'W '$(date '+%F %T')echo $power $(date '+%F %T') $delta $deltacount $count >> $fnametest_fname=$1'-'$(date '+%F')fi#change filename at midnightif [ "$test_fname" != "$fname" ]; then#fname=$1'-'$(date '+%F')fname=$test_fnameecho 'now logging to '$fnamefidoneApart from this I have a script that starts the right USB driver for my HW. (different from the one that was default on the router)Code:#!/bin/shif [ -e /tmp/harddisk/WL500g/usbserial.o ]theninsmod /tmp/harddisk/WL500g/usbserial.ofiif [ -e /tmp/harddisk/WL500g/ftdi_sio.o ]theninsmod /tmp/harddisk/WL500g/ftdi_sio.ofi

author: wemme
author_rank: Regular Contributor
timestamp: July 15, 2013, 11:34:20 pm
content: I am not sure what the deal is with Watts Clever they seem to be a bit half arsed.It does seem that they discontinue things like you say 10minutes after they release it.I also have a plug in meter from them which is complete crap.HopeRf make the RF modules but they are widely used in multiple products including the open energy projectedlisted previously and seem to be reasonable from what I gather.

author: wemme
author_rank: Regular Contributor
timestamp: July 16, 2013, 09:11:32 pm
content: I will be using the Hope RF RFM12.What were the main issues with them?I have used a cypress CYWUSB693x device in a product which was a right $#it with no end of issues.Everything we found a problem and a work around we would email them and they would publish a errata note a day or two later.We ended up using over 10K of them over the life of the product which is still in production.its the last time I ever will use a cypress part again.Cheers

author: wemme
author_rank: Regular Contributor
timestamp: July 19, 2013, 12:39:24 am
content: Cheers fro the information.Aliexpress do heaps of modules also if your in the need for cheap quality can be pretty marginal but have had some good products from there in the past also.

author: wemme
author_rank: Regular Contributor
timestamp: May 26, 2014, 10:46:56 pm
content: A couple of people have been asking for the code for this project.Attached is the python code.There are a number of modules required to run this.from memory they are listed below but i may have forgotten some.Rddtools.SQlite3python sqlite.lighttpdRegardsBart

author: macboy
author_rank: Super Contributor
timestamp: May 29, 2014, 05:51:25 pm
content: One way to monitor power usage accurately is to monitor the actual utility's power meter for your house. The old mechanical ones had a spinning disc with alternating black and white halves (or perhaps a black spot) and you could optically monitor the spinning. The new electronic ones have a blinky dot on their LCD or a blinky LED that serves the same purpose. You can optically monitor the meter from the outside without any modification, which would be illegal. A common blink rate is 1000 blinks per 1 kWh. It would not be a difficult project to build a microcontroller circuit to monitor the blinky and transmit by RF to a receiver inside the house.Commercial products are available which do the same thing such as Powercost fromhttp://www.bluelineinnovations.com/

author: kripton2035
author_rank: Super Contributor
timestamp: May 29, 2014, 06:43:12 pm
content: yep seeing that you are consuming 65KWh a day, it is necessary to monitor it and correct it !I live "normally" I think with house wife and 2 childs and barely consume 15kWh a day ...