Download MICROCONTROLLER BASED POWER FACTOR CORRECTION A

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Ohm's law wikipedia , lookup

Josephson voltage standard wikipedia , lookup

TRIAC wikipedia , lookup

Transistor–transistor logic wikipedia , lookup

Radio transmitter design wikipedia , lookup

Decibel wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Audio power wikipedia , lookup

Schmitt trigger wikipedia , lookup

Operational amplifier wikipedia , lookup

Valve RF amplifier wikipedia , lookup

Valve audio amplifier technical specification wikipedia , lookup

Current mirror wikipedia , lookup

CMOS wikipedia , lookup

Power MOSFET wikipedia , lookup

Voltage regulator wikipedia , lookup

Surge protector wikipedia , lookup

Opto-isolator wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Power electronics wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Rectiverter wikipedia , lookup

Transcript
MICROCONTROLLER BASED POWER FACTOR
CORRECTION
A PROJECT REPORT
Submitted by
ARJUNAN.S
BHARATHIDHASAN.R
GANESAN.M
32306105301
32306105305
32306105310
In partial fulfillment for the award of the degree
of
BACHELOR OF ENGINEERING
in
ELECTRICAL AND ELECTRONICS ENGINEERING
MEENAKSHI COLLEGE OF ENGINEERING
WEST KK NAGAR CHENNAI-600 078
ANNA UNIVERSITY: CHENNAI 600 025
APRIL 2010
1
ANNA UNIVERSITY: CHENNAI 600 025
BONAFIDE CERTIFICATE
Certified
that
this
“MICROCONTROLLER
CORRECTION”
is
the
project
BASED
bonafide
report
POWER
work
of
titled
FACTOR
“S.ARJUNAN,
R.BHARATHIDHASAN, M.GANESAN”, who carried out the project
under our supervision.
SIGNATURE
SINGNATURE
Mr. V.KARTHIKEYAN, M.E.,
Mr.G.VIJAYANAND, M.E.,
HEAD OF THE DEPARTMENT
SUPERVISOR
ASSISTANT PROFESSOR
Department of EEE,
Department of EEE,
Meenakshi College of Engineering,
Meenakshi College of Engineering,
West K K Nagar,
West K K Nagar,
Chennai-600 078.
Chennai-600 078.
Submitted for University Examination held on
at
Meenakshi College of Engineering.
Internal Examiner
External Examiner
2
ACKNOWLEDGEMENT
With great respect and humble submission hereby we would like
to thank our Director Mrs.PREMALATHA KANIKANAN, M.E, MBA,
for granting us privilege to carry out this project.
First and foremost we express our thanks to our Father &
Mother for their blessings throughout our life. We also extend our sincere
thanks to our beloved family members.
With great respect and humble submission hereby, we would like
to thank Principal Dr. G.GUNASAKARAN, ME, MBA, PhD., for
granted us the privilege to carry out this project.
We would like to express sense of gratitude to our respected
Head of the Department Mr.V.KARTHIKEYAN, M.E, MIEEE,
MISTE, for his much valuable support, unfledged attention and direction,
which kept this project on track.
We express our sincere thanks to our internal guide,
Mr.G.VIJAYANAND ME., Assistant Professor EEE, for his advices,
precious suggestions, constructive criticism, constant guidance, kind cooperation and encouragement to make our endeavor a successful one.
We extend our sincere thanks to all the Staff Members of the
department of Electrical & Electronics.
ARJUNAN.S
BHARATHIDHASAN.R
GANESAN.M
3
ABSTRACT
Power factor correction (PFC) is a technique of counteracting the
undesirable effects of electric loads that create a power factor that is less
than one. Power factor correction may be applied either by an electrical
power transmission utility to improve the stability and efficiency of the
transmission network or correction may be installed by individual
electrical customers to reduce the costs charged to them by their electricity
supplier.
Many control methods for the Power Factor Correction (PFC) have
been proposed. This project aims at the design and development of a
power factor corrector using Microcontroller.
The working model involves measuring the power factor value of
the load using Microcontroller chip and proper algorithm to determine and
trigger sufficient switching capacitors in order to compensate excessive
reactive components, thus bringing power factor near to unity.
4
TABLE OF CONTENTS
CHAPTER.NO
TITLE
PAGE
ABSTRACT
iv
LIST OF FIGURES
vi
LIST OF ABBREVATIONS
1. INTROUCTION
vii
1
1.1 NEEDS OF POWER FACTOR CONTROLLER
2
1.2 TYPES OF POWER FACTOR CONTROLLER
2
1.3 METHODS OF CAPACITIVE POWER FACTOR
CORRECTION
3
1.3.1 BULK CORRECTION
3
1.3.2 STATIC CORRECTION
4
1.3.3 INVERTER
5
1.3.4 SOLID-STATE SOFT STARTER
6
1.4 ADVANTAGES
7
1.5 DISADVANTAGES
7
1.6 OBJECTIVES
8
2. FUNCTIONAL BLOCK DIAGRAM
9
2.1 GENERAL
9
2.2 BLOCK DIAGRAM
9
3. HARDWARE IMPLEMENTATION
12
3.1 GENERAL
12
3.2 HARDWARE CIRCUIT
12
3.3 PRINCIPLE OF OPERATION
13
3.4 COMPONENTS USED
16
3.4.1.1 STEP DOWN TRANSFORMER
5
17
3.4.1.2
RECTIFIER UNIT
17
3.4.1.3 INPUT FILTER
17
3.4.1.4 REGULATOR UNIT
18
3.4.1.5 IC VOLTAGE REGULATORS
18
3.4.1.6 OUTPUT FILTER
18
3.4.3
OPERATIONAL AMPLIFIERS
19
3.4.4
Ex-OR GATE CD4070B
21
3.4.5
ANALOG TO DIGTAL CONVERTER
23
3.4.6
LCD DISPLAY
26
3.4.7
RELAY
28
4. MICROCONTROLLER AND PROGRAMMING
30
4.1 GENERAL
30
4.2 DESCRIPTION OF AT89C51
30
4.3 ARCHITECTURE FOR AT89C51
32
4.4 PIN DIAGRAM
33
4.5 PIN DESCRIPTION
34
4.5.1
37
4.5.2
OSCILLATOR CHARACTERISTICS
IDLE MODE
38
4.6 ALGORITHM
39
4.7 FLOW CHART
40
5. TEST SETUP & TEST RESULTS
41
6. CONCLUSION AND FUTURE SCOPE
44
7. REFERENCES
45
6
LIST OF FIGURES
FIG NO:
TITLE
PAGE
1.1
Bulk correction using capacitor bank
3
1.2
Static correction using capacitor
4
1.3
Power factor controller solid-state soft starter
6
2.1
Block Diagram of Microcontroller
Based Power factor Correction
9
Circuit Diagram
12
3.1
3.2
Voltage & Current Waveform Obtained o/p Op-amp 15
3.3
Waveform Obtained Output Of Ex-Or Gate
15
3.4
Pinning diagram Of Op-Amp
21
3.5
Pin Diagram for EX-OR Gate
22
3.6
Pin diagram for ADC
23
3.7
Block diagram for ADC
25
3.8
Pin Diagram for LCD
26
3.9
LCD Interfacing with Microcontroller
27
3.10
Relay with driver circuit
29
4.1
Architecture of AT89C51
32
4.2
Pin Diagram for AT 89C51
33
4.3
Oscillator Connection Circuit
37
4.4
Circuit for external clock drive
38
4.5
Flow Chart
40
5.1
Basic Test Set up Circuit
41
7
LIST OF ABBREVATIONS
Short form
Abbreviation
PFC
Power Factor Correction
PF
Power Factor
PT
Potential Transformer
CT
Current Transformer
ADC
Analog to Digital Converter
LCD
Liquid Crystal Display
LPF
Lower Power Factor
UPF
Upper Power Factor
8
CHAPTER 1
INTRODUCTION
Power factor is the ratio of true power in watts to apparent power in
volt amps. They are identical only when current and voltage are in phase
then the power factor is 1.0. The power in an ac circuit is very seldom
equal to the direct product of the volts and amperes. In order to find the
power of a single phase ac circuit the product of volts and amperes must be
multiplied by the power factor.
Ammeters and voltmeters indicate the effective value of amps and
volts. True power or watts can be measured with a wattmeter. If the true
power is 1870 watts and the volt amp reading is 2200. Than the power
factor is 0.85 or 85 percent. True power divided by apparent power.
The power factor is expressed in decimal or percentage. Thus power
factors of 0.8 are the same as 80 percent. Low power factor is usually
associated with motors and transformers. An incandescent bulb would
have a power factor of close to 1.0. A one hp motor has power factor about
0.80. With low power factor loads, the current flowing through electrical
system components is higher than necessary to do the required work.
These results in excess heating, which can damage or shorten the life of
equipment, a low power factor can also cause low-voltage conditions,
resulting in dimming of lights and sluggish motor operation.
Low power factor is usually not that much of a problem in
residential homes. It does however become a problem in industry where
multiple large motors are used. So there is a requirement to correct the
power factor in industries. Generally the power factor correction capacitors
are used to try to correct this problem.
9
1.1
NEEDS OF POWER FACTOR CONTROLLER
Power factor correction (PFC) is a technique of counteracting the
undesirable effects of electric loads that create a power factor that is less
than one. Power factor correction may be applied either by an electrical
power transmission utility to improve the stability and efficiency of the
transmission network or correction may be installed by individual
electrical customers to reduce the costs charged to them by their electricity
supplier.
1.2
TYPES OF POWER FACTOR CONTROLLER
Generally there are two types of technique are used to control the
power factor these are:
1. Passive PFC
This is a simple way of correcting the nonlinearity of a load by using
capacitor banks. It is not as effective as active PFC, switching the
capacitors into or out of the circuit causes harmonics, which is why active
PFC or a synchronous motor is preferred.
2. Active PFC
An active power factor corrector (active PFC) is a power electronic
system that controls the amount of power drawn by a load in order to
obtain a Power factor as close as possible to unity. In most applications,
the active PFC controls the input current of the load so that the current
waveform is proportional to the mains voltage waveform (a sine
wave).Some types of active PFC are: Boost, Buck and Buck-boost.
Active power factor correctors can be single-stage or multi-stage. Active
PFC is the most effective and can produce a PFC of 0.99 (99%).
10
3. Synchronous
Synchronous motors can also be used for PFC. Shaft less motors is
used, so that no load can be connected and run freely on the line at
capacitive (leading) power factor for the purposes of PFC.
1.3
Different types of capacitive power factor correction
Different types of capacitive power factor correction are
1. Bulk correction
2. Static correction
3. Inverter
4. Solid-state soft starter
1.3.1 Bulk correction
The Power factor of the total current supplied to the distribution
board is monitored by a controller which then switches capacitor banks. In
a fashion to maintain a power factor better than a preset limit. (Typically
0.95) Ideally, the power factor should be as close to unity as possible.
There is no problem with bulk correction operating at unity; however
correction should not be applied to an unloaded or lightly loaded
transformer. If correction is applied to an unloaded transformer, we create
a high Q resonant circuit between the leakage reactance of the transformer
and the capacitors and high voltages can result. In figure1 bulk correction
using capacitor bank is shown in fig 1.1.
Fig 1.1: BULK CORRECTION USING CAPACITOR BANK
11
1.3.2 Static correction
As a large proportion of the inductive or lagging current on the
supply is due to the magnetizing current of induction motors, it is easy to
correct each individual motor by connecting the correction capacitors to
the motor starters. With static correction, it is important that the capacitive
current is less than the inductive magnetizing current of the induction
motor. In many installations employing static power factor correction, the
correction capacitors are connected directly in parallel with the motor
windings.
When the motor is Off Line, the capacitors are also Off Line. When
the motor is connected to the supply, the capacitors are also connected
providing correction at all times that the motor is connected to the supply.
This removes the requirement for any expensive power factor monitoring
and control equipment. In this situation, the capacitors remain connected to
the motor terminals as the motor slows down.
Static correction is commonly applied by using one contactor to
control both the motor and the capacitors. It is better practice to use two
contactors, one for the motor and one for the capacitors. Where one
contactor is employed, it should be up sized for the capacitive load. The
use of a second contactor eliminates the problems of resonance between
the motor and the capacitors. Static correction is shown in fig 1.2.
Fig 1.2: STATIC CORRECTION USING CAPACITOR
12
1.3.3 Inverter
Static Power factor correction must not be used when a variable
speed drive or inverter controls the motor. The connection of capacitors to
the output of an inverter can cause serious damage to the inverter and the
capacitors due to the high frequency switched voltage on the output of the
inverters. The current drawn from the inverter has a poor power factor,
particularly at low load, but the motor current is isolated from the supply
by the inverter. The phase angle of the current drawn by the inverter from
the supply is close to zero resulting in very low inductive current
irrespective of what the motor is doing. The inverter does not however,
operate with a good power factor. Many inverter manufacturers quote a cos
Ø of better than 0.95 and this is generally true, however the current is non
sinusoidal and the resultant harmonics cause a power factor (KW/KVA) of
closer to 0.7 depending on the input design of the inverter. Inverters with
input reactors and DC bus reactors will exhibit a higher true power factor
than those without. The connection of capacitors close to the input of the
inverter can also result in damage to the inverter. The capacitors tend to
cause transients to be amplified, resulting in higher voltage impulses
applied to the input circuits of the inverter, and the energy behind the
impulses is much greater due to the energy storage of the capacitors. It is
recommended that capacitors should be at least 75 Meters away from
inverter inputs to elevate the impedance between the inverter and
capacitors and reduce the potential damage caused. Switching capacitors,
Automatic bank correction etc, causes voltage transients and these
transients can damage the input circuits of inverters. The energy is
proportional to the amount of capacitance being switched. It is better to
switch lots of small amounts of capacitance than few large amounts.
13
1.3.4 Solid state soft starter.
Static Power Factor correction capacitors must not be connected to
the output of a solid-state soft starter. When a solid-state soft starter is
used, a separate contactor must control the capacitors. The capacitor
contactor is only switched on when the soft starter output voltage has
reached line voltage. Many soft starters provide a "top of ramp" or "bypass
contactor control" which can be used to control the PFC capacitor
contactor. If the soft starter is used without an isolation contactor, the
connection of capacitors close to the input of the soft starter can also cause
damage if they are switched while the soft starter is not drawing current.
The capacitors tend to cause transients to be amplified resulting in higher
voltage impulses applied to the SCR’s of the soft starter, and due to the
energy storage of capacitors, the energy behind the impulses is much
greater. In such installations, it is recommended that the capacitors be
mounted at least 50 meters from the soft starter. The elevated the
impedance between the soft starter and the capacitors reduces the potential
for damage to the SCR’s. Switching capacitors, Automatic bank correction
etc, will cause voltage transients and these transients can damage the
SCR’s of Soft Starters if they are in the off state without an input
contactor. The energy is proportional to the amount of capacitance being
switched. It is better to switch lots of small amounts of capacitance than
few large amounts. Power factor controller solid-state soft starter is shown
in fig 1.3.
Fig 1.3: POWER FACTOR CONTROLLER SOLID-STATE SOFT
STARTER
14
1.4
ADVANTAGE
By improving the power factor you can save money on your
electricity bill and also derive the following benefits:
1. Reduction of heating losses in transformer and distribution
equipment
2. Longer equipment life
3. Stable voltage levels
4. Reduce Maximum demand(KVA demand)
5. Reduce transmission and distribution losses
6. Reduce the down side capacity of equipment (Transformer, Cables,
Bus bars).
1.5
DISADVANTAGES
The line losses in cable/conductor are proportional to the square of
the current drawn from the source.
1. The up stream equipments such as generator, transformer, and
circuit breaker ratings are based on current rating. It need to be
oversized to take care of the excess current drawn due to low power
factor.
2. Low power factor leads to excess voltage drop and needs extra
voltage regulating devices to maintain terminal voltage to the
required level.
15
1.3
Objective of work
Power factor correction (PFC) is a technique of counteracting the
undesirable effects of electric loads that create a power factor that is less
than one.
Power factor correction may be applied either by an electrical power
transmission utility to improve the stability and efficiency of the
transmission network or correction may be installed by individual
electrical customers to reduce the costs charged to them by their electricity
supplier.
This project explains the design of a Microcontroller based power
factor controller for power factor correction. The core idea of this work is
to design a Microcontroller based power factor controller. This system will
be able to control the power factor of both linear and nonlinear load
system.
16
CHAPTER 2
FUNCTIONAL BLOCK DIAGRAM
2.1
GENERAL
The building block proposed Microcontroller Based Power Factor
Correction and the function of each block is described in this chapter.
2.2
BLOCK DIAGRAM
LCD 16X2
1Ø AC Supply
PHASE SHIFT
DELAY
PT
ADC8591
AT89C51
P
CT
RELAY
N
POWER
CAPACITOR
LOAD
Fig 2.1: BLOCK DIAGRAM OF MICROCONTROLLER BASED
POWER FACTOR CORRECTION
17
The Functional block of the developed model includes the following:
1. Voltage Transformer
2. Current Transformer
3. Analog & Digital Converters(ADC)
4. Microcontroller (AT 89C51)
5. Liquid Crystal Display(LCD)
6. Relay
7. Power Capacitor
1. Voltage Transformer (PT):
Potential transformer is used to step down the power voltage to a
suitable value that can be handled by the electronic chips used in the
circuit. Apart from this function, it also gives the actual value of voltage to
the controller for calculation of Reactive power.
2. Current Transformer (CT):
Current transformer is used to step down the current to a suitable
value that can be handled by the electronic chip used in the circuit. Apart
from this function, it also gives the actual value of current flowing to the
controller for calculation of reactive power.
3. Analog & Digital Converters (ADC):
Analog to Digital Converter is used in this circuit because the
microcontroller being a digital circuit can handle only logic inputs and
cannot handle analog inputs. So the analog inputs must be first converted
to digital form before any form of processing can be done. The ADC first
splits the analog voltage into a numerous discrete samples and converts
each sample into equivalent digital form.
18
4. Microcontroller (AT 89C51):
Microcontroller is a microprocessor along with I/O ports and a
minimum memory in a single pack. It is available as a single 40pin IC. The
product will be of a small size as compare to the microprocessor based
systems and thus it will be handier. The inputs to microcontroller are the
voltage and current signal. The controller outputs are the activation signals
to relays and signals to LCD.
5. Liquid Crystal Display (LCD):
LCD display is used to display the value of current, voltage and
power factor of the circuit.
6. Relay:
Relays are mechanical switches which are used to switch in or
switch off a device into a circuit. It works on the principle of
electromagnetic induction and is available in numerous ratings.
7. Power Capacitor:
These are the actual power factor controllers. They are large
capacitors rated to operate at power voltages. They are usually connected
parallel to load. When in operation it acts as a source of leading reactive
power. This leading reactive power is used to compensate the lagging
reactive power drawn by the load and thus power factor is controlled.
19
CHAPTER 3
HARDWARE IMPLEMENTATION
3.1
GENERAL
The hardware circuit of the developed prototype model gives a
clear description about how the various units are connected to the different
pins of the ATMEL 89C51 microcontroller.
3.2
HARDWARE CIRCUIT
Fig 3.1: CIRCUIT DIAGRAM
20
3.3
PRINCIPLE OF OPERATION:
The current Transformer and Potential Transformer are respectively
used to find out the current and voltage of the system. It also steps down
the voltage and current to a value that can be handled by the electronic
chips used in this circuit.
The supply is given to PT & CT and the load is connected in the
primary side of current transformer. The LCD, Microcontroller &ADC
used requires a dc supply of 5Volts for its operation. The dc supply of 5
Volts can be obtained through the voltage regulator IC 7805.The voltage
regulator IC7805 converts the 12V dc supply into 5V dc supply.
The 12V dc supply can be obtained from full wave rectifier. The full
wave rectifier converts the ac supply into pulsating dc supply. The
pulsating dc supply is converted into pure dc supply by connecting suitable
filters.
The 12V ac supply is given to LM324. The clamp diodes produces
positive half cycle. The secondary side of CT is connected to op-amp. The
voltage, current output from op-amp is given to Ex-OR gate.
The Ex-OR gate is used to find time displacement between voltage
& current. The output of Ex-OR gate is given to voltage follower which
amplifies the voltage level to a certain value. Then the signal is given back
from Ex-OR gate to pin1 (AIN0) of ADC. The ADC converts the analog
signal to digital signal and is given to the microcontroller for further
process.
The ADC 9pin is SDA which is connected the port3.6 of
microcontroller. Then the ADC 10 pin is SCL which is connected to the
port 3.7 of microcontroller.
The AT89C51 Microcontroller is used and the LCD is interfaced
with the Microcontroller. Relay is also interfaced with microcontroller in
the port 2.3. The normal PF value is determined in the flash memory of
21
microcontroller. The microcontroller compares the determined value (0.85)
with the actual value. If the value is below the determined value, the relay
is activated. The relay connects the power capacitor across the load. The
load used is isolation transformer with rheostat (RL Load). When the relay
is activated, the green LED will glow. Otherwise the red LED will glow.
The values of voltage, current and power factor of the circuit are
displayed in the LCD Display.
22
Fig 3.2: VOLTAGE & CURRENT WAVEFORM OBTAINED
OUTPUT OF OP-AMP
Fig 3.3: WAVEFORM OBTAINED OUTPUT OF EX-OR GATE
23
3.4
COMPONENTS USED
 Potential Transformer-(I/P-230V, O/P -12V)
 Current Transformer –(I/P-5A,O/P-0.5A )
 Regulator IC-7805
 Diodes-4007
 Resistor-1K, 10K.
 Capacitor-1000Mfd, 47Mfd, 33pf, 10mf.
 Operational Amplifiers- LM324
 Ex-OR Gate-CD4070B
 ADC-PCF8591
 Microcontroller-AT89c51
 Relays
 Power Capacitors
 LCD-16X2
 Load
24
3.4.1 STEP DOWN TRANSFORMER
The step down transformer is used to step down the main supply
voltage from 230AC to a lower value of 12V. This 230AC voltage cannot
be used directly, thus its stepped down. The transformer consists of
primary and secondary coils. To reduce or step down the voltage, the
transformer is designed to contain less number of turns in its secondary
core. Thus the conversion from AC to DC is essential. This conversion is
achieved by using the rectifier circuit.
3.4.1.2 RECTIFIER UNIT
The Rectifier circuit is used to convert AC voltage into its
corresponding DC voltage. There are Half-Wave and Full-Wave rectifiers
available for this specific function. The most important and simple device
used in rectifier circuit is the diode. The simple function of the diode is to
conduct when forward biased and not to conduct when reverse biased. The
forward bias is achieved by connecting the diode’s positive with of
positive of battery and negative with battery’s negative. The efficient
circuit used is full wave bridge rectifier circuit. The output voltage of the
rectifier is in rippled form, the ripples from the obtained DC voltage are
removed using other circuits available. The circuit used for removing the
ripples is called Filter circuit.
3.4.1.3 INPUT FILTER
Capacitors are used as filters. The ripples from the DC voltage are
removed and pure DC voltage is obtained. The primary action performed
by capacitor is charging and discharging. It charges in positive half cycle
of the AC voltage and it will discharge in its negative half cycle, so it
allows only AC voltage and does not allow the DC voltage. This filter is
fixed before the regulator. Thus the output is free from ripples.
25
3.4.1.4 REGULATOR UNIT
Regulator regulates the output voltage to be always constant. The
output voltage is maintained irrespective of the fluctuations in the input
AC voltage. As and then the AC voltage changes, the DC voltage also
changes. To avoid this, these regulators are used. Also when the internal
resistance of the power supply is greater than 30 ohms, the pull up gets
affected. Thus this can be successfully reduced here. The regulators are
mainly classified for low voltage and for high voltage.
3.4.1.5 IC VOLTAGE REGULATORS
Voltage regulators comprise a class of widely used ICs. Regulator
IC units contain the circuitry for reference source, comparator amplifier,
control device and overload protection all in a single IC. IC units provide
the regulation of a fixed positive voltage, a fixed negative voltage or an
adjustably set voltage.
A Power Supply can be built using a transformer connected to the
AC supply line to step the ac voltage to desired amplitude, then rectifying
that ac voltage using IC regulator. The regulators can be selected for
operation with load currents from hundreds of mA to tens of amperes,
corresponding to power ratings from MW to tens of watts.
The purpose of the regulator is to maintain the output voltage
constant irrespective of the fluctuations in the input voltage. The Micro
controller and PC work at a constant supply voltage of +5V,-5Vand +12V
and -12V respectively. The regulators are mainly classified for positive
and negative voltage.
26
3.4.1.6 OUTPUT FILTER
The filter circuit is often fixed after the regulator circuit. Capacitor is
most often used as filter. The principle of the capacitor is to charge and
discharge. It charges during the positive half cycle of the AC voltage and
discharges during the negative half cycle. So it allows AC voltage and not
DC voltage. This filter is fixed after the regulator circuit to filter any of the
possibly found ripples in the output received finally. The output at this
stage is 5V and is given to Microcontroller 89C51.
3.4.3 OPERATIONAL AMPLIFIERS- LM324
General Description
The LM124 series consists of four independent, high gain, internally
frequency compensated operational amplifiers which were designed
specifically to operate from a single power supply over a wide range of
voltages. Operation from split power supplies is also possible and the low
power supply current drain is independent of the magnitude of the power
supply voltage.
Application areas include transducer amplifiers, DC gain blocks and
all the conventional op amp circuits which now can be more easily
implemented in single power supply systems. For example, the LM124
series can be directly operated off of the standard +5V power supply
voltage which is used in digital systems and will easily provide the
required interface electronics without requiring the additional ±15V power
supplies.
27
Unique Characteristics
 In the linear mode the input common-mode voltage range includes
