Author Topic: House Power monitoring  (Read 8438 times)

0 Members and 2 Guests are viewing this topic.

Offline wemmeTopic starter

  • Regular Contributor
  • *
  • Posts: 63
House Power monitoring
« on: July 11, 2013, 12:44:29 am »
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 meter
is 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 large
its practically impossible to clip them on anything inside a din rail breaker box. I had to cut the plastic thumb leaver off the one for
the 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 the
main distribution board to the sheds out back. the main unit doesn't work that well with multiple input and the documentation is rather
limited 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 from
the 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 being
generated 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 time
power 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 it
The micro is a Renesas LCD micro controller R5F2L38ACDFP
RF 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.
Regards
Wemme
 

Offline wemmeTopic starter

  • Regular Contributor
  • *
  • Posts: 63
Re: House Power monitoring
« Reply #1 on: July 11, 2013, 12:53:14 am »
Opps had to resize all the photos :o
 

Offline GeoffS

  • Supporter
  • ****
  • Posts: 1272
  • Country: au
Re: House Power monitoring
« Reply #2 on: July 11, 2013, 03:12:16 am »
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 from http://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!
« Last Edit: July 15, 2013, 10:42:05 am by GeoffS »
 

Offline wemmeTopic starter

  • Regular Contributor
  • *
  • Posts: 63
Re: House Power monitoring
« Reply #3 on: July 11, 2013, 08:52:17 pm »
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.

 

Offline wemmeTopic starter

  • Regular Contributor
  • *
  • Posts: 63
Re: House Power monitoring
« Reply #4 on: July 11, 2013, 08:55:13 pm »
Here are some Graphs automatically generated and hosted on the Raspberry pi.

 

Offline cosmos

  • Regular Contributor
  • *
  • Posts: 110
  • Country: 00
Re: House Power monitoring
« Reply #5 on: July 11, 2013, 09:37:19 pm »
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.
 

Offline Jon Chandler

  • Frequent Contributor
  • **
  • Posts: 539
    • Throw Away PIC
Re: House Power monitoring
« Reply #6 on: July 11, 2013, 09:54:55 pm »
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 off

2.  Somewhat regular cycling loads on both 120v lines ā€“ electric space heaters cycling on and off

3.  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 heater

I 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.
 

Offline woodchips

  • Frequent Contributor
  • **
  • Posts: 594
  • Country: gb
Re: House Power monitoring
« Reply #7 on: July 12, 2013, 06:09:35 pm »
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.
 

Offline wemmeTopic starter

  • Regular Contributor
  • *
  • Posts: 63
Re: House Power monitoring
« Reply #8 on: July 12, 2013, 08:36:43 pm »
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 :-)

 

Offline cosmos

  • Regular Contributor
  • *
  • Posts: 110
  • Country: 00
Re: House Power monitoring
« Reply #9 on: July 12, 2013, 10:26:49 pm »
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: [Select]
#!/bin/sh
stty -F /dev/usb/tts/0 50 raw pass8
start=$(date +%s)
count=0
startcount=0
remainder=0
pulsesperkWh=600
Joules_perpulse=$((1000*3600/$pulsesperkWh))
fname=$1'-'$(date '+%F')
test_fname=$1'-'$(date '+%F')
echo 'logging to '$fname

while true;
do

#detect the next pulse
(head -c 1 /dev/usb/tts/0)
stop=$(date +%s)
count=$(($count + 1))
#echo $count

#last minute handling
delta=$(($stop - $start))
#echo $delta
delta_adjusted=$(($delta+$remainder))

if [ "$delta_adjusted" -ge 60 ]; then
#process power for this minute and print it to file and display
remainder=$(($delta_adjusted - 60))
deltacount=$(($count - $startcount))
#echo $deltacount
startcount=$count
start=$stop
power=$((($Joules_perpulse * $deltacount) / $delta))
echo ' :  '$power'W '$(date '+%F %T')
echo $power $(date '+%F %T') $delta $deltacount $count >> $fname

test_fname=$1'-'$(date '+%F')
fi

#change filename at midnight
if [ "$test_fname" != "$fname" ]; then
#fname=$1'-'$(date '+%F')
fname=$test_fname
echo 'now logging to '$fname
 
fi

done

Apart 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: [Select]
#!/bin/sh
if [ -e /tmp/harddisk/WL500g/usbserial.o ]
 then
  insmod /tmp/harddisk/WL500g/usbserial.o
fi   
if [ -e /tmp/harddisk/WL500g/ftdi_sio.o ]
 then
   insmod /tmp/harddisk/WL500g/ftdi_sio.o
fi
 

Offline wemmeTopic starter

  • Regular Contributor
  • *
  • Posts: 63
Re: House Power monitoring
« Reply #10 on: July 15, 2013, 11:34:20 pm »
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 projected
listed previously and seem to be reasonable from what I gather.

 

Offline wemmeTopic starter

  • Regular Contributor
  • *
  • Posts: 63
Re: House Power monitoring
« Reply #11 on: July 16, 2013, 09:11:32 pm »
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



 

Offline wemmeTopic starter

  • Regular Contributor
  • *
  • Posts: 63
Re: House Power monitoring
« Reply #12 on: July 19, 2013, 12:39:24 am »
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.

 

Offline wemmeTopic starter

  • Regular Contributor
  • *
  • Posts: 63
Re: House Power monitoring
« Reply #13 on: May 26, 2014, 10:46:56 pm »
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.
SQlite3
python sqlite.
lighttpd

Regards
Bart
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2275
  • Country: ca
Re: House Power monitoring
« Reply #14 on: May 29, 2014, 05:51:25 pm »
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 from http://www.bluelineinnovations.com/
 

Offline kripton2035

  • Super Contributor
  • ***
  • Posts: 2645
  • Country: fr
    • kripton2035 schematics repository
Re: House Power monitoring
« Reply #15 on: May 29, 2014, 06:43:12 pm »
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 ...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf