Hello there,Currently i have a project to measured Volt Amp Real power and Power factor by using ACS712 30A and zmpt101b with Arduino UNO R3 and i got Vrms and Irms correct but can’t seems to get Real power and Power factor right.Can you help me? My power factor from coding is 0.75 while from meter it showed 0.95. My calibration value for zmpt101b and ACS712 were 530 and 12 if i change it to other value Vrms and Irms result will go wrong so i don’t really know what to do.
Power Factor is the ratio of real power to apparent power.
Apparent power is the product of the rms average current and the rms average voltage.
Real power is the average of the product of the instantaneous values of current and voltage.
When calibrating, you must first get the values for voltage and current correct. That will give you the correct value for apparent power.
The real power is affected by the phase relationship between voltage and current, That can be affected by three things - a phase error when measuring the voltage, a phase error when measuring the current, and the time between measuring the voltage and the current.
In your case, you might have a very small phase error from your ACS712 and ZMPT101B, but I think the big error will be the time difference between measuring the voltage and current samples.
You do not say how you are computing those values, so all I can say is you should look at our library, which we use to convert the readings into useful values, and study and understand the mathematics of “phasecal”. There is a detailed explanation at Learn→Electricity Monitoring→Current & Voltage→Advanced: Explanation of the phase correction algorithm→Explanation of the phase correction algorithm. And then do something similar in your computations.
Thank you for your reply here is what i do with my code all i change is calibration for ACS712 from 0.3 to 12
emon_all.ino (1.1 KB)
can you help me identify the things i need to change? thank you
Why did you not write that you are using emonLib? There is a very simple way when you are using emonLib:
Look at emonlib.cpp, and at line 26:
void EnergyMonitor::voltage(unsigned int _inPinV, double _VCAL, double _PHASECAL)
PHASECAL is the variable you must change. In your sketch, you use the value 1.7, here:
which is a good number when you are using the UK a.c. adapter and SCT-013-000 current transformer. That value will be very wrong for your sensors.
Follow the instructions in Learn→Electricity Monitoring→Current & Voltage→1. Calibration Procedure→Calibration Procedure to set it correctly.
Thanks and i want to know that do i have to use emonTx shield to be able to use emonlib or not nessessary
No, you do not need to use the emonTx Shield. But if you are using your Arduino Uno, or another microprocessor which also has an analogue to digital converter that only accepts positive voltages, you must have a circuit that is the equivalent of the analogue parts of the emonTx Shield.
Thank you so much.one more question if i use ACS712 and zmpt101b with Arduino UNO R3 i have to build circuit from https://learn.openenergymonitor.org/electricity-monitoring/ctac/how-to-build-an-arduino-energy-monitor?redirected=true and change the calibration and PhaseShift value right?
I think that should be OK in general, but you must not use an operational amplifier with the ZMPT101B, because the output needs to be biased to 0.5 × VCC, and provided that you choose the correct value for resistor “R” (on the data sheet) to give approx 1.2 V at your normal mains voltage, you do not need the 10 kΩ & 100 kΩ resistors.
And because the output from the ACS712 is already biased to 0.5 × VCC, you do not need the capacitor and the 2 × 470 kΩ resistors there.
So i can just connect both my sensors directly to arduino uno and use emonlib without have to connect anymore circuit right? If i use acs712 and ZMPT101B
No, I didn’t say that. Carefully read again what I wrote. You still need the bias components for the ZMPT101B - the capacitor and the 2 × 470 kΩ resistors.
Oh sorry didn’t see that so i just connect acs712 directly to arduino and ZMPT101B connect with the circuit of 2 x 470 kOhm and the capacitor to arduino right?
I think you have it right, now.