ground and the output voltage can also swing to ground, even
though operated from only a single power supply voltage
 The unity gain cross frequency is temperature compensated
 The input bias current is also temperature compensated
Advantages
 Eliminates need for dual supplies
 Four internally compensated op amps in a single package
 Allows directly sensing near GND and VOUT also goes to GND
 Compatible with all forms of logic
 Power drain suitable for battery operation
Features
 Internally frequency compensated for unity gain
 Large DC voltage gain 100 dB
 Wide bandwidth (unity gain) 1 MHz (temperature compensated)
 Wide power supply range:
 Single supply 3V to 32V or dual supplies ±1.5V to ±16V
 Very low supply current drain (700 μA)—essentially independent of
supply voltage
 Low input biasing current 45 nA (temperature compensated)
 Low input offset voltage 2 mV and offset current: 5 nA
28
 Input common-mode voltage range includes ground
 Differential input voltage range equal to the power supply voltage
 Large output voltage swing 0V to V+ − 1.5V
Fig 3.4: PIN DIAGRAM FOR OP-AMP
3.4.4 Ex-OR GATE CD4070B
Features
 High-Voltage Types (20V Rating)
 CD4070B - Quad Exclusive-OR Gate
 CD4077B - Quad Exclusive-NOR Gate
 Medium Speed Operation- tPHL, tPLH = 65ns (Typ) at VDD =
