Shield CT1234 Voltage SerialOnly.ino Example

From https://github.com/openenergymonitor/emontx-shield/blob/master/firmware/Shield_CT1234_Voltage_SerialOnly/Shield_CT1234_Voltage_SerialOnly.ino

I have one of these connected to the CTs from your shop. Just wondering about:
// (ADC input, calibration, phase_shift) ct1.voltage(0, 300.6, 1.7); ct2.voltage(0, 300.6, 1.7); ct3.voltage(0, 300.6, 1.7); ct4.voltage(0, 300.6, 1.7);

I presume the Power Factor is calibrated by the 1.7 example.
I seem to get 1.01 for all 4 CTs
How do I calibrate the 1.7 for the other 2 phases?

I have the 9Vac transformer and the Voltage, Current watts are reading correctly

Do you really mean that? You have a 3-phase supply?

I have a 3 phase supply feeding remote single phase distribution Boards and CT4 on a economy7 meter.
I have the 4CTs on a bench at present on a single phase attached to my shield.

I wonder:
A. Is it possible to get the each power factor / phase from “EmonLib.h” or does it only read on the phase the 9v transformer is attached to ?
B: How do I calibrate the (phase angle calibration) named phase_shift or is the default of 1.7 normally close enough in a 3p x 230v system?
Thanks

You are using a sketch that was written for the UK domestic single phase supply.

You can only measure real power on c.t. inputs that share the same phase as the a.c. adapter (a voltage transformer). If you put a c.t. on one of the other phases, you will not read the corrrect real power, and you will have only an estimate (albeit a good one while the phase voltages are balanced) of apparent power. You cannot use the phase angle calibration to correct that.

You should be using the three-phase sketch. Unfortunately, it has been modified by others and I can no longer vouch for its accuracy, or even whether it will work for you.

Thank you for your time answering that.

I thought it might be that way.
I will use it anyway as it works

FYI
I tried the 3Phase_Voltage.ino but using arduino.mk to upload it through a Rpi but gave up as my shield is in a remote building

I get compilation errors below on an Uno.
error: ‘calcVI3Ph’ was not declared in this scope
In function ‘void calcVI3Ph(int, int)’: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

The 3-phase PLL sketch used to compile, load and run fine under the Arduino IDE.
Obviously if you’re porting it into a different OS and compiling using a different compiler & linker, then you’re going to need to make some small changes – basically because the Arduino IDE is “dumbed down” and pre-supposes you have a “main( )” etc.

[Edit]

A function of that name doesn’t exist in the version that I created, so I’m afraid I cannot help you with changes made by a third party.

Thanks for that

A new problem is that
My 9vac adaptor is on L1
My economy7 is on L3 (Shield input4)

It appears Input 4 defaults to L1 judging by the mad readings I’m getting

Is there a way to change my sketch “Shield_CT1234_Voltage_SerialOnly.ino” to move input4 onto L3 instead of L1 ?

No, because as I wrote earlier, you are using a single phase sketch. It will only read real power correctly when used on a single phase supply, because that and only that is what it was designed to do. It will not read real power correctly as the voltage and current come from different phases.

If you want to report apparent power, which I’ve already told you about (and which will be ‘correct’ because it’s the product of rms voltage and current and disregards the phase relationship between the two), then you need to substitute that in the sketch where the values are despatched, by whatever method you use, to your RPi. EmonLib calculates all the relevant values, it’s just a matter of changing one statement per input. The values available are realPower, apparentPower, powerFactor, Vrms & Irms.

My best advice will be to download the original 3-phase PLL sketch, install the Arduino IDE on your computer, obtain a programmer and set up and calibrate the Uno & Shield connected directly to the computer. The procedure is fully documented in the instructions.

Thanks Robert,
Just went with Vrms and I sent to emonpi, which does the calculations.
It means I can verify easily with my clamp meter having the Amps separate