Automatic Power Factor Correcter: Declaration
Automatic Power Factor Correcter: Declaration
Automatic Power Factor Correcter: Declaration
Declaration
We, hereby declare that this project is an original work of us and is submitted in partial fulfillment of
the final project. This project has not been submitted earlier to this university or any other institute.
For the partial fulfillment of the requirement of a course of study.
BEREHAN TESHALE___________________
Program:-Degree
Approved by
_______________________ _______________________
School director
Mr. Abenew A
_______________________
June 2014
Acknowledgement
We would like to express our heartfelt gratitude to Bahir-Dar University School of Computing and
Electrical Engineering for the preparation of the equipments used for this project.
We would like to say thank you our advisor Mr. TEKETAY M. for giving us huge information to do
our project. We want thank for our Families and class mate students that they spend their time when
we work some work tasks.
Contents
Declaration ............................................................................................................................................................ i
Acknowledgement ................................................................................................................................................. ii
LIST OF FIGURE ...................................................................................................................................................... v
LIST OF TABLE ...................................................................................................................................................... vii
LIST OF ABBRIVATION ......................................................................................................................................... viii
SYMBOL ................................................................................................................................................................. x
Abstract ................................................................................................................................................................ xi
CHAPTER- ONE ...................................................................................................................................................... 1
1. INTRODUCTION ............................................................................................................................................... 1
1.1 BACKGROUND............................................................................................................................................. 1
1.1.1 Power theory ....................................................................................................................................... 2
1.1.2 Power quality ....................................................................................................................................... 4
1.1.3 Devices for reactive power compensation .......................................................................................... 5
1.2 STATEMENT OF PROBLEM .......................................................................................................................... 7
1.3 OBJECTIVE ................................................................................................................................................... 8
1.3.1 General Objective ................................................................................................................................ 8
1.3.2 Specific objective ................................................................................................................................. 8
CHAPTER-TWO ...................................................................................................................................................... 9
2. LITERATURE REVIEW ............................................................................................................................. 9
2.1 POWER FACTOR ........................................................................................................................................ 11
2.2 POWER FACTOR CORRECTION .................................................................................................................. 12
2.3 Capacitor ................................................................................................................................................... 16
2.4 Power Factor capacitors ........................................................................................................................... 17
2.5 Power factor Harmonics ........................................................................................................................... 21
2.6 Fixed Versus Automatic Capacitors .......................................................................................................... 23
2.7 Expected outcome of the project and Significant of the project ............................................................. 24
2.7.1 Expected outcome ............................................................................................................................. 24
2.7.2 Significant of the project ................................................................................................................... 24
2.8 Feasibility of the project ....................................................................................................................... 25
CHAPTER-THREE ................................................................................................................................................. 26
3. METHODOLOGY AND OVERALL SYSTEM DESIGN........................................................................ 26
LIST OF FIGURE
FIGURE-2.3: The waveform for pure resistive load, Voltage and current are in phase
FIGURE-2.5: The wave form for pure inductive load, the current lags the voltage by 90°C.
FIGURE-2.7: The wave form for pure capacitive load, current leads the voltage by 90°C.
LIST OF TABLE
LIST OF ABBRIVATION
PF – Power factor
IM - induction motor
TV- Television
KW – kilo-watt
KWh - in kilowatt-hours
KVA - kilovolt-amperes
KVAH - kilovolt-ampere-hours.
AC – Alternative current
DC – Direct current
Amp - Ampere
Hz - Hertz
CT – Current transformer
PT – Potential transformer
Kv – Kilo-Volt
C - Capacitance
IL – Load current
IC – Capacitor current
XC – Capacitive reactance
Fc – Capacitor frequency
MHz – Mega-Hertz
mA – Mill-Ampere
KB – Kilo-Byte
GND - Ground
Ms – Mill-Second
NC - Normally closes
NO - Normally open
CKT – Circuit
SYMBOL
P - Real Power
I - current
V - Voltage
R - Resister
S – Apparent power
Q – Reactive power
Abstract
Low power is poor electrical efficiency. It results in excess heating since the current flow through
electrical system components is higher than necessary. The excess heating then can lead to damage or
shortening the life of the appliances. Low power factor also results in low-voltage conditions which
can lead to slow operation of appliances and dimming of lights. When the power factor is low, the
electrical utility provides higher apparent power which means that the utility will use larger
distribution system devices. And the utility will pass the higher expenses through higher utility bills.
In the present technological revolution power is very precious. So we need to find out the causes of
power loss and improve the power system. Due to industrialization the use of inductive load increases
and hence power system losses its efficiency. So we need to improve the power factor with a suitable
method. . Whenever we are thinking about any programmable devices then the embedded technology
comes into force front. The embedded is now a day very much popular and most the product are
developed with Microcontroller based embedded technology.
Automatic power factor correction device reads power factor from line voltage and line current by
determining the delay in the arrival of the current signal with respect to voltage signal with the help
of power factor transducer high accuracy by using an internal timer. This time values are then
calibrated as DC voltage output and corresponding power factor. Then the values are displayed in the
2X16 LCD modules.
Automatic power factor correction techniques can be applied to the industries, power systems and
also households to make them stable and due to that the system becomes stable and efficiency of the
system as well as the apparatus increases. The use of microcontroller reduces the costs become more
efficient.
CHAPTER- ONE
1. INTRODUCTION
1.1 BACKGROUND
The power factor of an ac electric power system is defined as the ratio of the real power to the
apparent power, and is a number between 0 and 1[1]. Real power is the capacity of the electric load
for performing work in a particular time. Apparent power is the product of the current and voltage of
the electric load. Due to energy stored in the load and returned to the source, or due to a non-linear
load that distorts the wave shape of the current drawn from the source, the apparent power can be
greater than the real power [1]. Low-power-factor loads increase losses in a power distribution
system and result in increased energy costs. In a purely resistive ac circuit, voltage and current
waveforms are in phase; changing polarity at the same instant in each cycle Circuits containing
purely resistive heating elements such as filament lamps and cooking stoves have a power factor of
1.0. Circuits containing inductive or capacitive elements such as lamp ballasts and motors often have
a power factor below 1.0 [2].
Over the last few years, the interest in reactive power compensation has been growing, mainly
because of the way in which energy supplier charge a customer for reactive power [3]. Moreover, the
energy price is growing, what force the industry plants and individual customers to minimize energy
consumption, including reactive power. The aim is to minimize reactive power flow in supplying and
distribution systems, eliminate or minimize the charge for reactive power as well as aspire to active
energy limitation, in result, reducing fare for electrical energy [3]. In the matter of fact, the energy
providers want them customers to compensate reactive power.
There are few solutions, that allow handle the problem of reactive power compensation. One of them
is reactive power compensator basing on power capacitors. This is the most popular compensating
device, mainly because of economical reasons, they are relatively cheap comparing with i.e. active
filters or compensation by means of electric motors [3]. That is one of the reasons, for which
proposed the thesis topic “Design of automatic power factor corrector”.
“Power is a measure of energy per unit time [1]. Power therefore gives the rate of energy
consumption or production. The units for power are generally watts (W). For example, the watt rating
of an appliance gives the rate at which it uses energy. The total amount of energy consumed by this
appliance is the wattage multiplied by the amount of time during which it was used; this energy can
be expressed in units of watt-hours (or, more commonly, kilowatt-hours) [4].The power dissipated by
a circuit element whether an appliance or simply a wire is given by the product of its resistance and
the square of the current through it: P=I2R. The term “dissipated” indicates that the electric energy is
being converted to heat. This heat may be part of the appliance’s intended function (as in any electric
heating device), or it may be considered a loss (as in the resistive heating of transmission lines); the
physical process is the same. Another, more general way of calculating power is as the product of
current and voltage: P=IV. For a resistive element, we can apply Ohm’s law (P=I.V) to see that the
formulas P=I2R and P=I.V amount to the same thing:” [4]
Complex power
“Applying the simple formula P=I.V becomes more problematic when voltage and current are
changing over time, as they do in a.c. systems. In the most concise but abstract notation, power,
current, and voltage are all complex quantities [5], and the equation for power becomes:
S=I*V
Where S is the apparent power and the asterisk denotes the complex conjugate of the current I,
meaning that for purposes of calculation, the sign (positive or negative) of its imaginary component is
to be reversed. All this ought to make very little sense without a more detailed discussion of complex
quantities and their representation by phasors. In the interest of developing a conceptual
understanding of a.c. power, let us postpone the elegant mathematics and begin by considering
power, voltage, and current straightforwardly as real quantities that vary in time. In [5] the
fundamental and correct way to interpret the statement P=I*V when I and V vary in time is as a
statement of instantaneous conditions. Regardless of all the complexities to be encountered, it is
always true that the instantaneous power is equal to the instantaneous product of current and voltage.
In other words, at any instant, the power equals the voltage times the current at that instant. This is
expressed by writing each variable as a function of time,
P (t) = I (t)* V (t)
Where t is the same throughout the equation (i.e., the same instant) [5].
“However, instantaneous power as such is usually not very interesting to us. In power systems, we
generally need to know about power transmitted or consumed on a time scale much greater than 1/60
of a second. Therefore, we need an expression for power as averaged over entire cycles of alternating
current and voltage. Consider first the case of a purely resistive load. Voltage and current are in
phase; they are oscillating simultaneously. The average power (the average product of voltage and
current) can be obtained by taking the averages (rms values) of each and then multiplying them
together [5]. Thus,
Pave = Irms *Vrms (in resistive case)
But now consider a load with reactance. The relative timing of voltage and current has been shifted;
their maxima no longer coincide. In fact, one quantity is sometimes negative when the other is
positive. As a result, the instantaneous power transmitted or consumed (the product of voltage and
current) is sometimes negative. We can interpret the negative instantaneous power as saying that
power flows “backwards” along the transmission line, or out of the load and back into the generator
[6].
Reactive power
“Finally, we also specify what we might intuitively think of as the difference between apparent and
real power, namely, reactive power [6]. Reactive power is the component of power that oscillates
back and forth through the lines, being exchanged between electric and magnetic fields and not
getting dissipated [6]. It is denoted by the symbol Q, and its magnitude is given by”
Q = Irms *Vrms* sinφ
Again, note how the equation converges for the resistive case where φ =0 and sin sinφ=0, as there
will be no reactive power at all. Reactive power is measured in VAR (also written Var or VAr), for
volt-ampere reactive. We can represent power as a vector in the complex plane: namely, and arrow of
length S (apparent power) that makes an angle f with the real axis. The angle φ is the same as the
phase difference between voltage and current.”
Nonlinear loads
There are more and more energy consumers that use devices with nonlinear current voltage
characteristics, what affects the power quality delivered by the energy supplier [5]. This type of
device connected to the network is generating the higher order harmonics, which in turn, are main
reason of supplying voltage distortion [7]. The harmonics has been the most disturbing distortion in
the electric systems, and the problem still is not solved since the problem is being gained.
The power quality parameters are worst because of:
• Nonlinear loads
• Electromagnetic immunity of devices on electromagnetic distortions is smaller
• Electromagnetic ecology
The main point of the power quality improving is to understand the problem by the energy customers
and suppliers [7]. In order describe the sources of the power distortion, it is necessary to determine
which parameters of the power decide about the quality.
The characteristic thing about the energy is that its quality strictly depends on the end user. The
factors that affect the power quality the most are: faults in power system, substations mains, as well
as switching on and off the loads of the high power [1]. Moreover, installation of the big amount of
nonlinear loads such as lighting, electronic devices in the vicinity of the nonlinear, high power
electric drive has negative consequences. We can distinguish three groups of harmonics sources in
the power system [7]:
• Arc devices such as arc furnace, welding machines etc.
• Devices with electromagnetic cores such as transformers, electric motors or generators
• Electronic and power electronic devices
The energy consumers are using more electrical devices, which converts the energy. This devices,
very often consist of capacitors, filters, rectifiers. The state of the art computers, TV, and lighting also
affects the phase currents. The nonlinear loads produce higher order harmonic, especially the 3rd, 5th,
7th etc. The harmonics of the currents cause some problems in the mains while the voltage drop
across the line impedance distorts the voltage [8].
BAHIRDAR UNIVERSITY, JUNE2014 Page 4
AUTOMATIC POWER FACTOR CORRECTER
The nonlinear loads having electronic inputs, converts the delivered energy into the same type of
energy, but with different parameters than the one in the feeder [9]. This type of power conversion
allows controlling the conversion of the energy in order to obtain the other type of energy, i.e. the
mechanical one. It concerns the electric motors, lighting and heating. All the energy saving systems
basing on the semi-conductors (diodes, thyristors etc.) allows for the energy savings; on the other
hand they launch distortions to the electric grid [9]. The nonlinear loads are being used more often in
many locations. In the ideal supplying system, the current and voltage waveform is strictly sinusoidal.
In case, where there are the nonlinear loads in the system the waveforms are distorted. As a result of
the nonlinear loads, one may have a problem with the increase of the RMS current of the capacitors
for the reactive power compensation. The devices that are prone to the harmonics are, among other
things, transformers. The harmonic presence makes the power losses of the transformer core bigger
[8]. Distorted currents may cause:
• Higher supplying power
• Higher power losses of transmission line
• malfunction of protection
• overheating of transformers and motors
• malfunction of capacitors for reactive power compensation
• Increase of the current in neutral conductor
• Disturbances for sensitive devices
Shorter life expectancy of the insulation
In the most cases, PFC is used for economic reasons. Using compensating device, one can save on
electricity bill as well as keep certain grid parameters determined by the energy provider [10].
Power factor correction gives even more profits, than only savings. Compensating “unnecessary”
reactive power the current carrying capacity of an existing network can be sufficient to send more
active power through it, maintaining the same ratings of the apparatus within the supplying and
distribution system. PFC also allows decreasing transmission losses and limits voltage drops [8].
Generally, reliability of the network gets better. But one should be aware, that compensating device
connected to the mains can also have negative consequences like [10]:
• Transient generation
• Higher order harmonics generation
• Long lasting voltage rise
• Gain of higher order harmonics
• Voltage drops, outages and Overvoltage of short duration
• Other kind of distortions
All of this can be caused for few reasons, such as resonance phenomenon, mistakes in design, use of
unsuitable equipment, wrong exploitation. But despite of all negative consequences, there are also
positive ones, which will definitely improve energy quality [8]. These are as follows:
• Limitation of reactive power
• Adjustment of a voltage at receivers (burden) terminals
• Higher order harmonic filtration
• Phase voltage symmetrisation
• Limitation of voltage swing and flickering
Bearing above in mind, before one decides, what kind of compensating device will be used in
particular case; there is a few factors and conditions that has to be taken under consideration, such as
[10]:
• Rating of the mains, that is: voltage, frequency, and it`s real value (measurement)
• Demand on inductive reactive power taking into account the aim of compensation
• Presence of higher order harmonics of a current and voltage
• Short circuit parameters at the capacitor bank future location
• Ambient conditions
• Place of installation
Compensating devices can be classified into four groups [10]:
• Power capacitor based compensators
• Power electronics compensators and active filters
• Hybrid compensation systems (power capacitors and power electronics based)
• Synchronous machines
BAHIRDAR UNIVERSITY, JUNE2014 Page 6
AUTOMATIC POWER FACTOR CORRECTER
All current will cause losses in the supply and distribution system [1]. A load with a power factor of
1.0 result in the most efficient loading of the supply and a load with a power factor of 0.5 will result
in much higher losses in the supply system. A poor power factor can be the result of either a
significant phase difference between the voltage and current at the load terminals, or it can be due to
a high harmonic content or distorted/discontinuous current waveform [3]. Poor load current phase
angle is generally the result of an inductive load such as an induction motor, power transformer,
lighting ballasts, welder or induction furnace. A distorted current waveform can be the result of a
rectifier, variable speed drive, switched mode power supply, discharge lighting or other electronic
load [4].
A poor power factor due to an inductive load can be improved by the addition of power factor
correction, but, a poor power factor due to a distorted current waveform requires a change in
equipment design or expensive harmonic filters to gain an appreciable improvement. Many inverters
are quoted as having a power factor of better than 0.95 when in reality, the true power factor is
between 0.5 and 0.75. The figure of 0.95 is based on the Cosine of the angle between the voltage and
current but does not take into account that the current waveform is discontinuous and therefore
contributes to increased losses on the supply [7].
Electrical power generators are design to produce quality, reliable and stable power to consumers. It
came to light that most of the loads in commercial use are inductive loads that produce inductive
reactance and if not immediately checked, contributes to low power factor thereby increasing the
amount of electrical energy that flows through the electrical network from the generating station,
example of industrial and commercial loads are (inductive motors, furnaces, arc welding machines,
etc.) and (air conditions, washing machines, deep freezers, refrigerators heaters, etc.) respectively.
Attempts are made over the years to improve the low factor close to unity using capacitors banks to
generate capacitive reactance to compensate for the inductive reactance. Switching on and off of the
capacitor banks for the compensation also produces harmonics in the system .Therefore the need for
improving the power factor using microcontroller to do the switching of the capacitor banks on/off
the system and also eliminate harmonic effect in the system.
1.3 OBJECTIVE
The main objective of the proposed system is, in order to compensate the reactive power for Dire
Dawa food factory by switching on and off the capacitor bank through electromagnetic relay using
Micro-controller and to provide an automatically controlled power factor correction unit that will
bring the power factor near to 0.95 and have sufficient capacity for future PFC requirements or
expansion.
CHAPTER-TWO
2. LITERATURE REVIEW
Though correction of power factor is very old practice, we have considered the work done in recent years
in our Thesis. Many of the authors below have suggested and prescribe many ways of power factor
correction but this work concentrates on [11] We have considered the work done in the previous years,
starting from 1988. [12] Proposed a continuing effort to develop an effective, reliable, and inexpensive
adaptive power factor controller (APFC). The APFC was able to compensate adaptively the reactive
power of rapidly varying loads without adding harmonics or transients to the power system. Based on
thousands of hours of field operation, the APFC had substantially modified to improve its reliability and
effectiveness. [12]
[13] Proposed the speed and power factor of an adjustable speed slip power recovery drive were
controlled in order to optimize the operation. This was accomplished by means of a variable-voltage-
variable-frequencies power converter. The function of the digital controller of the power converter was to
provide the online speed and power factor regulation [13]. [14] reports a laboratory model of a
microcomputer-based power factor controller (PFC) for compensating the reactive power of rapidly
varying loads by switching capacitors sized in a binary ratio, with the help of zero voltage static
switches. Four types of control strategies were tried, viz.
Features like,
gap operating with a saturated core, a swinging inductor which has a stepped gap and a novel
inductor construction with a sloped air-gap (SAG). Results are presented for a 200 W power supply
and it is shown that the SAG inductor has the best performance in terms of harmonic response and
size [15]. [16] Proposed a detailed analysis of the ripple current of an electrolytic capacitor in a boost-
type power factor control circuit. The ripple current was divided into two components, namely the
low-frequency and the high-frequency components. The root-mean-square value of the capacitor
current was derived for both components [16]. In [11] proposed the programming of micro-controller
for power factor correction that described the design and development of a three-phase power factor
corrector using (Programmable Interface Microcontroller) chip. This involved sensing and measuring
the power factor value from the load using PIC and sensors, then using proper algorithm to determine
and trigger sufficient switching capacitors in order to compensate excessive reactive components,
thus withdraw PF near to unity [11]. [17] Proposed a new integrated power quality device-power
factor controller (PFC) for power distribution system and industrial power circuit applications. A PFC
integrated breaker-switched capacitor banks into a compact design with low cost sensing elements
and an intelligent control unit. The device provided more accurate voltage control and power factor
correction than traditional shunt capacitor bank installations [17]. [18] Proposed a power factor
controller (PFC) for a three-phase induction motor (IM) utilized the programmable logic controller
(PLC). It focused on the implementation of a laboratory model for a PLC based PFC to improve the
power factor of a three-phase induction motor. During the online process a set of capacitors sized in a
binary ratio would be switched on or off with the help of zero voltage static switches according to a
control strategy to obtain a pre-specified power factor. This control strategy relied on a look-up table
and an expert system. [19] Proposed an innovative converter topology that improved the performance
of a switched reluctance motor drive, aimed to equip home appliances. It was based on a modified C-
dump converter configuration, where the energy recovery stage acted as an active power factor controller
for off-line operation. [20] Proposed a general description of new functions integrated in the medium
voltage switchboard to meet the power quality challenge. They described circuit breakers with magnetic
actuators that were easy to justify economically and gave low cost power quality solutions.
[21] introduces a single-phase digital power-factor correction (PFC) control approach that requires no
input voltage sensing or explicit current-loop compensation, yet results in low-harmonic operation
over a universal input voltage range and loads ranging from high-power operation in continuous
conduction mode down to the near-zero load. The controller is based on low-resolution A/D
converters and digital pulse width modulator, requires no microcontroller or DSP programming, and
is well suited for a simple, low-cost integrated-circuit realization, or as a hardware description
language core suitable for integration with other power control and power management functions.
[22] proposed a novel compensator, where in-phase and quadrature components of the supply current
are vector-controlled. Implementation of this compensator in a power electronic system operating
with a very poor power factor (and hence high THD) shows that the system then draws a leading
current. A conventional power electronic system with one of the traditional static VAR compensators
and the conventional power electronic system incorporated with the proposed compensator are
simulated and the simulation results are obtained. It is shown that the proposed method offers only
0.7% THD, which also implies that the power factor is improved [22]. Shuffling presents an
intelligent power factor compensation controller that can perform power factor correction without
exciting harmonic resonance under varying demand conditions. Practical and robust control
algorithms are proposed for the purpose of easy implementation in a micro-controller. In addition, the
controller relies on common low cost sensing devices and does not require additional measurements.
As a result, the proposed controller can be constructed as a retrofitting device to replace existing
power factor correction controllers with little effort [23].
Power factor is an energy concept that is related to power flow in electrical systems. To understand
power factor, it is helpful to understand three different types of power in electrical systems. Real
Power is the power that is actually converted into useful work for creating heat, light and motion.
Real power is measured in kilowatts (KW) and is totalized by the electric billing meter in kilowatt-
hours (KWh) [1]. An example of real power is the useful work that directly turns the shaft of a motor.
Reactive Power is the power used to sustain the electromagnetic field in inductive and capacitive
equipment. It is the non- working power component. Reactive power is measured in kilovolt-amperes
reactive (KVAR). Reactive power does not appear on the customer billing statement. Total Power or
Apparent power is the combination of real power and reactive power. Total power is measured in
kilovolt-amperes (KVA) and is totalized by the electric billing meter in kilovolt-ampere-hours
(kVAH). Power factor (PF) is defined as the ratio of real power to total power, and is expressed as a
percentage (%) .
Or Power factor cos ϕ is defined as the ratio between the Active component IR and the total value of
the current I; ϕ is the phase angle between the voltage and the current [1].
An electrical load that operates on alternating current requires apparent power, which consists of real
power and reactive power. Real power is the power actually consumed by the load. Reactive power is
repeatedly demanded by the load and returned to the power source, and it is the cyclical effect that
occurs when alternating current passes through a load that contains a reactive component [4]. The
presence of reactive power causes the real power to be less than the apparent power, so the electric
load has a power factor of less than one. The reactive power increases the current flowing between
the power source and the load, which increases the power losses through transmission and
distribution lines. This results in operational and financial losses for power companies [9]. Therefore,
power companies require their customers, especially those with large loads, to maintain their power
factors above a specified amount especially around ally 0.90 or higher, or be subject to additional
charges. Electrical engineers involved with the generation, transmission, distribution and
consumption of electrical power have an interest in the power factor of loads because power factors
affect efficiencies and costs for both the electrical power industry and the consumers. In addition to
the increased operating costs, reactive power can require the use of wiring, switches, circuit breakers,
transformers and transmission lines with higher current capacities.
Power factor correction attempts to adjust the power factor of an AC load or an AC power
transmission system to unity through various methods. Simple methods include switching in or out
banks of capacitors or inductors which act to cancel the inductive or capacitive effects of the load,
respectively [10]. For example, the inductive effect of motor loads may be offset by locally connected
capacitors. It is also possible to effect power factor correction with an unloaded synchronous motor
connect across the supply. The power factor of the motor is varied by adjusting the field excitation
and be made to behave like a capacitor when over excited. Non-linear loads create harmonic currents
in addition to the original AC current. There are two types of PFCs, Passive and Active [7].
Passive PFC
The simplest way to control the harmonic current is to use a filter: it is possible to design a filter that
passes current only at line frequency 50Hz. This filter reduces the harmonic current, which means
that the non-linear device now looks like a linear load. At this point the power factor can be brought
to near unity, using capacitors or inductors as required. This filter requires large-value high-current
inductors, however, which are bulky and expensive. A passive PFC requires an inductor larger than
the inductor in an active PFC, but costs less. This is a simple way of correcting the nonlinearity of a
load is by using capacitor banks. It is not as effective as active PFC. Passive PFCs are typically more
power efficient than active PFCs [15].
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 [7]. 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). The purpose of making the power factor
as close to unity (1) as possible is to make the load circuitry that is power factor corrected appear
purely resistive (apparent power equal to real power). In this case, the voltage and current are in
phase and the reactive power consumption is zero. This enables the most efficient delivery of
electrical power from the power company to the consumer. 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%) [23].
Improved voltage
Current (I1) = (Power (KW) / Volts (V) x P.F) = (10000 / 240 x0.65) = 64.1Amps.
If the power factor of the motor is increased to 0.9 the current drawn by the motor
Current (I2) = (Power (KW) / Volts (V) x P.F) = (10000 / 240 x0.9) = 46.3 Amp.
Thus, as the power factor decreases the current required for the same value of active, or useful,
power increases. The result is that the capacity of the equipment, like the switchgear, cables,
transformers, etc., will have to be increased to cater for the higher current in the circuit [24]. All this
adds to the cost. Further, the greater current causes increased power loss or I2R losses in the circuits.
Also due to higher current, the conductor temperature rises and hence the life of the insulation is
reduced. Also, with the increased current the voltage drop increases; thereby the voltage at the supply
point is reduced. For different loads it causes voltage drop resulting in: a. Lower output of the
illumination system. Less current is drawn by the heating devices so that the operating temperature
drops. This results in increased consumption for the same rise of temperature. The induction motors
slow down and therefore draw more current to produce a fixed torque for the loads [25].
In general, electrical systems are made up of three components: resistors, inductors and capacitors.
Inductive equipment requires an electromagnetic field to operate. Because of this, inductive loads
BAHIRDAR UNIVERSITY, JUNE2014 Page 15
AUTOMATIC POWER FACTOR CORRECTER
require both real and reactive power to operate. The power factor of inductive loads is referred to as
lagging, or less than 100%, based upon our power factor ratio [26].
In most commercial and industrial facilities, a majority of the electrical equipment acts as a resistor or
an inductor. Resistive loads include incandescent lights, baseboard heaters and cooking ovens.
Inductive loads include fluorescent lights, AC induction motors, arc welders and transformers [27].
2.3 Capacitor
A capacitor (originally known as condenser) is a passive two-terminal electrical component used to
store energy in an electric field. The forms of practical capacitors vary widely, but all contain at least
two electrical conductors separated by a dielectric (insulator); for example, one common construction
consists of metal foils separated by a thin layer of insulating film. Capacitors are widely used as parts
of electrical circuits in many common electrical devices [28].
When there is a potential difference (voltage) across the conductors, a static electric field develops
across the dielectric, causing positive charge to collect on one plate and negative charge on the other
plate. Energy is stored in the electrostatic field. An ideal capacitor is characterized by a single
constant value, capacitance, measured in farads. This is the ratio of the electric charge on each
conductor to the potential difference between them [27].
The capacitance is greatest when there is a narrow separation between large areas of conductor; hence
capacitor conductors are often called plates, referring to an early means of construction. In practice,
the dielectric between the plates passes a small amount of leakage current and also has an electric
field strength limit, resulting in a breakdown voltage, while the conductors and leads introduce an
undesired inductance and resistance [28].
Capacitors are widely used in electronic circuits for blocking direct current while allowing alternating
current to pass, in filter networks, for smoothing the output of power supplies, in the resonant circuits
that tune radios to particular frequencies, in electric power transmission systems for stabilizing
voltage and power flow, and for many other purposes. Capacitors also require reactive power to
operate. However, capacitors and inductors have an opposite effect on reactive power. The power
factors for capacitors are leading. Therefore capacitors are installed to counteract the effect of
reactive power used by inductive equipment [20].
When the load conditions and power factor in a facility change frequently, the demand for power
factor improving capacitors also changes frequently. In order to assure that the proper amount of
power factor capacitor KVAr are always connected to the system (without over-correcting), an
Automatic Type Capacitor System should be used for applications involving multiple loads [29]. A
microcontroller automatic compensation system is formed by:
In a purely resistive AC circuit, voltage and current waveforms are in phase, changing polarity at the
same instant in each cycle. Where reactive loads are present, such as with capacitors or inductors,
energy storage in the loads result in a time difference between the current and voltage waveforms
[30]. This stored energy returns to the source and is not available to do work at that load. A circuit
with low power factor will have a higher current to transfer a given quality of real power than a
circuit with a high power factor [29]. In order to get the current reading with the oscilloscope for the
diagram for pure resistive, capacitive and inductive loads below. A resistor with a negligible value
was introduced in the circuit and the current value was measured across it. This assumption was made
using ohms law:
Ohms law: V=IR but R‘s value is negligible therefore V=I, This assumption was used to get the
waveform for current I.
FIGURE-2.3: The waveform for pure resistive load, Voltage and current are in phase.
FIGURE-2.5: The wave form for pure inductive load, the current lags the voltage by 90°C.
Figure-2.7: The wave form for pure capacitive load, current leads the voltage by 90°C.
• Electrical arc-furnaces.
• Induction motors with irregular magnetizing current associated with saturation of the iron.
• All equipment with built-in switching devices or with internal loads with non-linear
voltage/current characteristics.
• Malfunction of ripple control and other mains signaling systems, protective relays and,
possibly, other of control systems.
• Additional acoustic noise from motors and other apparatus, reducing the efficiency of motors.
• Telephone interference.
• High harmonic amplitudes may not only cause malfunctions, additional losses and
overheating, but also overload the power distribution network and overheat the neutral
conductor and cause it to burn out.
• Audio equipment;
• Equipment not specified in one of the three other classes shall be considered as Class A
equipment.
Class D: Equipment having a specified power < 600W of the following types:
• Personal computers and personal monitors;
• Television receivers.
Fixed capacitor banks are always on at all times, regardless of the load in the facility, while an
automatic capacitor bank varies the amount of correction supplied to an electrical system. An
automatic capacitor is much more expensive per kVAR than a fixed system. 100 kVAR of fixed
capacitors will save as much power factor penalties as a 100 kVAR automatic capacitor [30].
Generally, when a capacitor is connected to a system there is a reduction in amperage on the system.
This reduction in amperage reduces the voltage drop across a load, which results in a higher voltage
in the system. If 100 kVAR is connected to a 1000 KVA transformer, there is approximately a ¾%
voltage rise on the system (if there are no other loads on the system). The more kVAR connected, the
higher the voltage rise. This voltage rise is counter acted by the increase of load in the facility.
Typically, in the night and on weekends, utility voltage are higher than normal, and facilities that are
not normally loaded during these times, could experience a higher than normal voltage rise if too
much capacitance is connected to their system. Based on this, generally limit fixed capacitors to 10%
to 15% fixed kVAR to KVA of load size [31].
The expected outcome of this project is to measuring the power factor value and to improve power
factor using capacitor bank and reduce current draw by the load using microcontroller and proper
algorithm to turn on capacitor automatically, determine and trigger sufficient switching of capacitor
in order to compensate excessive reactive components, thus bringing power factor near to unity and
remove harmonics in the system there by improving the efficiency of the system and reducing the
electricity bill.
Significant of the project is to improve system voltages, thus enable maintaining rated voltage to
motors, pumps and other equipment. The voltage drop in supply conductors is a resistive loss, and
wastes power heating the conductors. Improving the power factor, especially at the motor terminals,
can improve the efficiency by reducing the line current and the line losses. Reduction in system
losses, and the losses in the cables, lines, and feeder circuits and therefore lower cable sizes could be
opted for.
CHAPTER-THREE
Automatic Power Factor correction device is developed basing on a micro controller power factor
transducer. The voltage and current sampled is step down to supply the power factor transducer. The
output of power factor transducer is pure DC; this output varies with respect to the current distortion.
The V and I sample signals are feed to the micro controller in order to measure the arrival of V and I
result. This value is calibrated as phase angle and corresponding power factor. The values are
displayed in the LCD modules after converting suitably. The capacitor banks are switched as per the
calibration in steps”.
The block diagram mainly consist of a microcontroller, power factor transducer, relay
circuit, capacitor, voltage and current measurement unit and inductive load.
• Current transformer and potential transformer are used to reduce current and voltage level for
• power factor transducer measures true phase angle delivered to a load and converts that
• The measured voltage and current signal are given to pin of microcontroller.
• Microcontroller calculate the power factor of measured value, depends up on error it will send signal
to the relay.
• LCD display is used to display power factor value of the line continuously.
• When the relay energized by microcontroller it connect capacitor parallel with load, when relay de
Customer of electric power wants to increase his power factor to 0.9 to avoid paying power factor
penalties that are being charged by the electrical utility. Calculate how much reactive power
compensation / power factor correction they need to install to raise the power factor to 0.9.
When a capacitor bank becomes too large, making the parallel energy of a series group too great
(above 4650 kvar) for the capacitor units or fuses, the bank may be split into two wye sections.
The characteristics of the grounded double wye are similar to a grounded single wye bank. The two
neutrals should be directly connected with a single connection to ground.
H Configuration
Some larger banks use an H configuration in each phase with a current transformer connected
between the two legs to compare the current down each leg. As long as all capacitors are normal, no
current will flow through the current transformer. If a capacitor fuse operates, some current will flow
through the current transformer. This bridge connection can be very sensitive. This arrangement is
used on large banks with many capacitor units in parallel.
Delta-connected Banks
Delta-connected banks are generally used at distributions voltages and are configured with a single
series group of capacitors rated at line-to-line voltage. With only one series group of units no
overvoltage occurs across the remaining capacitor units from the isolation of a faulted capacitor unit.
Therefore, unbalance detection is not required for protection. A delta-connected bank of capacitors is
usually applied to voltage classes of 2400 volts or less.
In a three phase system, to supply the same reactive power, the star connection requires a capacitor
with a capacitance three times higher than the delta connected capacitor. In addition, the capacitor
with the star connection results to be subjected to a voltage√3 lower and flows through by a current
√3 higher than a capacitor inserted and delta connected.
Where,
Capacitor banks in PFC Units are connected in Delta because sums of stored KVARs are required in
parallel across a three phase network to improve the power angle on the load. The summations of
KVARs are done in electrical stepping sequences via the PFC Unit controller depending on the
number of capacitor banks in the PFC Unit. Draw the equivalent circuit of a delta connected
capacitor. You will find that for the same cell capacitance (C), delta connection will give 1.5C
between any two lines, whereas if they are star connected, you would only get 0.5C between any two
lines.
Q =960kVAR
Step 3: Calculate New Apparent Power @ New PF:
P = S x PF
720kW = S x (0.95)
S = {(720kW) / (0.95)}
S = 757.9 kVA
Step 4: Calculate New Reactive Power @ New PF:
S2 = P2 + Q2
(757.9)2 = (720)2 + (Q) 2
(757.9)2 - (720)2 = (Q) 2
SQRT {(757.9)2 - (720)2} = Q
Q new = 236.67kVAR
When we connect the capacitor bank in delta the required capacitor value will be:
Per phase capacitor current:
635.27 = 119380.52 * C
The current taken from the supply is reduced from 1825.37 A to 1152.866 A without altering the
current or power taken by the load. This enables an economy to be affected in the size of generating
plant and in the cross-sectional area of the conductors.
Capacitor fuse
Delta connected banks can be used in two different arrangements. An “in line" or, "group fuse"
method of the circuit. The second method uses “branch" or "individual fuses” of the circuit. Three
phase capacitors use fuses in the line because they are connected delta internally. Normally branch
fuses are used for single-phase capacitors connected delta. However, on the smaller banks mentioned
above, the single phase capacitors could be connected delta and fused outside the delta (In the line.)
On small banks that have only one capacitor per phase, this should be the method of choice when the
neutral of the capacitor bank is not grounded.
When the bank has higher kVAR ratings and units are placed in parallel, the in line fusing becomes
large, and may not coordinate with the tank rupture curve of the capacitor and the upstream co-
ordination may not be possible. The ratings of fuses are:
Circuit Breaker
The circuit breaker should be sized no less than 135% of the rated capacitor current:
I1 = Q / sqrt (3) * V
The single-phase power factor transducer shown above has a single multiplier or element inside the
electronics package. Often the combined loads of an entire house, apartment, or office are monitored
with a power factor transducer. This requires a two-element model with current transformers. The
two- element, single-phase power factor transducer is connected as shown below.
Most motors in industry are three-phase, three-wire motors. These require two- element watt
transducers. Do not attempt to save money and use a single element transducer—it will not provide
correct or useful information. Smaller three-phase motors may be connected directly to the power
factor transducer. Larger three-phase motors will require the use of current and/or potential
transformers.
Power factor transducers are polarity sensitive. They sense not only the power but also the direction
in which it is flowing. Should a current transformer be installed backwards, the watt transducer will
sense this as reverse power flow and provide an output reversed in polarity, a negative output. Watt
transducers are also phase sensitive. If a current transformer is installed on the wrong phase line, the
watt transducer will interpret this as a 120-degree phase angle shift and give the wrong result
Weight 1000g
Shock Less than 0.2% after 50G
Specification of Arduino
Microcontroller: ATmega328
Operating Voltage: 5V
Input Voltage (recommended): 7-12V
Input Voltage (limits): 6-20V
Digital I/O Pins: 14 (of which 6 provide PWM output)
Analog Input Pins: 6
DC Current per I/O Pin: 40 mA
DC Current for 3.3V Pin: 50 mA
Power of Arduino
The Arduino Uno can be powered via the USB connection or with an external power supply. The
power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery.
The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power
jack. Leads from a battery can be inserted in the GND and VIN pin headers of the POWER
connector.
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If using
more than 12V, the voltage regulator may overheat and damage the board. The recommended
range is 7 to 12 volts.
In our project we use microcontroller especially for measuring the power factor transducer
output (voltage or current) and displaying the measured value in the form of the current power
factor value (lagging or leading) and energizing the relay driver. The microcontroller energize
the relay driver only the measured power factor value is less than 0.95.If the measured power
factor value greater than 0.95 the microcontroller de-energize the relay driver.
The relay driver is 2N3904.The relay used here having the specification as follows,
Coil voltage=12Vdc
Contact capacity=230V, 7A
The above specification indicates that the coil requires 12V dc and 200mA current dc. The
Microcontroller can’t supply more than 10mA current. So driver section is very much required.
2N3904 has a typical maximum output current of 500mA under normal conditions of
temperature.
LCD panel consists of two patterned glass panels in which crystal is filled under vacuum. The
thickness of glass varies according to end use. Most of the LCD modules have glass thickness in
the range of 0.70 to 1.1mm. Normally these liquid crystal molecules are placed between glass
plates to form a spiral stair case to twist the twist the light. Light entering the top plate twist 900
before entering the bottom plate. Hence the LCDs are also called as optical switches. These LCD
cannot display any information directly. These act as an interface between electronics and
electronics circuit to give a visual output. The values are displayed in the 2x16 LCD modules
after converting suitably. The liquid crystal display (LCD), as the name suggests is a technology
based on the use of liquid crystal. It is a transparent material but after applying voltage it
becomes opaque. This property is the fundamental operating principle of LCDs.
CHAPTER-FOUR
In the absence of power factor transducer, current transformer and potential transformer in our
school we use a simulation method by using DC supply, micro-controller, 16x2 LCD screen,
2N3904 relay driver and relay. In terms of the power factor transducer output reference table, we
use variable Dc supply for micro-controller input and finally we get better result.
When the power factor value reach above 0.95, the digital pin of the micro-controller de-energize
the relay driver and the relay automatically shutdown the switching network.
When the power factor value reaches under 0.95, the digital pin of micro-controller energize the
relay driver and the relay automatically closed the switching network.
This project work is carried out to design the automatic power factor corrector system using
micro-controller. Microcontroller senses the power factor by continuously monitoring the power
factor transducer output, and then according to the lagging behavior of power factor due to load
it performs the control action through a proper algorithm by switching capacitor bank through
different switch and improves the power factor of the load. This project gives more reliable and
user friendly power factor correcting system by continuously monitoring the load of the system.
Measuring of power factor from load is achieved by using power factor transducer and the
micro-controller developed algorithm to determine and trigger switching of capacitors in order to
compensate demand of excessive reactive power locally, thus bringing power factor near to
desired level.
CHAPTER-FIVE
5.1 CONCLUSION
The automatic power factor correction plays very important role, especially for the industry.
Nowadays, there are many power electronic devices being used such as converters, inverters,
UPS systems etc. They all generate distortions to the supplying voltage and current waveforms.
In order to avoid poor power quality, it is necessary to apply reactive power compensating device
minimizing reactive power consumption. Moreover, the harmonics make the task of reactive
power compensation harder, since they are dangerous for the power capacitors installed in the
capacitor bank. Compensating devices basing on the power capacitors are the most common
manner of reactive power compensation.
In this study, the power factor correction device is designed to display and take a switching
measurement; the power factor of the load connected the network. The conversion process of
difference between the current and voltage signals of the load to degree and time, and calculation
process are achieved by power factor transducer and designed analog-digital integrated circuit.
The designed circuit is further advantageous than the other static capacitor bank circuit because
the designed circuit has automatic protection property, with the help of micro-controller.
Dynamic compensation can be made by adding relay and contactor to the designed circuit. The
micro-controller based compensation process is also carried out by switching capacitor groups.
It can be concluded that power factor correction techniques can be applied to the industries,
power systems and also households to make them stable and due to that the system becomes
stable and efficiency of the system as well as the apparatus increases. The use of microcontroller
reduces the costs. Due to use of micro-controller multiple parameters can be controlled and the
use of extra hard wares, and input output ports reduces. Care should be taken for overcorrection
otherwise the voltage and current becomes more due to which the power system or machine
becomes unstable and the life of capacitor banks reduces. This method of improving the power
factor gives rise to the correction of power factor of inductive load.
5.2 RECOMMENDATION
• For our school we recommend that specification of the equipments and the
catalogue list that found in the store should be prepared. Because it is too hard to get
the material through checking one by one.
• For the company we recommend that over all factory input supply power and a
way of transforming (step up or step down) should be recorded including the
current statues.
• Every technician should have to know over all factory status including rating of
the material, current status of the material and distribution of the input supply
power and should have well recorded
REFERANCE
[1] John J. Grainger, William D. Stevenson (1994). “Power System Analysis” New York:
McGraw-Hill.
[2]. Meier, Alexandra. Electric Power Systems: A Conceptual Introduction (Wiley Survival
Guides in Engineering and Science). s.l. : Wiley - IEEE Press, 2006.
[3]. Power Factor Correction - Design of automatic capacitor bank. Kepka, Jakub. Wroclaw :
Wroclaw University of Technology, 2010.
[4]. Reactive power under nonsinusoidal conditions. L, Czarnecki. : IEEE Tran. on Power
Apparatus and Systems, 1983.
[5]. A combined time-domain and frequency-domainapproach to hybrid compensation in
unbalanced nonsinusoidal systems. L, Czarnecki. Milan : IEEE Stresa - Italy, 1993.
. [6]. Circuitor. Protection and control. Reactors for filtering. [Katalog produktów] s.l. :
Circuitor.
[7]. Circutor. Power Factor Correction and harmonic filtering. Automatic power factor
regulators. [Electronic Catalogue] s.l. : Circutor, 2009.
[8] Berthold Fuld'; Siegfried Kern; Ray Ridley (1991) “A Combined Buck and Boost Power-
Factor-Controller for Three-Phase Input”, IEEE European Conference on Power Electronics and
Applications, Volume: 7, Pages: 144-148.
[9] Freitas, W.; Morelato, A.; WilsunXu; Sato, F. (2005) “Impacts of AC Generators and
DSTATCOM Devices on the Dynamic Performance of Distribution Systems”, IEEE
Transactions on Power Delivery, Volume: 20, Issue: 2, Pages: 1493-1501.
[10] Jones, L. D.; Blackwell, D. (1983) “Energy Saver Power Factor Controller for Synchronous
Motors”, IEEE Transactions on Power Apparatus and Systems, Volume: 5, Issue: 5, Pages:
1391-1394.
[11] Barsoum model, An intelligent power factor corrector for power system using artificial
neural Networks, Electric Power Systems Research 79 (2009) 152–160.
[12] (Sharkawi et al. 1988) J., Branas C., Casanueva R., Microcontroller Power Mode Stabilized
Power Factor Correction Stage for High Intensity Discharge Lamp Electronic Ballast, IEEE
Transaction on Power Electronics, Vol. 22, No. 3, 2007, 845-853.
[13] Ioannides and Papadopoulos Power factor correction technique based on artificial neural
Networks, Energy Conversion and Management 47 (2006), 3204–3215.
[14] (Manual et al. 1994). Gorgun A., PID Controlled Synchronous Motor for Power Factor
Correction, Powereng, 2009 ,408-412.
[15] Wolfle,W.H. Power Factor Correction of a Switching Mode Power Supply By Using Neuro-
Fuzzy Controller, Gazi University. Journal of Science, 18(3), 2005, 421-437.
[16] Kurachi et al. High power factor correction circuits with space vector and hysteresis control
methods, Electric Power Systems Research 43 (1997), 207-214.
[18] (Ali et al. 2000) A Novel Common Power Factor Correction Scheme for Homes And
Offices, IEEE Transactions on Power Delivery, Vol. 20, No. 3, 2005, 2257-2263.
[19] (Consoli et al. 2001) Devresi Tasarımı ve Simülasyonu (Design and simulation of Power
Factor Measurement Circuit by using PIC) , Master Thesis, Yuzuncu Yıl Üniversity, Science
Institute, 2009.
[20] Borlotti et al. Hardware Implementations of Multi Layer Feed Forward Neural Networks
and Error Back Propagation Using 8-Bit PIC Microcontrollers, Neural and Fuzzy Systems:
Design, Hardware and Applications (Digest No.: 1997/133), IEE Colloquium on, 1997, 2/1–2/5.
[21] (Mather, B.A. 2011) An electronic design of a low cost Braille typewriter, in: Proceedings
of the Intelligent Information Systems Conference, The Seventh Australian and New Zealand
2001, 2001, 153–157.
[22] Venkateswarlu, N. “High- Performance Line Conditioner with Output Voltage Regulation
and Power Factor Correction”, IEEE Proceedings on Electric Power Applications,Volume: 151,
Issue: 1, Pages: 91- 97.
[23] (Shuffling 2012) Performance Line Conditioner with Output Voltage Regulation and Power
Factor Correction”, IEEE Proceedings on Electric Power Applications, Volume: 151, Issue: 1,
Pages: 91- 97.
[24] Alexander, C.K. and Sadiku, M.N.O. (2000). “Fundamentals of Electric Circuit” United
States of America: McGraw-Hill Companies, Inc.
[25] Stephen, J. C. (1999). “Electric Machinery and Power System Fundamentals.” 3rd.ed.
United State of America: McGraw-Hill Companies, Inc.
[26] John J. Grainger, William D. Stevenson (1994). “Power System Analysis.” New York:
McGraw-Hill.
[27] Jos Arrillaga, Neville R. Watson (2003). “Power System Harmonics” 2nd.ed. Chichester:
John Wiley.
[28] J. E. Miller (1982). “Reactive Power Control in Electric System.” New York: Wiley
[29] Roger C. Dugan, Mark F. McGranaghan, H. Wayne Beaty (1996). “Electrical Power
Systems Quality” 1st.ed. New York: McGraw Hill.
[30] Paul Gill (1998). “Electrical Power Equipment Maintenance and Testing.” Boca Raton, FL:
CRC Press.
[31] Keith Harker (1998). “Power System Commissioning and Maintenance practice.” London:
Institution of Electrical Engineers.
[32] Ramasamy Natarajan (2005). “Power System Capacitors.” Boca Raton, FL: Taylor &
Francis.
[33] H.M. El-Bolok, M.E. Masoud, And M.M. Mahmoud (1990). “A Microprocessor –Based
Adaptive Power Factor Corrector for Nonlinear Loads” Faculty of Engineering and Technology,
University of Helwan, Cairo, Egypt.
APPENDEX
#include <LiquidCrystal.h>
int sensorPin = A0; // select the input pin for the potentiometer
int sensorValue = 0; // variable to store the value coming from the sensor
int pin1=1;
LiquidCrystal lcd(12,11,5,4,3,2);
void setup() {
lcd.begin(1,1);
pinMode(pin1, OUTPUT);
void loop() {
sensorValue = analogRead(sensorPin);
if(sensorValue>105)
{ digitalWrite(pin1,HIGH);}
else
{digitalWrite(pin1,LOW);}
lcddisplay();
void lcddisplay()
{lcd.setCursor(1,1);
if(sensorValue<5)
if(sensorValue>5&&sensorValue<25)
if(sensorValue>25&&sensorValue<45)
if(sensorValue>45&&sensorValue<65)
if(sensorValue>65&&sensorValue<85)
if(sensorValue>85&&sensorValue<105)
if(sensorValue>105&&sensorValue<125)
if(sensorValue>125&&sensorValue<145)
if(sensorValue>145&&sensorValue<165)
if(sensorValue>165&&sensorValue<185)
if(sensorValue>185&&sensorValue<205)
if(sensorValue>205&&sensorValue<225)
if(sensorValue>225&&sensorValue<245)
if(sensorValue>245&&sensorValue<265)
if(sensorValue>265&&sensorValue<285)
if(sensorValue>285&&sensorValue<305)
if(sensorValue>305&&sensorValue<325)
if(sensorValue>325&&sensorValue<345)
if(sensorValue>345&&sensorValue<365)
if(sensorValue>365&&sensorValue<385)
if(sensorValue>385&&sensorValue<405)
if(sensorValue>405&&sensorValue<425)
if(sensorValue>425&&sensorValue<445)
if(sensorValue>445&&sensorValue<465)
if(sensorValue>465&&sensorValue<485)
if(sensorValue>485&&sensorValue<505)
if(sensorValue>505&&sensorValue<525)
if(sensorValue>525&&sensorValue<545)
if(sensorValue>545&&sensorValue<565)
if(sensorValue>565&&sensorValue<585)
if(sensorValue>585&&sensorValue<605)
if(sensorValue>605&&sensorValue<625)
if(sensorValue>625&&sensorValue<645)
if(sensorValue>645&&sensorValue<665)
if(sensorValue>665&&sensorValue<685)
if(sensorValue>685&&sensorValue<705)
if(sensorValue>705&&sensorValue<725)
if(sensorValue>725&&sensorValue<745)
if(sensorValue>745&&sensorValue<765)
if(sensorValue>765&&sensorValue<785)
if(sensorValue>785&&sensorValue<805)
if(sensorValue>805&&sensorValue<825)
if(sensorValue>825&&sensorValue<845)
if(sensorValue>845&&sensorValue<865)
if(sensorValue>865&&sensorValue<885)
if(sensorValue>885&&sensorValue<905)
if(sensorValue>905&&sensorValue<925)
if(sensorValue>925&&sensorValue<945)
if(sensorValue>945&&sensorValue<965)
if(sensorValue>965&&sensorValue<985)
if(sensorValue>985&&sensorValue<1005)
if(sensorValue>1005&&sensorValue<1024)