Sunteți pe pagina 1din 12

CHAPTER THREE

METHODOLOGY ADOPTED
(System Description and Hardware Implementation)

Fig: Block diagram of an Automatic Power Factor Controller Using PIC Microcontroller.
System Description and function

The circuit is been supplied from 230V ac by a potential transformer (PT) connected in parallel
to the line, who steps down the voltage to 12V ac. The voltage is fed to a bridge rectifier for
rectification, to the capacitor for filtration and then the voltage regulator to give a constant
voltage (5V) at the output suitable for both the microcontroller, LCD and the LED indicator.

Part of the rectified voltage is connected to a voltage regulator to provide 12V dc to supply the
zero-crossing detectors both voltage (V) and current (I), as well as the relay drivers with her
relays respectively. Both the unregulated 12Vdc after the rectifier circuit and the regulated 5Vdc
are been fed as inputs to the zero-crossing detector (voltage) circuit for pulse production. The
current transformer (CT) connected in series on the line, senses the current in the line which is
then rectified by a bridge rectifier and fed to the input of the zero crossing detector (I) circuit for
the generation of current pulses.

The microcontroller is coded in mikro C pro for PIC, it reads and interprets the pulses from the
zero crossing detector circuits, then fined a phase difference between. The phase difference
between those two pulses result to either a leading or lagging power factor. The microcontroller
issue a pulse to the relay driver to turn on the corresponding relays connected to capacitors, only
when the power factor is lagging (PF<unity) due to inductive loads. Then it releases the pulse
when there is a leading power factor (PF ~= unity).

The power factor is then corrected by inducing shunt capacitors in parallel with the inductive
loads such as induction motors.
The LCD display outputs the current power factor from the microcontroller.
Fig: Complete circuit diagram of automatic power factor correction.
Hardware Implementation
It involves the details of the set of design specifications. The hardware design consists of, the
selection of system components as per the requirement, the details of subsystems that are
required for the complete implementation of the system has been carried out. It involves the
component selection, component description and hardware details of the system design.

Component selection and description.


Hardware details of the system designed.

Component Selection and Description


Over voltage and under voltage tripping circuit design includes the following components:

1. POWER SUPPLY

Transformer - 230 V, 50Hz


Diode Bridge Rectifier
Positive Voltage Regulators - IC1 7805 AND IC1 7812

2. PIC16F877A MICROCONTROLLER

3. LM 358N (OPERATIONAL AMPLIFIER )

4. ULN 2003A (RELAY DRIVER)

5. RELAY
6. LCD DISPLAY (Liquid crystal display)

7. CAPACITOR BANKS

8. CAPACITORS AND RESISTORS

1. Transformer:

A potential Transformer is an electromechanical static device which transform one coil to


another without changing its frequency due to the magnetic effect of the coil. The flux induced in
the primary is transfer to the secondary coil. It is the most common type of transformer widely
used in electrical power transmission and appliances to convert mains voltage to low voltage in
order to power low power electronic devices. They are available in power ratings ranging from
mW to MW. The Insulated laminations minimize eddy current losses in the iron core. A potential
transformer is typically described by its voltage ratio from primary to secondary. The potential
transformer here has a voltage ratio of 230:12 that is, when the input voltage is 230V, the output
is 12V.

Fig: Step down transformer


The potential transformer here is being used for voltage sensing in the line. They are designed to
present negligible load to the supply being measured and have an accurate voltage ratio and
phase relationship to enable accurate secondary connected metering. It is used to supply a
voltage of about 12V to the Detectors through a voltage regulator, relay and relay driver circuits.
Diode Bridge Rectifier.

A diode bridge is a device that changes Alternating Current (AC) to Direct Current (DC). A
diode bridge is an arrangement of four (or more) diodes in a bridge configuration that provides
the same polarity of output for either polarity of input. When used in its most common
application, for conversion of an alternating current (AC) input into direct current a (DC) output,
it is known as a bridge rectifier.
Fig: A bridge rectifier
Positive Voltage Regulators - IC1 7805 AND IC1 7812.
Positive voltage regulators are electrical regulators designed to automatically maintain a constant
positive voltage level at the output regardless of changes in load currents with considering the
change of voltage in it input.

Fig: Positive voltage regulators


Electronic voltage regulators operate by comparing the actual output voltage to some internal
fixed reference voltage. Any difference is amplified and used to control the regulation element in
such a way as to reduce the voltage error. This forms a negative feedback control loop; increasing
the open-loop gain tends to increase regulation accuracy but reduce stability (avoidance of
oscillation, or ringing during step changes).

PIC MICROCONTROLLER.
The PIC microcontroller PIC16f877a is one of the most renowned microcontrollers in the
industry. This controller is very convenient to use, the coding or programming of this controller
is also easier. One of the main advantages is that it can be write-erase as many times as possible
because it use FLASH memory technology. It has a total number of 40 pins and there are 33 pins
for input and output. PIC16F877A is used in many pic microcontroller projects.
Fig: PIC16F877A microcontroller
PIC16f877a finds its applications in a huge number of devices. It is used in remote sensors,
security and safety devices, home automation and in many industrial instruments. An EEPROM
is also featured in it which makes it possible to store some of the information permanently like
transmitter codes and receiver frequencies and some other related data. The cost of this controller
is low and its handling is also easy. Its flexible and can be used in areas where microcontrollers
have never been used before as in coprocessor applications and timer functions etc.

Features
Operating frequency DC 20MHz
Resets (and delays) POR , BOR (PWRT , OST)
Flash program Memory (14-bit word) 8K
Data Memory (bytes) 368
EEPROM Data Memory (bytes) 256
Interrupts 15
I/O ports Port A,B,C,D,E
Timers 3
Capture/Compare/PWM modules 2
Serial Communications MSSP,USART
Parallel communications PSP
10-bit Analog-to-Digital Module 8 input channels
Analog comparators 2
Instruction Set 35 Instructions
Packages 40-pin PDIP

OPERATIONAL AMPLIFIER (LM 358N)

The LM 358N has dual OPAMs. With few components around it, form a zero crossing detector
circuit for current and voltage respectively.
Fig: Operational amplifier
Zero Crossing Detector

The zero crossing detector is a sine-wave to square-wave converter. The reference voltage in this
case is set to zero. The output voltage waveform shows when and in what direction an input
signal crosses zero volt. If input voltage is a low frequency signal, then output voltage will be
less quick to switch from one saturation point to another. And if there is noise in between the two
input nodes, the output may fluctuate between positive and negative saturation voltage Vsat.

RELAY DRIVER (ULN 2003A)

Fig: Relay driver pin out


Features.
Seven Darlingtons per package
Output current of 500mA per driver (600mA peak)
Output voltage of up to 50V
Integrated suppression diodes for inductive loads.
Output can be paralleled for higher current
TTL/CMOS/PMOS/DTL compatible inputs
Inputs pinned opposite outputs to simplify layout
The ULN2003A and are high voltage, high current Darlington arrays each containing seven open
collector Darlington pairs with common emitters. Each channel rated at 500mA and can
withstand peak currents of 600mA. Suppression diodes are included for inductive load driving
and the inputs are pinned opposite the outputs to simplify board layout. These versatile devices
are useful for driving a wide range of loads including solenoids, relays DC motors, LED displays
filament lamps, thermal print heads and high power buffers.

RELAY

Fig: A relay and its pins out

A relay is an electrically operated switch. Many relays use an electromagnet to operate a


switching mechanism mechanically, but other operating principles are also used. Relays are used
where it is necessary to control a circuit by a low-power signal (with complete electrical isolation
between control and controlled circuits), or where several circuits must be controlled by one
signal.

LCD DISPLAY (Liquid crystal display).

