Community
OpenEnergyMonitor

OpenEnergyMonitor Community

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. :wink:

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

thumbsup highfive
In the words of Dick Martin, I’ll beer_cheer 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. :grin:

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. :grimacing:

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.

I’ve answered that above (1).

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