Sie sind auf Seite 1von 78

FAULT LOCATION AND IDENTIFICATION FOR

UNDERGROUND POWER CABLE USING


DISTRIBUTED PARAMETER APPROACH BY WSCADA
A PROJECT REPORT
Submitted by

VINOTH KUMAR.M
PUSHPARAJ.K
VELMURUGAN.V
PRABAKARAN.R
in partial fulfillment for the award of the degree
of

BACHELOR OF ENGINEERIN
ELECTRICAL AND ELECTRONICS ENGINEERING
APOLLO ENGINEERING COLLEGE, CHENNAI
ANNA UNIVERSITY: CHENNAI 600 025
APRIL 2013

ANNA UNIVERSITY : CHENNAI 600 025


BONAFIDE CERTIFICATE
Certified

that

this

project

report

FAULT

LOCATION

AND

IDENTIFICATION FOR UNDERGROUND POWER CABLE USING


DISTRIBUTED PARAMETER APPROACH BY WSCADAis the bonafide
work of VINOTHKUMAR.Mwho carried out the project work under my
supervision.

SIGNATURE

SIGNATURE

D.RAMASUBRAMANIAN

AISHWARYA.R

HEAD OF THE DEPARTMENT

SUPERVISOR

DEPT. OF ELECTRICAL AND

MASTER OF ENGINEERING

ELECTRONICS ENGINEERING

DEPT. OF ELECTRICAL AND

APOLLO ENGINEERING COLLEGE

ELECTRONICS ENGINEERING

CHENNAI-602105

APOLLO ENGINEERING COLLEGE

TABLE OF CONTENTS
CHAPTER NO

TITLE

PAGE NO

ABSTRACT

viii

LIST OF TABLE

ix

LIST OF FIGURES

LIST OF SYMBOLS
1

INTRODUCTION

1.1

GENERAL

1.2

NEED FOR UNDER GROUND SUSTEM

1.3

CABLE TYPES AND THERE CHARECTERISTICS

LITERATURE REVIEW

BLOCK DIAGRAM

3.1

3.2

GENERAL
OVER ALL BLOCK DIAGRAM

3.2.1ZONE-1(open/close circuit detection node)

3.2.2

ZONE-2(over current/low voltage detection node)

3.3.3

Server Monitoring Unit

3.3.4

Cable Faults

3.3.5

Zigbee

3.3.6

WSCADA

3.3.7

Sensor

3.3.7.1 Voltage Sensor

9
3

3.3.7.2 Current Sensor

3.3.8

PIC Micro Controller

10

3.3.9

Liquid Crystal Display

10

3.3.10 MP LAB IDE


4

FAULT

11

4.1

INTRODUCTION

11

4.2

CABLE FAULT TYPES

11

4.2.1

Fault between core-core and/or core-sheath

11

4.2.2

Defects on the outer protective shield(PVC,PE)

11

4.3

CABLE FAULT LOCATION PROCEDURE

12

4.4

CABLEFAULT PRELOCATION

12

4.4.1 Impuse reflection method TDR

12

4.4.2 Muitiple impulse method(SIM/MIM)

13

4.4.3Bridge method

13

WSCADA

10

14

5.1

INTRODUCTION

14

5.2

FEATURES OF WSCADA

15

5.3

COMPONENTS OF THE SCADA SYSTEM

16

5.3.1

Master unit

16

5.3.2

Remote unit

16

5.3.3

Communication mode

16

ZIGBEE

18

6.1

INTRODUCTION

18

6.2

WSN CONCEPT

18

6.2.1 The main purposes of WSN deployment

19

6.2.1.1 To Monitor

19

6.2.1.2 To Control

19

6.2.1.3 Both to monitor and to control

19

6.3
7

COMPARISION OF ZIGBEE AND BLUETOOTH

20

PIC CONTROLLER

21

7.1

21

INTRODUCTION
7.1.1

7.2

PIC (16F877)

FEATURES

21

21

7.2.1

High performance RISC CPU

21

7.2.2

Peripheral features

22

7.2.3

Analog features

22

7.2.4

Special Microcontroller features

22

7.3

CMOS TECHNOLOGY

23

7.4

DEVICE OVERVIEW

23

7.5

PINDIAGRAM

25

7.6

I/O PORTS

26

7.7

7.6.1 Port A and TRISA Resister

26

7.6.2 Port B and TRISB Resister

26

7.6.3 Port C and TRISC Resister

27

7.6.4 Port D and TRISD Resister

27

7.6.5 Port E and TRISE Resister

27

STATUS RESISTER

28

7.8MEMORY ORGANIZATOIN
7.8.1

7.9

Program memory organization

30
30

RESISTER FILE MAP

31

7.9.1 General Purpose Register

31
5

SENSOR

32

8.1

INTRODUCTION

32

8.2

VOLTAGE SENSOR

32

8.3

CURRENT SENSOR34

HARTWARE IMPLEMENTATION

36

9.1

GENERAL

36

9.2

HARDWARE DESCRIPTION36
9.2.1 Circuit Description

9.3

9.4

OVER ALL CIRCUIT

38

9.3.2 RS232 Interfacing

38

POWER SUPPLY

39

9.4.1 Step-down transformer

40

9.4.2 Rectifier circuit

40

9.4.3 Input filter

41

9.4.4 Regulator unit

41

9.4.5

9.6

37

9.3.1 Circuit Operation

9.4.4.1 IC Voltage Regulators

9.5

36

Output filter

41
42

PIC CONTROLLER

43

9.5.1

Analog Inputs

43

9.5.2

Digital Signals

43

9.5.3

Clock

43

9.5.4

MCLR/VPP

44

9.5.5

TXD and RXD

44

9.5.6

Vcc and Ground

44

LIQUIT CRYSTAL DISPLAY

45
6

9.6.1

10

44780 Background

45

9.6.2Handling the EN control line

46

9.6.3

Checking the busy status of the LCD

47

9.6.4

Initializing the LCD

48

9.6.5

Clearing the display

48

9.6.6

Writing text to the LCD

48

CONCLUSION

50

10.1 Future Scope

50

REFERENCE

51

APPENDIX

52

PHOTOS

62

ABSTARCT
This project proposes an extensive fault location model for underground
power cable in distribution system using voltage and current measurements at the
sending-end. First, an equivalent circuit that models a faulted underground cable
system is analyzed using distributed parameter approach.
Then, the analysis of sequence networks in wireless sensor network is
obtained by applying the boundary conditions. This analysis is used to calculate a
fault location in single section using voltage and current measurements. The
extension to multi-section is further analyzed based on wireless distribution
systems.
This method is an iterative process to determine a faulted section from the
network.The network identity can be done by having unique MAC id provided for
the Zigbee Wireless Transceiver. Finally, the design and implementations are
evaluated with variations of fault open/close circuit and over current/voltage,
which also includes the evaluation of its robustness to load uncertainty.

ACKNOWLEDGEMENT
Very special people have contributed significantly for this project. It would
not have been possible without the kind support and help of these individuals.
Iwould like to extend my sincere thanks to all of them.
In the deep midst pleasure and satisfaction we express our deep sense
Ofgratitude to our beloved chairman forthe keen interest and affection towards us
throughout the course
I convey my sincere thanks to V. NATARAJAN,Principal, Apollo
Engineering college for providing allfacilities to complete my work in time.
I wish to express my sincere thanks to Mr.D.RAMASUBRAMANIYAN,
M.E., (Ph.D),Head of the Department of Electrical and Electronics Engineering,
for thecontinuous help over the period of project work.
I

express

my

deep

guideMiss.R.AISWARYA,M.E,Assistant

sense

of

Professor,

gratitude

to

for

ingenious

her

my

commitment,encouragement and highly valuable advice that she has provided over
the entirecourse of this project.
I also express my thanks to all staff members, Department of Electrical
andElectronicsEngineering and my classmates for their support and suggestions
duringthis project.

LIST OF FIGURES

FIGURE NO

TITLE

PAGE NO

3.1 OVER ALL BLOCK DIAGRAM

3.2 ZONE-1(OPEN/CLOSE CIRCUIT DETECTION NODE)