Alphanumeric displays are used in a wide range of applications, including palmtop computers,
word processors, photocopiers, point of sale terminals, medical instruments, cellular phones, etc.
The 16 x 4 intelligent alphanumeric dot matrix display is capable of displaying 448 different
characters and symbols. It requires a single power supply (+5V).The LCD used in this project is
been configure in 4 bits mode.
Fig: LCD configured in 4 bit mode.
Pin descriptions
Pins Functions
VSS Ground
VDD Power supply
VEE Contrast adjust
RS Register select signal
R/W Read/write input
E Enable input
D1-D7 Data inputs

Capacitor Banks

A capacitor bank is a grouping of several identical or non-identical capacitors interconnected in


parallel or in series with one another. These groups of capacitors are typically used to correct or
counteract undesirable characteristics such as power factor lag or phase shifts inherent in
alternating current electrical power supplies. Capacitor banks may also be used in direct current
power supplies to increase stored energy and improve the ripple current capacity of the power
supply. The capacitor bank here is use for power factor correction (Reactive power
compensation) and consists of a group of three (4) a.c capacitors, all rated at 450V, 50Hz i.e., the
supply voltage and frequency. The value of capacitors are 25micro farad, 10uf, 5uf and 1.5uf.
The capacitor bank is controlled by the relay module (driver) and is connected across the line.
The operation of a relay connects the associated capacitor across the line in parallel with the load
and other capacitors.
Fig: Capacitor bank
Other components used
Name value Quantity
Capacitors 470uf 2
22pf 2
Resistors 330 1
5
7
10k
6

4k7
1k

Push button - 1
Crystal oscillator 20Mh 1
z
Led emitting diode - 5
Inductive load - 1

SOFTWARE DEVELOP ENVIRONMENT

The microcontroller is programmed using microC pro for PIC compiler.

MikroC is a powerful, feature rich development tool for PIC controllers. It is designed to provide
the user with the easiest possible solution for developing application for embedded systems,
without compromising performance or control. MikroC provides a successful match featuring
highly advanced Integrated Development Environment, American National standards institute
compliant compiler, broad set of hard libraries, comprehensive documentation, and plenty of
ready-to-run examples.

MikroC allows quickly develop and deploy complex applications. For programming PIC with
mikroC C code is first written using the highly advanced Code Editor, the include mikroC
libraries are used to speed up the development: data acquisition, memory, display and
conversions function. Functions are used to monitor program structure, variables, and functions
in the Code Explorer. MikroC generates commented, human-readable assembly, and standard
HEX compatible with all programmers. The program is finely inspected with flow and debugs
executable logic with the integrated Debugger.

ALGORITHM
Algorithm for determining the different parameters:

Step 1- Include the LCD library into your mikroC complier


Step 2- create an instance for each phases to be measured
Step 3- Include the other libraries to be use
Step 4- Initialize the different outputs and inputs pins for the LCD, switches and capacitors
Step 5- Use the Timer1interupt model to measure the voltage and current from the sensors
Step 6- Use the mathematic expression to calculate all the number of half wavelengths
(crossings) of these signals and set up a time out.
Step 7- Print out the power factor of the first line the LCD display
Step 8- Display the result of the calculation on an LCD display in the second line.

Algorithm for switching the capacitor bank:


Step 1 Check if compensation is active
Step 2 Check if the compensation is single or three phase
Step 3- Calculate the Power Factor (cosf).
Step 4- Check whether the power factor is between the reference power factors.
Step 5- If the power factor is less than lower reference, switch on one capacitor and check the
corrected power factor.
Step 6- If the power factor is greater than upper reference, then switch off a capacitor from the
capacitor bank and again check the corrected power factor.
Step 7- Display the corrected power factor.
Step 8- Repeat steps 3 to 7 until the corrected power factor is between 0.95 to 0.98.

Fig: Flow chart of the system

S-ar putea să vă placă și