[Solved] EmonTX: Wanting to supply the AC voltage value (rather than measuring it)

I bought an emonTX board today and am already writing the code to have it work with wired Ethernet and MQTT.

My property runs on a 20kWh battery, with an inverter charger that gives me the present mains voltage value. May aim is to provide this value, either as is, or scaled down to what is expected.

Maybe someone familiar with the EmonLib could point me ot the value I need to ‘over-write’ to achieve this goal?

The Voltage in AU is 240V (not 230V as stated at Learn | OpenEnergyMonitor). What makes this V worse is the solar PV pushing to the grid often as high as 256 V.

Also, how does EnergyMonitor::serialprint() know which CT’s values to output?

Do you mean an emonTx, or an emonTx Shield? Please be careful to use the correct name, because they are two different beasts and you’ll get wrong and misleading information from us if you say one and mean the other.

I don’t understand why you want to ignore the measured value of voltage. Is it that you’re measuring the “wrong” voltage, i.e. the incoming mains:

rather than putting the a.c. adapter on and measuring the inverter output?

Taking the current (which is available from emonLib - just look at the header file for the “public” variables - those are all the quantities that are available to you - and serialprint() is a method that’s one of them) and multiplying that by your “best guess” or nominal voltage will give you apparent power - not the real power value that you get when you allow emonLib to do its calculations using the true instantaneous voltage that goes with each current sample so that it that also knows the phase relationship between voltage and current.

I know, it’s the same as the UK. Who knows, on 1st January next when we leave the EU, it might just go back to being called “240 V” instead of 230 V when the centre voltage has never changed from 240 V.

It’s a method that belongs to the instantiation of the class - just the same as ct1.Irms (or whatever call each instance).

Thank you for your detailed response.

The emontx is this: emonTx - Energy Monitor Transmitter
(Node ID : 15 (default), Enclosure: Assembled PCB Only - No Enclosure)
Maybe I bought the wrong thing; I couldn’t find the shield; when I looked for emonTx the above came up with no other options.

[edit1] OK, got it; it is under development boards; that’s what I should have bought; ouch.

It is not so much ignoring the value of measuring voltage, but the complications with it. There is no AU power supply, so how to do I make use of the existing power supplies. Then they take up space, etc. If the transformer were on the board or integrated that would be nicer. Hence, since I have this real-time V value, why not feed it into the emon, and update it every minute or so. Given the associated (and documented) errors, I cannot see much of a negative impact of getting the V rather than real-time reading it.
The whole property sits behind this battery; hence, I am not reading mains, but the ‘generated’ AC V. The grid only acts as back-up generator. But then, since I push PV out to the grid, I am measuring grid mains (with all its variations).

Duh, now I get the class thing (never really worked with these). :slight_smile:

The reason I asked was because you mentioned “wired Ethernet” - I was guessing you had an Arduino with Ethernet. If the emonTx is in saleable condition, the shop might exchange it. It’s worth an email to ask, if that’s what you’d prefer.

Yes there is: https://www.jaycar.com.au/9v-ac-1-amp-plugpack/p/MP3027 also https://www.jaycar.co.nz/9v-ac-1-amp-plugpack/p/MP3027
Voltage calibration coefficient - 300.0 (No-load = 10.4 V)

True, however it would mean difficult and expensive certification for sale within the E.U, which is sidestepped when we use an already-certified adapter outputting a low voltage.

“emon” is a generic name, we have emonSD, emonTH, emonTx, emonCMS, emonPi, emonEVSE and emonDC (I think that’s all :smiley:)

That’s possibly true if you always have loads with a power factor close to unity. When the power factor of your load is poor, then the scalar product of voltage and current will yield an apparent power that can be far removed from the real power. If you’re content with that, then that’s OK.

If you carefully calibrate your emonTx, you should be able to get to within 1% of the reference meter you’re using. You might want to review this: IoTaWatt and emonTx Accuracy (Note the Iotawatt is no longer available here.)

Ah, so in effect, you’re monitoring two largely independent systems: exporting PV to the grid, and current from the battery’s inverter and calculating apparent power using the inverter’s voltage output.

A reasonably good tutorial: C++ In Action: Industrial Strength Programming Techniques - Free Computer, Programming, Mathematics, Technical Books, Lecture Notes and Tutorials

1 Like

A wealth of knowledge here! Thank you!

Well, I keep the emonTx; can receive the RF24 via rtl_433 :slight_smile:
openHAB already receives that stream and separates it out to relevant items.

Thanks for the links; already dived into the book. :slight_smile:

1 Like