Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The showCurrents option displays wrong values #8

Open
eax64 opened this issue Dec 16, 2022 · 0 comments
Open

The showCurrents option displays wrong values #8

eax64 opened this issue Dec 16, 2022 · 0 comments
Assignees

Comments

@eax64
Copy link

eax64 commented Dec 16, 2022

Hi,
The currents and power factors on my emontx4 didn't seem to make sense.

Looking at the code (in EmonTxV4.ino), there seems to have been a mistake:

Serial.print(F(",I1:")); Serial.print(EmonLibCM_getIrms(EmonLibCM_getLogicalChannel(1)),3);
[...]
Serial.print(F(",I6:")); Serial.print(EmonLibCM_getIrms(EmonLibCM_getLogicalChannel(6)),3);

Serial.print(F(",pf1:")); Serial.print(EmonLibCM_getPF(EmonLibCM_getLogicalChannel(1)),4);
[...]
Serial.print(F(",pf6:")); Serial.println(EmonLibCM_getPF(EmonLibCM_getLogicalChannel(6)),4);

I think it should be:

Serial.print(F(",I1:")); Serial.print(EmonLibCM_getIrms(0),3);
[...]
Serial.print(F(",I6:")); Serial.print(EmonLibCM_getIrms(5),3);

Serial.print(F(",pf1:")); Serial.print(EmonLibCM_getPF(0),4);
[...]
Serial.print(F(",pf6:")); Serial.println(EmonLibCM_getPF(5),4);

Readings before the change:

MSG:24,Vrms:244.50,P1:381,P2:-18,P3:27,P4:136,P5:52,P6:79,E1:37925,E2:4657,E3:14021,E4:8776,E5:6637,E6:4936,pulse:0,I1:1.961,I2:1.961,I3:1.961,I4:0.310,I5:0.370,I6:0.723,pf1:0.7938,pf2:0.7938,pf3:0.7938,pf4:-0.2564,pf5:0.2999,pf6:0.7668
MSG:25,Vrms:244.35,P1:385,P2:-18,P3:30,P4:135,P5:54,P6:79,E1:37926,E2:4657,E3:14021,E4:8776,E5:6637,E6:4937,pulse:0,I1:1.981,I2:1.981,I3:1.981,I4:0.309,I5:0.377,I6:0.723,pf1:0.7956,pf2:0.7956,pf3:0.7956,pf4:-0.2553,pf5:0.3226,pf6:0.7661
MSG:26,Vrms:244.55,P1:382,P2:-18,P3:30,P4:135,P5:51,P6:79,E1:37927,E2:4657,E3:14021,E4:8777,E5:6637,E6:4937,pulse:0,I1:1.967,I2:1.967,I3:1.967,I4:0.310,I5:0.378,I6:0.723,pf1:0.7933,pf2:0.7933,pf3:0.7933,pf4:-0.2565,pf5:0.3206,pf6:0.7657

Readings after the change:

MSG:13,Vrms:243.22,P1:384,P2:-18,P3:28,P4:132,P5:71,P6:68,E1:37913,E2:4658,E3:14021,E4:8772,E5:6635,E6:4934,pulse:0,I1:2.045,I2:0.307,I3:0.547,I4:0.713,I5:0.459,I6:0.292,pf1:0.7720,pf2:-0.2579,pf3:0.2136,pf4:0.7604,pf5:0.6378,pf6:0.9546
MSG:14,Vrms:243.90,P1:389,P2:-18,P3:28,P4:136,P5:72,P6:68,E1:37915,E2:4658,E3:14021,E4:8772,E5:6635,E6:4934,pulse:0,I1:2.060,I2:0.310,I3:0.542,I4:0.727,I5:0.462,I6:0.292,pf1:0.7748,pf2:-0.2554,pf3:0.2150,pf4:0.7652,pf5:0.6430,pf6:0.9550
MSG:15,Vrms:244.52,P1:393,P2:-18,P3:28,P4:140,P5:71,P6:68,E1:37916,E2:4658,E3:14021,E4:8773,E5:6635,E6:4934,pulse:0,I1:2.047,I2:0.311,I3:0.464,I4:0.741,I5:0.457,I6:0.293,pf1:0.7850,pf2:-0.2523,pf3:0.2484,pf4:0.7723,pf5:0.6390,pf6:0.9550
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants