Having recently obtained a emonTX4 and emonVs and added them to my emonPi but the AC Vrms shows as -24x.xx (not 240x.xx) if I remove the emonVs then it shows 240.0, is this expected or have I got something wrong ?
My first guess is you have entered a negative calibration coefficient for the voltage. The voltage is automatically rectified by squaring (part of the root mean square process), so the calibration (which happens after this) is the only place where a minus sign could come into the calculation.
This is expected - it has assumed a constant 240 V and it’s no longer calculating real power, it’s using the current and 240 V to give only a “best guess” for the apparent power.
The calibration is
There has to be an unwanted minus sign somewhere. Where are you seeing this? The serial output window in the Arduino IDE, emonHub “View Log”, the Inputs page of emonCMS, or where?
In the Inputs view on my EmonPi (from the 433MHz feed)
and in the Serial Monitor
MSG:1298,Vrms:-240.29,P1:53,P2:2,P3:8,P4:1,P5:1,P6:3,E1:6184,E2:433,E3:1170,E4:151,E5:156,E6:491,T1:22.37,pulse:0 MSG:1299,Vrms:-240.30,P1:53,P2:2,P3:8,P4:1,P5:0,P6:3,E1:6185,E2:433,E3:1170,E4:151,E5:156,E6:491,T1:22.37,pulse:0 MSG:1300,Vrms:-240.27,P1:53,P2:2,P3:9,P4:1,P5:1,P6:3,E1:6185,E2:433,E3:1170,E4:151,E5:156,E6:491,T1:22.37,pulse:0
From this, it just HAS to be a negative calibration constant somewhere, which has made its way into the software in the emonTx. It could be a negative voltage reference, which you “corrected” by reversing the c.t’s, and this would turn the voltage calibration negative.
@TrystanLea & @borpin appear to have changed emonLibCM, and @TrystanLea wrote the sketch, so they are better placed to know what might have happened. I’ve looked but I can’t see an obvious mistake.
It’s the first time ever that this has been reported, so somebody has changed something somewhere.
Unfortunately, I can’t compile and try the default sketch because at least one library has been changed in an incompatible manner *but retaining the same name (and the Arduino IDE most stupidly does not allow the library path to be defined).
A work-around is to multiply by -1, either in emonHub or in the input processing of emonCMS.
Hello Stuart, could you email us at [email protected] with your order number and we will look into this for you.
I don’t have the order number as the items were purchased by someone else and passed to me to configure (neither do I see how this is relevant) as emonTX4 came with the LowPower Firmware, but because I am using an older emonPi I have re-flashed it using the Interface in Admin → Update to the Classic Firmware.
Could you check the nodes section of the EmonHub configuration, I wonder if a -1 scale factor could have worked it’s way in there? It should look like this:
[] nodename = emonTx4_17 [[[rx]]] names = MSG, Vrms, P1, P2, P3, P4, P5, P6, E1, E2, E3, E4, E5, E6, T1, T2, T3, pulse datacodes = L,h,h,h,h,h,h,h,l,l,l,l,l,l,h,h,h,L scales = 1,0.01,1,1,1,1,1,1,1,1,1,1,0.01,0.01,0.01,1 units = n,V,W,W,W,W,W,W,Wh,Wh,Wh,Wh,Wh,Wh,C,C,C,p
Alternatively perhaps that voltage calibration has not actually been saved as a positive value on the EmonTx4 itself? I see you listed the configuration above, but I wonder if the interface didnt pick it up correctly?
Do you see the arrows on the bottom of the CT sensors, these should be pointing in the direction of the load, are they pointing the wrong way as well?