3.3 ZONE-2(OVER CURRENT/LOW VOLTAGE DETECTION

NODE)
3.4SERVER MONITORING UNIT

5.1wscada

17

6.1WSN (REMOTE SENSORS MONITORING)

18

7.1PIN DIAGRAM

24

7.2STATUS REGISTER

27

7.3REGISTER FILE MAP

30

8.1VOLTAGE SENSOR

31

8.2 CURRENT SENSOR

33

9.1OVERALL CIRCUIT

36

9.2RS232 INTERFACING

37

9.3POWER SUPPLY CIRCUIT

39

9.4 LCD

49

10

LIST OF TABLE
TABLE NO

TITLE

PAGE NO

6.1

COMPARISON OF ZIGBEE AND BLUETOOTH

19

7.1

DEVICE OVERVIEW

23

7.2

STATUS REGISTER

28

11

CHAPTER 1
INTRODUCTION
1.1 GENERAL
Power supply networks are growing continuously and their reliability is
getting more important than ever.
The power supply systems are broadly classified into two categories. They
are,
I.
II.

Overhead transmission system


Underground transmission system

1.2 NEED FOR UNDER GROUND SYSTEM


For most of the worldwide operated low voltage and medium voltage
distribution lines underground cables have been used for many decades. During the
last years, also high voltage lines have been developed to cables.
To reduce the sensitivity of distribution networks to environmental
influences underground high voltage cables are used more and more. They are not
influenced by weather conditions, heavy rain, storm, snow and ice as well as
pollution. Cables have been in use for over 80years. The number of different
designs as well as the variety of cable types and accessories used in a cable
network is large.
The ability to determine all kind of different faults with widely different
fault characteristics is turning on the suitable measuring equipment as well as on
the operators skills. The right combination enables to reduce the expensive time
that is running during a cable outage to a minimum.

12

1.3 CABLE TYPES AND THEIR CHARACTERISTICS


Cable types are basically defined as low-, medium- and high voltage cables.
The tendency of the last year s show the shifting to single-core systems as they are
lower in price, lower in weight and cheaper in regards to repair costs. Furthermore
oil impregnated or oil filled cables are used less and less, as the environmental
sustainability cannot be guaranteed. Especially in industrialized countries, these
cable types have been replaced and are no more installed.
On the other hand a high demand for maintenance of those cables is given as
the installed oil-insulated networks do show up a lifetime of 50 years and more.
Today mainly XLPE (Cross Linked Polyethylene) insulated cables are used. The
improvement of the XLPE insulation material combined with the modern design of
the cable enable to manufacture cables even for the extra high voltage level.
All kind of low, medium and high voltage cables are delivered and stored on
cable drums. The maximum available cable length is mainly specified by the
diameter (1-core ore 3-core cable) and the voltage level of the cable.
In low voltage networks, the connection of the fault location equipment in
most cases is applied to the faulty core that is expected to flash over to the ground
core. On the other hand, the mains supply is tapped between one healthy core and
ground. This may force the operating earth (OE) to rise up to a higher potential an
usual. According to this potential lift, the potential of the safety earth (SE) will also
increase. Due to this potential lift, a larger potential difference and so a higher
voltage between neutral wire (connected to OE) and phase will occur, which may
cause a harmful effect to the equipments mains input.

13

CHAPTER 2
LITERATURE SURVEY
Seung(2004) in his paper a new fault location algorithm by direct analysis
of 3 phase circuit in distribution systems discusses the unbalanced nature of
distribution systems due to single-phase laterals and loads gives difficulty in the
fault location. This paper proposes a new fault location algorithm developed by the
direct analysis of 3-phase circuit for unbalanced distribution systems, which has
not been investigated due to high complexity. The proposed algorithm overcomes
the limit of the conventional algorithm, which requires the balanced system. It is
applicable to any power system, but especially useful for the unbalanced
distribution systems. Its effectiveness has been proved through many EMTP
simulations.
Dr. Aditya Goel & Ravi Shankar Mishra(2009) in his paper remote data
acquisition using wireless scada system proposes that Supervisory Control and
Data Acquisition (SCADA) is a process control system that enables a site operator
to monitor and control processes that are distributed among various remote sites. A
properly designed SCADA system saves time and money by eliminating the need
for service personnel to visit each site for inspection, data collection/logging or
make adjustments. Supervisory Control and Data Acquisition systems are
computers, controllers, instruments; actuators, networks, and interfaces that
manage the control of automated industrial processes and allow analysis of those
systems through data collection.
A.Ngaopitakkul (2010) in his paper identification of fault locations in
under-ground

distribution

system

using

discrete

wavelet

transform

proposes a technique for detecting faults in underground system is presented.


14

Discrete Wavelet Transform (DWT) based on traveling wave is employed in


order to detect the high frequency components and to identify fault locations in the
underground distribution system. The first peak time obtained from the faulty bus
is employed for calculating the distance of fault from sending end. The validity of
the proposed technique is tested with various fault inception angles, fault locations
and faulty phases. The result is found that the proposed technique provides
satisfactory result and will be very useful in the development of power systems
protection scheme.
Lorenzo Peretto (2011) in his paper addresses the topic of Fault location in
power networks with cable lines that in the era of smart grid the demand of
intelligent measurement systems capable of providing quickly and with high
accuracy the right location of faults in power networks is growing fast. Many
proposals can be found in literature relevant to different approaches. Some
commercial instrumentation is also available on the market for this purpose.
Protection relays implementing this feature can either be found. This paper
presents the experimental results of a measurement campaign carried out in the
MV power network in the city of Milan (Italy).
Xia Yang (2012) in his paper Fault Location for Underground Power Cable
Using Distributed Parameter Approach proposes an extensive fault location model
for underground power cable in distribution system using voltage and current
measurements at the sending-end. This analysis is used to calculate a fault distance
in single section using voltage and current equations. The extension to multisection is further analyzed based on Korean distribution systems.

15

CHAPTER 3
BLOCK DIAGRAM
3.1 GENERAL
The project deals with the identification and location of faults in
underground power cables. The circuit implementation is done using distributed
parameter approach by assuming the overall network as two zones viz, zone1 and
zone2. These zones are synchronized with the server monitoring unit to acquire the
data by using Zigbee transceiver. These are explained in the block diagram given
below in fig.3.1
3.2. OVER ALL BLOCK DIAGRAM

ZONE 1
REMOTE
MONITORING
UNIT
(WSCADA)

AC
SUPPLY
ZONE 2

Fig 3.1Over all block diagram

The detailed block diagram of the zones are given in fig.3.2, 3.3

16

Liquid Crystal Display

Voltage
Sensor

AC

Open/

SUPPLY

Short

PIC
Controller

Wireless
Transceivers

Circuit

Load

Current
Sensor

Switches

Fig 3.2 Zone-1(Open/Close circuit detection node)

Liquid Crystal Display

POT

AC

Voltage
Sensor

SUPPLY
Load

Current

PIC
Controller

Sensor

Wireless
Transceivers

Load

Fig 3.3 Zone-2(Over current/Low voltage detection node)

17

Server
System
(WSCADA)

Wireless
Transceiver

PIC
Controller

TTL to
RS232

Fig 3.4 Server monitoring unit

3.3.1 ZONE-1(OPEN/CLOSE CIRCUIT DETECTION NODE)


In zone1 for our conveniences we manually trigger the short circuit and open
circuit faults. The voltage and current sensor continuously monitors the line and
the data are sent to the server monitoring unit. Using the data further control
measures can be taken. The uncertainty of the location of fault is between 2 to 3
meter in real-time.
3.3.2 ZONE-2(OVER CURRENT/LOW VOLTAGE DETECTION NODE)
The zone2 comprises of a potential transformer and an additional load to
trigger the over current and over voltage faults. Similar to the zone1 this also
comprises of PIC microcontroller which helps the sensor to communicate with the
wireless transceiver.

18

3.3.3 SERVER MONITORING UNIT


The server monitoring unit consists of a wireless transceiver which receives
the data from the zones and displays on the personal computer. The interface
between the Zigbee and PC is done by the PIC microcontroller and transistortransistor logic cable RS232.
3.3.4 CABLE FAULTS
A cable fault can be defined as any defect, inconsistency, weakness or nonhomogeneity that affects the performance of a cable. All faults in underground
cables are different and the success of a cable fault location depends to a great
extent on practical aspects and the experience of the operator. To accomplish this,
it is necessary to have personnel trained to test the cables successfully and to
reduce their malfunctions. The further explanation about Cable faults is shown in
chapter 4.
3.3.5 ZIGBEE
ZigBee is the name of a specification for a suite of high level communication
protocols using small, low-power digital radios based on the IEEE 802.15.4-2006
standard for wireless personal area networks (WPANs), such as wireless
headphones connecting with cell phones via short-range radio. The technology is
intended to be simpler and cheaper than other WPANs, such as Bluetooth. ZigBee
is targeted at radio-frequency (RF) applications that require a low data rate, long
battery life, and secure networking. The further explanation about Zigbee is shown
in chapter 6.

19

3.3.6 WSCADA
Wireless SCADA system for monitoring & accessing the performance of
remotely situated device parameter such as temperature, pressure, humidity on real
time basis. For this we have used the infrastructure of the existing mobile network,
which is based on GPRS technique Supervisory Control and Data Acquisition
(SCADA) is a field of constant development and research. This project investigates
on creating an extremely low cost device. The further explanation about WSCADA
is shown in chapter 5.
3.3.7 SENSOR
3.3.7.1 VOLTAGE SENSOR:
A transformer converts one voltage to another. It only works with alternating
current, in which the direction of the electrical flow periodically changes. Since
energy cannot be created or destroyed, the power passed by a transformer remains
the same at the output. Since the voltage changes, the current must change so that
the amount of power is the same. The further explanation about voltage sensor is
shown in chapter 8.1.
3.3.7.2 CURRENT SENSOR:
A single wire carrying current generates a magnetic field. You can visualize
this by making a loose fist with your right hand, and sticking your thumb out. The
thumb indicates the direction the current is flowing in the single wire, and your
fingers represent the magnetic lines of flux circling around the wire (current). This
is called the right-hand-rule. The further explanation about current sensor is shown
in chapter 8.2.

20

3.3.8 PIC MICRO CONTROLLER


PICs are popular with developers and hobbyists alike due to their low cost,
wide availability, large user base, extensive collection of application notes,
availability of low cost or free development tools, and serial programming (and reprogramming with flash memory) capability. The controller chosen for my
application is PIC16F877A. Its a8-bit controller. The further explanation about
PIC microcontroller is shown in chapter 7.
3.3.9 LIQUID CRYSTAL DISPLAY:
Frequently, a microcontroller 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 microcontroller port is an LCD display.
Some of the most common LCDs connected to the microcontroller are 16x2 and
20x2 displays. Fortunately, a very popular standard exists which allows us to
communicate with the vast majority of LCDs regardless of their manufacturer. The
further explanation about Liquid crystal display is shown in chapter 9.4.
3.3.10 MP LAB IDE
For programming the PIC Microcontroller we use embedded Cprogramming. The Microcontroller is programmed for serial communication by
enabling In-Circuit Debugger and also the coding is written so as to collect the
digital data from the Analog to digital convertor. A hi-tech cross compiler is a
software, which compiles a source code of one environment as an object file to be
executed in different environment. It is broadly classified into development and
simulation. The simulation is handled by D Scope. Even the corresponding power
value can also be displayed in a text box.

21

CHAPTER 4
FAULT
4.1 INTRODUTION
A cable fault can be defined as any defect, inconsistency, weakness or nonhomogeneity that affects the performance of a cable. All faults in underground
cables are different and the success of a cable fault location depends to a great
extent on practical aspects and the experience of the operator. To accomplish this,
it is necessary to have personnel trained to test the cables successfully and to
reduce their malfunctions.
4.2 CABLE FAULT TYPES
There are many type of cable fault occurring here we discuss some the
commonly occurring faults,
4.2.1 Fault between core-core and / or core - sheath:
Low resistive faults (R < 100 - 200 )
o short circuit
High resistive faults (R > 100 - 200 )
o Intermittent faults (breakdown or flash faults)
o Interruption (cable cuts)
4.2.2 Defects on the outer protective shield (PVC, PE):
Cable sheath faults
Most of the cable faults occur between cable core and sheath. Furthermore,
very frequently blown up open joint connections or vaporized cable sections can
cause the core to be interrupted. To figure out whether such a fault is present, the
loop resistance test shall be done. By using a simple multimeter, the continuity in
general can be measured.
22

The easiest way to perform this test is to keep the circuit breaker at the far
end grounded. Corrosion of the cable sheath may increase the line resistance. This
is already an indication for possible part reflections in the TDR result.
4.3 CABLE FAULT LOCATION PROCEDURE
Cable fault location as such has to be considered as a procedure
Covering the following steps and not being only one single step.
Fault Indication
Disconnecting and Earthing
Fault Analyses and Insulation Test
Cable Fault Prelocation
Cable Route Tracing
Precise Cable Fault Location (Pinpointing)
Cable Identification
Fault Marking and Repair
Cable Testing and Diagnosis
Switch on Power
4.4 CABLE FAULT PRELOCATION
The cable fault is pre located by analyzing the length of the cable by using
the following methods
4.4.1 Impulse Reflection Method TDR
The TDR method is the most established and widely used measuring method
for determination of
the total length of a cable
the location of low resistive cable faults
the location of cable interruptions
the location of joints along the cable

23

The Time Domain Reflectometer IRG (BAUR abbreviation for Impulse


Reflection Generator) sends a low voltage impulse into the cable under test. The
low voltage impulse (max. 160V) travels through the cable and is reflected
positively at the cable end or at any cable interruption (cable cut). At a short circuit
point this low voltage impulse is reflected negatively. The Time Domain
Reflectometer IRG is measuring the time between release and return of the low
voltage impulse.
4.4.2 Multiple Impulse Method (SIM/MIM)
The Multiple Impulse Method is the most advanced cable fault prelocation
method available. Every cable fault that is either a high resistive or intermittent
fault cannot be indicated by means of the TDR method. The low voltage impulse
sent out by the Time Domain Reflectometer is not reflected at the faulty position,
as the fault impedance compared to the insulation impedance of the healthy part of
the cable is not significantly lower.

4.4.3 Bridge Method


All faults having the characteristic to happen between two defined cores and
therefore two parallel wire scan be prelocated with any of the previously
mentioned cable fault prelocation methods based on pulse reflectometry. Certain
cable structures enable cable faults to happen from a core to the outside and
therefore the soil.
Bridge methods are basically used for prelocation of low resistive faults. By
using a high voltage source that is integrated in the latest generation of measuring
bridge instruments even high resistive fault scan be prelocated.
All bridge measurement methods that work with direct current for locating
faults in cables (Glaser and Murray) are based in principle on modified Wheatstone
circuits.

24

CHAPTER 5
WSCADA
5.1 INTRODUCTION
Wireless SCADA system for monitoring &accessing the performance of
remotely situated device parameter such as temperature, pressure, humidity on real
time basis. For this we have used the infrastructure of the existing mobile network,
which is based on GPRS technique Supervisory Control and Data Acquisition
(SCADA).
5.1.1 NEED FOR SCADA
This project investigates on creating an extremely low cost device which can
be adapted to many different SCADA applications via some very basic
programming, and plugging in the relevant peripherals. Much of the price in some
expensive SCADA applications is a result of using specialized communication
infrastructure. The application of infrastructure, in the proposed scheme the cost
will come down. Additionally the generic nature of the device will be assured.
Wireless SCADA deals with the creation of an inexpensive, yet adaptable
and easy to use SCADA device and infrastructure using the mobile telephone
network, in particular, the General Packet Radio Service (GPRS).
The hardware components making up the device are

relatively

unsophisticated, yet the custom written software makes it re-programmable over


the air, and able to provide a given SCADA application with the ability to send and
receive control and data signals at any non-predetermined time.
5.2 FEATURES OF WSCADA
GPRS is a packet-based radio service that enables always on connections,
eliminating repetitive and time-consuming dial-up connections.

