[go: up one dir, main page]

0% found this document useful (0 votes)
88 views71 pages

Sample Thesis

This document is a project thesis submitted by six students for their Bachelor's degree in Electrical Engineering. It discusses designing a system for automatic power factor correction (APFC) in industrial power systems to minimize penalties. The system aims to improve the power factor of non-linear loads through real-time monitoring and switching capacitors banks. The project involves designing hardware circuits using components like a microcontroller, relays, voltage regulators, and current transformers to automatically calculate and correct low power factors.

Uploaded by

Yash Wankar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views71 pages

Sample Thesis

This document is a project thesis submitted by six students for their Bachelor's degree in Electrical Engineering. It discusses designing a system for automatic power factor correction (APFC) in industrial power systems to minimize penalties. The system aims to improve the power factor of non-linear loads through real-time monitoring and switching capacitors banks. The project involves designing hardware circuits using components like a microcontroller, relays, voltage regulators, and current transformers to automatically calculate and correct low power factors.

Uploaded by

Yash Wankar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 71

A

Project Thesis
On
“AUTOMATIC POWER FACTOR COMPENSATION (APFC)
FOR INDUSTRIAL POWER USE TO MINIMIZE PENALTY”

This project thesis is submitted in partial fulfillment the requirement


For the award of Degree of Bachelor in Electrical Engineering
under the Faculty of Science & Technology, RTM Nagpur
University

(Session 2022 - 2023)

Submitted by
Ajinkya Hatwar
Shivani Harshe
Parag Sontake
Aditya Suryavanshi
Prajwal Ghutke
Abhishek Korkoppulwar

VIII Semester B.E. (Electrical Engineering)

• Guide •
Prof. D.R. Tutakne
(Assistant Professor)

Department of Electrical Engineering


WAINGANGA COLLEGE OF ENGINEERING &
MANAGEMENT, NAGPUR
Certificate

The dissertation titled “AUTOMATIC POWER FACTOR COMPENSATION (APFC)


FOR INDUSTRIAL POWER USE TO MINIMIZE PENALTY” submitted by Ajinkya
Hatwar, Shivani Harshe, Parag Sontake, Aditya Suryavanshi, Prajwal Ghutke, Abhishek
Korkoppulwar for the award of degree of Bachelors of Engineering in Electrical
Engineering, has been carried out under my supervision at the Department of Electrical
Engineering of Wainganga College of Engineering & Management, Nagpur. The work is
comprehensive, complete and fit for evaluation.

Guide
Prof. D.R. Tutakne
Asst. Professor
Department of Electrical Engineering
Wainganga College of Engineering &
Management, Nagpur

HOD Principal

Asst. Professor Wainganga College of


Department of Electrical Engineering Engineering & Management,
Wainganga College of Engineering & Nagpur
Management, Nagpur

External Examiner
Declaration

I, hereby declare that the dissertation titled “AUTOMATIC POWER FACTOR


COMPENSATION (APFC) FOR INDUSTRIAL POWER USE TO MINIMIZE
PENALTY” submitted herein, has been carried out by me individually, for the award of
degree in Master of Technology in Electrical Engineering in the Department of Electrical
Engineering of Wainganga College of Engineering & Management, Nagpur. The work is
original and has not been submitted earlier as a whole or in part for the award of any degree
/ diploma at this or any other Institution / University.

Ajinkya Hatwar
Shivani Harshe
Parag Sontake
Aditya Suryavanshi
Prajwal Ghutke
Abhishek Korkoppulwar

Date:
Acknowledgement

The Completion of the course of B.E (Electrical Engineering) is challenging task. It takes
a lot of effort and hard work to complete a project and desertion work. I would like to express
my gratitude and respect to all those who have directly or indirectly, aided me in my work and
research.
I extend my sincerest gratitude to my Guide, Prof. D.R.Tutakne, Department of
Electrical Engineering, Wainganga College of Engineering & Management, Nagpur, under
whose guidance I carried out this research. Without my Guide’s advice and supervision my
research would never have reached its conclusion.
I am thankful to Principal, Wainganga College of Engineering & Management, Nagpur,
for providing excellent facilities and access to required technology and research material for my
study and research work.
I am also thankful to my Parents, family, teachers, colleagues and friends for all their
support every time whenever I have questions and supported me with their expertise and
knowledge and supported me morally whenever needed.

Ajinkya Hatwar
Shivani Harshe
Parag Sontake
Aditya Suryavanshi
Prajwal Ghutke
Abhishek Korkoppulwar

Date

iv
Contents
Certificate ................................................................................................................................ 2
Declaration .............................................................................................................................. 3
Acknowledgement ................................................................................................................... 4

LIST OF FIGURES ............................................................................................................................ 7

1.INTRODUCTION............................................................................................................................ 9

2 PROPOSED SYSTEM .................................................................................................................. 10

3.OBJECTIVES OF THE PROJECT............................................................................................. 11

4.LITERATURE SUVEY................................................................................................................. 12

5. ABSTRACT ................................................................................................................................... 13

6.Power factor improvement............................................................................................................ 14

7.POWER FACTOR CORRECTION ............................................................................................ 17


Power factor in linear circuits ................................................................................. 17
Definition and calculation ........................................................................................ 18
Power factor correction of linear loads ................................................................... 19
Non-linear loads ........................................................................................................ 20
Non-sinusoidal components...................................................................................... 20
Distortion power factor ............................................................................................ 21

8. INTRODUCTION TO EMBEDDED SYSTEMS ...................................................................... 22

9. PROJECT BLOCK DIAGRAM ................................................................................................. 25

v
10.CIRCUIT DIAGRAM ................................................................................................................. 26

11.HARDWARE REQUIREMENTS ............................................................................................. 27


11.1 TRANSFORMER ......................................................................................................... 28
11.2 VOLTAGE REGULATOR 7805 ................................................................................. 30
11.3 RECTIFIER .................................................................................................................. 32
11.4 FILTER.......................................................................................................................... 33
11.5 MICROCONTROLLER AT89S52 ............................................................................. 34
11.6 RELAY .......................................................................................................................... 41
11.7 ULN2003 ........................................................................................................................ 45
11.8 PUSH BUTTONS .......................................................................................................... 49
11.9LIQUID CRYSTAL DISPLAY .................................................................................... 51
11.10QUAD VOLTAGE COMPARATOR LM339 ........................................................... 53
11.11 CURRENT TRANSFORMER .................................................................................. 54
11.12 INDUCTIVE LOAD ................................................................................................... 55
11.13 SHUNT CAPACITORS ............................................................................................. 55
11.14 LED .............................................................................................................................. 56
11.15 1N4007.......................................................................................................................... 59
11.16 RESISTORS ................................................................................................................ 62
Units ........................................................................................................................... 63
Variable resistors ...................................................................................................... 64
4.17 CAPACITORS .............................................................................................................. 65
Theory of operation .................................................................................................. 66

CONCLUSION ................................................................................................................................. 70

FUTURESCOPE ............................................................................................................................... 71

BIBLIOGRAPHY ............................................................................................................................. 71

vi
LIST OF FIGURES

Figure 6.1 – Waveform for Inductive Load

Figure 6.2 – Waveform for Capacitive Load

Figure 8.1 – Embedded System 6

Figure 8.2 -V Diagram 8

Figure 9.1 – Block Diagram 13

Figure 10.1 – Circuit Diagram 16

Figure 11.1 – Transformer 18

Figure 11.2.1- Voltage Regulator 7809 18


Figure 11.2.2 - Block Diagram of Voltage Regulator 11.19
Figure 11.2.3 – Rating of the Voltage Regulator 19

Figure 11.3 – Rectifier 20

Figure 11.4 – Filter 32

Figure 11.5.1 – Block Diagram of AT89S52 35

Figure11.5.2 – Pin Diagram of AT89S52 36

Figure11.5.3 – Oscillatior Connection 38

Figure 11.5.4 – External clock Drive Configuration 39

Figure 11.6.1 – Relay showing coil and switch contacts 40

Figure 11.7.1 – ULN 2003 44

Figure11.7.2 – Pin Diagram 45

Figure 11.7.3 – Schematics of Darlington Pair 46

Figure 11.7.4 – Darlington Pair 46

Figure11.8 – Push on Button 49

Figure 11.9.1 - LCD 50


