Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Power & power factor reading issue while using ACS712 & ZMPT101B Module

Tags: #<Tag:0x00007f6821022200>

Hi Everyone,

I’m currently working on an Energy meter project to measure voltage, current, power, power and energy. I stumbled upon emoblib and currently using it to measure above parameters.

I’ve directly connected ACS712 & ZMPT101B sensors to arduino and made following changes in calibration as follows

emon1.voltage(1, 325.3, -2); // Voltage: input pin, calibration, phase_shift
emon1.current(2, 13.5); // Current: input pin, calibration.

Also, Ive not done any other calibration other than the above changes. Please suggest me if anything else needs to be done.

I’m getting proper voltage, current, power, pf values for resistive load (incandescent bulb) which i cross checked with an energy meter. But, I’ve no luck in getting proper power and pf for loads such as CFL bulb, led light etc.

This project i’m working on is very time sensitive. So, any help will be highly appreciated. Thanks in advance

Regards
Karthik

Those are the only calibration values available to you - and the only ones that should be necessary. However, I’m rather concerned by the value -2 for the phase shift. Ideally, the value for that should lie between 0 and 1. In the circumstances for which emonLib was designed, it compensates for both phase errors in the transformers and for the timing error between making the two readings. The phase errors of your transducers should be very small, all you should need to correct for is the delay between the two readings, so I’m wondering whether you have got the interface for your sensors right, and not introduced a phase shift somewhere.

Have you considered noise? In our experience, Arduino ‘breadboard’ builds are often susceptible to excessive noise, and this of course will confuse the readings at low currents, which I think are implied when you say CFL bulb and LED light - in the singular.

The other question is - what is the standard against which you are comparing? It might well be that this too has errors.

Thank you so much for the quick response, sir.

‘’‘so I’m wondering whether you have got the interface for your sensors right, and not introduced a phase shift somewhere’’’

I’ve directly connected them to arduino. should there be any circuitry in between? or what exactly did you mean by interface for the sensors?

‘’‘Have you considered noise?’’’

will adding decoupling filters solve the issue? open for suggestion if not.

‘’‘what is the standard against which you are comparing? It might well be that this too has errors’’’

Ive used an energy meter from HTC to verify the data from arduino. I’m pretty much confident that this energy meter is giving me right data.

I’ve now been able to run a test for you. Using an emonTx V2 (because all the input pins are accessible), I’ve linked one of the ADC current inputs to the voltage input, so exactly the same wave is reaching both input pins.

With the phase calibration value set to 0.0, I get a power factor of 0.9877 (to 4 figures).
With the phase calibration value set to 1.0, I get a power factor of 0.9994 (to 4 figures).

p.f. = 0.9877 represents about 9° of phase error, which is close to the number I expect given the sample rate of emonLib.

[Edit: With no input, I see p.f. values anywhere between 0.07 and 0.3, but mostly around 0.13 Those are not of course true power factors, but the result of multiplying random small numbers arising from circuit and power supply noise. ]

I think you must have introduced somewhere, inadvertently of course, either a time delay or a phase shift, into one or both of the measurements. You should not need a phase calibration of -2.0 When I use that, I get a pf of 0.9635, representing a phase/timing error of 15.5° There’s something seriously wrong somewhere.

Have you ensured that the mid-point bias for the ZMPT101 is adequately decoupled, as that will appear as a high-pass filter to the ADC.

The noise source can be the power supply to your Arduino, or it can be the Arduino itself. There’s evidence to suggest that the internal power supply regulator is likely to be better in this respect than most 5 V sources, therefore it’s recommended that you use the 9 - 12 V barrel connector.
You also need to follow or exceed the data sheet recommendations for the ACS712.

[Edit]

Were you telling the truth when you wrote that you have a ZMPT101B, or were you misleading everybody and do you really have a ZMPT101B MODULE with op.amps. and filters?

Because if you have, that’s where your 15° phase error is coming from. For our purposes, that module is rubbish - throw it away - just keep the ZPMPT101B itself and follow its data sheet for the voltage multiplier and burden resistors around it, and bias it like an ordinary a.c. adapter according to the instructions in the ‘Learn’ section.

Hi Robert, Thanks again for the response. Sorry, I was out of station and couldnt respond any sooner.

I’m very new to all of these and still at the learning phase. So, some of the things that you’ve mentioned has gone straight over my head. Extremely sorry for that.

“Were you telling the truth when you wrote that you have a ZMPT101B, or were you misleading everybody and do you really have a ZMPT101B MODULE with op.amps. and filters?”

I really didnt know that ZMPT101B existed without the module. When I look for AC voltage sensor, all I saw was this sensor module and assumed this is how it comes as one packed module.

“Have you ensured that the mid-point bias for the ZMPT101 is adequately decoupled, as that will appear as a high-pass filter to the ADC.”

Would you please share more insights about this?

