Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Power factor measurement using PIC18f4520

Status
Not open for further replies.
1N400x across the relay COIL, not the terminal (switch) side. It can be any 1N400x or similar diode, the voltage rating is not important as it will never exceed ~0.7V when the diode conducts and the relay coil voltage when not conducting.

The 10W rating of the bleed resistors is far more than you need. What is more important is their voltage rating, most small resistors are rated no higher than 250V so it would be best to use two in series to share the voltage. The resistance isn't critical, it is only to ensure the capacitors discharge when out of circuit for safety reasons. Bear in mind that to charge them to peak voltage you would have to open the relay at the exact instant of the AC peak, the chances of that happening are fairly low and it is far more likely they will have a lower voltage across them. If you use two 100K 1W resistors in series it will be more than adequate and much cheaper/smaller.

Yes, if you need large capacitor values, make it from several smaller value capacitors in parallel.

Brian.

Hello Brian, and thank you!

I've tested the system with the 60W fan, results were:

Vinput = 204VAC
Iload = 0.237Amps
Phase = 43
pf = 0.737

When pushed the red button, and according to the calculation I wrote in previous reply, I got at the end that to improve pf of 60W fan from 0.7 to 0.85 I need around 200uF capacitor.

This is the code:
Code:
capparameters:
switch_pressed = 0
realpower = x * allcurrent * pf
tan = Sin(phasedeg) / Cos(phasedeg)
qold = realpower * tan
Lcdcmdout LcdClear
Lcdout "Qold = ", #qold, "VAR"

phasedeg2 = 31.788 * 0.01745329
tan2 = Sin(phasedeg2) / Cos(phasedeg2)
tan3 = Sin(phasedeg - phasedeg2) / Cos(phasedeg - phasedeg2)
qnew = realpower * tan3
Lcdcmdout LcdLine2Home
Lcdout "Qnew = ", #qnew, "VAR"

reactance = x * x / qnew
Lcdcmdout LcdLine3Home
Lcdout "Xc= ", #reactance

capacitance = 1 / 2 * 3.1415926 * 50 * reactance
capacitance = capacitance * 0.00001
Lcdcmdout LcdLine4Home
Lcdout "C = ", #capacitance, "   uF"
WaitMs 1000

cap_measured = 1

activatecapbank:

If cap_measured = 1 And switch_pressed = 1 Then Goto capon
Lcdcmdout LcdClear
Lcdout "Press Red Button"
Lcdcmdout LcdLine2Home
Lcdout "To Continue"
WaitMs 1000

Lcdcmdout LcdClear
Lcdout "Qold = ", #qold, "VAR"
Lcdcmdout LcdLine2Home
Lcdout "Qnew = ", #qnew, "VAR"
Lcdcmdout LcdLine3Home
Lcdout "Xc= ", #reactance
Lcdcmdout LcdLine4Home
Lcdout "C = ", #capacitance, "   uF"
WaitMs 1000

Goto activatecapbank

Return                                            

capon:
switch_pressed = 0
Lcdcmdout LcdClear
Lcdout "Activating cap:"
Lcdcmdout LcdLine2Home
Lcdout "C = ", #capacitance, "   uF"
Lcdcmdout LcdLine3Home
Lcdout "Vcap = 400VAC"
'High the port where cap is installed
Goto prog_end
Return


Is it logical to have a 200uF for a single phase 60W inductive fan?

Are there any solid switching circuits to drive the capacitor when needed rather than the open relay switch?!

Much thanks
 

Hello,

Using the 60W fan, I tried to parallely connect at its terminals a 6uF rated at 450VAC, to see what happens:

I connected two 2W 100K bleed resistors in series, like the image:




The results were:

same power factor.

more current drawing from 0.2Amps to 0.4Amps :lol:

Any explanations?

Thank you
 

Hi,

I've tested the system with the 60W fan, results were:

Vinput = 204VAC
Iload = 0.237Amps
Phase = 43
pf = 0.737

Some calculations:
204v x 0.237 A = 48.35VA (this is only true if there is undistorted sine in current and voltage, and both values are RMS values)
with a power factor of 0.737 this means it is about 48.35VA x 0.737 = 35.6W of true power
and 32.7 VAr (according pythagoras)
Currents: 174mA true current and 160.3mA reactive (imaginary) current.

connecitng a 6uF capacitor (ideal) to 204V:
gives xc = 1/( 2 * Pi * 50Hz * 6uF) = 530 Ohms.
This gives 384.9 mA recative current

now subtract the capacitvie reactive current from the inductive reactive current : 160.3mA - 384.9mA = 224.6mA (capacitve) reactive current.
the remaining total current is (pythagoras of 224.6mA and 174mA) = 284 mA

--> either your voltage and/or current is not sinusoidal, or there is something wrong withc our mmeasurement/calculations.

*****
How to calculate the compensation capacitor:

The reactive current from the fan is 160.3mA.
The compensation capacitor needs to generate exactely the same current (but in opposite direction).
Therefore Xc should be 204V/160.3mA = 1273 Ohms.
C = 1/ (2 * pi * 50Hz * 1273 Ohms) = 2.50uF

