Community
OpenEnergyMonitor

# Help with whole house power monitoring (200amp/USA)

It sounds like Larry is missing the concept of scale here.

Larry,

What Robert and Paul are trying to say is the voltage supplied by the AC to AC transformer (wall-wart) is lower than, but proportional to, your 240 Volt AC Mains Voltage.

The voltage sample from the transformer is used to determine the phase relationship between voltage and current to enable the hardware to calculate real power, i.e. what you get billed for. Without the transformer, the hardware uses a fixed value in the sketch to make the calculation. The result of that calculation is only an estimate of apparent power. We want an accurate measure of real power.

Robertâs graph shows how the voltage at his location varies througout the day. That happens everywhere
and is one of the reasons the AC wall-wart is needed for accurate measurements. i.e mains voltage doesnât stay at one value. It varies, over a fairly small range, constantly.

It doesnât âknowâ anything. The onus there is on you. If you do as PB66 mentioned two posts above this one, itâll work fine. I ran an emonTx for about two years with a 120 Volt wall-wart as an AC voltage sample source, and it worked like a champ. The emon part of an emonPi is essentially a stripped down emonTx.

To get optimum accuracy, youâll need to perform the calibration procedure.

Thanks for the replies.

Aha, Scale and proportional might be the magic Iâm missing here.

I am following what is being said by all, and I do have an electrical background for more decades than Iâd like to confess to.

I have a True RMS Fluke DMMâŚShould the emonPi match and display the same Volts as my Fluke, or is there more to it than that?

Hereâs what I wrote before I saw your last post above:

In order to measure the a.c. voltage, we have to step it down to about 1 V. For practical reasons, we do that in two steps: the first step with an a.c adapter and the second with resistors. All we need to know is the overall fraction by which we step it down. That voltage goes into the analogue to digital converter and appears as a pure number in the maths. And although it varies a bit due to all the factors I and my colleagues have mentioned, itâs roughly the same number whether your mains is 120 V, 230 V or 240 V, provided you use the right adapter.

Now to display the real voltage and to calculate the power, we need to turn those ânumbersâ back into voltage values.

In the final stage of the maths, we need to multiply by a scale factor that happens to be the inverse of the fraction we divided the voltage by. If we know what that ratio is, and it turns out we do (with a small margin of error), we know what the multiplier will be. That number is the calibration coefficient. Itâs that which you set in the '328P front end with âcalibration = 230Vâ or âcalibration = 110Vâ.

Now hereâs where it gets messy.
Those are not numbers, they are âflagsâ that actually set, in the '328P front end, calibration values of 256.8 and 130.0 respectively, for a 230 V a.c. adapter and a 120 V a.c. adapter respectively. In fact, these are the mains voltages needed to give exactly 1 V at the input of the analogue to digital converter. But you are using a 120 V adapter on half of a 240 V supply, and there are only two flags - there isnât one for 240 V. It just got messier.

You can do one of two things:

1. Set âcalibration = 110Vâ and double everything when it gets into emonHub,
2. Set âcalibration = 230Vâ as a starting point.

In each case, you have to multiply the pure number in two stages to get back to the actual voltage that youâre measuring, once in the '328P front end because you have to choose one or the other, and the second time in emonHub. In the first case, in emonHub it is to double up from 120 V to 240 V, plus youâll need a final small adjustment to that doubling to correct for component tolerances. In the second, youâll only need the adjustment for component tolerances.

Finally, please do adjust the `scales = ...` so that you read exactly (or as close as you can) the voltage that your Fluke shows. That is exactly how it should be done. The Piâs internal display wonât change as you change `scales = ...`, but the numbers shown on your web browser page in emonCMS will. And those are the important ones, because that is what is recorded in emonCMS.

Then youâre in good company, Lar. I started my 45th year in Electronics this month, and Robert has been involved in Engineering longer than that. No need to feel like the Lone Ranger.

Well then, indeed I am in good company for sure. âOld Guys Ruleâ This place is getting better all the time.

I was the guy wearing a hard hat and a tool pouch and was chained to a step ladder all day. : )

And Thanks to all who have repliedâŚyour willingness to share and help is Fantastic!

1 Like

In the words of Dick Martin, Iâll to that!

YVW,S!