vii
Figure 11.9.2 – 3 Line Control 51

Figure 11.10 – Pin Diagram of Volltage regulator LM339 52

Figure 11.11 – Current Transformer 53

Figure 11.12 – Inductive Load 54

Figure 11.13 – Shunt Capactor 54

Figure 11.14.1 – Typical LED 55

Figure 11.14.2 – Circuit Diagram 55

Figure 11.14.3 – Different Types of LED 56

Figure 11.14.4 – White LED spectrum 57

Figure 11.15.1 – IN 4007 60

Figure 11.16 – Resistor 61

Figure 11.17 – Capacitor 64

viii
1.INTRODUCTION

Power factor is the ratio between real power and the apparent power of the equipment. In the present
trend, Automatic Power Factor Controller design can be achieved by using programmable device. As we
think about programmable device embedded system comes forefront. Embedded system nowadays is
very popular and microcontroller proves to be advantageous with the reduction of cost, extra hardware
use such as timer, RAM, ADC are avoided. Only the relays used are disadvantageous as they are too
bulky and need regular maintenance. Now the embedded technology has become cheaper with the help
of technical revolution so as to apply it in all the fields. Automatic Power Factor Correction device is
very useful to improve the transmission of active power efficiently. Power factor must be maintained
within a limit. As inductive load is connected, Power factor lags and when Power factor goes below the
lagging Power factor, then a penalty is charged by the supplying company. Therefore, it is necessary to
maintain Power factor within limit. APFC techniques can be applicable to industries, power systems and
also to households to make them stable and also help in improving the efficiency of the system. Poor
Power factor can be improved by addition of Power factor correction, but a poor Power factor which is
caused due to distortion in current waveform needs to have a change in the design of the equipment
APFC is to be developed based on
microcontroller( AT89S52\C51) Poor Power factor can be improved by addition of Power factor
correction, but a poor Power factor which is caused due to distortion in current waveform needs to
have a change in the design of the equipment APFC is to be developed based on microcontroller(
AT89S52\C51) . Lesser reactive power flows from the line. They decrease the phase difference in the
voltage and current. When capacitors are used Losses are low and also requires very less maintenance.
Installation of capacitors is easy because of lighter weight and do not require foundation.

9
2 PROPOSED SYSTEM
In this proposed system, two zero crossing detectors are used for detecting zero crossing of voltage and
current. The project is designed to minimize penalty for industrial units using automatic power factor
correction unit. The microcontroller used in this project belongs to 8051 family. The time lag between
the zero-voltage pulse and zero-current pulse is duly generated by suitable operational amplifier circuits
in comparator mode is fed to two interrupt pins of a microcontroller. The program takes over to actuate
appropriate number of relays from its output to bring shunt capacitors into load circuit to get the power
factor till it reaches near unity. The capacitor bank and relays are Research Article Volume 10 Issue
No.7 IJESC, July 2020 26778 http:// ijesc.org/ interfaced to the microcontroller using a relay driver. It
displays time lag between the current and voltage on an LCD. Furthermore, the project can be enhanced
by using thyristor control switches instead of relay control to avoid contact pitting often encountered by
switching of capacitors due to high in rush current.

10
3.OBJECTIVES OF THE PROJECT

The primary objective of the project was to design correction equipment which can monitor the
power factor of the mine electrical framework and enhance the power factor to a desired value.
The research investigations were carried out with the following objectives:
National Institute of Technology, Rourkela Page 3
⮚ To conduct an electrical survey of the existing system in an opencast mine to study the
⮚ system configuration and load patterns, variation of power factor during the mine
⮚ operation hours and analyze power factor correction facility, if any.
⮚ Design a microcontroller based correction equipment to improve the power factor of the
⮚ system to desired value of greater than 0.95.
⮚ Implement the system and monitor different electrical load models and diverse load
⮚ patterns to verify the result.
⮚ To carry out economic analysis for power factor improvement.

11
4.LITERATURE SUVEY

By the literature survey we have found the due to modern day development in the industrial sector the
demand of the power has been increased extremely. There are more power demand arises due to the
loads in industries. An electrical load can be classified in three types and they are resistive load like
filament lamp, capacitive load like motor starter.

12
5. ABSTRACT

In this proposed system, two zero crossing detectors are used for detecting zero crossing of
voltage and current. The project is designed to minimize penalty for industrial units using automatic
power factor correction unit. The microcontroller used in this project belongs to 8051 family.

The time lag between the zero-voltage pulse and zero-current pulse is duly generated by suitable
operational amplifier circuits in comparator mode is fed to two interrupt pins of a microcontroller. The
program takes over to actuate appropriate number of relays from its output to bring shunt capacitors into
load circuit to get the power factor till it reaches near unity. The capacitor bank and relays are interfaced
to the microcontroller using a relay driver. It displays time lag between the current and voltage on an
LCD. Furthermore, the project can be enhanced by using thyristor control switches instead of relay
control to avoid contact pitting often encountered by switching of capacitors due to high in rush current.

13
6.Power factor improvement

Alternating current circuits


Unlike Director Current Circuits, where only resistance restricts the current flow, in Alternating
Current Circuits, there are other circuits aspects which determines the current flow; though these are
akin to resistance, they do not consume power, but loads the system with reactive currents; like D.C.
circuits where the current multiplied by voltage gives watts, here the same gives only VA.
Like resistance, these are called “Reactance”. Reactance is caused by either inductance or by
capacitance. The current drawn by inductance lags the voltage while the one by capacitance leads the
voltage. Almost all industrial loads are inductive in nature and hence draw lagging wattles current,
which unnecessarily load the system, performing no work. Since the capacitive currents is leading in
nature, loading the system with capacitors wipes out them.

FIG 6.1: WAVEFORMS FOR INDUCTIVE LOAD

14
FIG 6.2: WAVEFORMS FOR CAPACITIVE LOAD

Capacitors for power-factor improvement

Whatever the power factor is, however, the generating authority must install machines capable of
delivering a particular voltage and current even though, in a particular case, not all the voltage and
current products is being put to good use. The generators must be able to withstand the rated voltage and
current regardless of the power delivered. For example, if an alternator is rated to deliver 1000A at
11000 volts, the machine coils must be capable of carrying rated current. The apparent power of such a
machine is 11 M V A and if the load power factor is unit this 11 MVA will be delivered and used as 11
MW of active power i.e. the alternator is being used to the best of its ability. If, however, the load power
factor is say, 0.8 lagging, then only 8.8 MW are taken and provide revenue, even though the generator
still has to be rated at 1000A at 11 kV. The lower the power factor, the worse the situation becomes
from the supply authorities’ viewpoint. Accordingly, consumers are encouraged to improve their load
power factor and in many cases are penalized if they do not. Improving the power factor means reducing
the angle of lag between supply voltage and supply current.

Location of power-factor improvement capacitor banks:

Any installation including the following types of machinery or equipment is likely to have low
power factor which can be corrected, with a consequent saving in charges, by way of reduced demand
charges, lesser low power factor penalties:

15
1. Induction motors of all types (which from by far the greatest industrial load on a. c. mains).
2. Power thyristor installation (for D.C. motor control and electro-chemical processes).
3. Power transformers and voltage regulators.
4. Welding machines
5. Electric-arc and induction furnaces.
6. Choke coils and magnetic system.
7. Neon signs and fluorescent lighting.

Apart from penalties like maximum demand charges, penalty for low power factor, the factory
cabling and supply equipment can be relieved of a considerable wattles or reactive load, which will
enable additional machinery to be connected to the supply without enlarging these services.
Additionally, the voltage drop in the system is reduced.

The method employed to achieve the improvements outlined involves introducing reactive kVA
(kvar) into the system in phase opposition to the wattles or reactive current mentioned above the
effectively cancels its effect in the system. This is achieved either with rotary machines (synchronous
condensers)

16
7.POWER FACTOR CORRECTION