Klaus
 
Last edited:
Hello,

Thank you Klaus:

After many trials ans error, I noticed that when I decrease value of C, current drawing becomes better:

I have 4,5 and 6 uF all rated at 450VAC:

When used the 5uF, iload was 0.3Amps
When used the 6uF, iload increased to 0.4Amps
When decreased the capacitance value by using 4&5 caps in parallel, current returned to original value of 0.2Amps, hence no improvement was there for phase angle.

Thanks
 

When decreased the capacitance value by using 4&5 caps in parallel, current returned to original value of 0.2Amps, hence no improvement was there for phase angle

without any cap - 237 mA current
With 5uF - current increases
With 6uF - current increases

The load is a fan and is inductive in nature.
With a cap on the power rails, the reactive part will decrease (XL and XC are opposite in sign) and current should reduce

You see current increasing- that means that you are overcompensating ....

Your cap values are too high. You need to start with 0.2, 1.0, 1.5, 2 etc in small steps and see when the current is minimum

When the total current is minimum, you have reached perfect compensation.

- - - Updated - - -

I have 4,5 and 6 uF all rated at 450VAC:

When decreased the capacitance value by using 4&5 caps in parallel, current returned to original value of 0.2Amps, hence no improvement was there for phase angle.

With 4 and 5 in parallel, the equivalent cap becomes 9 and if the current returns to the original value of 0.2A, there is some mistake somewhere...
 
With 4 and 5 in parallel, the equivalent cap becomes 9 and if the current returns to the original value of 0.2A, there is some mistake somewhere...

Hello c_mitra,

Sorry it was a typing fault: 4 and 5 in series.

I tried to decrease capacitance value, by connecting two 1uF in series that results in 0.5uF , the result was also the same!
No improvement in phase angle, nor in current drawing.

Should it be more decreased? Is power factor correction for such a small load (60W) is applicable?

Thanks in advance
 

I tried to decrease capacitance value, by connecting two 1uF in series that results in 0.5uF , the result was also the same!
No improvement in phase angle, nor in current drawing.

In #283 Klaus has computed the capacitor needed for compensation as 2.5uF. His logic is sound and it should work. There appears to be some thing else that is causing the error.

Please try with a 40 or 60W filament lamp (NOT LED or CFL) and see whether you are getting a higher pf. A traditional filament lamp will give you a pf close to 0.9 (I hope so). If your pf value is still low, we need to investigate more. Also, just try with two 5uF in parallel (10uF) only (no fan, no light) and see the current and the phase and the power factor.
 
In #283 Klaus has computed the capacitor needed for compensation as 2.5uF. His logic is sound and it should work. There appears to be some thing else that is causing the error.

Please try with a 40 or 60W filament lamp (NOT LED or CFL) and see whether you are getting a higher pf. A traditional filament lamp will give you a pf close to 0.9 (I hope so). If your pf value is still low, we need to investigate more. Also, just try with two 5uF in parallel (10uF) only (no fan, no light) and see the current and the phase and the power factor.

Hello c_mitra,

I tried to connect what KlausST came up with, of connecting a 2.5uF across the load:

The results were the same, no change ever happened to current (0.237Amps) nor phase angle (still ~43deg).

As for changing load, to a 200W incandescent light bulb, the power factor was unity, and zero was the phase angle. I think there are no problems regarding measurements.

All results for all tried capacitance did not work.

I see tables on other regions of the internet about power factor multipliers. There are no such light loads as 60W, the smallest motor was rated of 1/2hp sometimes 1hp.

Is this application of shunt capacitance across a small inductive load is applicable? Should I try it with a larger fan, of 200W?

Or should I try capacitance with pF instead of uF for such a small load?

Thanks

- - - Updated - - -

Some calculations:
204v x 0.237 A = 48.35VA (this is only true if there is undistorted sine in current and voltage, and both values are RMS values)
with a power factor of 0.737 this means it is about 48.35VA x 0.737 = 35.6W of true power
and 32.7 VAr (according pythagoras)
Currents: 174mA true current and 160.3mA reactive (imaginary) current.

connecitng a 6uF capacitor (ideal) to 204V:
gives xc = 1/( 2 * Pi * 50Hz * 6uF) = 530 Ohms.
This gives 384.9 mA recative current

now subtract the capacitvie reactive current from the inductive reactive current : 160.3mA - 384.9mA = 224.6mA (capacitve) reactive current.
the remaining total current is (pythagoras of 224.6mA and 174mA) = 284 mA

Perhaps the remaining total current is TOO small and being directly dissipated in the two 100K 2W series bleeding resistors without being able to get at the load?
 

Hi,

* capacitors in the pf range are useless

* connecting a capacitor in th uF range will change the phase angle. If you don't see the change, then your measurement may have problems

* if 60W gives no meaningful result you should try bigger load.

Klaus
 
Klaus,