Yes and no. You should aim to get the same(ish) values from emoncms as you see on your DMM, however, be aware that there will be time differences, ie what you see on you meter will not appear in emoncms for up to 15 seconds (may equally be significantly faster, itâs luck of the draw) as the voltage is only reported every 5secs and the input and feeds pages in emonCMS refresh every 10s. The voltage reported in emoncms is also a average for the proceeding 5secs not a rolling 5secs (or what ever the âtrue RMSâ calculation period is on your DMM). Your best bet is to do it when the supply voltage is at itâs most stable (eg middle of the night for example) and make slow adjustments allowing for some discrepancy otherwise you will end up chasing your tail if you try to get every read exact.

ErrâŚ
Are you sure? I donât think so. I think itâs a 10-cycle snapshot every 5 s.

Whoops! You right, I was thinking constant monitoring. The premise remains, the values will not necessarily follow exactly (even with the delay), whilst I was thinking 5s average, the reality is a micro-snapshot within the 5sec interval, maybe not always the exact same point at which the DMM is checked.

A slower approach avoiding âknee-jerkâ corrections and understanding that a ânot-exactly the sameâ value doesnât necessarily mean a previously applied correction is wrong, check it over a period of time before changing it again.

I think thereâs only one way to do this, and thatâs with a rock-solid lab power supply - for both current and voltage. And thatâs out of the reach of almost everyone.

For everyone else, the only realistic way is to get the voltage as close as possible using the best meter available, do the same with current (if you can), then calculate and record energy over a period of time and compare that against the supplierâs meter.

Okay, I get the gist of that. Thanks.

Now I need to know where at to do the edit/change.

Is it somewhere on the SD card?

Could I access it through emoncms locally?

I do have my own revenue grade watthour meter near to the emonPi. It displays power factor and RMS values I can compare to.

Yes, you do it through the emonCMS on your emonPi.

Go to Setup > EmonHub > Edit Config
and find your emonPi - itâs Node 5:

``````[[5]]
nodename = emonpi
[[[rx]]]
names = power1,power2,power1pluspower2,vrms,t1,t2,t3,t4,t5,t6,pulsecount
datacodes = h, h, h, h, h, h, h, h, h, h, L
scales = 1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1
units = W,W,W,V,C,C,C,C,C,C,p
``````

All the values in `names`, `datacodes` etc are in order left - right, so to adjust Vrms you need to adjust the 4th value in `scales = `.

So to increase the reading in emoncms by 10%, youâd change it from 0.01 to 0.011
(Itâs 0.01 because your 240.12 V is sent as an integer: 24012, and to get back to volts, you multiply by 0.01)

That will not adjust the power value because the multiplication by current is done before this stage. Therefore youâll need to change the 3 powers by the same proportion - and thatâs assuming the current readings are spot on. If theyâre not, you need an additional adjustment for that too, but that adjustment will probably be different for power1 & power2. âpower1pluspower2â is the sum of the two, so thatâll need an average adjustment.

Excellent, Thanks for the clear directions.

I shall save a copy before playing around, just in case I might need to revert back.

Appears that I was able to get VRMS to within a fraction of a volt.
But the way I did it I get 4 digits right of the decimal point.

And it appears the calibration is in fact shown accurately on the LCD display internal to the emonPi.

I think the emonPiâs 2 c.t.s cannot give me what data I want.

I have a âsplitâ distribution panel and my solar system has a input and an output.
The input side is bi-directional solar inverter sync and connects to the grid through the main distribution panel and can import, export and consume. There is a âbypassâ switch at the solar end also.
Then the solar output can be either solar or grid source or even a blend of both sources but never export to the gridâŚthat is my âcritical loadsâ (sub) panel through the solar system wiring.

Hereâs the rub, when no solar production is available grid will feed all the main dist.panel loads, of which one such load is the _critical loads (sub) panel. SoâŚpower1 , power2 , and âpower1pluspower2â doesnât measure correctly due to having a now large negative value added to just a slightly larger positive value, So simple addition doesnât reflect a usable total.

Would I need a third c.t.to get this to work? And does emoncms have to do some different math?
Yes, I do know the emonPi can only do 2 c.t.s, so that would be huge stumbling point if needing a third c.tâŚ

I need a diagram of your system to understand what youâre saying. Iâve only ever known about one measurement on one 240 V circuit.

Good Day to you Robert and All,

Yes, certainly it would make it more clear to what I tried to describe.

Larry

fp2_qsg_na.pdf (1.6 MB)

Edit - moved attachment from 3rd party site to OEM. BT

OK, I think Iâm beginning to understand. The short version is, you have not only PV but also batteries for load-lopping.