10V, CL = 50pF
 100% Tested for Quiescent Current at 20V
 Standardized Symmetrical Output Characteristics
 5V, 10V and 15V Parametric Ratings
 Maximum Input Current of 1μA at 18V Over Full Package
Temperature Range - 100nA at 18V and 25oC
29
 Noise Margin (Over Full Package Temperature Range) - 1V at VDD
= 5V, 2V at VDD = 10V, 2.5V at VDD = 15V
 Meets All Requirements of JEDEC Standard No. 13B, “Standard
Specifications for Description of ‘B’ Series CMOS Devices
Applications
 Logical Comparators
 Adders/Subtractors
 Parity Generators and Checkers
Description
The Harris CD4070B contains four independent Exclusive-OR
gates. The Harris CD4077B contains four independent Exclusive-NOR
gates.
The CD4070B and CD4077B provide the system designer with a
means for direct implementation of the Exclusive-OR and Exclusive-NOR
functions, respectively.
Fig 3.5: PIN DIAGRAM FOR EX-OR GATE
30
3.4.5 ANALOG TO DIGTAL CONVERTER
An analod-to-digital converter is a device whice converts signals to
discrete digital numbers. The reverse operation is performed by a digitalto-analog converter(DAC).
GENERAL DESCRIPTION
The PCF8591 is a single-chip, single-supply low power 8-bit CMOS
data acquisition device with four analog inputs, one analog output and a
serial I2C-bus interface. Three address pins A0, A1 and A2 are used for
programming the hardware address, allowing the use of up to eight devices
connected to the I2C-bus without additional hardware. Address, control
and data to and from the device are transferred serially via the two-line
bidirectional I2C-bus. The functions of the device include analog input
multiplexing, on-chip track and hold function, 8-bit analog-to-digital
conversion and an 8-bit digital-to-analog conversion. The maximum
conversion rate is given by the maximum speed of the I2C-bus.
PIN DIAGRAM
Fig 3.6: PIN DIAGRAM FOR ADC
31
FEATURES
 Single power supply
 Operating supply voltage 2.5 V to 6 V
 Low standby current
 Serial input/output via I2C-bus
 Address by 3 hardware address pins
 Sampling rate given by I2C-bus speed
 analog inputs programmable as single-ended or differential inputs
 Auto-incremented channel selection
 Analog voltage range from VSS to VDD
 On-chip track and hold circuit
 8-bit successive approximation A/D conversion
 Multiplying DAC with one analog output.
