Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Vrms = 0.43 without AC connected -> no CT readings

Looks like EmonTX 3.4 v1.7 does not work straight out without AC power as its showing a small AC reading anyway. Using serial monitor I looked that the script finds CT:s and should work. Also emoncms revceives the messages as message counter starts to go up.

Anyhow due to AC detected it fails to report CT readings. I tried pressing reset several times as instructed. Did not find a way to disable AC using serial config.

Something I have missed or is it time to change the script and reflash ?

It should. The AC power helps in the calculations, but is not essential for operation.

I think that value can simply be disregarded @Robert.Wall can say more.

That is correct.

How are you receiving the data? Over RFM to an emonBase or an emmonPi?

The 2 are not connected as I said above.

Are you measuring a standard 230v single phase system? If so that should work as it is.

Looks like the emonTxV3.4 Continuous Sampling v1.9 is not using EmonLibCM_acPresent to choose operation between apparent power vs real power. Thought it would automatically detect if AC is present or not and choose operating accordingly.

// Other options calculated by EmonLibCM
// RMS Current: EmonLibCM_getIrms(ch)
// Apparent Power: EmonLibCM_getApparentPower(ch)
// Power Factor: EmonLibCM_getPF(ch)

emontx.P1 = EmonLibCM_getRealPower(0);
emontx.E1 = EmonLibCM_getWattHour(0);


Note:
The remainder of this post has been deleted because it made demonstrably false assertions regarding the operation of emonLibCM. EmonLibCM does accurately measure the voltage and currents presented to it, and from those values, it calculates the real and apparent power taking into account the phase relationship between voltage and current. It is not the place of a general purpose library to make assumptions regarding the possible value of voltage that applies in the circuit being measured in the event that no voltage sensor is available and connected. That is properly done in the application sketch, making use of the rms currents reported by calls to
EmonLibCM_getIrms(channel) which along with the other API calls is fully documented in the file emonLibCM User Doc.pdf that is part of the official download of emonLibCM.

Therefore, the change proposed below is totally unnecessary and, as it will report false values, it must not be copied.

Robert Wall
Chartered Electrical Engineer & Moderator

I’ll have to leave @Robert.Wall or @TrystanLea to comment on that.

I’d be exceptionally surprised

Did a quick fix;

EmonTX firmware:

//emontx.P1 = EmonLibCM_getRealPower(0); 
emontx.P1 = EmonLibCM_getApparentPower(0);
emontx.E1 = EmonLibCM_getWattHour(0); 

//emontx.P2 = EmonLibCM_getRealPower(1); 
emontx.P2 = EmonLibCM_getApparentPower(1);
emontx.E2 = EmonLibCM_getWattHour(1); 

etc…

and to emonlibCM:
Irms_CT[i] *= currentCal[i];
if (!acPresent) Vrms = 230;
VA = Irms_CT[i] * Vrms;

Now CT1 shows correctly but at least CT3 is not showing a correct value. Maybe it has something related to a lack of AC trigger pulse ? Need to investigate more or find a library that works without AC or to find a suitable din rail transformer to include AC. The din rail transformer would be the way to go if easily obtainable.

Adding a note: My CT:s are connected to different phases, so therefore I suspect timing being an issue. Anyhow ordered a 8/10/12V din rail transformer so should be able to use 3 phase script instead…


Note:
This ‘fix’ will in general produce inaccurate and misleading results and should not be copied. For the reasons, please refer to the 2nd post above.

Robert Wall
Chartered Electrical Engineer & Moderator

That’s a false statement. EmonLibCM is designed to and does work perfectly with or without an a.c. input. But what you need to consider: how can it calculate real power, or apparent power, if it does not know the voltage?

I believe the sketch does not use the value of current and an assumed voltage to indicate an approximate apparent power on the grounds that if a battery supply is used, the life of the battery when monitoring continuously will be unacceptably short. I advise you to look at the shop page for the emonTx: If a battery holder is requested, then the “discrete sample” sketch is supplied.

Will you therefore retract your assertion that emonLibCM is not designed to work without an a.c. supply.

Sounds like the OP has his emonTX connected to a 3-phase service.

Robert, isn’t the present version of your CM library usable only in a single phase environment?

Thanks for pointing out towards discrete sampling, but doesnt that use old emonlib.h rather than new emonlib continuous sampling library ?

It’s intended, just like the emonTx and the emonPi, for a single phase UK domestic supply. EmonLibCM can be used on a multi-phase system if the power and apparent power values are ignored - because they will of course be wrong - and the voltage and current values are used instead. But those will not give a true reading of real (or active) power, only apparent power.

And of course if a fixed value is used for the voltage, then the accuracy of even the apparent power can never be better than the discrepancy between the assumed voltage and the actual voltage at any instant.

Installed discrete sampling but unfortunately with only 4 CT inputs + pulse connected it crashed every time when the load exeeded 11k (for all phases summed together). Removed WDT including unnecessary waits and now everything working smoothly on emonTX side.

It was really hard to find the discrete sampling source. The initial link above links to an older version where as new is still update this year but not an obvious one to find.