The âMainâ is solely an incomer to the inverter-battery chargers, while the âSub-panelâ is the main house distribution board.

So what do you want to know? Notice I said âknowâ, not âmeasureâ. Those might mean the same, or they might not. So maybe you need to answer both: what you know you want to know, and what you think you need to measure.

Not exactlyâŚâSub-panelâ is âCritical or Essential Loadsâ with Battery Backup (inverter output)
and âMainâ is Grid connected and is Non-critical or Non-essential Loads" and without battery Backup (inverter input and SURPLUS PV export to grid)

Okay, for setting up emoncms using the emonpi I measure Power1 and Power2, then both Power1 and Power2 are added together. So, where would I place the c.t.s at to get meaningful data?

Just to restateâŚâMainâ Input Power can and does move bi-directionally, with import and export (Main) so value can be positive or negative depending on direction of flow.

The other moves Output Power all in one direction (critical loads panel) but from two sources.
(PV inverter/charger, or the grid or a mix of both blended) Never does any Exporting.
Depending on which source is used (grid or PV) (180* out of phase) causes the values to change from positive or negative.

How would emoncms measure Solar Totals, Grid Totals and the Combined Consumed Totals?
How would emoncms measure Solar Total Production? (consumed + export)
How would emoncms measure Grid Totals? (import +/- export)

I realize that all of these are not possible all at one time with having a total of two c.t.s that a emonPi has, but I am not sure any one option is even possible singly given my changing (+/-) values.

Help straighten me out here please.

Larry

So you have other loads connected to the âMainâ panel that arenât shown on your diagram? In the absence of any other information, I obviously thought that you had exactly the âstockâ installation that the manual shows. A new or supplementary diagram is needed then.

Up until now, youâve only told us about 240 V loads etc. Everything changes now that I know there are 120 V loads coming into the picture.

The possibility of neutral current, because the 120 V loads on âAC Subpanelâ share a common neutral, means that you can no longer measure just one line current and assume the current on the other line is the same. You must measure both line currents, or one line and neutral (which amounts to the same thing, after youâve done some maths).

And note, the two c.tâs need to face in opposite directions.

Now because youâre measuring the current taken by the 240 V loads twice - once as it comes in on one line and again as it goes out on the other, you should return to scaling your a.c. voltage to 120 V.

(Have a look again at the diagrams and maths on the âUse in North Americaâ page if this is getting confusing.)

Taking the last point first:

But I am! The emonPi and emonTx will, given an a.c. voltage input, give you a value of real power that is signed according to the direction of power flow. Our convention is imported power and energy is positive.

Your options for places to measure are:

1. If you put a c.t. on each incomer on the upstream side of âAC Distribution Panelâ, then youâll measure the nett power from or to the grid.

2. If you do the same thing on the âAC Subpanelâ, youâll get the house consumption of the loads fed by that.

3. If you can (conceptually if not physically) get a pair of c.tâs through which you can thread all the outgoing wires from the âMainâ panel except the inverter, then youâll get the consumption of all your ânon-criticalâ loads.
You can achieve the same thing by measuring the output from âAC Distribution Panelâ to the inverters and subtracting that from the Grid input.

4. If you put a pair c.tâs on the inverter feed from the âMainâ panel, then you get the nett power that goes to everything except the ânon-criticalâ loads.

Without taking data from your inverter or measuring on the d.c. output of the panels themselves, you canât know the solar total by itself. You can take the difference between what goes out of the inverter to the âAC Subpanelâ and what goes into the inverter, and the long-term value you get is Solar less inverter and battery losses. In the short term, thatâs more or less meaningless as it includes the battery charging or discharging.

Youâd add the result of ânon-critical loadsâ (3) to the input to the âAC Subpanelâ (2)

It looks like you must move things around a lot, or you need a lot more kit.

Duly noted and will investigate further with 120 Volt scaling. Diagram is accurate other than labeling to there being other loads, of which some are 120 VoltâŚno two installs are alike and my install is as 'stock" as any other. I can certainly pen in some other breakers/loads but how might I upload them here?

Could you also comment on the 180 degree out o phase when power source is changed but direction has not changed through a fixed c.t.?

Math goes out the window whenever measurements change between a positive value to a negative value when the source changes between PV to grid and back going to the critical loads sub-panel.
If changing to 120 V scaling doesnât overcome this I am at a loss to see the math done correctly.

Got to be away for a while now, Thanks for your generous assistance.

Larry