Issue in EmontxV3.4 with Continuous Firmware Calibration

I´ve update to the new Continuous Monitoring firmware in my EmontxV3.4, i enable in the firmware to show current for calibration. All 4 CT´s show the same current after calibration but P1 is always 15w higher than P2,P3 and P4 is lower 30w of P2-P3.


I´ve plugged in a SONOFF-POW to compare and I have values like P2-P3…

What is reading wrong to get these different values on the Power??
What is the “float i4Lead” values for in firmware??

Edit - formatted for readability. BT, Moderator

If you download emonLibCM, in the zip file you will find documentation for the library, which explains all calibration variables. You will have noticed that each channel shows a different power factor. Until you calibrate each channel for the current transformer that will be used for that channel, you should expect differences due to each c.t. having slightly different characteristics to the next one.

I have read the info in the emonLibCM but I fond that in the file EmonLibCM.cpp these options:

// --------------  general global variables -----------------
// Some of these variables are used in multiple blocks so cannot be static.
// For integer maths, many variables need to be 'long' or in extreme cases 'int64_t'

double currentCal[max_no_of_channels] = {90.91, 90.91, 90.91, 16.67, 90.91};
double  phaseCal_CT[max_no_of_channels] ={4.2, 4.2, 4.2, 1.0, 4.2}; 

double voltageCal = 268.97;

Do i have to change here values???

I have made my ICalibration as the sketch show the same current for the 4 CT´s


To adjust the PF so I can get the same power on the 4 channels I have to change the default value (4.2º) in phaseCAL???

No, you change them in your sketch. Those are the defaults that the sketch overrides.

The sketch source code is probably the safest place to make changes, as you have a record of the values you set.

You can also change them (I think, Trystan wrote the sketch) on-line using the Arduino IDE’s serial monitor. I don’t think he’s documented that. Here’s the documentation for my complete version, but I do know not everything mentioned in this is implemented in your sketch.

Config.pdf (47.9 KB)

I think the text that the sketch shows when you enter the Configuration Mode at power-up will be correct for that sketch, though.