32
BLOCK DIAGRAM
Fig 3.7: BASIC BLOCK DIAGRAM OF ADC
33
3.4.6 LCD DISPLAY
Fig 3.8: PIN DIAGRAM OF LCD
PIN DESCRIPTION
Pins 1 &16 - Ground (GND)
These pins are connected to the ground terminal.
Pins 2 & 15 - Voltage Supply (Vcc)
These pins are used to give power supply to the LCD.
Pin 3 – Contrast
This pin is the contrast setting pin of the LCD. We ground this pin to
get maximum contrast in the LCD.
Pin 4 - Register Select (RS)
Register select input is used to select either of the two available
registers in the module: Data register or command register
When RS = 1 Data register is selected.
When RS = 0 Command register is selected.
34
Pin 5 - Read or write(R/W)
Allows the user to write information to the LCD or read information
from it. To read from the LCD, this pin is set high and to write to the LCD
this pin is set low. As we are using LCD for the purpose of displaying
alone, we ground this pin so that the LCD will always be in write mode.
Pin 6 - Enable (E)
This pin is used by LCD to latch information available at its data
pins when it is active high.
Pin 7-14 Data Bus (DB)
This 8-bit data bus is used to send information to the LCD to read the
contents of the internal registers of the LCD.
INTERFACING WITH MICROCONTROLLER:
Fig 3.9: LCD INTERFACING WITH MICROCONTROLLER
35
3.4.7 RELAY
A relay is an electrical switch that opens and closes under the
control of electrical circuit. In the original form, the switch is operated by
an electromagnet to open or close one or many sets of contacts. Here we
are using double contact relay. The pulse to the relay from port number
P2.3 of the ATMEL microcontroller.
Precautions:
 If you're switching an AC device, PLEASE BE CAREFUL. Make