The power factor of an AC electric power system is defined as the ratio of the real power
flowing to the load to the apparent power in the circuit, and is a dimensionless number between 0 and 1
(frequently expressed as a percentage, e.g. 0.5 pf = 50% pf). Real power is the capacity of the circuit for
performing work in a particular time. Apparent power is the product of the current and voltage of the
circuit. 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 will be greater than the
real power.
In an electric power system, a load with a low power factor draws more current than a load with
a high power factor for the same amount of useful power transferred. The higher currents increase the
energy lost in the distribution system, and require larger wires and other equipment. Because of the
costs of larger equipment and wasted energy, electrical utilities will usually charge a higher cost to
industrial or commercial customers where there is a low power factor.
Linear loads with low power factor (such as induction motors) can be corrected with a passive
network of capacitors or inductors. Non-linear loads, such as rectifiers, distort the current drawn from
the system. In such cases, active or passive power factor correction may be used to counteract the
distortion and raise the power factor. The devices for correction of the power factor may be at a central
substation, spread out over a distribution system, or built into power-consuming equipment.

Power factor in linear circuits


In a purely resistive AC circuit, voltage and current waveforms are in step (or in phase),
changing polarity at the same instant in each cycle. All the power entering the loads is consumed. 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. During each cycle of the AC voltage, extra
energy, in addition to any energy consumed in the load, is temporarily stored in the load in electric or
magnetic fields, and then returned to the power grid a fraction of a second later in the cycle. The "ebb
and flow" of this nonproductive power increases the current in the line. Thus, a circuit with a low power
factor will use higher currents to transfer a given quantity of real power than a circuit with a high power
factor. A linear load does not change the shape of the waveform of the current, but may change the
relative timing (phase) between voltage and current.
17
Circuits containing purely resistive heating elements (filament lamps, strip heaters, cooking stoves, etc.)
have a power factor of 1.0. Circuits containing inductive or capacitive elements (electric motors,
solenoid valves, lamp ballasts, and others) often have a power factor below 1.0.

Definition and calculation


AC power flow has the three components: real power (also known as active power) (P),
measured in watts (W); apparent power (S), measured in volt-amperes (VA); and reactive power (Q),
measured in reactive volt-amperes
The power factor is defined as:
In the case of a perfectly sinusoidal waveform, P, Q and S can be expressed as vectors that form
a vector triangle such that:
If is the phase angle between the current and voltage, then the power factor is equal to the cosine of the
angle, and:
Since the units are consistent, the power factor is by definition a dimensionless number between
0 and 1. When power factor is equal to 0, the energy flow is entirely reactive, and stored energy in the
load returns to the source on each cycle. When the power factor is 1, all the energy supplied by the
source is consumed by the load. Power factors are usually stated as "leading" or "lagging" to show the
sign of the phase angle.
If a purely resistive load is connected to a power supply, current and voltage will change polarity
in step, the power factor will be unity (1), and the electrical energy flows in a single direction across the
network in each cycle. Inductive loads such as transformers and motors (any type of wound coil)
consume reactive power with current waveform lagging the voltage. Capacitive loads such as capacitor
banks or buried cable generate reactive power with current phase leading the voltage. Both types of
loads will absorb energy during part of the AC cycle, which is stored in the device's magnetic or electric
field, only to return this energy back to the source during the rest of the cycle.
For example, to get 1 kW of real power, if the power factor is unity, 1 kVA of apparent power
needs to be transferred (1 kW ÷ 1 = 1 kVA). At low values of power factor, more apparent power needs
to be transferred to get the same real power. To get 1 kW of real power at 0.2 power factor, 5 kVA of
apparent power needs to be transferred (1 kW ÷ 0.2 = 5 kVA). This apparent power must be produced
and transmitted to the load in the conventional fashion, and is subject to the usual distributed losses in
the production and transmission processes.

18
Electrical loads consuming alternating current power consume both real power and reactive power. The
vector sum of real and reactive power is the apparent power. The presence of reactive power causes the
real power to be less than the apparent power, and so, the electric load has a power factor of less than 1.

Power factor correction of linear loads


It is often desirable to adjust the power factor of a system to near 1.0. This power factor
correction (PFC) is achieved by switching in or out banks of inductors or capacitors. For example the
inductive effect of motor loads may be offset by locally connected capacitors. When reactive elements
supply or absorb reactive power near the load, the apparent power is reduced.
Power factor correction may be applied by an electrical power transmission utility to improve the
stability and efficiency of the transmission network. Correction equipment may be installed by
individual electrical customers to reduce the costs charged to them by their electricity supplier. A high
power factor is generally desirable in a transmission system to reduce transmission losses and improve
voltage regulation at the load.
Power factor correction brings the power factor of an AC power circuit closer to 1 by supplying
reactive power of opposite sign, adding capacitors or inductors which act to cancel the inductive or
capacitive effects of the load, respectively. For example, the inductive effect of motor loads may be
offset by locally connected capacitors. If a load had a capacitive value, inductors (also known as
reactors in this context) are connected to correct the power factor. In the electricity industry, inductors
are said to consume reactive power and capacitors are said to supply it, even though the reactive power
is actually just moving back and forth on each AC cycle.
The reactive elements can create voltage fluctuations and harmonic noise when switched on or
off. They will supply or sink reactive power regardless of whether there is a corresponding load
operating nearby, increasing the system's no-load losses. In a worst case, reactive elements can interact
with the system and with each other to create resonant conditions, resulting in system instability and
severe overvoltage fluctuations. As such, reactive elements cannot simply be applied at will, and power
factor correction is normally subject to engineering analysis.
An automatic power factor correction unit is used to improve power factor. A power factor
correction unit usually consists of a number of capacitors that are switched by means of contactors.
These contactors are controlled by a regulator that measures power factor in an electrical network. To be
able to measure power factor, the regulator uses a current transformer to measure the current in one

19
phase.
Depending on the load and power factor of the network, the power factor controller will switch
the necessary blocks of capacitors in steps to make sure the power factor stays above a selected value
(usually demanded by the energy supplier), say 0.9.
Instead of using a set of switched capacitors, an unloaded synchronous motor can supply reactive
power. The reactive power drawn by the synchronous motor is a function of its field excitation. This is
referred to as a synchronous condenser. It is started and connected to the electrical network. It operates
at a leading power factor and puts VARS onto the network as required to support a system’s voltage or
to maintain the system power factor at a specified level.
The condenser’s installation and operation are identical to large electric motors. Its principal advantage
is the ease with which the amount of correction can be adjusted; it behaves like an electrically variable
capacitor. Unlike capacitors, the amount of reactive power supplied is proportional to voltage, not the
square of voltage; this improves voltage stability on large networks. Synchronous condensers are often
used in connection with high voltage direct current transmission projects or in large industrial plants
such as steel mills.

Non-linear loads
A non-linear load on a power system is typically a rectifier (such as used in a power supply), or
some kind of arc discharge device such as a fluorescent lamp, electric welding machine, or arc furnace.
Because current in these systems is interrupted by a switching action, the current contains frequency
components that are multiples of the power system frequency. Distortion power factor is a measure of
how much the harmonic distortion of a load current decreases the average power transferred to the load.
Non-sinusoidal components
Non-linear loads change the shape of the current waveform from a sine wave to some other
form. Non-linear loads create harmonic currents in addition to the original (fundamental frequency) AC
current. Filters consisting of linear capacitors and inductors can prevent harmonic currents from entering
the supplying system.
In linear circuits having only sinusoidal currents and voltages of one frequency, the power factor
arises only from the difference in phase between the current and voltage. This is "displacement power
factor". The concept can be generalized to a total, distortion, or true power factor where the apparent
power includes all harmonic components. This is of importance in practical power systems which

20
contain non-linear loads such as rectifiers, some forms of electric lighting, electric arc furnaces, welding
equipment, switched-mode power supplies and other devices.
A typical multimeter will give incorrect results when attempting to measure the AC current
drawn by a non-sinusoidal load; the instruments sense the average value of a rectified waveform. The
average response is then calibrated to the effective, RMS value. An RMS sensing multimeter must be
used to measure the actual RMS currents and voltages (and therefore apparent power). To measure the
real power or reactive power, a wattmeter designed to work properly with non-sinusoidal currents must
be used.

Distortion power factor


The distortion power factor' describes how the harmonic distortion of a load current decreases
the average power transferred to the load.

THDi is the total harmonic distortion of the load current. This definition assumes that the voltage stays
undistorted (sinusoidal, without harmonics). This simplification is often a good approximation in
practice. I1,rms is the fundamental component of the current and Irms is the total current - both are root
mean square-values.
The result when multiplied with the displacement power factor (DPF) is the overall, true power factor or
just power factor (PF):

