Multi CT Sensor with Openenergy Library

I got a problem with using multi CT Sensor


I got the result from Sensor1 and Sensor2 not equally, I got Sensor1 correct value very close with Amp meter but for sensor2 different so far

Here is my code

#include “EmonLib.h” // Include Emon Library

EnergyMonitor emon1, emon2; // Create an instance
void setup()
{
Serial.begin(9600);
emon1.voltage(A0, 221.5, 1.7) ; // input pin, voltage calibration, phase calibration
emon1.current(A0, 220);
emon2.voltage(A1, 221.5, 1.7) ; // the same numbers as emon1
emon2.current(A1, 220);

}
void loop()

{

emon1.calcVI(20,1000); // 10 cycles (20 zero crossings) timeout after 2000 ms
Serial.print(“rms Irms Sensor1 = “); Serial.print(emon1.calcIrms(1480));
Serial.println(””);
emon2.calcVI(20,1000); // 10 cycles (20 zero crossings) timeout after 2000 ms
Serial.print(“rms Irms Sensor2 = “); Serial.print(emon2.calcIrms(1480));
Serial.println(””);

delay(1000);
}

Thank you

Why are you using the same input pin for both voltage and current? That is impossible. You must have the correct pin numbers.

Here are the method definitions:
void EnergyMonitor::voltage(unsigned int _inPinV, double _VCAL, double _PHASECAL); void EnergyMonitor::current(unsigned int _inPinI, double _ICAL)

inPinV is the input pin for the voltage signal,
inPinI is the input pin for the current signal.

What you have done is, you are measuring the emon1 current using whatever is on A0, and the emon2 current using whatever is on A1.
You are measuring the emon1 voltage using whatever is on A0, and the emon2 voltage using whatever is on A1.

Hi

I was remove emon.voltage and monitor measuring current only following pic above and duplicate CT sensor to 2
I still got a problem emon1 is correct 17.xx but emon2 value is 6.xx why it’s so different

Thank you

Your diagram shows only 1 input. Have you connected A1 & A2 together.

What do you read when you connect A1 & A2 together and do
emon1.current(A1, 220);
emon2.current(A2, 220);

Serial.print("Irms Sensor1 = "); Serial.print(emon1.calcIrms(1480));
Serial.print("Irms Sensor2 = "); Serial.println(emon2.calcIrms(1480));

Yes i do working with the same as your suggestion code

void setup()
{
Serial.begin(9600);
//emon1.voltage(A0, 221.5, 1.7) ; // input pin, voltage calibration, phase calibration
emon1.current(A0, 220);
//emon2.voltage(A1, 221.5, 1.7) ; // the same numbers as emon1
emon2.current(A1, 220);

}
void loop()

{
delay(500);
double Irms1 = emon1.calcIrms(1480); // Calculate Irms only
double Irms2 = emon2.calcIrms(1480); // Calculate Irms only
Serial.print("CT 1: “);
Serial.print(Irms1*230.0); // Apparent power
Serial.print(” ");
Serial.println(Irms1); // Irms

Serial.print("CT 2: “);
Serial.print(Irms2*230.0); // Apparent power
Serial.print(” ");
Serial.println(Irms2); // Irms
//emon1.calcVI(20,1000); // 10 cycles (20 zero crossings) timeout after 2000 m

But i still got value from between sensor1 and sensor2 so different as the same power source
Sensor1 is correct 17.xx but Sensor2 value is 6.xx is not correct

I’m not sure about the circuit diagram what should i connected when i need more than one CT Sensor, I’ll go back to check for make sure the circuit is correct connected or not

Thank you

could be a bad solider joint will give funny readings - does it zero out to roughly the same reading. if not then it probably a circuit issue

1 Like

Yes, my friend’s he insert the wrong R number at the burden so the result is not equally

Thank you so much human error