25

It will also provide real throughput in excess of 40 Kbps, about the same
speed as an excellent landline analog modem connection. From the wireless
SCADA system which is proposed in setup the temperature of around 30C could
be sufficiently recorded from remote location. In the similar manner reading of
electric energy meter could be read 223 Kilo Watt Hour (KWH) or 223 Unit.
The properly designed SCADA system saves time and money by eliminating
the need of service personal to visit each site for inspection, data collection
/logging or make adjustments. Supervisory Control and Data Acquisition
(SCADA) is a process control system that enables a site operator to monitor and
control processes that are distributed among various remote sites.
Supervisory Control and Data Acquisition systems are computers,
controllers, instruments, actuators, networks, and interfaces that manage the
control of automated industrial processes and allow analysis of those systems
through data collection .
They are used in all types of industries, from electrical distribution systems,
to food processing, to facility security alarms. Supervisory control and data
acquisition is used to describe a system where both data acquisition and
supervisory control are performed. Mobile Supervisory Control and Data
Acquisition (referred to as Mobile SCADA) is the use of SCADA with the mobile
phone network being used as the underlying communication medium.
GSM is a wireless communication technology; most popular today for
transmitting data anywhere in the world through SMS with the help of mobile
phones.
General Packet Radio Service (GPRS) is chosen as the specific mobile
communication protocol to use as it provides an always on-line Inter connection
without any time based charges.

26

SMS is a globally accepted wireless service that enables the transmission of


alphanumeric messages between mobile subscribers and external systems such as
electronic mail, paging, and voice-mail systems. It is a store and forward way of
transmitting messages to and from mobiles. SMS benefits includes the delivery of
notifications and alerts, guaranteed message delivery, reliable and low cost
communication mechanism for concise information, ability to screen messages and
return calls in a selective way and increased subscriber productivity.

5.3 COMPONENTS OF THE SCADA SYSTEM


SCADA systems typically are made of four components:

Display and
control
console

Auxiliary
memory
Prog.

C.P.U.

I/O

Communication
interface

equipm
ent

RTU

RTU

RTU

27

5.3.1Master Unit
This is heart of the system and is centrally located under the operator's
control
5.3.2Remote Unit
This unit is installed from where the process is actually monitored. It gathers
required data about the process and sends it to the master unit.
5.3.3Communication Mode
This unit transmits signals/data between the master unit and the remote unit.
Communication mode can be a cable, wireless media, satellite etc.
Computer receives data from RTUs via the communication interface.
Operators control base one or more CRT terminals for display. With this, terminal
it is possible to execute supervisory control commands and request the display of
data in alpha numerical formats arranged by geographical location and of type.

28

CHAPTER 6
ZIGBEE
6.1 INTRODUCTION
ZigBee is the name of a specification for a suite of high level communication
protocols using small, low-power digital radios based on the IEEE 802.15.4-2006
standard for wireless personal area networks (WPANs), such as wireless
headphones connecting with cell phones via short-range radio.
6.1.1 NEED FOR TECHNOLOGY
The technology is intended to be simpler and cheaper than other WPANs,
such as Bluetooth. ZigBee is targeted at radio-frequency (RF) applications that
require a low data rate, long battery life, and secure networking. The Zigbee
concept is divided into four sections. The sections are as follows:

Wireless Sensor Networking

WSN Technology

IEEE 802.15.4 Standard

ZigBee Standard

6.2 WSN CONCEPT


Wireless sensor network is a network of small spatially distributed devices
that can communicate with each other over the air. Wireless sensor networks is a
less expensive, more flexible and highly reliable alternative for existing wired
monitoring and controlling solutions. WSN systems are rapidly replacing wires in
weather stations, light switches, HVAC systems, and many other areas.

29

6.2.1 The main purposes of WSN deployment are


6.2.1.1 To Monitor
Data from remote sensors of different types (temperature, pressure, motion,
vibrations, etc.) with WSN connectivity can be easily collected by central unit for
further processing and analysis
6.2.1.2 To Control
Actuators (switches, valves, sound emitters, robots, etc.) can be controlled
remotely by commands sent over the air
6.2.1.3 Both to monitor and to control
Measurements collected from sensors can be immediately used to control
actuators present in the same wireless network

Fig. 6.1 WSN example for remote sensors monitoring


Low power mesh networking. IEEE 802.15.4 Standard, based on Motorolas
proposal. Low power, Networked, Open standard Personal Operating Space
(POS) of 10m radius, or greater range Mesh self-healing network.

30

6.3 COMPARISON OF ZIGBEE AND BLUETOOTH:

Characteristic

Zigbee

Bluetooth

Range
As designed

10-100 metres

10 metres

Special kit or outdoors


Data rate

Up to 400 metres
20-250 Kbps

100+ meters dep.on radio


1 Mbps

Security

128 bit AES and application


layer user definable

64 bit,128 bit

Operating frequency

868 Mhz,902-928 Mhz,2.4


Ghz ISM

2.4 Ghz

Complexity

Simple

Complex

Network topology

Adhoc, star, mesh hybrid

Adhoc piconets

Number of devices per


network

2 to 65,000

TABLE 6.1

31

CHAPTER 7
PIC CONTROLLER
7.1 INTRODUCTION
The microcontroller that has been used for this project is from PIC series.
PIC microcontroller is the first RISC based microcontroller fabricated in CMOS
(complementary metal oxide semiconductor) that uses separate bus for instruction
and data allowing simultaneous access of program and data memory.
The main advantage of CMOS and RISC combination is low power
consumption resulting in a very small chip size with a small pin count. The main
advantage of CMOS is that it has immunity to noise than other fabrication
techniques.
7.1.1 PIC (16F877)
Various microcontrollers offer different kinds of memories. EEPROM,
EPROM, FLASH etc. are some of the memories of which FLASH is the most
recently developed. Technology that is used in pic16F877 is flash technology, so
that data is retained even when the power is switched off. Easy Programming and
Erasing are other features of PIC 16F877.
7.2 FEATURES
7.2.1 High-Performance RISC CPU
Only 35 single-word instructions to learn. All single-cycle instructions
except for program branches, which are two-cycle. Operating speed: DC 20 MHz
clock input DC 200 ns instruction cycle Up to 8K x 14 words of Flash Program
Memory, Up to 368 x 8 bytes of Data Memory (RAM), Up to 256 x 8 bytes of
32

EEPROM Data Memory. Pin out compatible to other 28-pin or 40/44-pin


PIC16CXXX and PIC16FXXX microcontrollers.
7.2.2 Peripheral Features
Timer0: 8-bit timer/counter with 8-bit pre-scaler. Timer1: 16-bit
timer/counter with pre-scaler, can be incremented during Sleep via

external

Crystal/clock.Timer2: 8-bit timer/counter with 8-bit period register, pre-scaler and


post-scaler. Two Capture, Compare, PWM modules Capture is 16-bit, max
resolution is 12.5 ns Compare is 16-bit, max resolution is 200 ns PWM max
resolution is 10-bit Synchronous Serial Port (SSP) with SPI (Master mode) and
I2C (Master/Slave) Universal Synchronous Asynchronous Receiver Transmitter
(USART/SCI) with 9-bit address detection. Parallel Slave Port (PSP) 8 bits wide
with external RD, WR and CS controls (40/44pin only). Brown-out detection
circuitry for Brown-out Reset (BOR).
7.2.3 Analog Features
10-bit, up to 8-channel Analog-to-Digital converter (A/D). Brown-out Reset
(BOR). Analog Comparator module with two analog comparators. Programmable
on-chip voltage reference (VREF) module. Programmable input multiplexing from
device inputs and internal voltage reference. Comparator outputs are externally
accessible.
7.2.4 Special Microcontroller Features
100,000 erase/write cycle Enhanced Flash program memory typical.
1,000,000 erase/write cycle Data EEPROM memory typical.

Data EEPROM

Retention > 40 years. Self-reprogrammable under software control. In-Circuit


Serial Programming (ICSP) via two pins.
33

Single-supply 5V In-Circuit Serial Programming. Watchdog Timer (WDT)