I have different measurements tools and all of them are giving same result; for instance, the load current which is supposed to decrease if power factor is increased is measured by a clamp meter, a DCM and PIC where all of these tools are giving almost same answer.

I tried different capacitance values from 0.2uF to 6uF and none did improve power factor.

I also turned off all inductive load at home, from refrigerator to ACs.

Thank you
 

Can you please tell me the readings when you put two 6 uF caps (in parallel; 12 uF total) as the load? I want to know the current, pf and the phase. We need to debug step by step.
 
Can you please tell me the readings when you put two 6 uF caps (in parallel; 12 uF total) as the load? I want to know the current, pf and the phase. We need to debug step by step.

O.K c_mitra,

But my question is, shouldn't I read a lower current using an external clamp meter when connecting the cap bank to the fan? (even in milliamps)

Thank you
 

Hi,

I also turned off all inductive load at home, from refrigerator to ACs.
I assume the refrigerator is not involved in your current measurement....I wonder why you mention it.

Only devices connected "after" the current measurement will change the reading.

Klaus
 

But my question is, shouldn't I read a lower current using an external clamp meter when connecting the cap bank to the fan? (even in milliamps)

Yes; that is the expected result if and only if the capacitor is improving the power factor. That is why I suggest to *debug* the setup in small steps.

What YOU find that the power factor and the phase angle are not improving and I wish to know why.
 
Yes; that is the expected result if and only if the capacitor is improving the power factor. That is why I suggest to *debug* the setup in small steps.

What YOU find that the power factor and the phase angle are not improving and I wish to know why.

Hello c_mitra,

I did your requested test:

Connected two 6uF in parallel to get a total of 12uF and connected two 100K 2W series resistors across output terminal.
I connected this load to PIC system and saw that:

The current dissipated in such load is 0.857Amps
The phase angle is 0.000
The power factor is 1.000

here it is the connection:




Thank you
 

Hi,

12uF give 265 ohms.
204V / 265 ohms gives 770mA.
Phase 90°
Power factor near 0

Klaus
 
The current dissipated in such load is 0.857Amps
The phase angle is 0.000
The power factor is 1.000

Ok, this is now easy to study. You have 12uF capacitor and 200K resistor in parallel.

Assuming frequency to be 50Hz, we get Rc=1/(2*pi*f*C)=265 Ohms; as this is much smaller than the 200K bleeder resistor you have put, I can ignore the 200K. I hope this is clear.

(same value Klaus reported above); voltage you have not reported but using the current I get the voltage as 265*0.857=227V (very reasonable number).

Both phase angle and the power factor reported are obviously wrong. Phase should be close to 90 and power factor should be close to zero.

This is a software problem. You need to debug the program. I have some idea about the PIC and I can try to help. Can you please repost the part of the program used for calculating the phase?
 
Hi,

Just to be complete:
Lets calculate wit the values of c_mitra: 12uF, 50Hz, 200k, 227V
So the current through the (perfect) capacitor is 0.857A
The current through the 200k resistor is: 227V/200k = 0.0011A
Now you can draw the triangle in a carthesian diagram:
One line from zero --> 1.1mA to the right. (This is the real part. This current causes heat. This is the current caising true working power)
From this endpoint --> 857mA straight to the top (capacitive currents are allways straight to the top. Causing no working power)
(Inductive currents go straight to the bottom. Also causing no working power)
Now complete the triangle with a line from zero to the endpoint of the capacitive current (vector). This here is hard to do, because the real current is that low.
But you see the resulting current is almost the same as the capacitive current.
The angle you have to measure with respect to the horizontal line, (starting from zero) --> it is almost 90°

Klaus
 

Hello c_mitra,


I thought that I`m done with measurements, but it seems that there is a problem...

Here's the circuit used for pf measurement (I`m using a XOR to seek pf): betwixt method



Here is the BASIC code, used for pf measurement:
**note** V, and I measurements are very O.K and have no problems.

Code:
        Adcin 2, phase
	Lcdcmdout LcdLine4Clear
	Lcdcmdout LcdLine4Home
	phasean = phase / 14.869           //This is referred as fudge factor
	phasean = phasean / 1.6
	Lcdout "Phase: ", #phasean
	WaitMs 4000
	phasedeg = phasean * 0.01745329    //This is to transform angle from Rad to Deg
	Lcdcmdout LcdLine4Clear
	pf = Cos(phasedeg)
	Lcdout "pf: ", #pf
	WaitMs 1000
	Endif

What I`m amazed is the zero value, this means when I connected the cap bank of 12uF with 200K bleed resistors, the XOR gate saw it as purely resistive, and V and I were in phase since no output (low logic) was detected at the output of the XOR gate which is the input for phase measurement.

Using same code/circuit the system sees the fan V,I phase as 43 deg, and 0 for 200W resistive bulb.

I don't know why the system saw cap bank as resistive.

The problem isn't from software, if it had any other value than zero, we can say that there is an error in the code, but '0' means that there was a 0V from the output of two XOR inputs of 74AC86, this is an electrical problem, or there might be another definitions for this.

Thank you
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top