21
8. INTRODUCTION TO EMBEDDED SYSTEMS

What is embedded system?

An Embedded System is a combination of computer hardware and software, and perhaps


additional mechanical or other parts, designed to perform a specific function. An embedded system is a
microcontroller-based, software driven, reliable, real-time control system, autonomous, or human or
network interactive, operating on diverse physical variables and in diverse environments and sold into a
competitive and cost conscious market.
An embedded system is not a computer system that is used primarily for processing, not a
software system on PC or UNIX, not a traditional business or scientific application. High-end embedded
& lower end embedded systems. High-end embedded system - Generally 32, 64 Bit Controllers used
with OS. Examples Personal Digital Assistant and Mobile phones etc .Lower end embedded systems -
Generally 8,16 Bit Controllers used with an minimal operating systems and hardware layout designed
for the specific purpose.

SYSTEM DESIGN CALLS:

Operati
Dig Integrated Build
Electronic ng des
Ana Downlo
Electronic Embedded Comp
Systems Archite
Sensors
measure Soft
Enginee
Electric
and Con D
Enginee Communic
Embedded system design calls on many

Figure 8.1: Embedded system design calls

22
System System
Definition Testing

Rapid Hardware-
Prototyping in-the-

Targeting

Figuren 8.2 “V Diagram”


EMBEDDED SYSTEM

Characteristics of Embedded System


• An embedded system is any computer system hidden inside a product other than a computer.
• They will encounter a number of difficulties when writing embedded system software in addition
to those we encounter when we write applications
– Throughput – Our system may need to handle a lot of data in a short period of time.
– Response–Our system may need to react to events quickly
– Testability–Setting up equipment to test embedded software can be difficult
– Debugability–Without a screen or a keyboard, finding out what the software is doing
wrong (other than not working) is a troublesome problem
– Reliability – embedded systems must be able to handle any situation without human
intervention
– Memory space – Memory is limited on embedded systems, and you must make the
software and the data fit into whatever memory exists
– Program installation – you will need special tools to get your software into embedded
systems
– Power consumption – Portable systems must run on battery power, and the software in
these systems must conserve power
23
– Processor hogs – computing that requires large amounts of CPU time can complicate the
response problem
– Cost – Reducing the cost of the hardware is a concern in many embedded system
projects; software often operates on hardware that is barely adequate for the job.

• Embedded systems have a microprocessor/ microcontroller and a memory. Some have a serial
port or a network connection. They usually do not have keyboards, screens or disk drives.
APPLICATIONS
1) Military and aerospace embedded software applications
2) Communication Applications
3) Industrial automation and process control software
4) Mastering the complexity of applications.
5) Reduction of product design time.
6) Real time processing of ever increasing amounts of data.
7) Intelligent, autonomous sensors.
CLASSIFICATION
● Real Time Systems.
● RTS is one which has to respond to events within a specified deadline.
● A right answer after the dead line is a wrong answer.
RTS CLASSIFICATION
● Hard Real Time Systems
● Soft Real Time System
HARD REAL TIME SYSTEM
● "Hard" real-time systems have very narrow response time.
● Example: Nuclear power system, Cardiac pacemaker.
SOFT REAL TIME SYSTEM
● "Soft" real-time systems have reduced constrains on "lateness" but still must operate very
quickly and repeatable.
● Example: Railway reservation system – takes a few extra seconds the data remains valid.

24
9. PROJECT BLOCK DIAGRAM

25
10.CIRCUIT DIAGRAM

26
11.HARDWARE REQUIREMENTS

HARDWARE COMPONENTS:

● TRANSFORMER (230 – 12 V AC)

● VOLTAGE REGULATOR

● RECTIFIER

● FILTER

● MICROCONTROLLER (AT89S52/AT89C51)

● RELAY

● RELAY DRIVER

● PUSH BUTTONS

● LCD

● LM339

● CURRENT TRANSFORMER

● INDUCTIVE LOAD

● SHUNT CAPACITOR

● LED

● 1N4007 / 1N4148

● RESISTOR

● CAPACITOR

12.SOFTWARE REQUIREMENTS

● Keil Compiler
● Languages: Embedded C or Assembly

27
11.1 TRANSFORMER

Transformers convert AC electricity from one voltage to another with a little loss of power. Step-
up transformers increase voltage, step-down transformers reduce voltage. Most power supplies use a
step-down transformer to reduce the dangerously high voltage to a safer low voltage.

FIG 11.1: A TYPICAL TRANSFORMER

The input coil is called the primary and the output coil is called the secondary. There is no
electrical connection between the two coils; instead they are linked by an alternating magnetic field
created in the soft-iron core of the transformer. The two lines in the middle of the circuit symbol
represent the core. Transformers waste very little power so the power out is (almost) equal to the power
in. Note that as voltage is stepped down and current is stepped up.
The ratio of the number of turns on each coil, called the turn’s ratio, determines the ratio of the
voltages. A step-down transformer has a large number of turns on its primary (input) coil which is
connected to the high voltage mains supply, and a small number of turns on its secondary (output) coil
to give a low output voltage.
TURNS RATIO = (Vp / Vs) = ( Np / Ns )
Where,
Vp = primary (input) voltage.
Vs = secondary (output) voltage
Np = number of turns on primary coil
Ns = number of turns on secondary coil
Ip = primary (input) current
Is = secondary (output) current.

28
Ideal power equation

The ideal transformer as a circuit element

If the secondary coil is attached to a load that allows current to flow, electrical power is
transmitted from the primary circuit to the secondary circuit. Ideally, the transformer is perfectly
efficient; all the incoming energy is transformed from the primary circuit to the magnetic field and into
the secondary circuit. If this condition is met, the incoming electric power must equal the outgoing
power:

giving the ideal transformer equation

Transformers normally have high efficiency, so this formula is a reasonable approximation.

If the voltage is increased, then the current is decreased by the same factor. The impedance in
one circuit is transformed by the square of the turns ratio. For example, if an impedance Zs is attached
across the terminals of the secondary coil, it appears to the primary circuit to have an impedance of
(Np/Ns)2Zs. This relationship is reciprocal, so that the impedance Zp of the primary circuit appears to the
secondary to be (Ns/Np)2Zp.

29
11.2 VOLTAGE REGULATOR 7805

Features
• Output Current up to 1A.
• Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V.
• Thermal Overload Protection.
• Short Circuit Protection.
• Output Transistor Safe Operating Area Protection.

Fig 11.2.1Voltage Regulator 7805


Description
The LM78XX/LM78XXA series of three-terminal positive regulators are available in the TO-
220/D-PAK package and with several fixed output voltages, making them useful in a Wide range of
applications. Each type employs internal current limiting, thermal shutdown and safe operating area
protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver
over 1A output Current. Although designed primarily as fixed voltage regulators, these devices can be
used with external components to obtain adjustable voltages and currents.

30
Internal Block Diagram

FIG 11.2.2: BLOCK DIAGRAM OF VOLTAGE REGULATOR

Absolute Maximum Ratings

TABLE 11.2.3: RATINGS OF THE VOLTAGE REGULATOR

31
11.3 RECTIFIER

A rectifier is an electrical device that converts alternating current (AC), which periodically
reverses direction, to direct current (DC), current that flows in only one direction, a process known as
rectification. Rectifiers have many uses including as components of power supplies and as detectors of
radio signals. Rectifiers may be made of solid statediodes, vacuum tube diodes, mercury arc valves, and
other components. The output from the transformer is fed to the rectifier. It converts A.C. into pulsating
D.C. The rectifier may be a half wave or a full wave rectifier. In this project, a bridge rectifier is used
because of its merits like good stability and full wave rectification. In positive half cycleonly two diodes
(1 set of parallel diodes) will conduct, in negative half cycle remaining two diodes will conduct and they
will conduct only in forward bias only.

Fig 11.3 : Rectifier

32
11.4 FILTER

Capacitive filter is used in this project. It removes the ripples from the output of rectifier and
smoothens the D.C. Output received from this filter is constant until the mains voltage and load is
maintained constant. However, if either of the two is varied, D.C. voltage received at this point changes.
Therefore a regulator is applied at the output stage.
The simple capacitor filter is the most basic type of power supply filter. The use of this filter is
very limited. It is sometimes used on extremely high-voltage, low-current power supplies for cathode-
ray and similar electron tubes that require very little load current from the supply. This filter is also used
in circuits where the power-supply ripple frequency is not critical and can be relatively high. Below
figure can show how the capacitor charges and discharges.

