navitron
 
Renewable Energy and Sustainability Forum
UK's most popular Renewable Energy Forum May 25, 2012, 03:19:25 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Anyone wishing to register as a new member on the forum is strongly recommended to use a "proper" email address - following recent spam/hack attempts on the forum, all security is set to "high", and "disposable" email addresses like Gmail, Yahoo and Hotmail tend to be viewed with suspicion, and the application rejected if there is any doubt whatsoever
 
Recent Articles: UPDATE ON DECC APPLICATION FOR LEAVE TO APPEAL TO THE SUPREME COURT | Yingli Green Energy's PV Module Ranks No.2 in TUV Rheinland Energy Yield Test | Navitron Solar Showers at Glastonbury for Year 5!
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: 1 Wire Energy Monitor  (Read 2539 times)
ericw
Hero Member
*****
Offline Offline

Posts: 735


« on: January 15, 2010, 05:07:23 PM »

The latest addition to the widgets under this thread http://www.navitron.org.uk/forum/index.php/topic,8978.0.html is a cheap energy monitor that plugs straight into an existing 1 wire temperature monitoring setup with no software tweaking.
As the photo of the breadboard shows its extremely simple. It uses a clamp on current sensor normally used for whole house monitors (currently £8.95 on Ebay) 3 resistors and a PIC chip.
It senses the current and calculates the RMS value working out the power assuming the voltage is a standard 240v.

In the example of the output plot from LogTemp below the scale is 10 degrees = 1 kW


* power1.jpg (38.51 KB, 330x336 - viewed 967 times.)

* power.png (12.99 KB, 686x512 - viewed 961 times.)
Logged
StBarnabas
Hero Member
*****
Offline Offline

Posts: 2111


St Barnabas Chapel (2009)


« Reply #1 on: January 15, 2010, 05:54:00 PM »

Eric
an excellent piece of work.
I assume you are measuring true RMS?
What sort of sampling rate are you achieving and how many points are you using
What fraction of the time is taken up by the calculation of RMS? If this is not too high one could also calculate frequency and THD for example
What accuracy are you achieving?

My interest would be to have a few of these at lower currents one for each of my heat pumps for example and maybe the Solar Circulation pump - though I will probably go for a flow meter there. Presumably it would be easy to have a lower power version? This might be possible by simply using different resistor values.

If one could also measure voltage simultaneously how difficult would it be to get a true power meter and also measure current direction.

What are you using as a power supply? I find I get some flicker on the PIC ADCs when the 1-wire bus is running but that is using the 5V supply from the USB dongle which is probably not that great.

Sean
« Last Edit: January 15, 2010, 05:57:01 PM by StBarnabas » Logged


Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
ericw
Hero Member
*****
Offline Offline

Posts: 735


« Reply #2 on: January 15, 2010, 08:26:55 PM »

Sean,

I don't measure it continually but only during the Convert time.
I sample the voltage across a scaling resistor loading the current transformer 256 times per mains cycle (every 78usec), sum the squares of these voltages, divide by 256, and then calculate the square root. At the moment I'm plotting an 8 cycle average because that conveniently gets an 8 bit value into 'temperature format' 

By using a larger value scaling resistor you can get it more sensitive. Also as you are suggesting measuring a current in a wire you can disconnect, you can also use a much cheaper non-clamp type current transformer. I decided that doing this on the input to the consumer unit was a likely way of earning a nomination for a Darwin Award.

I'm using the power supply from the USB dongle but if you look carefully on the graph there does seem to be some jitter.  Decoupling the supply at the PIC removes a lot of the power supply noise and does seem to improve things. I notice Maplin do a very low drop out regulator which might be worth trying the provide a more stable reference voltage.

To simplify the calculations I use an 8bit value of the absolute value of the input voltage, and calculating the square root takes around 60usec.

I think the accuracy is set by the resistor tolerances and the 5v supply both of which are probably worse than the errors within the PIC, but all could be improved by adding built-in a calibration run with a known load and storing the fudge factors in the EEPROM.

Having seen the output graph I'm not sure that accuracy is as big an issue as dissuading SWMBO from using the tumble dryer.

Eric
Logged
brackwell
Hero Member
*****
Offline Offline

Posts: 737


« Reply #3 on: January 15, 2010, 08:46:11 PM »

Eric, Can you please tell me where exactly you saw the clip on current sensor-i never have much success with e bay
  Ken
Logged
Pat_
Sr. Member
****
Offline Offline

Posts: 290



« Reply #4 on: January 15, 2010, 10:59:49 PM »

Type 'current sensor' into the search box (on ebay).
« Last Edit: January 15, 2010, 11:01:57 PM by Pat_ » Logged
ericw
Hero Member
*****
Offline Offline

Posts: 735


« Reply #5 on: January 16, 2010, 08:51:44 AM »

Ken
You can also do a search for  'energy monitor'  that finds a couple more similar types.
Logged
StBarnabas
Hero Member
*****
Offline Offline

Posts: 2111


St Barnabas Chapel (2009)


« Reply #6 on: January 16, 2010, 12:04:49 PM »

Sean,

I don't measure it continually but only during the Convert time.
I sample the voltage across a scaling resistor loading the current transformer 256 times per mains cycle (every 78usec), sum the squares of these voltages, divide by 256, and then calculate the square root. At the moment I'm plotting an 8 cycle average because that conveniently gets an 8 bit value into 'temperature format'  
Not sure where you get the time! This is pretty much exactly what I was going to do and is very well done.
Quote
By using a larger value scaling resistor you can get it more sensitive. Also as you are suggesting measuring a current in a wire you can disconnect, you can also use a much cheaper non-clamp type current transformer. I decided that doing this on the input to the consumer unit was a likely way of earning a nomination for a Darwin Award.
Ah the Darwin awards! Any good entries this year? Any particular current transformers you would recommend?
Quote
I'm using the power supply from the USB dongle but if you look carefully on the graph there does seem to be some jitter.  Decoupling the supply at the PIC removes a lot of the power supply noise and does seem to improve things. I notice Maplin do a very low drop out regulator which might be worth trying the provide a more stable reference voltage.

To simplify the calculations I use an 8bit value of the absolute value of the input voltage, and calculating the square root takes around 60usec.

I think the accuracy is set by the resistor tolerances and the 5v supply both of which are probably worse than the errors within the PIC, but all could be improved by adding built-in a calibration run with a known load and storing the fudge factors in the EEPROM.
My gut feeling is that the calculations will be pretty accurate. Will run a simple Monte Carlo next week just to check. It is more likely that the supply voltage and resistor tolerances  will limit the accuracy
Quote
Having seen the output graph I'm not sure that accuracy is as big an issue as dissuading SWMBO from using the tumble dryer.

Eric

« Last Edit: January 16, 2010, 04:43:37 PM by StBarnabas » Logged


Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!