UPDATE: I’ve totally discarded the ZMPT101B sensor module and have used the voltage sensing method (230v~9v method using a voltage transformer) mentioned in the LEARN section. Yet, i’m still getting some degree of phase error. when I connect a 60W incandescent bulb, power factor shown was 0.86 for emon1.voltage(2, 234.26, 1.7) and emon1.current(1, 13.5) calibration. At this point i’m really confused as where exactly this phase error is being introduced.

There’s no need to be sorry. We all had to learn once - as long as you’re prepared to listen and learn, I’m prepared to help you, and I think you’ll find that’s true with most people here.

Yes it does. While the design of that module is OK if you want a number for the voltage, when you need to do more - as we do in the maths inside emonLib and calculate the power at one instant in time, and repeat that 2500 times per second - a delay between the mains voltage and what appears at the output terminal is critical, as you’ve found out.

I don’t think that is a problem. If you look at the circuit for the c.t. input to an Arduino in ‘Learn’ Learn→Electricity Monitoring→CT Sensors→3. Interfacing with an Arduino→CT Sensors - Interfacing with an Arduino,
it is the capacitor C1 that “decouples” the mid-point voltage so that no a.c. voltage appears there. If there was an a.c. voltage - say the 5 V supply was not steady - then it would find its way into the ADC input, which you don’t want.

The reason for that is the a.c. adapter also has a phase error, but it is much smaller that the ZMPT101B Module’s. You should be able to compensate for that.

But, as you have the ZMPT101B, why not use it? Did you notice a small circuit on the ZMPT101B data sheet? You can use that with the interface you have for the a.c. adapter.

Calculate R’ = your voltage ÷ 2 mA, then split that (for safety reasons) into at least two equal resistors in series to give you the nearest to the correct value. Using the actual value you have for R’, calculate R, the burden (or sampling or load) resistor, using the equation given. The value you use for U2 is the rms value that is about 0.3 × the input voltage range of your ADC. That will give you about 10% spare to allow for mains voltage fluctuations.

You then connect that circuit almost exactly as you have connected your a.c. adapter, except that you do not use the voltage divider resistors that you have with the a.c. adapter - connect one side of U2 to “mid-point” and the other side to the ADC input.

And that should give you a good power factor.

“There’s no need to be sorry. We all had to learn once - as long as you’re prepared to listen and learn, I’m prepared to help you, and I think you’ll find that’s true with most people here.”

Thanks for the kind understanding.

"But, as you have the ZMPT101B, why not use it? Did you notice a small circuit on the ZMPT101B data sheet? You can use that with the interface you have for the a.c. adapter.

Calculate R’ = your voltage ÷ 2 mA, then split that (for safety reasons) into at least two equal resistors in series to give you the nearest to the correct value. Using the actual value you have for R’, calculate R, the burden (or sampling or load) resistor, using the equation given. The value you use for U2 is the rms value that is about 0.3 × the input voltage range of your ADC. That will give you about 10% spare to allow for mains voltage fluctuations.

You then connect that circuit almost exactly as you have connected your a.c. adapter, except that you do not use the voltage divider resistors that you have with the a.c. adapter - connect one side of U2 to “mid-point” and the other side to the ADC input.

And that should give you a good power factor."

To see if i’ve understood correct,
so,

R’=260(fluctuations in India) / 2mA = 130kohm
if i take U2 = 0.3 x 5 = 1.5V then
R=(1.5x130k)/260=750ohm

Please let me know if the assumptions are right. If this is right then i’m bring in all necessary components and check if I get the right power factor

One last thing, If i use the below CT then do i have to decouple the CT output before feeding it to the ADC or is it already decoupled as the output is already 1V?

Screen Shot 2021-01-07 at 19.02.16

I would make R’ 2 × 68 kΩ in series. Each resistor will then dissipate just under 250 mW, so a ½ W component, with a 250 V or 350 V rating, will be suitable. (Note, the peak voltage of a 260 V supply is above the highest common resistor voltage rating, which is 350 V. This is one of the reasons for using at least two in series.)

That will make R = 784 Ω, so choosing the next lower value, 750 Ω should be fine.

That c.t. already has a burden resistor built in, so use the circuit here Learn→Electricity Monitoring→CT Sensors→3. Interfacing with an Arduino→CT Sensors - Interfacing with an Arduino but DON’T have the 33 Ω burden - you already have that inside the case of the c.t.

But - you might be making things complicated for yourself. Both the c.t. and the a.c. adapter have a phase error, and it’s the difference between the two phase errors that causes you to read the wrong power factor, and which PHASECAL attempts to compensate for.

The ZMPT101B and the ACS712 both have a very small phase error, so the difference between those is very small.

I would advise you to use either the a.c. adapter and c.t., OR the ZMPT101B and the ACS712, and not mix them.

You can read about the phase error for our a.c. adapter and the c.t. (the 100 A version - but that 15 A one will be similar) in the test reports in the ‘Learn’ section here.