with its own on-chip RC oscillator for reliable operation. Programmable code
protection. Power saving Sleep mode. Selectable oscillator options. In-Circuit
Debug (ICD) via two pins
7.3 CMOS TECHNOLOGY
Low-power, high-speed. Flash/EEPROM technology. Fully static design.
Wide operating voltage range (2.0V to 5.5V). Commercial and Industrial
temperature ranges. Low-power consumption
7.4 DEVICE OVERVIEW
This document contains device specific information about the following
devices. The pin diagram of pic controller 16F877A is shown in fig 7.1
PIC16F873A
PIC16F874A
PIC16F876A
PIC16F877A
PIC16F873A/876A devices are available only in 28-pin packages, while
PIC16F874A/877A devices are available in 40-pin and 44-pin packages.
All devices in thePIC16F87XA family share common architecture with the
following differences:
The PIC16F873A and PIC16F874A have one-half of the total on-chip
memory of the PIC16F876A and PIC16F877A. The 28-pin devices have three I/O
ports, while the 40/44-pin devices have five. The 28-pin devices have fourteen
34

interrupts, while the 40/44-pin devices have fifteen. The 28-pin devices have five
A/D input channels, while the 40/44-pin devices have eight. The Parallel Slave
Port is implemented only on the 40/44-pin devices.

TABLE 7.1

35

7.5PIN DIAGRAM

FIGURE 7.1

36

7.6 I/O PORTS


Some pins for these I/O ports are multiplexed with an alternate function for
the peripheral features on the device. In general, when a peripheral is enabled, that
pin may not be used as a general purpose I/O pin.
Additional Information on I/O ports may be found in the IC micro MidRange Reference Manual,
7.6.1 PORTA AND THE TRIS A REGISTER
PORTA is a 6-bit wide bi-directional port. The corresponding data direction
register is TRISA. Setting a TRISA bit (=1) will make the corresponding PORTA
pin an input, i.e., put the corresponding output driver in a Hi-impedance mode.
Clearing a TRISA bit (=0) will make the corresponding PORTA pin an output, i.e.,
put the contents of the output latch on the selected pin.
7.6.2 PORTB AND TRISB REGISTER
PORTB is an 8-bit wide bi-directional port. The corresponding data
direction register is TRISB. Setting a TRISB bit (=1) will make the corresponding
PORTB pin an input, i.e., put the corresponding output driver in a hi-impedance
mode. Clearing a TRISB bit (=0) will make the corresponding PORTB pin an
output, i.e., put the contents of the output latch on the selected pin. Three pins of
PORTB are multiplexed with the Low Voltage Programming function; RB3/PGM,
RB6/PGC and RB7/PGD. The alternate functions of these pins are described in the
Special Features Section. Each of the PORTB pins has a weak internal pull-up. A
single control bit can turn on all the pull-ups.

37

This is performed by clearing bit RBPU (OPTION_REG<7>). The weak


pull-up is automatically turned off when the port pin is configured as an output.
The pull-ups are disabled on a Power-on Reset.
7.6.3 PORTC AND THE TRIS C REGISTER
PORTC is an 8-bit wide bi-directional port. The corresponding data
direction register is TRISC. Setting a TRISC bit (=1) will make the corresponding
PORTC pin an input, i.e., put the corresponding output driver in a hi-impedance
mode. Clearing a TRISC bit (=0) will make the corresponding PORTC pin an
output, i.e., put the contents of the output latch on the selected pin. PORTC is
multiplexed with several peripheral functions. PORTC pins have Schmitt Trigger
input buffers.
7.6.4 PORTD AND TRISD REGISTERS
This section is not applicable to the 28-pin devices. PORTD is an 8-bit port
with Schmitt Trigger input buffers. Each pin is individually configurable as an
input or output. PORTD can be configured as an 8-bit wide microprocessor Port
(parallel slave port) by setting control bit PSPMODE (TRISE<4>). In this mode,
the input buffers are TTL.
7.6.5 PORTE AND TRISE REGISTER
PORTE has three pins RE0/RD/AN5, RE1/WR/AN6 and RE2/CS/AN7,
which are individually configurable as inputs or outputs. These pins have Schmitt
Trigger input buffers.
The PORTE pins become control inputs for the microprocessor port when
bit PSPMODE (TRISE<4>) is set. In this mode, the user must make sure that the

38

TRISE<2:0> bits are set (pins are configured as digital inputs). Ensure ADCON1 is
configured for digital I/O. In this mode the input buffers are TTL.
PORTE pins are multiplexed with analog inputs. When selected as an analog
input, these pins will read as '0's. TRISE controls the direction of the RE pins, even
when they are being used as analog inputs. The user must make sure to keep the
pins configured as inputs when using them as analog inputs.
7.7 STATUS REGISTER

FIGURE 7.2

39

40

TABLE 7.2

7.8 MEMORY ORGANIZATION


There are three memory blocks in each of the PIC16F87XA devices. The
program memory and data memory have separate buses so that concurrent access
can occur and is detailed in this section
7.8.1 Program Memory Organization
The PIC16F87XA devices have a 13-bit program counter capable of
addressing an 8K word x 14 bit program memory space. The PIC16F876A/877A
devices have 8K words x 14 bits of Flash program memory, while
PIC16F873A/874A devices have 4K words x 14 bits. Accessing a location above
the physically implemented address will cause a wraparound. The Reset vector is
at 0000h and the interrupt vector is at 0004h.

41

7.9 REGISTER FILE MAP:

FIGURE 7.3

7.9.1 GENERAL PURPOSE REGISTER FILE


The register file can be accessed either directly or indirectly through the File
Selected Register (FSR). There are some Special Function Registers used by the
CPU and peripheral modules for controlling the desired operation of the device.
These registers are implemented as static RAM. The Special Function Registers
can be classified into two sets; core (CPU) and peripheral. Those registers
associated with the core functions.

42

CHAPTER 8
SENSOR
8.1 INTRODUCTION
The sensor are used to continuously sense the parameter needed to be
measured in this project voltage and current sensor. The input to this sensors are
given from power supply through a step down transformer. The output is given to
the microcontroller.
8.2 VOLTAGE SENSOR

voltage Sensor
D1

T1
1

230v AC 50Hz

filter
D3

R1
C1

D2

D4
f ilter capacitor

R2

to ADC0

rectifier
Figure8.1
A transformer converts one voltage to another. It only works with
alternating current, in which the direction of the electrical flow periodically
changes.

43

Since energy cannot be created or destroyed, the power passed by a


transformer remains the same at the output. Since the voltage changes, the
current must change so that the amount of power is the same.
The high-current low-voltage windings have fewer turns of thicker wire.
The thicker wire helps carry more current. The high-voltage, low current
windings have more turns of thinner wire. The thinner wire carries less current,
but at a higher voltage.
Some transformers have equal numbers of windings on both coils. These
"isolation" transformers are used to prevent direct current flow between electric
circuits, while transferring power. Small transformers are often used to isolate
and link different parts of radios.
The fig.8.1 represents the voltage sensor. The input ac supply is given to
the step-down transformer which converts the 230v into 12v. During positive
half cycle the points 5 and 8 are positive and negative respectively. At this
instance diode D1 and D4 conduct. During negative half cycle the polarity of
points 5 and 8 gets reversed. Now the diode D2 and D3 conducts. The output of
the full wave rectifier is given to the ADC unit of the microcontroller which
converts the analog data into digital data. Since PIC 16F877A is 8bit controller
its capable of delivering 8 level of output. So that we are able to get greater
accuracy.

44

8.3 CURRENT SENSOR

LOAD

current Sensor
rectifier
D1

T1

230v AC
50Hz

D3
R1
C1

D2

D4
f ilter capacitor

R2

to ADC1

filter

Figure8.2
The figure 8.2 represents a current transformer. The current transformer
operates only when loads is acting series to the supply.During positive half
cycle the points 5 and 8 are positive and negative respectively. At this instance
diode D1 and D4 conduct. During negative half cycle the polarity of points 5
and 8 gets reversed. Now the diode D2 and D3 conducts. The output of the full
wave rectifier is given to the ADC unit of the microcontroller which converts
the analog data into digital data. Since PIC 16F877A is 8bit controller its
capable of delivering 8 level of output. So that we are able to get greater
accuracy.
Current transformers are used so that ammeters and the current coils of
other instruments and relays need not be connected directly to high voltage
lines. In other words, these instruments and relays are insulated from high
voltages.
45

CT's also step down the current in a known ratio. The use of CT means
that relatively small and accurate instruments, relays and control devices of
standardized design can be used in circuits.
The CT has separate primary and secondary windings. The primary
winding which consists of few turns of heavy wire, wound on a laminated iron
core is connected in series with one of the line wires. The secondary winding
consists of a greater number of turns of a smaller size of wire. The primary and
secondary windings are wound on the same core.
The current rating of the primary winding of a CT is 100A. The primary
winding has three turns and the secondary winding has 60 turns. The secondary
winding has the standard current rating of 5A; therefore the ratio between the
primary and secondary current is 100/5 or 20/1.The primary current is 20 times
greater than the secondary current. Since the secondary winding has 60 turns
and the primary winding has 3 turns, the secondary winding has 20 times as
many turns as the primary winding. For a CT, then the ratio of primary to
secondary currents is inversely proportional to the ratio of primary to secondary
turns.
The CT in the figure has polarity markings in that the two high voltage
primary leads are marked 1 and 4, and the secondary leads are marked 5 and
8.When 1 is instantaneously positive, 5 is positive at the same moment. Some
CT manufacturers mark only the 1 and 5 leads. When connecting the CT's in
circuits; the 1 lead is connected to the line lead feeding from the source while
the 4 lead is connected directly to the ammeter. Note that one of the secondary
leads is grounded as a safety precaution to eliminate high voltage hazards.

46

CHAPTER 9
HARDWARE IMPLEMENTATION
9.1 GENERAL
The hardware circuit implementation deals with the wiring of sensor with the
load and with pic microcontroller unit. The pic controller is connected with
wireless transceiver which transmits and receives data. In the server monitoring
unit transceiver is interfaced with the PC using RS232 cable.
9.2 HARDWARE DESCRIPTION
The hardware implementation includes the following circuits
1. POWER SUPPLY CIRCUIT
2. SENSORS
3. PIC CONTROLLER
4. ZIGBEE MODEM
5. PERSONAL COMPUTER
6. LCD
7. RS 232
9.2.1 CIRCUIT DESCRIPTION
The overall circuit consists of power supply unit which allows the flow of
power through our circuit. In this unit the rectification, filtering and other quality
enhancement work are done the output of this unit is given to the zones which
means the load centers. These zones are connected with fault detection unit which
senses the fault and process the output through the microcontroller. The output of
microcontroller is given to Zigbee transceiver which transmits the data.

47

9.3 OVERALL CIRCUIT

1
2

J1
+12V 1A

Power Supply Unit


U1
LM7805C/TO220

D1
2

IN

OUT

C1
0.1MFD

1k
D2

3
C2

C3

0.1MFD

LED

470MFD 25V

1N4007

GND

VCC R1

reset switch
VCC
R1
RESISTOR
RESET SWITCH

for system Interfacing


through RS232 TXD
sending to the PC

VCC

C2

4MHz

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

MCLR
RB7
AN0
RB6
AN1
RB5
AN2
RB4
AN3
RB3
AN4
RB2
AN5
RB1
RE0
RB0
RE1
Vdd
RE2 PIC16F877A Vss
Vdd
RD7
Vss
RD6
osc1
RD5
osc2
RD4
RC0
RC7
RC1
RC6
RC2
RC5
RC3
RC4
RD0
RD3
RD1
RD2

40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21

TXD
tx
C7
1 MFD
C7
1 MFD

U4
13
8 R1IN
11 R2IN
10 T1IN
T2IN
1
3
4
5
2
6

C+
C1C2+
C2V+
V-

P1
12
R1OUT 9
R2OUT 14
T1OUT 7
T2OUT
VCC
GND

rx
RXD
VCC

TXD

16
14

RXD
C8
CAPACITOR

5
9
4
8
3
7
2
6
1
SERIAL CON

MAX232
VCC C7
tx

C7

for ZigbeeInterfacing
through RS232 RXD

1 MFD
1 MFD

receiving from the zigbee

CRYSTAL OSCILLATOR

MICROCONTROLLER

Fig 9.1Over all circuit

48

9.3.1 CIRCUIT OPERATION


The input ac power supply is given to the zones. In the zones the 230v is
stepped down to 12v using a step-down transformer. The 12v output is given to the
voltage and current sensors which senses the line voltage and current. The analog
output of the sensors is given to the ADC unit of pic controller. The digital output
is compared with the threshold value. During stable operation of the system the
voltage and current values are within the tolerance limit. Hence the output of the
controller calls the LCD to display as stable system. During faulted condition the
sensors senses the voltage and current value and its output is given to controller
which compares the value with threshold value. According to the output of the
sensors the type of fault occurred is displayed in the LCD by the call of interrupt in
the controller. The location of the fault can be determined by using the mac id
assigned to the Zigbee at each zone. From the Zigbee transceiver the data is send to
the remote monitoring unit.
9.3.2 RS232 INTERFACING
P1
U3
RXD1_RS232
TXD1_RS232
TXD0_RS232

13
8

TXD0
TXD1

10
11

C5
1
3
4
5

0.1MFD
C7
0.1MFD

2
6
C8
0.1MFD

R 1IN
R 2 IN

R 1O U T
R2OUT

T 2 IN
T 1IN

T 1O U T
T2 OUT

C 1+
C 1C2+
C2-

VCC
GN D

12
9

RXD1
RXD0

14
7

RXD1_RS232
RXD0_RS232

16
15

V+
V-

TXD1_RS232

+3.3V
C6
0.1MFD

UART1
P2

C9 MAX3232_SOIC

RXD0_RS232
RTS
TXD0_RS232

0.1MFD

DTR

+3.3V

1
6
2
7
3
8
4
9
5

1
6
2
7
3
8
4
9
5
UART0_ISP

Fig 9.2
49

9.4 POWER SUPPLY


The power supply is very important section of all electronic devices as all the
electronic devices works only in DC. One important aspect of the project is that the
power supply should be compact. Most electronic devices need a source of DC
power.
Power supply unit consists of following units:
Step down transformer
Rectifier unit
Input filter
Regulator unit
Output filter
The circuit is powered by a 12V dc adapter, which is given to
LM7805voltage regulator by means of a forward voltage protection diode and is
decoupled by means of a 0.1 f capacitor. The voltage regulator gives an output of
exactly 5V dc supply. The 5V dc supply is given to all the components including
the Microcontroller, the serial port, and the IR transmitters and sensors.
The AC supply which when fed to the step down transformer is leveled down
to 12 volts AC . This is then fed to full wave rectifier which converts it in to 12
volts DC. This is then passed to a filter to remove the ripples. Then it is fed to a
voltage regulator that converts 12 V to 5 V stable voltages and currents.

50

VIN

VOUT

C4

0.1MFD

C3

470MFD

C2

C6

10MFD

GND

+3.3V

U2
AMS1117-3.3/ SOT223

OUT

0.1MFD

0.1MFD

CONN JACK
R1
4.7K C1

IN
GND

+5VDC

0.1MFD

+5VDC

U1
LM7805C/TO220

1
2
3

J1

C5

L1
LED

Fig 9.3

9.4.1 STEPDOWN TRANSFORMER


The step down transformer is used to step down the main supply voltage
from 230AC to lower value. This 230AC voltage cannot be used directly, thus its
stepped down. The transformer consists of primary and secondary coils. To reduce
or step down the voltage, the transformer is designed to contain less number of
turns in its secondary core. Thus the conversion from AC to DC is essential. This
conversion is achieved by using the rectifier circuit.
9.4.2 RECTIFIER UNIT
The Rectifier circuit is used to convert AC voltage into its corresponding DC
voltage. There are Half-Wave and Full-Wave rectifiers available for this specific
function. The most important and simple device used in rectifier circuit is the
diode. The simple function of the diode is to conduct when forward biased and not
to conduct when reverse biased.

51

The forward bias is achieved by connecting the diodes positive with of positive of
battery and negative with batterys negative. The efficient circuit used is full wave
bridge rectifier circuit. The output voltage of the rectifier is in rippled form, the
ripples from the obtained DC voltage are removed using other circuits available.
The circuit used for removing the ripples is called Filter circuit.
9.4.3 INPUT FILTER
Capacitors are used as filters. The ripples from the DC voltage are removed
and pure DC voltage is obtained. The primary action performed by capacitor is
charging and discharging. It charges in positive half cycle of the AC voltage and it
will discharge in its negative half cycle, so it allows only AC voltage and does not
allow the DC voltage. This filter is fixed before the regulator. Thus the output is
free from ripples.
9.4.4 REGULATOR UNIT
Regulator regulates the output voltage to be always constant. The output
voltage is maintained irrespective of the fluctuations in the input AC voltage. As
Band then the AC voltage changes, the DC voltage also changes. This to avoid
these regulators are used. Also when the internal resistance of the power supply is
greater than 30 ohms, the pullup gets affected. Thus this can be successfully
reduced here. The regulators are mainly classified for low voltage and for high
voltage.
9.4.4.1 IC VOLTAGE REGULATORS
Voltage regulators comprise a class of widely used ICs. Regulator IC units
contain the circuitry for reference source, comparator amplifier, control device and
overload protection all in a single IC.
52

A Power Supply can be built using a transformer connected to the AC supply


line to step the ac voltage to desired amplitude, then rectifying that ac voltage
using IC regulator. The regulators can be selected for operation with load currents
from hundreds of milli amperes to tens of amperes, corresponding to power ratings
from milli watts to tens of watts. The Micro controller and PC work at a constant
supply voltage of +5V,-5Vand +12V and -12V respectively. The regulators are
mainly classified for positive and negative voltage.
9.4.4.2 LM 7805 VOLTAGE REGULATOR
9.4.4.2.1 Features
Output Current up to 1A
Output Voltages of 5, 6, 8, 9, 10, 11, 12, 15, 18, 24V
Thermal Overload Protection
Short Circuit Protection
Output Transistor Safe Operating area Protection

9.4.5 OUTPUT FILTER


The filter circuit is often fixed after the regulator circuit. Capacitor is most
often used as filter. The principle of the capacitor is to charge and discharge. It
charges during the positive half cycle of the AC voltage and discharges during the
negative half cycle. So it allows AC voltage and not DC voltage. This filter is fixed
after the regulator circuit to filter any of the possibly found ripples in the output
received finally. The output at this stage is 5V and is given to Microcontroller
89S52.

53

9.5 PIC CONTROLLER


The PIC Microcontroller board consists of circuits necessary to operate a
Microcontroller with PC interface. The board contains provisions for interfacing 8
analog inputs and 23 Digital level signals. The Description of the circuit is given
below.

9.5.1 Analog inputs


Pin no 2 to 10 can be used to connect any analog signals of range 0-5v.

9.5.2 Digital signals


As mentioned in the circuit the pin outs from the port is taken to a 26 pin
FRC connector through which we can connect our Digital level signals 0 or 5 volts.

9.5.3 Clock
The PIC16F877 can be operated in Four Different oscillator modes. The user
can program two configuration bits FOSC1 and FOSC0 to select one of these four
modes.
*LP - Low Power crystal
*XT - crystal / resonator
*HS - High speed crystal/resonator
*RC - Resistor capacitor
The clock we have used is 10 MHZ which full under HS category.

54

9.5.4 MCLR/VPP
This is master clear input pin to the IC. A logic low signal will generate a
reset signal to the microcontroller. So we have tied this pin to VCC for the proper
operation of the microcontroller.
9.5.5 TXD and RXD
TO communicate with the outside world the microcontroller has an inbuilt
USART. The O/P and I/P line from the USART is taken and given to a MAX232
IC for having communication with the PC. Since we have used comport for
interfacing the microcontroller.
9.5.6 VCC and Ground
Pin no 32, 11 are tied to VCC and pin no 31, 12 are grounded to provide
power supply to the chip.
9.6 LIQUID CRYSTAL DISPLAY
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.

55

FIGURE 9.4

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.
9.6.1 44780 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).
The three control lines are referred to as EN, RS, and RW.

56

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, bringENhigh (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.
Finally, the data bus consists of 4 or 8 lines (depending on the mode of
operation selected by the user). In the case of an 8-bit data bus, the lines are
referred to as DB0, DB1, DB2, DB3, DB4, DB5, DB6, and DB7.
9.6.2 HANDLING THE EN CONTROL LINE
As we mentioned above, the EN line is used to tell the LCD that you are
ready for it to execute an instruction that you've prepared on the data bus and on
the other control lines. Note that the EN line must be raised / lowered before/after
each instruction sent to the LCD regardless of whether that instruction is read or
write text or instruction.
57

In short, you must always manipulate EN when communicating with the


LCD. EN is the LCD's way of knowing that you are talking to it. If you don't
raise/lower EN, the LCD doesn't know you're talking to it on the other lines.
Thus, before we interact in any way with the LCD we will always bring the
EN line low with the following instruction:
9.6.2.1 CLR EN
And once we've finished setting up our instruction with the other control
lines and data bus lines, we'll always bring this line high:
9.6.2.2 SETB EN
The line must be left high for the amount of time required by the LCD as
specified in its datasheet. This is normally on the order of about 250 nano seconds
but check the datasheet. In the case of a typical 8051 running at 12 MHz, an
instruction requires 1.08 microseconds to execute so the EN line can be brought
low the very next instruction.
However, faster microcontrollers (such as the DS89C420 which executes an
instruction in 90 nanoseconds given an 11.0592 Mhz crystal) will require a number
of NOPs to create a delay while EN is held high. The number of NOPs that must
be inserted depends on the microcontroller you are using and the crystal you have
selected. The instruction is executed by the LCD at the moment the EN line is
brought low with a final CLR EN instruction.

58

9.6.3 CHECKING THE BUSY STATUS OF THE LCD


As previously mentioned, it takes a certain amount of time for each
instruction to be executed by the LCD. The delay varies depending on the
frequency of the crystal attached to the oscillator input of the 44780 as well as the
instruction which is being executed.
While it is possible to write code that waits for a specific amount of time to
allow the LCD to execute instructions, this method of "waiting" is not very
flexible. If the crystal frequency is changed, the software will need to be modified.
Additionally, if the LCD itself is changed for another LCD which, although 44780
compatible, requires more time to perform its operations, the program will not
work until it is properly modified.
A more robust method of programming is to use the "Get LCD Status"
command to determine whether the LCD is still busy executing the last instruction
received. The "Get LCD Status" command will return to us two tidbits of
information; the information that is useful to us right now is found in DB7. In
summary, when we issue the "Get LCD Status" command the LCD will
immediately raise DB7 if it's still busy executing a command or lower DB7 to
indicate that the LCD is no longer occupied.
Thus our program can query the LCD until DB7 goes low, indicating the
LCD is no longer busy. At that point we are free to continue and send the next
command. Since we will use this code every time we send an instruction to the
LCD, it is useful to make it a subroutine.

59

9.6.4 INITIALIZING THE LCD


Before you may really use the LCD, you must initialize and configure it.
This is accomplished by sending a number of initialization instructions to the LCD.
The first instruction we send must tell the LCD whether we'll be communicating
with it with an 8-bit or 4-bit data bus. We also select a 5x8 dot character font.
These two options are selected by sending the command 38h to the LCD as a
command. As you will recall from the last section, we mentioned that the RS line
must be low if we are sending a command to the LCD.
9.6.5 CLEARING THE DISPLAY
When the LCD is first initialized, the screen should automatically be
cleared by the 44780 controller. However, it's always a good idea to do things
yourself so that you can be completely sure that the display is the way you want it.
Thus, it's not a bad idea to clear the screen as the very first operation after the LCD
has been initialized. An LCD command exists to accomplish this function. Not
surprisingly, it is the command 01h.
9.6.6 WRITING TEXT TO THE LCD
Now we get to the real meat of what we're trying to do: All this effort is
really so we can display text on the LCD. Really, we're pretty much done.
Once again, writing text to the LCD is something we'll almost certainly
want to do over and over. The WRITE_TEXT routine that we just wrote will send
the character in the accumulator to the LCD which will, in turn, display it. Thus to
display text on the LCD all we need to do is load the accumulator with the byte to
display and make a call to this routine.

60

CHAPTER 10
CONCLUSION
Detecting

the fault in the underground is more complicated which is

determined by our implementation. The faults like open circuit and short circuit are
found effectively by the system proposed. The underground cable implementation
are developing at a faster rate. Hence the need for the detection of faults are also
increasing. The proposed system detects the underground faults with greater
accuracy using sensor monitoring method. Thus the time for the location of fault in
underground cable is decreased.

10.1 FUTURE SCOPE


The fault location can be more accurate using an RSSI algorithm in Zigbee
so that the distance of fault can be measured.

61

REFERENCE
1. Identification of Fault Locations in Underground Distribution System using
Discrete Wavelet Transform IEEE 2010 paper by A. Ngaopitakkul, C.
Apisit, C. Pothisarn, C. Jettanasen and S. Jaikhan.
2. Remote Data Acquisition Using Wireless - Scada System by Dr. Aditya
Goel & Ravi Shankar Mishra.
3. A new fault location algorithm using direct circuit analysis for distribution
systems, IEEE Trans. Power Del., vol. 19, no. 1, pp. 3541, Jan. 2004.
4. Computerized underground cable fault location expertise, IEEE Power
Eng. Soc. General Meeting, Apr. 1015, 1994, pp. 376382.

62

APPENDIX 1
PIC CONTROLLER CODING
#include <pic.h>
#include "def.h"
#include "adc.c"
#include "delay.c"
#include "delay.h"
#include "usart.c"
#include "usart.h"
unsigned char mvolt,mcurrent1,mcurrent2,mcurrent3;
unsignedint z;
void delay2();
void display(unsigned char val);
voiddisplayser(unsigned char val);
void displayser1(unsigned char val);
void displayser2(unsigned char val);
voidpwmdelay();
void main(void)

63

{
unsignedintj,k,l,x;
unsigned char i,adcv,val,temp,ecg,humi;
RBPU=0;
TRISA=0x0f;
TRISB=0X00;
TRISD=0X00;
PORTB=0X00;
TRISC5=1;
init_comms();

// set up the USART - settings defined in usart.h

initlcd();
initadc();
lcdcommand(0x80);
for(k=0;k<16;k++)
{
lcddisplay(nodename[k]);
}
lcddelay();lcddelay();lcddelay();lcddelay();
lcddelay();lcddelay();lcddelay();lcddelay();
64

lcdcommand(0x01);
lcdcommand(0x80);
for(l=0;l<16;l++)
{
lcddisplay(nodename2[l]);
}
while(1)
{
mcurrent1=conv_adc(2);
lcdcommand(0x8C);
display(mcurrent1);
putch('A');
displayser(mcurrent1);
}
}
voidinitlcd(void)
{
// init commands for lcd
lcdcommand(0x28);
65

delay1();
lcdcommand(0x28);
delay1();
lcdcommand(0x28);
delay1();
lcdcommand(0x0e);
delay1();
lcdcommand(0x01);
delay1();
lcdcommand(0x02);
delay1();
lcdcommand(0x06);
delay1();
lcdcommand(0x86);
delay1();
lcdcommand(0x80);
delay1();
}
voidlcdcommand(unsigned char value)
66

{
/*DATA = cmd;
RS=0;
EN=1;
delay1();
EN=0;
*/
intg,copy;
g=value;
copy=g;
g=((g>>4) & 0x0F);
PORTD= g;
PORTD|=0X20;
delay1();//for(i=0;i<=1000;i++);
PORTD=0X00;
g=copy;
g=(g & 0x0F);
PORTD= g;
PORTD|=0X20;
67

delay1();
PORTD=0X00;
}
voidlcddisplay(unsigned char value)
{
/*DATA=dat;
RS=1;
EN=1;
delay1();
EN=0;
*/
inth,copy;
h=value;
copy=h;
h=((h>>4) & 0x0F);
PORTD= h;
PORTD|=0XA0;
delay1();
PORTD=0X00;
68

h=copy;
h=(h & 0x0F);
PORTD=h;
PORTD|=0XA0;
delay1();
PORTD=0X00;
}
voidlcddelay(void)
{
int i;
for(i=0;i<=18000;i++);
}
void delay1(void)
{
unsignedint j;
for(j=0;j<=1000;j++);
}
voidchardelay(void)
{
69

int i;
for(i=0;i<=5000;i++);
}

voidconv_lcd(unsigned char hip1)


{
unsigned char hb1=0;unsigned char ha1=0;
hb1=(hip1&0xf0)>>4;
if(hb1<=9){lcddisplay(hb1+0x30);}///////hsb
else{lcddisplay(hb1+0x37);}
ha1=hip1&0x0f;
if(ha1<=9){lcddisplay(ha1+0x30);}///////lsb
else{lcddisplay(ha1+0x37);}
}
void display(unsigned char val)
{
unsigned char val1,val2,val3;
//

val=val*196/100;

val1= val/100;
70

lcddisplay(val1+0x30);
val2= (val%100)/10;
lcddisplay(val2+0x30);
val3 = val%10;
lcddisplay(val3+0x30);
}
voiddisplayser(unsigned char val)
{
unsigned char val1,val2,val3;
int i;
val1= val/100;
putch(val1+0x30);
//

lcddisplay(val1+0x30);

delay1();
val2= (val%100)/10;
putch(val2+0x30);
//

lcddisplay(val2+0x30);

delay1();
val3 = val%10;
71

putch(val3+0x30);
//

lcddisplay(val3+0x30);

delay1();
}
voidpwmdelay(void)
{
int z;
for(z=0;z<100;z++);
}

72

APPENDIX 2
ANALOG TO DIGITAL CONVERTER
void init_a2d(void)

//ADC Initialization

{
ADCON0=0x40; // select Fosc/2
ADCON1=0;

// select left justify result. A/D port configuration 0

ADON=1;

// turn on the A2D conversion module

}
unsigned char read_a2d(unsigned char channel)

// reading theanalog channels

{
channel&=0x07;

// truncate channel to 3 bits

ADCON0&=0xC5;

// clear current channel select

ADCON0|=(channel<<3);

// apply the new channel select

ADGO=1;

// initiate conversion on the selected

channel
while(ADGO)continue;
return(ADRESH);

// return 8 MSB of the result

}
void adc_4_chread_serial_display(unsigned char ch)// displaying digital value of
the read analog values
73

{
unsigned char x,v1,v2,v3,v4,v5;
unsigned char i;
unsigned char rval;
x=read_a2d(ch);

// sample the analog value on RA0

v1=x;
v2=v1/100;

putch(v2+0x30);
txs(v2+0x30);
v3=v1%100;
v4=v3/10;
putch(v4+0x30);
txs(v4+0x30);
v5=v3%10;
putch(v5+0x30);
txs(v5+0x30);
}

74

APPENDIX 3
LCD
void txs(unsigned char value)
{
DATA=value;
RS=1;
EN=1;
EN=0;
lcddelay();
}
void initlcd(void) // init commands for lcd
{
TRISD=0x00;

// Port B as output for LCD

lcdcommand(0x38);
lcddelay();
lcdcommand(0x38);
lcddelay();
lcdcommand(0x38);
lcddelay();
75

lcdcommand(0x0c);
lcddelay();
lcdcommand(0x01);
lcddelay();
lcdcommand(0x02);
lcddelay();
lcdcommand(0x80);
}
void lcdcommand(unsigned char value)
{
DATA=value;
RS=0;
EN=1;
EN=0;
lcddelay();
}
void lcddisplay(unsigned char value)
{
DATA=value;
76

RS=0;
EN=1;
EN=0;
lcddelay();
}
void lcddelay(void)
{
unsigned int i;
for(i=0;i<=2000;i++);
}

77

APPENDIX 4
DATA SHEET

78

Das könnte Ihnen auch gefallen