Fig 11.4 : Filter

33
11.5 MICROCONTROLLER AT89S52
The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of
in-system programmable Flash memory.The device is manufactured using Atmel’s high-density non
volatile memory technology and is compatible with the industry standard 80C51 instruction set and pin
out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional
non volatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable
Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides a highly-
flexible and cost-effective solution to many embedded control applications. The AT89S52 provides the
following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two
data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex
serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic
for operation down to zero frequency and supports two software selectable power saving modes. The
Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to
continue functioning. The Power-down mode saves the RAM contents but freezes the oscillator,
disabling all other chip functions until the next interrupt or hardware reset.

34
Features:

• Compatible with MCS®-51 Products


• 8K Bytes of In-System Programmable (ISP) Flash Memory
– Endurance: 10,000 Write/Erase Cycles
• 4.0V to 5.5V Operating Range
• Fully Static Operation: 0 Hz to 33 MHz
• Three-level Program Memory Lock
• 256 x 8-bit Internal RAM
• 32 Programmable I/O Lines
• Three 16-bit Timer/Counters
• Eight Interrupt Sources
• Full Duplex UART Serial Channel
• Low-power Idle and Power-down Modes
• Interrupt Recovery from Power-down Mode
• Watchdog Timer
• Dual Data Pointer
• Power-off Flag
• Fast Programming Time
• Flexible ISP Programming (Byte and Page Mode)
• Green (Pb/Halide-free) Packaging Option

35
Block Diagram of AT89S52:

FIG 11.5.1: BLOCK DIAGRAM OF AT89S52

36
Pin Configurations of AT89S52

FIG 11.5.2: PIN DIAGRAM OF AT89S52


Pin Description:
VCC:
Supply voltage.
GND:
Ground.
Port 0:
Port 0 is an 8-bit open drain bidirectional 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
can 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.

37
Port 1:
Port 1 is an 8-bit bidirectional 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. In addition, P1.0 and P1.1 can be configured to be the
timer/counter 2 external count input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX).
Port 2:
Port 2 is an 8-bit bidirectional 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 high-order address byte during fetches
from external program memory and during accesses to external data memory that use 16-bit addresses
(MOVX @ DPTR). In this application, Port 2 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 3:
Port 3 is an 8-bit bidirectional 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.
RST:
Reset input. A high on this pin for two machine cycles while the oscillator is running resets the
device. This pin drives high for 98 oscillator periods after the Watchdog times out. The DISRTO bit in
SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit DISRTO, the
RESET HIGH out feature is enabled.
ALE/PROG:
Address Latch Enable (ALE) is an 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
38
each access to external data memory.
PSEN:
Program Store Enable (PSEN) is the read strobe to external program memory. When the
AT89S52 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. This pin also receives the 12-volt programming enable voltage (VPP)
during Flash programming.
XTAL1:
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2:
Output from the inverting oscillator amplifier.
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 a 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 6.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 11.5.3: Oscillator Connections

39
FIG 11.5.4: External Clock Drive Configuration
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 all the special functions registers remain
unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a
hardware reset.
Power down Mode
In the power down mode the oscillator is stopped, and the instruction that invokes power down
is the last instruction executed. The on-chip RAM and Special Function Registers retain their values
until the power down mode is terminated. The only exit from power down is a hardware reset. Reset
redefines the SFRs but does not change the on-chip RAM. The reset should not be activated before VCC
is restored to its normal operating level and must be held active long enough to allow the oscillator to
restart and stabilize

40
11.6 RELAY

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.

Fig 11.6.1 : Relays

A relay is an electrically operated switch. Current flowing through the coil of the relay creates a
magnetic field which attracts a lever and changes the switch contacts. The coil current can be on or off
so relays have two switch positions and most have double throw (changeover) switch contacts as shown
in the diagram.

Fig 11.6.2 Relay showing coil and switch contacts

Relays allow one circuit to switch a second circuit which can be completely separate from the
first. For example a low voltage battery circuit can use a relay to switch a 230V AC mains circuit. There

41
is no electrical connection inside the relay between the two circuits; the link is magnetic and
mechanical.

The coil of a relay passes a relatively large current, typically 30mA for a 12V relay, but it can be
as much as 100mA for relays designed to operate from lower voltages. Most ICs (chips) cannot provide
this current and a transistor is usually used to amplify the small IC current to the larger value required
for the relay coil. The maximum output current for the popular 555 timer IC is 200mA so these devices
can supply relay coils directly without amplification.

Relays are usually SPDT or DPDT but they can have many more sets of switch contacts, for
example relays with 4 sets of changeover contacts are readily available. For further information about
switch contacts and the terms used to describe them please see the page on switches.

Most relays are designed for PCB mounting but you can solder wires directly to the pins
providing you take care to avoid melting the plastic case of the relay.

The supplier's catalogue should show you the relay's connections. The coil will be obvious and it
may be connected either way round. Relay coils produce brief high voltage 'spikes' when they are
switched off and this can destroy transistors and ICs in the circuit. To prevent damage you must connect
a protection diode across the relay coil.

The figure shows a relay with its coil and switch contacts. You can see a lever on the left being
attracted by magnetism when the coil is switched on. This lever moves the switch contacts.

42
There is one set of contacts (SPDT) in the foreground and another behind them, making the relay
DPDT.
The relay's switch connections are usually labelled COM, NC and NO:
● COM = Common, always connect to this; it is the moving part of the switch.
● NC = Normally Closed, COM is connected to this when the relay coil is off.
● NO = Normally Open, COM is connected to this when the relay coil is on.

43
Applications of relays

Relays are used to and for:

● Control a high-voltage circuit with a low-voltage signal, as in some types of modems or audio
amplifiers.
● Control a high-current circuit with a low-current signal, as in the starter solenoid of an
automobile.
● Detect and isolate faults on transmission and distribution lines by opening and closing circuit
breakers.
● Time delay functions. Relays can be modified to delay opening or delay closing a set of contacts.
A very short (a fraction of a second) delay would use a copper disk between the armature and
moving blade assembly. Current flowing in the disk maintains magnetic field for a short time,
lengthening release time. For a slightly longer (up to a minute) delay, a dashpot is used. A
dashpot is a piston filled with fluid that is allowed to escape slowly. The time period can be
varied by increasing or decreasing the flow rate. For longer time periods, a mechanical clockwork
timer is installed.

44
11.7 ULN2003
RELAY DRIVER:

ULN2003 is a high voltage and high current Darlington transistor array.

DESCRIPTION:

The ULN2003 is a monolithic high voltage and high current Darlington transistor arrays. It
consists of seven NPN Darlington pairs that feature high-voltage outputs with common-cathode Clamp
diode for switching inductive loads. The collector-current rating of a single Darlington pair is 500mA.
The Darlington pairs may be paralleled for higher current capability. Applications include relay drivers,
hammer drivers, lamp drivers, display drivers (LED gas discharge), line drivers, and logic buffers.

The ULN2003 has a 2.7kW series base resistor for each Darlington pair for operation directly
with TTL or 5V CMOS devices.

Fig11.7.1: ULN 2003


Pin no.:16

● Temperature, Operating Range:-20°C to +85°C

● Transistor Polarity: NPN

● Transistors, No. of:7

● Case Style:DIP-16

● Temp, Op. Min:-20°C

● Temp, Op. Max:85°C


45
● Base Number:2003

● Channels, No. of:7

● Current, Output Max:500mA

● Device Marking:ULN2003A

● IC Generic Number:2003

● Input Type: TTL, CMOS 5V

● Logic Function Number:2003

● Output Type: Open Collector

● Transistor Type: Power Darlington

● Voltage, Input Max:5V

● Voltage, Output Max:50V

PIN Diagram:

Fig 11.7.2 :Pin Diagram of ULN 2003

46
Fig 11.7.3: Schematics of Darlington’s pair

Fig 11.7.4: Darlington pair

Darlington pairs are back to back connection of two transistors with some source resistors and when
they are arranged as shown in the circuit they are used to amplify weak signals. The amount by which
the weak signal is amplified is called the ‘GAIN’. .

47
FEATURES OF DRIVER:
● Seven Darlington’s per package

● Output currents500mA per driver(600mA peak)

● Integrated suppression diodes for inductive loads

● Outputs can be paralleled for high currents

● TTL/CMOS/PMOS/DTL compatible inputs.

● Inputs pinned opposite to outputs

● Simplified layout

Figure shows the Darlington pair connection of transistor. The circuit above is a ‘Darlington
Pair’ driver. The first transistor’s emitter feeds into the second transistor’s base and as a result the input
signal is amplified by the time it reaches the output. The important point to remember is that the
Darlington Pair is made up of two transistors

FEATURES
* 500mA rated collector current (Single output).
* High-voltage outputs: 50V.
* Inputs compatible with various types of logic.
* Relay driver application.

48
11.8 PUSH BUTTONS

A push-button (also spelled pushbutton) or simply button is a simple switch mechanism for controlling
some aspect of a machine or a process. Buttons are typically made out of hard material, usually plastic
or metal. The surface is usually flat or shaped to accommodate the human finger or hand, so as to be
easily depressed or pushed. Buttons are most often biased switches, though even many un-biased
buttons (due to their physical nature) require a spring to return to their un-pushed state. Different people
use different terms for the "pushing" of the button, such as press, depress, mash, and punch.
Uses:
In industrial and commercial applications push buttons can be linked together by a mechanical linkage
so that the act of pushing one button causes the other button to be released. In this way, a stop button
can "force" a start button to be released. This method of linkage is used in simple manual operations in
which the machine or process have no electrical circuits for control.
Pushbuttons are often color-coded to associate them with their function so that the operator will
not push the wrong button in error. Commonly used colors are red for stopping the machine or process
and green for starting the machine or process.
Red pushbuttons can also have large heads (mushroom shaped) for easy operation and to
facilitate the stopping of a machine. These pushbuttons are called emergency stop buttons and are
mandated by the electrical code in many jurisdictions for increased safety. This large mushroom shape
can also be found in buttons for use with operators who need to wear gloves for their work and could
not actuate a regular flush-mounted push button. As an aid for operators and users in industrial or
commercial applications, a pilot light is commonly added to draw the attention of the user and to
provide feedback if the button is pushed. Typically this light is included into the center of the
pushbutton and a lens replaces the pushbutton hard center disk.

49
The source of the energy to illuminate the light is not directly tied to the contacts on the back of
the pushbutton but to the action the pushbutton controls. In this way a start button when pushed will
cause the process or machine operation to be started and a secondary contact designed into the operation
or process will close to turn on the pilot light and signify the action of pushing the button caused the
resultant process or action to start.
In popular culture, the phrase "the button" refers to a (usually fictional) button that a military or
government leader could press to launch nuclear weapons.
Push to ON Button

Fig 11.8: push on button

Initially the two contacts of the button are open. When the button is pressed they become connected.
This makes the switching operation using the push button.

50
11.9LIQUID CRYSTAL DISPLAY
This is the first interfacing example for the Parallel Port. We will start with something simple.
This example doesn't use the Bi-directional feature found on newer ports, thus it should work with most,
if not all Parallel Ports. It however doesn't show the use of the Status Port as an input for a 16 Character
x 2 Line LCD Module to the Parallel Port. These LCD Modules are very common these days, and are
quite simple to work with, as all the logic required running them is on board.

LCD Background:

Frequently, an 8051 program must interact with the outside world using input and output devices
that communicate directly with a human being. One of the most common devices attached to an 8051 is
an LCD display. Some of the most common LCDs connected to the 8051 are 16x2 and 20x2 displays.
This means 16 characters per line by 2 lines and 20 characters per line by 2 lines, respectively.

Fortunately, a very popular standard exists which allows us to communicate with the vast
majority of LCDs regardless of their manufacturer. The standard is referred to as HD44780U, which
refers to the controller chip which receives data from an external source (in this case, the 8051) and
communicates directly with the LCD.

FIG 11.9.1: LCD

51
44780 LCD BACKGROUND

The 44780 standard requires 3 control lines as well as either 4 or 8 I/O lines for the data bus. The
user may select whether the LCD is to operate with a 4-bit data bus or an 8-bit data bus. If a 4-bit data
bus is used the LCD will require a total of 7 data lines (3 control lines plus the 4 lines for the data bus).
If an 8-bit data bus is used the LCD will require a total of 11 data lines (3 control lines plus the 8 lines
for the data bus).

Fig 11.9.2 : Line Control

The three control lines are referred to as EN, RS, and RW.

The EN line is called "Enable." This control line is used to tell the LCD that you are sending it data. To
send data to the LCD, your program should make sure this line is low (0) and then set the other two
control lines and/or put data on the data bus. When the other lines are completely ready, bring EN high
(1) and wait for the minimum amount of time required by the LCD datasheet (this varies from LCD to
LCD), and end by bringing it low (0) again.

The RS line is the "Register Select" line. When RS is low (0), the data is to be treated as a command or
special instruction (such as clear screen, position cursor, etc.). When RS is high (1), the data being sent
is text data which should be displayed on the screen. For example, to display the letter "T" on the screen
you would set RS high.

The RW line is the "Read/Write" control line. When RW is low (0), the information on the data bus is
being written to the LCD. When RW is high (1), the program is effectively querying (or reading) the
LCD. Only one instruction ("Get LCD status") is a read command. All others are write commands--so
RW will almost always be low .
52
11.10QUAD VOLTAGE COMPARATOR LM339

DESCRIPTION

The LM339 consists of four independent precision voltage


comparators, with an offset voltage specification as low as 20㎷ max for
each comparator, 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.

These comparators also have a unique characteristic in that the input common-mode voltage
range includes ground, even though they are operated from a single power supply voltage. The LM339
series was designed to directly interface with TTL and CMOS. When operated from both plus and
minus power supplies, the LM339 series will directly interface with MOS logic where their low power
drain is a distinct advantage over standard comparators.

FEATURES

● Wide single supply voltage range 2.0VDC TO 36VDC or


dural supplies ±1.0VDC to ±18VDC
● Very low supply current drain (0.8㎃) independent
of supply voltage (1.0㎽/comparator at 5.0VDC)
● Low input biasing current 25㎁
● Low input offset current ±5㎁ and offset voltage
● Input common-mode voltage range includes ground
● Differential input voltage range equal to the power

Fig 11.10 : Pin Diagram


53
11.11 CURRENT TRANSFORMER

Fig 11.11 : Current Transformer


In electrical engineering, a current transformer (CT) is used for measurement of electric currents.
Current transformers, together with voltage transformers (VT) (potential transformers (PT)), are known
as instrument transformers. When current in a circuit is too high to directly apply to measuring
instruments, a current transformer produces a reduced current accurately proportional to the current in
the circuit, which can be conveniently connected to measuring and recording instruments. A current
transformer also isolates the measuring instruments from what may be very high voltage in the
monitored circuit. Current transformers are commonly used in metering and protective relays in the
electrical power industry.

54
11.12 INDUCTIVE LOAD

Fig 11.12 : Inductive Load


A load that is predominantly inductive, so that the alternating load current lags behind the
alternating voltage of the load.Also known as lagging load. Any devices that have coils of wire in there
manufacture can be classed as inductive loads. E.g. motors, solenoids and contactor coils are a few.
Example of resistive loads can be baseboard heaters, filament light bulbs, toasters and stove top
elements.

11.13 SHUNT CAPACITORS

Fig 11.13 : Shunt Capacitor


Shunt capacitor banks are used to improve the quality of the electrical supply and the
efficientoperation of the power system. Studies show that a flat voltage profile on the system
cansignificantly reduce line losses. Shunt capacitor banks are relatively inexpensive and can beeasily
installed anywhere on the network.

55
11.14 LED

LEDs are semiconductor devices. Like transistors, and other diodes, LEDs are made out of
silicon. What makes an LED give off light are the small amounts of chemical impurities that are added
to the silicon, such as gallium, arsenide, indium, and nitride.

When current passes through the LED, it emits photons as a byproduct. Normal light bulbs
produce light by heating a metal filament until it is white hot. LEDs produce photons directly and not
via heat, they are far more efficient than incandescent bulbs.

Fig 11.14.1: Typical LED Fig 11.14.2: circuit symbol

Not long ago LEDs were only bright enough to be used as indicators on dashboards or electronic
equipment. But recent advances have made LEDs bright enough to rival traditional lighting
technologies. Modern LEDs can replace incandescent bulbs in almost any application.

Types of LED’S

LEDs are produced in an array of shapes and sizes. The 5 mm cylindrical package is the most
common, estimated at 80% of world production. The color of the plastic lens is often the same as the actual
color of light emitted, but not always. For instance, purple plastic is often used for infrared LEDs, and most
blue devices have clear housings. There are also LEDs in extremely tiny packages, such as those found on
blinkers and on cell phone keypads. The main types of LEDs are miniature, high power devices and custom
designs such as alphanumeric or multi-color.

56
Fig 11.14.3 Different types of LED’S

Colors and materials of LED’S

Conventional LED’S are made from a variety of inorganic semiconductor materials, the
following table shows the available colours with wavelength range, voltage drop and material.

White LED’S

Light Emitting Diodes (LED) have recently become available that are white and bright, so bright
that they seriously compete with incandescent lamps in lighting applications. They are still pretty
expensive as compared to a GOW lamp but draw much less current and project a fairly well focused
beam.

The diode in the photo came with a neat little reflector that tends to sharpen the beam a little but
doesn't seem to add much to the overall intensity.

When run within their ratings, they are more reliable than lamps as well. Red LEDs are now
being used in automotive and truck tail lights and in red traffic signal lights. You will be able to detect
them because they look like an array of point sources and they go on and off instantly as compared to
conventional incandescent lamps.

57
Fig 11.14.4 : White LED Spectrum

LEDs are monochromatic (one color) devices. The color is determined by the band gap of the
semiconductor used to make them. Red, green, yellow and blue LEDs are fairly common. White light
contains all colors and cannot be directly created by a single LED. The most common form of "white"
LED really isn't white. It is a Gallium Nitride blue LED coated with a phosphor that, when excited by
the blue LED light, emits a broad range spectrum that in addition to the blue emission, makes a fairly
white light.

There is a claim that these white LED's have a limited life. After 1000 hours or so of operation,
they tend to yellow and dim to some extent. Running the LEDs at more than their rated current will
certainly accelerate this process.

There are two primary ways of producing high intensity white-light using LED’S. One is to use
individual LED’S that emit three primary colours—red, green, and blue—and then mix all the colours to
form white light. The other is to use a phosphor material to convert monochromatic light from a blue or
UV LED to broad-spectrum white light, much in the same way a fluorescent light bulb works. Due to
metamerism, it is possible to have quite different spectra that appear white.
58
11.15 1N4007

Diodes are used to convert AC into DC these are used as half wave
rectifier or full wave rectifier. Three points must he kept in mind while
using any type of diode.
1. Maximum forward current capacity
2. Maximum reverse voltage capacity
3. Maximum forward voltage capacity

The number and voltage capacity of some of the important diodes available in the market are as follows:
● Diodes of number IN4001, IN4002, IN4003, IN4004, IN4005, IN4006 and IN4007 have
maximum reverse bias voltage capacity of 50V and maximum forward current capacity of 1
Amp.
● Diode of same capacities can be used in place of one another. Besides this diode of more
capacity can be used in place of diode of low capacity but diode of low capacity cannot be used
in place of diode of high capacity. For example, in place of IN4002; IN4001 or IN4007 can be
used but IN4001 or IN4002 cannot be used in place of IN4007.The diode BY125made by
company BEL is equivalent of diode from IN4001 to IN4003. BY 126 is equivalent to diodes
IN4004 to 4006 and BY 127 is equivalent to diode IN4007.

59
PN JUNCTION OPERATION
Now that you are familiar with P- and N-type materials, how these materials are joined together
toform a diode, and the function of the diode, let us continue our discussion with the operation of the
PNjunction. But before we can understand how the PN junction works, we must first consider current
flow inthe materials that make up the junction and what happens initially within the junction when these
twomaterials are joined together.

Current Flow in the N-Type Material


Conduction in the N-type semiconductor, or crystal, is similar to conduction in a copper wire.
Thatis, with voltage applied across the material, electrons will move through the crystal just as current
wouldflow in a copper wire. This is shown in figure 1-15. The positive potential of the battery will
attract thefree electrons in the crystal. These electrons will leave the crystal and flow into the positive
terminal ofthe battery. As an electron leaves the crystal, an electron from the negative terminal of the
battery willenter the crystal, thus completing the current path. Therefore, the majority current carriers in
the N-typematerial (electrons) are repelled by the negative side of the battery and move through the
crystal towardthe positive side of the battery.

Current Flow in the P-Type Material


Current flow through the P-type material is illustrated. Conduction in the P material isby positive
holes, instead of negative electrons. A hole moves from the positive terminal of the P materialto the
negative terminal. Electrons from the external circuit enter the negative terminal of the material andfill
holes in the vicinity of this terminal. At the positive terminal, electrons are removed from the
covalentbonds, thus creating new holes. This process continues as the steady stream of holes (hole
current) movestoward the negative terminal.

60
1N4148
The 1N4148 is a standard small signal silicondiode used in signal processing. Its name follows
the JEDEC nomenclature. The 1N4148 is generally available in a DO-35 glass package and is very
useful at high frequencies with a reverse recovery time of no more than 4ns. This permits rectification
and detection of radio frequency signals very effectively, as long as their amplitude is above the forward
conduction threshold of silicon (around 0.7V) or the diode is biased.

Fig11.15.:1N4148 diode
Specifications:
● VRRM = 100V (Maximum Repetitive Reverse Voltage)
● IO = 200mA (Average Rectified Forward Current)
● IF = 300mA (DC Forward Current)
● IFSM = 1.0 A (Pulse Width = 1 sec), 4.0 A (Pulse Width = 1 uSec) (Non-Repetitive Peak Forward
Surge Current)
● PD = 500 mW (power Dissipation)
● TRR< 4ns (reverse recovery time)

Applications
● High-speedswitching

Features
● 1)Glasssealedenvelope.(GSD)
● 2)Highspeed.
● 3) High Reliability

61
11.16 RESISTORS

A resistor is a two-terminal electronic component designed to oppose an electric current by producing a


voltage drop between its terminals in proportion to the current, that is, in accordance with Ohm's law:
V = IR
Resistors are used as part of electrical networks and electronic circuits. They are extremely
commonplace in most electronic equipment. Practical resistors can be made of various compounds and
films, as well as resistance wire (wire made of a high-resistivity alloy, such as nickel/chrome).
The primary characteristics of resistors are their resistance and the power they can dissipate.
Other characteristics include temperature coefficient, noise, and inductance. Less well-known is critical
resistance, the value below which power dissipation limits the maximum permitted current flow, and
above which the limit is applied voltage. Critical resistance depends upon the materials constituting the
resistor as well as its physical dimensions; it's determined by design.
Resistors can be integrated into hybrid and printed circuits, as well as integrated circuits. Size,
and position of leads (or terminals) are relevant to equipment designers; resistors must be physically
large enough not to overheat when dissipating their power.

Fig 11.16 : Resistor


A resistor is a two-terminalpassiveelectronic component which implements electrical resistance
as a circuit element. When a voltage V is applied across the terminals of a resistor, a current I will flow
through the resistor in direct proportion to that voltage. The reciprocal of the constant of proportionality
is known as the resistance R, since, with a given voltage V, a larger value of R further "resists" the flow
of current I as given by Ohm's law:

62
Resistors are common elements of electrical networks and electronic circuits and are ubiquitous
in most electronic equipment. Practical resistors can be made of various compounds and films, as well
as resistance wire (wire made of a high-resistivity alloy, such as nickel-chrome). Resistors are also
implemented within integrated circuits, particularly analog devices, and can also be integrated into
hybrid and printed circuits.
The electrical functionality of a resistor is specified by its resistance: common commercial
resistors are manufactured over a range of more than 9 orders of magnitude. When specifying that
resistance in an electronic design, the required precision of the resistance may require attention to the
manufacturing tolerance of the chosen resistor, according to its specific application. The temperature
coefficient of the resistance may also be of concern in some precision applications. Practical resistors
are also specified as having a maximum power rating which must exceed the anticipated power
dissipation of that resistor in a particular circuit: this is mainly of concern in power electronics
applications. Resistors with higher power ratings are physically larger and may require heat sinking. In a
high voltage circuit, attention must sometimes be paid to the rated maximum working voltage of the
resistor.
The series inductance of a practical resistor causes its behavior to depart from ohms law; this
specification can be important in some high-frequency applications for smaller values of resistance. In a
low-noise amplifier or pre-amp the noise characteristics of a resistor may be an issue. The unwanted
inductance, excess noise, and temperature coefficient are mainly dependent on the technology used in
manufacturing the resistor. They are not normally specified individually for a particular family of
resistors manufactured using a particular technology. A family of discrete resistors is also characterized
according to its form factor, that is, the size of the device and position of its leads (or terminals) which is
relevant in the practical manufacturing of circuits using them.

Units
The ohm (symbol: Ω) is the SI unit of electrical resistance, named after Georg Simon Ohm. An
ohm is equivalent to a volt per ampere. Since resistors are specified and manufactured over a very large
range of values, the derived units of milliohm (1 mΩ = 10−3 Ω), kilohm (1 kΩ = 103 Ω), and megohm (1
MΩ = 106 Ω) are also in common usage.

The reciprocal of resistance R is called conductance G = 1/R and is measured in Siemens (SI
unit), sometimes referred to as a mho. Thus a Siemens is the reciprocal of an ohm: S = Ω − 1. Although
63
the concept of conductance is often used in circuit analysis, practical resistors are always specified in
terms of their resistance (ohms) rather than conductance.

Variable resistors
Adjustable resistors
A resistor may have one or more fixed tapping points so that the resistance can be changed by
moving the connecting wires to different terminals. Some wirewound power resistors have a tapping
point that can slide along the resistance element, allowing a larger or smaller part of the resistance to be
used.
Where continuous adjustment of the resistance value during operation of equipment is required,
the sliding resistance tap can be connected to a knob accessible to an operator. Such a device is called a
rheostat and has two terminals.

Potentiometers
A common element in electronic devices is a three-terminal resistor with a continuously
adjustable tapping point controlled by rotation of a shaft or knob. These variable resistors are known as
potentiometers when all three terminals are present, since they act as a continuously adjustable voltage
divider. A common example is a volume control for a radio receiver.
Accurate, high-resolution panel-mounted potentiometers (or "pots") have resistance elements
typically wire wound on a helical mandrel, although some include a conductive-plastic resistance
coating over the wire to improve resolution. These typically offer ten turns of their shafts to cover their
full range. They are usually set with dials that include a simple turns counter and a graduated dial.
Electronic analog computers used them in quantity for setting coefficients, and delayed-sweep
oscilloscopes of recent decades included one on their panels.

64
4.17 CAPACITORS

A capacitor or condenser is a passive electronic component consisting of a pair of conductors


separated by a dielectric. When a voltage potential difference exists between the conductors, an electric
field is present in the dielectric. This field stores energy and produces a mechanical force between the
plates. The effect is greatest between wide, flat, parallel, narrowly separated conductors.
An ideal capacitor is characterized by a single constant value, capacitance, which is measured
in farads. This is the ratio of the electric charge on each conductor to the potential difference between
them. In practice, the dielectric between the plates passes a small amount of leakage current. The
conductors and leads introduce an equivalent series resistance and the dielectric has an electric field
strength limit resulting in a breakdown voltage.
The properties of capacitors in a circuit may determine the resonant frequency and quality
factor of a resonant circuit, power dissipation and operating frequency in a digital logic circuit, energy
capacity in a high-power system, and many other important aspects.

Fig 11.17 : Capacitors

65
A capacitor (formerly known as condenser) is a device for storing electric charge. The forms of
practical capacitors vary widely, but all contain at least two conductors separated by a non-conductor.
Capacitors used as parts of electrical systems, for example, consist of metal foils separated by a layer of
insulating film.
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 and for many other purposes.
A capacitor is a passive electronic consisting of a pair of conductors separated by a dielectric
(insulator). When there is a potential difference (voltage) across the conductors, a static electric field
develops in the dielectric that stores energy and produces a mechanical force between the conductors.
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.
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.

Theory of operation
Capacitance

Charge separation in a parallel-plate capacitor causes an internal electric field. A dielectric (orange)
reduces the field and increases the capacitance.

66
A simple demonstration of a parallel-plate capacitor
A capacitor consists of two conductors separated by a non-conductive region. The non-conductive
region is called the dielectric or sometimes the dielectric medium. In simpler terms, the dielectric is just
an electrical insulator. Examples of dielectric mediums are glass, air, paper, vacuum, and even a
semiconductordepletion region chemically identical to the conductors. A capacitor is assumed to be self-
contained and isolated, with no net electric charge and no influence from any external electric field. The
conductors thus hold equal and opposite charges on their facing surfaces, and the dielectric develops an
electric field. In SI units, a capacitance of one farad means that one coulomb of charge on each
conductor causes a voltage of one volt across the device.
The capacitor is a reasonably general model for electric fields within electric circuits. An ideal capacitor
is wholly characterized by a constant capacitance C, defined as the ratio of charge ±Q on each conductor
to the voltage V between them:

Sometimes charge build-up affects the capacitor mechanically, causing its capacitance to vary. In this
case, capacitance is defined in terms of incremental changes:

Energy storage
Work must be done by an external influence to "move" charge between the conductors in a capacitor.
When the external influence is removed the charge separation persists in the electric field and energy is
stored to be released when the charge is allowed to return to its equilibrium position. The work done in
establishing the electric field, and hence the amount of energy stored, is given by:

67
Current-voltage relation
The current i(t) through any component in an electric circuit is defined as the rate of flow of a charge
q(t) passing through it, but actual charges, electrons, cannot pass through the dielectric layer of a
capacitor, rather an electron accumulates on the negative plate for each one that leaves the positive
plate, resulting in an electron depletion and consequent positive charge on one electrode that is equal
and opposite to the accumulated negative charge on the other. Thus the charge on the electrodes is equal
to the integral of the current as well as proportional to the voltage as discussed above. As with any
antiderivative, a constant of integration is added to represent the initial voltage v (t0). This is the integral
form of the capacitor equation,

.
Taking the derivative of this, and multiplying by C, yields the derivative form,

.
The dual of the capacitor is the inductor, which stores energy in the magnetic field rather than the
electric field. Its current-voltage relation is obtained by exchanging current and voltage in the capacitor
equations and replacing C with the inductance L.

68
ADVANTAGES

● Reactive power decreases

● Efficiency of supply system and apparatus increases.

● The electrical consumption tariffs depend on power factor.

● Avoid poor voltage regulation

● Overloading is avoided

● Copper loss decreases

● Transmission loss decreases

● Improved voltage control

● Efficiency of supply system and apparatus increases

DISADVANTAGES

● Large line losses: Line losses are proportional to the square of current. Therefore, larger the
current, greater are the line losses.

● Greater conductor size and cost: At low power factor, current will be increased. To transmit this
high current conductor size has to be increased.

● Effect on transformers: For decreased power factor, the KW capacity of the transformer is
decreased and voltage is increased.

● Effect on switch gear and busbars: The cross- sectional area of the bus bar, and the contact
surface of the switchgears must be enlarged for the same power to be delivered at low power
factors.

69
CONCLUSION

It can be concluded that power factor correction techniques can be applied to the industries,
power systems and 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 microcontroller multiple parameters can be controlled and the use of
extra hard wares such as timer, RAM, ROM 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.

70
FUTURESCOPE

The automatic power factor correction using capacitive load banks is a very efficient as it

reduces the cost by decreasing the power drawn from the supply. As it operates automatically ,Man

power is not required and this Automated Power Factor Correction using capacitive load banks can be

used for the industries purpose in the future.

BIBLIOGRAPHY

TEXT BOOKS REFERED:

1. “The 8051 Microcontroller and Embedded systems” by Muhammad Ali Mazidi and Janice Gillispie

Mazidi , Pearson Education.

2. ATMEL 89S52 Data Sheets.

WEBSITES

● www.electrosal.com

● www.beyondlogic.org

● www.wikipedia.org

● www.howstuffworks.com

● www.alldatasheets.com

71

You might also like