sure you've got the coil working BEFORE you hook up the AC load.
 Make sure you have correctly labeled all the pins on the relay NEVER connect AC voltage directly to the relay coil.
NO - Normally-open (NO) contacts connect the circuit when the relay is
activated; the circuit is disconnected when the relay is inactive.
NC - Normally-closed (NC) contacts disconnect the circuit when the relay
is activated; the circuit is connected when the relay is inactive.
RELAY CIRCUIT DIAGRAM
This is the circuit diagram for driving relays from a microcontroller.
Here we are using a 5-volt relay (this refers to the coil, not the load
circuit), and make sure that the relay has a high enough rating for the load
that you're driving.
36
Fig 3.10: RELAY WITH DRIVER CIRCUIT
The diode protects the circuit in case the polarity is reversed. The
stripe on the diode should be towards the 5v side.
RELAY OPERATION
Under normal condition the common point C will be in contact with
NO (Normally Open), so the capacitor will be in OFF condition. When the
power factor value decrease microcontroller will give signal to the relay by
means of relay driver circuit, to energize the relay coil.
Now the common point C is moved from contact NO to NC. Then
the capacitor will be connected parallel to the load.
37
CHAPTER 4
MICRO CONTROLLER AND PROGRAMING
4.1
GENERAL:
This chapter deals with the ATMEL 89C51 Microcontroller and its
programming for calculating the power & power factor.
4.2
DESCRIPTION OF AT89C51:
The AT89C51 is a low-power, high-performance CMOS 8-bit
microcomputer with 4K bytes of Flash programmable and erasable read
only memory (PEROM). The device is manufactured using Atmel’s highdensity nonvolatile memory technology and is compatible with the
industry-standard MCS-51 instruction set and pin out. The on-chip Flash
allows the program memory to be reprogrammed in-system or by a
conventional nonvolatile memory programmer. By combining a versatile
8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a
powerful microcomputer which provides a highly-flexible and costeffective solution to many embedded control applications.
38
Features
 Compatible with MCS-51™ Products
 4K Bytes of In-System Reprogrammable Flash Memory
