Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 31st October 2009, 04:16 PM   #1
Default Measure power factor using PIC microcontrollerr

any body give the idea to Measure power factor using PIC microcontroller.
sahu is offline  
Old 31st October 2009, 10:02 PM   #2
Default

Do you have a formula for the power factor?
Russ Hensel is offline  
Old 31st October 2009, 10:36 PM   #3
Default

Quote:
Do you have a formula for the power factor?
I do:

See attached pictures
Attached Thumbnails
Measure power factor using PIC microcontrollerr-dsc06799.jpg   Measure power factor using PIC microcontrollerr-dsc06800.jpg   Measure power factor using PIC microcontrollerr-dsc06801.jpg   Measure power factor using PIC microcontrollerr-dsc06802.jpg   Measure power factor using PIC microcontrollerr-dsc06803l.jpg  

__________________


Last edited by jakeselectronics; 31st October 2009 at 10:45 PM.
jakeselectronics is offline  
Old 1st November 2009, 02:24 PM   #4
Red face

Quote:
Originally Posted by Russ Hensel View Post
Do you have a formula for the power factor?
my mean...is any electronics circuitry pic micro controller based.
sahu is offline  
Old 2nd November 2009, 02:20 PM   #5
Default

To take the approach of you formulas you need to monitor the voltage and current. Then you need to detetect the 0 crossing of each. Measure the time between the 0 crossings and assuming a fixed frequency you can compute the power factor. An op amp to condition each input connected to a comparitor might make up the inputs to the digital input pins on the uC. You will need to learn how to do timings on the uc. You can probably do the programming using only polling wich is not as flexible as interupts but a bit easier. Walk thru this step by step getting one part to work and then another. If you are new to this sort of thing you have several different sub projects to complete to get the whole thing done.
Russ Hensel is offline  
Old 3rd November 2009, 06:49 AM   #6
Default

Be aware that it is very common for an AC load to contain nonsinusoidal components. A simple DC power supply, a rectifier and a capacitor, has a lot of harmonics because no current flows until the instantaneous voltage exceeds the capacitor voltage, then current can be fairly high. These harmonics complicate the measurement but not all that much. The ADC can take quite a few datapoints off a 60Hz wave.

But one thing to look at is that the samples will be confused by frequency components above the Nyquist Rate, which is 1/2 the sample rate. So if you're sampling the waveform at 1Ksample/sec, any harmonics above 500Hz will not represent correctly. One way to fix this is a lowpass analog filter before the ADC to cutoff these components, however, a single pole RC filter may be too soft of a cutoff. An active filter can be designed with a far cleaner cutoff.

Be aware that the PIC, and say an LCD, will probably be grounded on the powerline Neutral. This is unsafe to touch, but you generally won't need to touch them. The real problem involves using your ICD on a Neutral-grounded board: you cannot do this! It could potentially blow the ICD if not your PC. AFAIK you have to discard ICD, program externally, and insert the chip in a socket. And you definitely cannot connect your PC's RS232 serial port to the PIC's UART with the PIC ground tied to Neutral. You'll need optoisolators in between.

But the problems with neutral grounding can be avoided if you can get ahold of a 120v "isolation transformer". A bit uncommon nowadays to find, but always good to have. As the name implies, they isolate the 2 output wires from the input ground entirely, because it's a transformer, but generally with a 1:1 ratio so it's 120vac in/120vac out. This should allow you to safely program and ICD and use the UART directly with the PC.
__________________
I thought what I'd do was I'd pretend I was one of those deaf-mutes.

Last edited by Oznog; 3rd November 2009 at 07:01 AM.
Oznog is offline  
Reply

Tags
factor, measure, microcontrollerr, pic, power

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Power factor Electronman General Electronics Chat 10 19th October 2009 04:28 PM
How would I measure Power Factor? Viann Electronic Projects Design/Ideas/Reviews 29 12th October 2009 05:36 AM
power factor calculation using PIC malikgtheone Micro Controllers 2 4th April 2007 08:19 PM
Power factor? windozeuser General Electronics Chat 24 17th December 2006 08:14 AM
power factor asimattar General Electronics Chat 5 20th July 2006 07:49 PM



All times are GMT. The time now is 08:45 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker