emonTx v3 3.4 Continuous Sampling .ino and calibration

I have a remote emonTx v3 up and running and reporting sensor data to emonCMS via wifi and emonESP.

I want to now calibrate the VRMS and CT readings. I am using the Arduino software and can view the emontx outputing to the serial window with a USB UART adaptor.

As I am using an emonESP I could disable the RF function.

I have found the following sketch:-

How is best to comment out the RF function so that it is not operating, and keep the wifi connection?

Regarding the calibration, is it better to edit the sketch or am I correct in thinking it is possible to calibrate it on the fly using commands in the serial window?

I would normally play with this and use trial and error to learn how the sketch behaves. However this emonTx lives in a communal electric meter room - it is not easy to get access inside and I cannot spend a good deal of time in there once it is open. I need to edit a sketch and upload/calibrate when I can get brief access.

Hello @PaulJordan

It’s possible with this sketch to set the configuration over serial and then save to EEPROM, see the helper text here: emontx3/firmware/emonTx34/emonTx34_CM/emonTx34_CM_config.ino at master · openenergymonitor/emontx3 · GitHub

to disable radio it’s:

w0

then save with

s

Not totally clear from Trystan’s answer, you can both calibrate and disable the built-in ISM band radio using a laptop & programmer on-site and the serial connection.

Here’s a general readable & printable write-up of the commands to calibrate an emonTx or emonPi. The emonTx will give you the specific available commands if you ask it with ‘?’.

General settings & calibration on-line.pdf (48.2 KB)

Thank you Tristan for the confirmation and to Robert for the printable help sheet - it was very useful.

I have managed to update the VRMS and the reading on CT one is far closer than it was before.

I started with the ‘?’ command, and I am concerned that a few of the other commands didnt seem to work, despite being listed:

+++ either within ten seconds of start up or after ten seconds showed no response in either case.

l - List
s - Save
? - Show text all worked, but x - exit and v - version did nothing. I did not try r - restore.

I was able to turn off the temperature sensing but not the RF function.

Should I be concerned about this? I rebooted the emonTx and the VRMS and CT values I had changed had saved correctly.

As I am only measuring a single phase installation, should the phase calibration for CT 1 simply be ‘1’?

** edit ** I cannot say with any certainty what sketch is on the emontx - I updated it to 3.4 using the tool within an emonpi.

I appreciate the help so far, even more so as I am messing with kit that had been discontinued. Many thanks!

It would be nice to turn off the r.f., but it’s not necessary.

For a reason I don’t know, that appears to be no longer required.
However, ‘x’ should have worked and shown “Continuing…”, and ‘v’ should too and shown “EmonTxV4 V2.4.0”. (Note: lower case ‘x’ and ‘v’).
‘w0’ should have turned the radio off (and replied “RF off”) or ‘w1’ turns it on and replies “RF on”. (No spaces between ‘w’ and ‘0’

No, the value required is the phase error in degrees, the default is 3.0 (degrees), but if you want or need accuracy, adjust the value so that the power factor reads as close to 1.0 as possible (or real power is equal to apparent power) at the “normal” current you draw.

(I did warn you that the sheet was “general”, and some sketches don’t use all the commands listed. But all the commands listed by the emonTx with ‘?’ should have worked.)