– Endurance: 1,000 Write/Erase Cycles
 Fully Static Operation: 0 Hz to 24 MHz
 Three-level Program Memory Lock
 128 x 8-bit Internal RAM
 32 Programmable I/O Lines
 Two 16-bit Timer/Counters
 Six Interrupt Sources
 Programmable Serial Channel
 Low-power Idle and Power-down Modes
39
4.3
ARCHITECTURE FOR ATMEL89C51:
The general architecture of AT 89C51 microcontroller
and its Pin details are shown in Fig 4.1 &4.2
Fig 4.1: ARCHITECTURE OF AT89C51
40
4.4
PIN DIAGRAM
Fig 4.2: PIN DIAGRAM FOR AT89C51
41
4.5
PIN DESCRIPTION:
VCC - Supply voltage.
GND - Ground.
Port 0
Port 0 is an 8-bit open-drain bi-directional I/O port. As an output
port, each pin can sink eight TTL inputs. When 1s are written to port 0
pins, the pins can be used as high impedance inputs.
Port 0 may also be configured to be the multiplexed low order
address/data bus during accesses to external program and data memory. In
this mode P0 has internal pull-ups. Port 0 also receives the code bytes
during Flash programming, and outputs the code bytes during program
verification. External pull-ups are required during program verification.
Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The
Port 1 output buffers can sink/source four TTL inputs. When 1s are written
to Port 1 pins they are pulled high by the internal pull-ups and can be used
as inputs. As inputs, Port 1 pins that are externally being pulled low will
source current (IIL) because of the internal pull-ups. Port 1 also receives
the low-order address bytes during Flash programming and verification.
Port 2
Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The
Port 2 output buffers can sink/source four TTL inputs. When 1s are written
to Port 2 pins they are pulled high by the internal pull-ups and can be used
as inputs. As inputs, Port 2 pins that are externally being pulled low will
source current (IIL) because of the internal pull-ups. Port 2 emits the highorder address byte during fetches from external program memory and
during accesses to external data memory that use 16-bit addresses (MOVX
42
@ DPTR). In this application, it uses strong internal pull-ups when
emitting 1s. During accesses to external data memory that use 8-bit
addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special
Function Register. Port 2 also receives the high-order address bits and
some control signals during Flash programming and verification.
Port 3
Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The
Port 3 output buffers can sink/source four TTL inputs. When 1s are written
to Port 3 pins they are pulled high by the internal pull-ups and can be used
as inputs. As inputs,
Port 3 pins that are externally being pulled low will source current
(IIL) because of the pull-ups. Port 3 also serves the functions of various
special features of the AT89C51 as listed below:
Port 3 also receives some control signals for Flash programming and
verification.
43
RST
Reset input. A high on this pin for two machine cycles while the
oscillator is running resets the device.
ALE/PROG
Address Latch Enable output pulse for latching the low byte of the
address during accesses to external memory. This pin is also the program
pulse input (PROG) during Flash programming.
In normal operation ALE is emitted at a constant rate of 1/6 the
oscillator frequency, and may be used for external timing or clocking
purposes. Note, however, that one ALE pulse is skipped during each
access to external Data Memory. If desired, ALE operation can be disabled
by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only
during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled
high. Setting the ALE-disable bit has no effect if the microcontroller is in
external execution mode.
PSEN
Program Store Enable is the read strobe to external program
memory. When the AT89C51 is executing code from external program
memory, PSEN is activated twice each machine cycle, except that two
PSEN activations are skipped during each access to external data memory.
EA/VPP
External Access Enable. EA must be strapped to GND in order to
enable the device to fetch code from external program memory locations
starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is
programmed, EA will be internally latched on reset. EA should be strapped
to VCC for internal program executions.
44
This pin also receives the 12-volt programming enable voltage
(VPP) during Flash programming, for parts that require 12-volt VPP.
XTAL1
Input to the inverting oscillator amplifier and input to the internal
clock operating circuit.
XTAL2
Output from the inverting oscillator amplifier.
4.5.1 OSCILLATOR CHARACTERISTICS
XTAL1 and XTAL2 are the input and output, respectively, of an
inverting amplifier which can be configured for use as an on-chip
oscillator, as shown in Figure 1. Either quartz crystal or ceramic resonator
may be used. To drive the device from an external clock source, XTAL2
should be left unconnected while XTAL1 is driven as shown in Figure 2.
There are no requirements on the duty cycle of the external clock signal,
since the input to the internal clocking circuitry is through a divide-by-two
flip-flop, but minimum and maximum voltage high and low time
specifications must be observed.
Fig 4.3: OSCILLATOR CONNECTION CIRCUIT
45
4.5.2 IDLE MODE
In idle mode, the CPU puts itself to sleep while all the on chip
peripherals remain active. The mode is invoked by software. The content
of the on-chip RAM and the entire special functions registers remain
unchanged during this mode. The idle mode can be terminated by any
enabled interrupt or by a hardware reset.
It should be noted that when idle is terminated by a hard ware reset,
the device normally resumes program execution, from where it left off, up
to two machine cycles before the internal reset algorithm takes control.
On-chip hardware inhibits access to internal RAM in this event, but access
to the port pins is not inhibited. To eliminate the possibility of an
unexpected write to a port pin when Idle is terminated by reset, the
instruction following the one that invokes Idle should not be one that
writes to a port pin or to external memory.
Fig 4.4: CIRCUIT FOR EXTERNAL CLOCK DRIVE
46
4.6
ALGORITHM
STEP 1: Start the program.
STEP 2: Sense the Voltage and Current values from PT & CT.
STEP 3: Finding Time displacement (TD) through Ex-OR.
STEP 4: Check the Time displacement value with the determination value
in Microcontroller (Pf<0.85).
STEP 5: If value is lower than 0.85, activate the relay which adds
capacitor across load.
STEP 6: If the value is higher, the relay doesn’t activate.
STEP 7: LCD shows V, I, PF.
STEP 8: Stop the program.
47
4.7
FLOW CHART:
Fig4.5: FLOW CHART
48
CHAPTER 5
TEST SETUP & TEST RESULTS
5.1
GENERAL
The complete test set up that has been carried out in the laboratory
for measuring power & Pf has been discussed in this chapter.
5.2
BASIC TEST SET UP CIRCUIT
The circuit arrangement for basic test circuit is given in fig 5.1.
Fig 5.1 BASIC TEST SET UP CIRCUIT
The test has been carried out in the laboratory with RL Load (Rheostat in
series with Isolation Transformer)
5.2.1 Test Result with R-Load Only
Applied
Voltage(V)
Current(A)
220
3
Power(W)
Pf=Cos Ø
=W/VI
500
49
0.75
5.2.2 Test Result with L-Load Only
Inductance in %
Voltage(v)
Current (A)
50
30
3
75
110
3.5
100
120
4
100
200
3.7
5.2.3 Test Result with R L –Load [Without Capacitor]:
Voltage (v)
Current (A)
Power (W)
Power Factor
200
2
360
0.9
220
2.2
400
0.82
5.2.4 Test Result with R L –Load [With Capacitor]:
Voltage (v)
Current (A)
220
Power (W)
1.85
Power Factor
400
0.98
When we connect a power capacitor across load, the current value is
decreased and the improvement in Pf has been observed. The
increases from 0.82 to 0.96
50
Pf
has
FORMULA USED
POWER FACTOR =COS Ø
COS Ø = Real power in kW/Real+ Reactive Power in kVA
= Real Power/Apparent Power
Reactive Power (Q) = VI Sin Ø
True Power (P)
= VI Cos Ø
Apparent Power(S)
= VLIL
Design calculation:
Real Power
– 0.396kw
Apparent Power – 0.484kva
Reactive Power – 0.277kvar
For above values we are getting the kvar rating with a range of 0.2
so we choose capacitor with a range of 1 kvar for further
enhancements.
5.3
TEST SET UP USING MICROCONTROLLER
For the same load without capacitor & with capacitor
testing has been carried out using the developed prototype model
and the obtained test results. Were compared with the actual test
results.
51
CHAPTER 6
CONCULUSION AND FUTURE SCOPE
6.1
CONCULUSION
This thesis work is an attempt to design and implement the power
factor controller using PIC micro controller. In this work there is a
provision to define the own current minimum range and power factor
minimum and maximum range. PIC monitors both continuously and then
according to the lagging or leading power factor it takes the control action.
This thesis gives more reliable and user friendly power factor controller.
This thesis makes possible to store the real time action taken by the PIC
microcontroller.
This thesis also facilitates to monitor the power factor changes on
LCD in real time.
6.2
FUTURE WORK
This thesis work is not tested on power converter based systems or
synchronous motor because of the requirement of huge amount of expense.
It needs the further enhancement of the system. Finance is a critical issue
for further enhancement.
52
CHAPTER 7
REFERENCES
1. Badri Ram, “Power System Protection & Switchgear”, TMH2001
2. V.ramanthan, P.S.Kannan, V.Saravanan, P.S.Manoharan-“Electric
Energy Generation, Utilization and Conservation” (2ndEdition,
January2008)
53