Sie sind auf Seite 1von 100

DESIGN AND CONSTRUCTION OF A DIGITAL

UNDERGROUND CABLE FAULT LOCATOR

BY

Itodo Friday Victory


UE/10104/07

FEBRUARY 2012

DESIGN AND CONSTRUCTION OF A DIGITAL UNDERGROUND


CABLE FAULT LOCATOR

BY

ITODO FRIDAY VICTORY


UE/10104/07

A PROJECT REPORT PRESENTED TO


THE DEPARTMENT OF ELECTRICAL AND ELECTRONIC
ENGIINEERING, UNIVERSITY OF AGRICUTURE, MAKURDI,
BENUE STATE, NIGERIA.
IN PARTIAL FULFILMENT OF THE REQUIREMENT FOR THE
AWARD OF THE DEGREE OF BACHELOR OF ENGINEERING
(B.Engr.) IN ELECTRICAL AND ELECTRONIC ENGINEERING,

ii

FEBRUARY 2012
DECLARATION
I declare that this project work described in this report represents my original work and has not
been submitted to any university or similar institution for any degree.

ITODO, FRIDAY VICTORY

--------------------------------------------

UE/10104/07

Signature/Date

iii

APPROVAL PAGE
This is to certify that this project was carried out by ITODO, FRIDAY VICTORY
(UE/10104/07) which met the requirement of the College of Engineering; University of
Agriculture, Makurdi, for the award of Bachelor in Engineering (B.Engr.) Degree.

Approved by:
Project Supervisor:
(Dr J. A. ENOKELA)

Signature/Date

Project Coordinator:
(Engr N. S. Tarkaa)

Signature/Date

Head of Department:
(Dr Jonathan A. Enokela)

Signature/Date

External Examiner
Signature/Date

iv

DEDICATION
This project is dedicated to God almighty for granting me the knowledge, support and protection
throughout my whole life to this moment and to my late father Mr. Itodo Friday.

ACKNOWLEDGMENT
Gods support through this career cannot be quantified; I owe everything to Him for His infinite
mercy and immeasurable love over me. If not because of Him, it would not have been possible
for me to successfully complete this program.
The contribution of my mother Mrs. Mary Onoja Itodo is all-directional, it therefore pleases my
heart to give her thanks and may the almighty God bless her for her enamors support.
It gives me a great joy to use this opportunity to thank my able supervisor, Dr. J.A.Enokela, of
Electrical/Electronic Engineering Department, University of Agriculture Makurdi for his careful
supervisory roles played in this work. His advice and guidance to this work can never be
forgotten. I appreciate all staff of Electrical/Electronic Engineering Department for their
individual and collective contributions to my academic up-bringing.
I thank Dr. Onoja.F.Ameh whom has stood by me from my childhood till this defining moment
of my life cum Mr. Kennedy Iwundu and Mr. Simon Onuh for their immense and immeasurable
contribution to my life in all entireties.
I am grateful to my beloved family members: my uncle Mr. J. A.Onoja, for his fatherly advice
and support. Appreciation is extended to my brother Mr.U.F. Itodo and my good friend Miss
Berikisu Musa for their unending contribution to the success of this work
Finally, I would like to appreciate every other person who contributed in one way or the other to
the successful completion of this project work.
The acknowledgement is not exhaustive but for time and space, I say thank you all.

vi

ABSTRACT
Frequent faults in underground cables due to breakdown of the paper or polymer plastic
insulation due to chemical action, reaction or even poor workmanship during installation and
the difficulty in locating the approximate fault area has long been a serious engineering
problem. Most underground faults are located by unearthing the entire length of armoured cable
to enable visual inspection to be carried out. In case where visual inspection is not helpful, the
entire length of such a cable is replaced. This method is not only expensive but also, long outage
of a cable from service results in heavy loss of revenue to the power distribution company,
production loss of industries as well as unpleasant condition to the general public, since the
consumers are left without electricity for the whole period taken to unearth the cable and carryout necessary repairs. To salvage these challenges, an efficient instrument capable of locating
the fault in minimum possible time and restoring the supply, that is, the digital underground
cable fault locator is designed and constructed. This research work will help in easy
identification and location of underground cable fault without unearthing the entire length of
cable before repair or replacing the entire cable due to difficulties in detecting or locating the
fault. It will also help to reduce loss of revenue due to damage in trying to locate or detect fault
and long power down time will be reduced as minimum time will be used to restore supply. In
the design and construction of digital underground cable fault locator, the locator circuit is
designed to use the sectionalizing test method to locate the fault distance. Its main limitation is
the fact that measurement and monitoring must be conducted at regular uninterrupted intervals
of 10m following the underground mapping of the trouble spot. The device is program based
and uses microcontroller as the interface between the input section of the device (detector circuit
and the analogue to digital converter which comprises the comparators and the pull-up resistor
configured in the ACTIVE LOW arrangement) and the output of the device which is a seven
segment LED display.

TABLE OF CONTENT
vii

Cover page

Title page

ii

Certification-

--

iii

Approval page -

iv

Dedication

Acknowledgement

--

vi

Abstract

--

vii

Table of Content

viii

List of Figures -

List of Tables -

xii

CHAPTER ONE

Introduction -

1.2 Statement of research problem

1.3 Significance of the Research

1.4 Aims And Objectives Of The Study

1.5 Scope of the Research

1.6 Review 0f Literature

11

2.3

Underground Cable Fault Location Methods -

12

2.3.1

Thumping Method

13

2.3.2

Sectionalizing-

13

2.4

Definition of underground cable Faults

13

15

1.1 General Overview -

CHAPTER TWO
2.1
2.2

2.4.1

xi

Background Of the Design

Anatomy Of Underground Distribution Cables


Aging Mechanisms In Underground Cables

Earth fault-

viii

2.4.2

Short circuit fault-

16

2.4.3

Open circuit fault--

16

2.5

The Block Diagram of the Circuit-

17

2.5.1

The locator circuit-

17

2.5.2

Analog To Digital Converter-

18

2.5.2.1

Lm393 Comparator

19

2.5.3

Pic16f84a Microcontroller-

21

2.5.3.1

Pins on PIC16F84A microcontroller have the following meaning- -

22

2.5.3.2

Memory Organization -

24

2.5.3.3

Microcontroller Board

24

2.5.3.4

PIC 16F84A least circuit

25

2.5.3.5

Microcontroller PIC16F84A knows several sources of resets

26

2.5.3.6

The Registers- -

27

2.5.3.7

Programming the Microcontroller.- -

28

2.5.3.7

Status Register

29

2.5.3.8

TRISA and TRISB

29

2.5.3.9

PORTA and PORTB -

30

2.5.3.10

Program Structure for PIC 16F84A -

32

2.5.3.11

Programming Concepts-

34

ix

2.5.3.12

PIC Instruction Set BTFSS

36

2.5.3.13

The XOR-Trick.

37

2.5.3.14

Power requirements -

38

2.5.4

Seven Segment Display Unit -

38

2.6

LM7805 Voltage Regulator. -

39

CHAPTER THREE DESIGN AND ANALYSIS


3.1

Detector Circuit.

42

3.2

Analogue To Digital Converter

43

3.3

Inputs -

46

3.4

Output -

48

3.4.1

Seven Segment Display

49

3.5

Program for the Underground Cable Fault Locator -

53

CHAPTER 4 PROGRAM TESTINGAND HARDWARE CONSTRUCTION


4.1 Programming the PIC (Peripheral Interface Controller) microcontroller

56

4.2 MPLAB

57

4.3

Writing The Program -

60

4.4

Simulator

61

4.5

MPLAB Programming

64

4.6

The Burning Process

69

4.7

Summary Of Project Construction And Results-

72

73

4.7.1 Program Debugging- -

4.7.2 Burning The Program-

74

4.7.3 Copy Of The Burnt Program- -

77

4.7.4 Breadboarding And Testing- -

81

CHAPTER FIVE CONCLUSIONS AND FUTURE WORK


5.1 Conclusions

82

5.3 Future Work

82

Reference

xi

LIST OF FIGURES
Figure
Page
Fig.2.1 Anatomy of typical single phase underground cable -

Fig. 2.2: Single line earth fault -

15

Fig. 2.3: Double-line to earth fault Earthing -

15

Fig 2.4: Three-line to earth fault -

15

Fig. 2.5: Single-line to earth through a resistance fault. -

16

Fig. 2.6: Double line short circuit fault-

16

Fig. 2.7: Three phase short circuit fault -

16

Fig.2.8; Shows the block diagram of the digital underground cable fault locator - -

17

Fig. 2.9: The detector circuit -

17

18

Fig. 2.11: Conversion of analogue signal to digital signal - -

19

Fig. 2.12: Low power low offset voltage dual comparator - -

20

Fig. 2.13; The pin diagram of PIC16F48A microcontroller - -

21

Fig.2.14; The block diagram of PIC16F84A microcontroller -

--

23

Fig.2.15; PIC16F84A microcontroller board arrangement -

24

Fig.2.16; PIC16F84A RC oscillator connection -

25

Fig.2.17; PIC16F84A reset circuit. -

26

Fig.2.18; LED display anatomy. -

39

Fig.2.19; pin-out of Lm7805 voltage regulator - -

40

Fig. 2.10: 3-bit flash analog to digital converter-

Fig.3.1; Block diagram of digital underground cable fault locator (DUCLF) -

41

Fig.3.2; Detector circuit -

42

Fig.3.3; Analogue to digital converter of the fault locator - -

44

xii

Fig.3.4; The primary configuration of the project microcontroller - -

46

Fig.3.5; Active Low/High arrangements -

47

48

Fig.3.7; microcontroller port B connections to the seven segment display -

49

Fig.3.8; Schematic diagram of digital underground cable fault locator (DUCFL) - -

52

Fig.4.1; MPLab IDE (v8.60) window -

Fig.3.6; Input Circuitry to Port A of PIC16F48A -

58

Fig.4.2; MPLab IDE project welcome window -

58

Fig.4.3; MPLab IDE project wizard window -

59

Fig.4.4; MPLab IDE project making window -

59

Fig.4.5; Finish window of project Initialization of MPLab IDE -

60

Fig.4.6; MPLab IDE project creation window -

60

Fig.4.7; MPLab IDE Debug pane window - -

61

Fig.4.8; MPLab IDE special function registers window -

63

Fig.4.9; MPLab IDE watch window - -

63

Fig.4.11; MPLab IDE build option window - -

64

Fig.4.12; MPLab IDE compile setting window -

65

Fig.4.13; MPLab IDE header files window - -

65

Fig.4.14; MPLab IDE program target window -

65

Fig.4.15; MPLab IDE reset tool window -

66

Fig.4.16; MPLab IDE naming project window --

66

Fig.4.17; MPLab IDE project directory window -

67

Fig.4.18; MPLab IDE check box window - -

67

Fig.4.19; MPLab IDE menu window -

67

xiii

Fig.4.20; MPLab IDE .asm extension window -

68

Fig.4.21; MPLab IDE assembly code editor window -

68

Fig.4.22; MPLab IDE .ikr file window -

68

Fig.4.23; MPLab IDE simulation/debug window - -

69

Fig.4.24; MPLab IDE project file directory window -

70

Fig.4.25; Dataman intelligent universal programmer -

71

Fig.4.26; Dataman programmer software window - -

72

Fig.4. 27; Screenshot of the project compilation -

72

73

Fig.4.29; Screen shot of STATUS register watch window -- -

73

Fig.4.30; Screenshot of TRISA register watch window -

74

Fig.4.31; Screenshot of created files from project build -

74

Fig.4.32 The programmer interface with the microcontroller -

75

Fig.4.33; Screenshot of Dataman software buffer radio window -

76

Fig.4.34; Screenshot of loaded HEX file on Dataman buffer -

76

Fig.4.35; Screenshot of Dataman software programming progress bar -

77

Fig.4.36; picture of the completed project - -

81

Fig.4. 28; Screen shot of project single step debugging -

xiv

LIST OF TABLES
Table

Page

Table 2.1; Summary of ageing mechanism in cables -

12

Table 2.2; Register file map of PIC16F84A - -

28

Table 2.3; The status register of PIC16F84A -

29

Table 2.4; graphical illustration of port A - -

30

Table.2.5; Graphical illustration of TRISA- -

32

Table 2.6; the used instruction set for the Project.

35

Table 2.7; Op-Code Field Description -

35

Table 2.8; Flag check in the Status Register -

37

Table 2.9; XOR Truth Table --

37

Table 3.1 On/Off status in the common cathode abcdefg seven segment display for 0-9

50

Table 3.2; The hexadecimal encodings for displaying the digits 0 to F -

51

xv

CHAPTER ONE
INTRODUCTION

1.1 GENERAL OVERVIEW


Study of cable failures and development of accurate fault detection and location methods has
been interesting yet challenging research topics in the past and present. Fault detection entails
determination of the presence of a fault, while fault location includes the determination of the
physical location of the fault. Accurate permanent fault detection techniques and relatively
accurate fault location methods have been developed for overhead distribution systems.
However, fault detection and location technology for underground distribution systems is still
in developing stages. From a macroscopic perspective, cable faults refer to the abnormalities
associated with any type of deterioration phenomena manifested in the cable electrical
signals.

The power industry has been developing in a challenging and competitive environment due
to, the ongoing restructuring and deregulation. This structural change has required the electric
utilities to reduce operating costs and optimize usage and maintenance of electrical assets
without sacrifice the quality and reliability of the power delivered to the customers.

Underground distribution systems are valuable assets of electric utilities, which supply power
to the end customers at low voltages. Many of the system components, particularly
underground cables, fail over time, in part due to the deterioration of the insulating materials
used in their structure. Studies reveal that cable failure rates in power systems continue to
worsen as the cable ages [1].

In the past, analogue system was used to detect and locate faults. However, the need for
improvement has made it necessary to shift from analogue to digital system of fault detection
and location. This shift requires developing new tools and methods to detect and locate faults
of underground distribution systems including power cables.

In addition to degrading system reliability, cable failures cost substantial amounts of money
for the utilities as replacing or repairing a cable is a very costly process. Quick detection and
location of cable faults within a minimum time would undoubtedly be a great benefit to the
utilities enabling them to avoid catastrophic failures, unscheduled outages, and thus loss of
revenues. This project presents a tool, digital underground cable fault locator (DUCFL) and a
methodology for such a location system known as sectionalisation.

1.2 STATEMENT OF RESEARCH PROBLEM


Frequent faults in underground cables due to the breakdown of the paper or polymer plastic
insulation due to chemical action, reaction or even poor workmanship during installation and
the difficulty in locating the approximate fault area have long been a serious engineering
problem. Most underground faults are located by unearthing the entire length of armoured
cable to enable visual inspection to be carried out. In case where visual inspection is not
helpful, the entire length of cable is replaced. This analogue method is not only expensive,
but also, long outage of a cable from service results in heavy loss of revenue to the power
distribution company, production loss of industries as well as unpleasant conditions to the
general public, since the consumers are left without electricity for the whole period taken to
unearth the cable and carry out necessary repairs. To salvage these challenges, an efficient
instrument capable of locating the fault in minimum possible time and restoring the supply is
needed. This research is aimed at designing and constructing a digital underground cable fault
locator to solve this problem.
1.3 SIGNIFICANCE OF THE RESEARCH
Underground cables constitute the heart of any distribution system such as the power and
communication utilities.
This research work will help these utilities in easy identification and location of underground
cable fault without unearthing the entire length of the cable before repair or replacing the
entire cable due to difficulties in detecting or locating the fault.
The research will also help to reduce the loss of revenue due to damage in trying to locate
or detect faults and long power down time will be reduced as minimum time will be used to
restore supply.

Thus, the research will help to enhance the quality and reliability of the power or signal
delivered to the customers and also reduces cost of services to the customers.
This project will also help researchers for future work.
1.4 AIMS AND OBJECTIVES OF THE STUDY
At the end of this study, a digital underground cable fault locator would have been

Designed

Constructed

Able to locate underground cable fault and display the results using digital methods.

1.5 SCOPE OF THE RESEARCH


The research would be based on designing and constructing a digital tool or instrument that is
capable of locating an underground cable fault.
1.6 REVIEW OF LITERATURE
Electrical cable is composed of one or more electric conductors covered by insulation and
sometimes protective sheath, used for transmitting electric power or the impulse of an electric
communications system.
For electric power transmission, three-wire cables sheathed with lead and filled with oil under
pressure are employed for high-voltage circuits; secondary distribution lines usually employ
insulated single-conductors cables. In residential electric wiring, B-X cable is often used.
This type of cable contains two insulated conductors, which are wound with additional layers
of insulation and covered with a helically wound strip of metal for protection [5].
Conductor material and insulation type will be specified. Restricting extensions of existing
systems to a specific conductor material and insulation type in order to match an existing
cable type is permitted only when a need has been established.
Neutral cables, where required, will be installed with 600V insulation unless concentric
neutral cable is used. In duct lines, neutrals will be installed in the same conduit with
associated phase cables.
a. Conductor material. Since underground conductors are continuously supported, soft-drawn
copper or aluminium alloy 5005 provides adequate strength. However, the selection of copper
3

or aluminium will be justified based upon an analysis using life, environmental, and cost
factors. The need for mechanical flexibility requires that conductors be stranded, and the
NEC makes this mandatory for cables larger than No. 8 AWG installed in raceways. The
installation of conductors larger than 500 kcmil is not economical, and such large cables
should be used only under exceptional circumstances. Large ampacities can be served by
parallel or multiple circuits. Three 15 kV, single conductor, non-metallic-jacketed cables
larger than No. 4/0 AWG will require use of ducts larger than the standard four-inch size (i.e.
three single conductor cables making up a three-phase circuit and each having individual
overall diameters greater than 1.25 inches will need to be installed in a duct larger than four
inches). One three conductor cable is more costly than three single conductor cable, and use
of multiple-conductor cable will be restricted to special conditions.
Metallic-armoured cable is such a special condition.
b. Insulation and jacket material. The type of insulation used will be dependent upon the
voltage level and type of service required. Factors affecting selection will be the effects of the
surrounding environment, the importance of the load in regard to operation of the installation,
and whether peak loading is continuous or intermittent.
(1) Medium-voltage cable. Cable will be specified as 133 percent insulation level
(ungrounded) which allows greater margin for voltage surges, insulation deterioration, and
fault clearing time than does the use of the 100 percent insulation level (grounded). When
marking guide specifications, refer to NFPA 70, which currently limits the minimum size to
No. 1 AWG at 133 percent insulation for 15 kV to 28 kV systems and No. 2 AWG at 133
percent insulation for 8 kV to 15 kV systems. Medium-voltage cable above 3 kV will be
shielded.
(a) Non-metallic-jacketed cable. Non-metallic jacketed cable will be used, except where
circumstances warrant other coverings. Insulation will be either cross linked-polyethylene
(XLP) for short life requirements, or ethylene-propylene-rubber (EPR) for long life
requirements, in accordance with NEMA WC-7 and WC-8.
This option allows the use of cables which are available as stock items in small quantities. In
some environments, however, the selection of other jacket materials may be necessary
because properties of some jacket materials may not provide adequate cable protection.
Special shielding or coverings will not be specified, unless the designer has checked that the
4

footage installed for each different cable diameter is large enough for manufacturers to make
the special runs required.
(b) Metallic-armoured cable. Armoured cable is justified only when cable is installed under
water (submarine cables) and sometimes when installed in cable trays or trenches. Armored
cable will have XLP or EPR insulation covered with a thermoplastic core covering and then
provided with interlocked-metal tape armour. A non-metallic jacket is required for
underground installations, where corrosion and moisture protection is required, for
installations in outdoor cable trays, or for submarine cables. Submarine cable may also
require a lead covering. Cable having steel armour will be three-conductor type to avoid the
high hysteresis and eddy current losses which can result when single-conductor cable is used.
(c) Lead-covered cable. Lead-covered cables will not be used, unless extenuating
circumstances prevail such as for submarine cable. The lead covering is both more costly and
more difficult to handle. The use of laminated insulation such as for paper-insulated-leadcovered (PILC) or for varnished-cambric-lead-covered (VCLC) instead of the solid or
extruded dielectrics such as cross linked-polyethylene (XLP) or ethylene propylene- rubber
(EPR) is not approved. In addition, these cables have lower temperature ratings.
(2) Low-voltage cables. Cables suitable for below grade installations are listed in the NEC.
Insulation will be either XLP (NEMA WC 7) or EPR (NEMA WC 8) and jackets or other
protection will be in accordance with the applicable Underwriters Laboratories (UL)
specification covering that NEC type. Use of metal-clad (MC) cable will be limited as
previously discussed for metallic armoured cable. The use of the less expensive Moistureand-Heat-Resistant Thermoplastic (THWN) or Moisture-and-Heat-Resistant Cross-Linked
Synthetic Polymer (XHHW) is not recommended for underground work as their thinner
insulation has been designed for interior usage.
Moisture-and-Heat Resistant Thermoplastic (THW) wiring does have the same thickness of
insulation

as

Heat-Resistant

Rubber

(RHH)/Moisture-and-Heat

Resistant

Rubber

(RHW)/Underground Service-Entrance (USE) wire, but polyvinylchloride insulation is


considered to have only fair electrical and mechanical insulation properties as compared to
the excellent properties exhibited by XLP and EPR insulation. UF cable may have a greater
insulation thickness, but some sizes have a lower ampacity rating than does USE cable.

c. Cable ampacity. The current carrying capacities of cable will be in accordance with
ampacities given in the NEC and IEEE/ICEA publications. There are many factors taken into
account in determining these allowable ampacities such as operating temperatures, soil
effects, shielding losses, and conductor configurations, but the variables which cause the
most concern are circuit loading and location in a duct bank. Because of load diversity, peak
demands for cables in a duct bank will not occur concurrently in most cases. This diversity
factor will be taken into account when computations expected heat build-up in a duct bank.
Heat dissipation from a cable is also influenced by the position occupied by the cable in a
duck bank. Cables in duck bank corners dissipate heat more effectively than cables in interior
ducts, because of the greater soil dissipating area and the smaller heat contribution from
neighbouring cables. Calculations of the position effect indicate that, to equalize operating
temperatures, full load ratings of cables appropriate for isolated (one-way) ducts should be
decreased for multiple duct banks. For example, in an eight-way-duct bank the recommended
full-load percentage decrease for each corner duct is 95 percent and for each interior duct is
83 percent giving an average load percentage decrease of 89 percent. This rerating still allows
provision for loads in excess of the normal feeder capacity usually found on military
installations, as the summation of feeder capacities is generally from three to eight times the
overall capacity of a main electric supply station.
In communication systems, cables commonly consist of numerous pairs of paper-insulated
wire, encased in a lead sheath; the individual pairs of wire are intertwined to minimize induce
interference with other circuits in the same cable. To avoid electrical interference from
external circuits, cables used in radio broadcasting are often shielded with a winding of metal
braid, which is grounded. The development of the coaxial cable was an important advance in
the communications field. This type of cable consists of several copper tubes; each tube
contains a wire conductor that extends along its centre. The entire cable is sheathed in lead
and is generally filled with nitrogen under pressure to prevent corrosion. Because the coaxial
cable has a broad frequency range, it is valuable in transmission of carrier-current telephone.
For safety purpose, cables are laid underground; originally channel will be dug into the
ground along the route of a pre-planned network where a four-inch earthenware pipe would
be laid. Depending on the needs of the network, either a wide or thin cable would be pulled
through the pipe by rope; leaving some spare space for future use, spare rope was left in the
ducts for future cables, which today are frequently fibre optics. Fenect and other techniques
(sometimes the old ways are the best) blocked cable ducts can be a problem, especially if the
6

blockage is 60 feet away from an opening. The best way to shift the obstruction is to attack
the duct like blocked drain with a very long pole.
Means for a method of laying electrical cable underground and providing a high conductivity
environment therefore, consisting of a cable flow machine plus means to fill the evacuated
tube in which the cable is laid and buried 600mm below the surface. The diameter of the duct
depends on what size cable that will be installed. Cable faults such as short circuit faults,
open circuit faults, earth faults and high resistance joint and splices are traced by faulting
circuits indicators.
In the design of digital underground cable fault locator, the detector reads up the resistance of
the faulty underground cable which is proportional to its length at fault and feeds this
analogue signal to the digital integrated circuits which comprises the comparator, PIC
microcontroller and the digital display driver. The concept of digital data manipulation has
made a dramatic impact on our society. One has long grown accustomed to the idea of digital
computers, evolving steadily from mainframe and mini computers. More significant,
however, is a continuous trend towards digital solutions in all other areas of electronics.
Instrumentation was one of the first noncompeting domains where the potential benefits of
digital data manipulation over analogue processing were recognized. Early digital electronics
systems were based on magnetically controlled switches (or relays). They were mainly used
in the implementation of very simple logic networks. The age of digital electronic computing
only started in full with the introduction of the vacuum tube [2].
The first truly successful IC logic family, TTL (Transistor-Transistor Logic) was pioneered in
1962 [30]. Other logic families were devised with higher performance in mind. Examples of
these are the current switching circuits that produced the first sub nanosecond digital gates
and culminated in the ECL (Emitter-Coupled Logic) family [36]. TTL had the advantage,
however, offering a higher integration density and was the basis of the first integrated circuit
revolution. MOS digital integrated circuits started to take off in full in the early 1970s.
Remarkably, the first MOS logic gates introduced was of the CMOS variety [37], and this
trend continued till the late 1960s, the complexity of these devices for two more decades.
Interestingly enough, power consumption concerns are rapidly becoming dominant in CMOS
design as well and this time alleviates the problem.
Integration density and performance of integrated circuits have gone through an astounding
revolution in the last couple of decades. In the 1960s, Gordon Moore then with fair child
7

corporation and later cofounder of Intel predicted that the number of transistors that can be
integrated on a single die would grow exponentially with time. This prediction, later called
Moores law, has proven to be amazingly visionary [36].

CHAPTER TWO
BACKGROUND OF THE DESIGN
2.1 ANATOMY OF UNDERGROUND DISTRIBUTION CABLES
The core component of any underground system is the cable that supplies power from the
source to the load. The longevity and reliability along with desired safety and aesthetic issues
of underground cables have made underground distribution systems an unprecedented
substitute for overhead distribution lines. Underground cables have been designed for various
applications and voltage levels and extensive improvements in design process have been
achieved. Today pressurized cables are available up to 765 KV and even 1100 KV through
the gradual advancements in materials and manufacturing processes [7]. For primary
distribution systems, cables are typically designed with the following major components,
conductor, conductor shield, insulation, insulation shield, concentric neutral, and jacket.
These components are illustrated in figure 2.1.

The conductor can be either aluminium or copper in solid or stranded form. The selection of a
conductor type depends on ampacity, voltage, physical properties, flexibility, shape, and
economics [2], however it is recommended to use solid or stranded-filled conductors for
reliability [1]. Conductor shields and insulation shields synergistically provide a uniform
cylindrical surface next to the cable insulation to establish the most uniform possible
distributions of electrical stress. Research performed on cable failures has shown that
existence and development of voids or protrusions near the conductor shield-insulation
interface played an important role in the failure process [1]. This region experiences
9

extremely high electrical stresses and these irregularities help boost a non-uniform electrical
field, stressing the cable insulation and eventually causing it to fail. The extruded conductor
shield is a layer of semiconducting material, used to prevent excessive electrical stress in
voids between the conductors.
Insulation can be of a variety of materials such as EPR1, XLPE2, paper, and TRPE3
compounds, whose thickness is a function of cable voltage rating such that the higher the
voltage rating, the thicker the insulation. The extruded insulation shield also consists of a
semi-conductive layer similar to the conductor shield. The function of the insulation shield is
to confine the electric field within the cable, symmetrically distribute electrical stress, reduce
the hazard of shock, limit radio interference, and protect cable induced potential when
connected to overhead lines [8]. The shield may be a metallic tape or a non-metallic tape,
drain wires, or concentric neutral wires. The outer shield is normally connected to ground.
Concentric neutral conductors serve as the metallic component of the insulation shield and as
a conductor for the neutral return current [2]. Due to some mechanical and electrical
considerations, concentric neutral conductors are built from copper even if the central cable
conductor is aluminium.
The cable jacket is the outermost layer of the cable. The purpose of the jacket is to provide
mechanical, thermal, chemical, and environmental protection. It can be made of polyethylene,
polyvinyl chloride, nylon, as well as other plastics. Certain cables use a sheath or armour
instead of a jacket, which provide a much better protection to the cable than a jacket [2].
The first widely accepted concentric neutral cables were unjacketed. The bare concentric
neutral (BCN) cables were directly buried exposing the concentric neutral conductors to the
surrounding soil and consequently provided very effective ground. This design was desired
from a personnel safety point of view in case of a dig-in. Due to the presence of a low
resistance path through neutral conductors, adequate fault current could be conducted to
operate protective devices. The low resistance between the neutral and earth would also
reduce the touch potential at the dig-in site, significantly [1].
Despite the numerous advantages of BCN cables, major durability problems hindered their
wide instalment in underground systems. Soon engineers found that cable moisture and/or
concentric neutral corrosion played a major role in increasing the failure rate of unjacketed
underground cables. Due to the lack of a protective jacket, BNC cables were subject to
corrosion. Once corroded, the only neutral current path was through ground rods which were
10

a totally unsatisfactory condition from the safety and reliability stand point. Therefore,
jacketed concentric cables (JCN) achieved wide acceptance with a special attention to system
grounding.
It is worth mentioning that while U.S utilities installed BCN cables, European and Japanese
utilities installed only jacketed cables and as a result these utilities have experienced much
higher reliability than in the United States. Today, the U.S utilities mainly use jacketed cables
which are also use in Nigeria. [1].
2.2

AGEING MECHANISMS IN UNDERGROUND CABLES

Deterioration of insulation is an inevitable phenomenon in underground cables leading to


insulation failures. The aging is caused by single or synergistic action of several aging factors
that include thermal, electrical, mechanical and environmental [4][5]. Persisting aging factors
eventually cause the cable insulation to fail through a number of mechanisms summarized in
Table 2-1.
Activation of aging mechanisms either change the bulk properties of the insulating materials
referred to as intrinsic aging or cause degradation known as extrinsic aging. The degradation
is the result of the presence of contaminants, defects, voids, and protrusions in the insulation
material and their interaction with different aging mechanisms [5][6]. Under normal
conditions, electrical stresses are the predominant aging factors that may fail cables through
partial discharge and treeing mechanisms aggravated by the presence of water. In organic
extruded dielectric and in particular in cross-linked polyethylene (XLPE) cables, the majority
of cable failures are related to the treeing activity. Treeing refers to any kind of damage in the
insulation medium in which the deterioration path resembles the form of a tree.
This pre-breakdown phenomenon takes place in the form of electrical trees or water tress
under DC, AC and impulse voltages [7]. The primary cause of treeing in dry dielectrics is
partial discharges under high electric stresses and moisture at lower electric stresses. On the
other hand, not all degradation phenomena are associated with electrical stresses. Cable might
fail under abnormal conditions- through thermally aged insulation breakdown [8]. Moisture
increases dielectric losses so localized heat generation is produced and thermally degrades the
paper insulation. The following sections will briefly discuss electrical aging mechanisms i.e.
partial discharges, electrical trees, and water trees as the most commonly sought failure
phenomena.
11

2.3 UNDERGROUND CABLE FAULT LOCATION METHODS


To date, various research studies have been conducted to develop methods for fault
identification and location in underground systems [9]-[11] and some commercial detection
systems are also available for diagnostic testing [12]-[13]. The present methods, although
conceptually different, can be categorized in terms of the mutually exclusive active/passive
terms. The term active describes detection schemes that require an external electric source to
energize the system and generate the diagnosis signals. The opposite holds true for passive
methods in which there is no external injection to the cable system. Active methods are often
destructive which implies that they may further degrade cable insulation that has not already
failed. Thus, the portion of the system involved in the fault must be replaced before restoring
power. Offline methods consist of detection techniques that operate while a section of the
cable is de-energized. Passive methods are preferred over active diagnosis techniques because
it is not destructive.
Existing methods target two main categories of insulation categories. While some of the
methods are used to provide an overall assessment of the insulation, there are other methods
that perform an incremental condition assessment of the underground cable.
12

From a field application point of view, the existing methods can be categorized into the
following classes [10]: i) Thumping method ii) Methods based on sectionalisation. The
following sections discuss these methods with particular attention to the advantages and disadvantages of each method.
2.3.1 THUMPING METHOD
When a high voltage is supply to a faulted cable, the resulting higher-current arc makes a
noise loud enough for you to hear above ground. This method has its drawback as it requires
a current on the order of tens of thousand of amps at voltages as high as 25kV to make an
underground noise loud enough for you to hear above ground.
The heating from this high current often causes some degradation of the cable insulation.
Moderate testing may produce no noticeable effects, sustained or frequent testing can cause
the cable insulation to degrade to an unacceptable conduction.
2.3.2 SECTIONALIZING
Sectionalisation method is risk reducing cable reliability, because it depends on physically
cutting and splicing the cable into successively smaller sections which will narrow down the
search for a fault.
For example, on a 9m length, you would cut the cable into two 4.5m sections and measure
both ways with the digital underground cable fault locator
The defective section shows a lower IR than the good section. You would repeat this divide
and conquer procedure until reaching a short enough section of cable to allow repair of the
fault from voltage divider.
2.4 DEFINITION OF UNDERGROUND CABLE FAULTS
Underground cable incipient faults are the primary causes of catastrophic failures in the
distribution systems. These faults develop in the extruded cables from gradual deterioration
of the solid insulation due to the persisting stress factors. The initial incipient activity is
caused by the electrical stresses applied to the voids or protrusions near the conductor shield
insulation interference. This region undergoes an extremely high electrical stresses and such
irregularities serve as stress amplifiers when they produce a non-uniform electrical field.
Once initiated, the gradual damage propagates locally through the insulation in the form of a
13

tree and the incipient process develops. The aging in the insulation can progress due to the
contribution of electrical stresses in the form of partial discharges i.e. electrical trees or from
the presence of moisture in the form of water trees. Electrical trees are swift whereas the
propagation time of the water trees is expressed in years [10]. Water trees fail the cable when
they convert to electrical trees as a result of heat generation or under other stress factors.
Once this happens, the time to failure is normally short because the initiated electrical tree
propagates rapidly through the already weakened dielectric. The only window for detection is
during the conversion process [8].
Electrochemical trees are also likely to develop which are believed to be due to the presence
of chemicals in the region [1]. Regardless of the type of aging mechanism, the term incipient
fault encompasses the insulation treeing process from inception to completion before leading
to a catastrophic failure. From a macroscopic perspective, underground cable faults refer to
the abnormalities associated with any type of deterioration phenomena manifested in the
underground cable electrical signals.

14

2.4.1 EARTH FAULT: This is the most common of all. It occurs when the conductor is in
contact with the lead sheath and thereby transferring charges to the general mass of the earth
and the fault resistance may be low or high. Earth fault normally encountered in real life are:
-

Single-line to earth fault.

Conductors

Fig. 2.2: Single line earth fault


-

Double-line to the earth fault

Conductors

Fig. 2.3: Double-line to earth fault Earthing


-

Three-line to earth fault

Conductors

Fig 2.4: Three-line to earth fault


-

Single-line to earth through a resistance

15

Conductors

Resistor

Fig. 2.5: Single-line to earth through a resistance fault.

2.4.2 Short circuit fault: This fault is less common than the earth fault and is usually found
in combination with an earth. This fault occurs as a result of damaged insulation and can
result in overheating of conductors and often causes sparking or arcing at the point where it
occurs [5]. It can be any of the following:
-

Double line short circuit fault:


Conductors

Short circuiting
Fig. 2.6: Double line short circuit fault
-

Three phase circuit fault.


Conductors

Fig. 2.7: Three phase short circuit fault


2.4.3 Open circuit fault: The fault can be a break in a cable or a loose joint connection. A
clear broken cable is seldom met and only occurs when the cable has been unduly stretched
by accident.

16

2.5 The Block Diagram of the Circuit

Detector
Circuit

Fig.2.8; The block diagram of the digital underground cable fault locator

2.5.1 The detector circuit

Vs

R1
cable About 100R

R3

Vo

U2A

A2

1
2
4

R4

GND
8

U3A

A3

1
2
4

R5

GND
8

U4A

A4

1
2

R2

GND

R6

GND

Ref

GND

Fig.2.9; The detector circuit


The fundamental concept of the detector circuit is voltage divider principle. In its basic
application, a dc voltage is applied to the locator circuit. The value of R2 is precisely known.
An unknown resistance R1 is connected which is determined by the resistance of the faulty
cable and it varies with the length of location of fault. Since resistance is directly proportional

17

to the length of a cable ( ), R1 varies with the point at which the fault is detected on the
cable. By voltage divider rule,
0 =

2
2.1
1 + 2

Where, R1 is the resistance of the faulty conductor from the probe terminal to the location of
the fault.
From equation (2.1), R1 (resistance of the measured cable) determines the output signal
(voltage) that will be fed into the digital/analogue converter.
The resistance of a cable is proportional to its length, L and inversely proportional to its cross
sectional area, A.

. 2.2
Or
=

2.3

2.5.2 ANALOG TO DIGITAL CONVERTER

Figure2.10; 3-bit flash analogue to digital converter

18

The principle of operation is based on the comparator principle to determine whether or not
to turn on a particular bit of the binary number output.
The resistor net and comparators provide an input to the combinational logic circuit, so the
conversion time is just the propagation delay through the network - it is not limited by the
clock rate or some convergence sequence. It is the fastest type of ADC available, but requires
a comparator for each value of output (63 for 6-bit, 255 for 8-bit, etc.) Such ADCs are
available in IC form up to 8-bit and 10-bit flash ADCs (1023 comparators) are planned.
Also called the parallel A/D converter, this circuit is the simplest to understand. It is formed
of a series of comparators, each one comparing the input signal to a unique reference voltage.
The comparator outputs connect to the inputs of a PIC 16F84A microcontroller.
As the analogue input voltage exceed the reference voltage at each comparator, the

V(volt)

V(volt)

comparator outputs will sequentially saturate to a high state [36][37].

Analog input

Time

-1
Time

Fig. 2.11: Conversion of analogue signal to digital signal


2. 5.2.1

LM393 COMPARATOR

The LM393 series are dual independent precision voltage comparators capable of single or
split supply operation. These devices are designed to permit a common mode
rangetoground level with single supply operation. Input offset voltage specifications as
low as 2.0 mV make this device an excellent selection for many applications in consumer,
automotive, and industrial electronics [22].

A dedicated voltage comparator chip such as LM393 is designed to interface with a digital
logic interface (to a TTL or a CMOS). The output is a binary state often used to interface real
19

world signals to digital circuitry. If there is a fixed voltage source from, for example, a DC
adjustable device in the signal path, a comparator is just the equivalent of a cascade of
amplifiers. When the voltages are nearly equal, the output voltage will not fall into one of the
logic levels, thus analogue signals will enter the digital domain with unpredictable results. To
make this range as small as possible, the amplifier cascade is high gain. The circuit consists
of mainly bipolar transistors except perhaps in the beginning stage which will likely be field
effect transistors. For very high frequencies, the input impedance of the stages is low. This
reduces the saturation of the slow, large P-N junction bipolar transistors that would otherwise
lead to long recovery times. Fast small Schottky diodes, like those found in binary logic
designs, improve the performance significantly though the performance still lags that of
circuits with amplifiers using analogue signals. Slew rate has no meaning for these devices.
For applications in flash ADCs the distributed signal across 8 ports matches the voltage and
current gain after each amplifier, and resistors then behave as level-shifters[20][22].
The LM393 accomplishes this with an open collector output. When the inverting input is at a
higher voltage than the non inverting input, the output of the comparator connects to the
negative power supply [20].When the non inverting input is higher than the inverting input,
the output is 'floating' (has a very high impedance to ground) [36][37].
With a pull-up resistor and a 0 to +5V power supply, the output takes on the voltages 0 or +5
and can interface with TTL logic:
else 0

Fig. 2.12: Low Power Low offset Voltage Dual Comparator

.
20

2.5.3 PIC16F84A MICROCONTROLLER

A microcontroller is a microprocessor which has I/O circuitry and peripherals built-in,


allowing it to interface more or less directly with real-world devices such as lights, switches,
sensors and motors. They simplify the design of logic and control systems, allowing complex
(or simple!) behaviours to be designed into a piece of electronic or electromechanical
equipment. They represent an approach which draws on both electronic design and
programming skills; an intersection of what was once two disciplines, and is now called
embedded design.
Modern microcontrollers make it very easy to get started. They are very forgiving and often
need little external circuitry. Among the most accessible are the PIC microcontrollers.
The range of PICs available is very broad from tiny 6-pin 8-bit devices with just 16 bytes
of data memory which can perform only basic digital I/O, to 100-pin 32-bit devices with 512
kilobytes of memory and many integrated peripherals for communications, data acquisition
and control [24].
A diagram showing the pin-outs of the PIC 16F84A is given in figure 2.11.

Fig. 2.13; The pin diagram of PIC16F48A microcontroller


RA0 to RA4
RA is a bidirectional port. That is, it can be configured as an input or an output. The number

21

following RA is the bit number (0 to 4). So, we have one 5-bit directional port where each
bit can be configured as Input or Output.
RB0 to RB7
RB is a second bidirectional port. It behaves in exactly the same way as RA, except there are
8 - bits involved.
VSS and VDD.
These are the power supply pins. VDD is the positive supply, and VSS is the negative
Supply or 0V. The maximum supply voltage that you can use is 6V, and the minimum is 2V
OSC1/CLK IN and OSC2/CLKOUT: these pins are where we connect an external clock, so
that the microcontroller has some kind of timing.
MCLR
This pin is used to erase the memory locations inside the PIC (i.e. when we want to reprogram it).
In normal use it is connected to the positive supply rail.
INT.
This is an input pin which can be monitored. If the pin goes high, we can cause the program
to restart, stop or execute any other single function we desire.
T0CK1.
This is another clock input, which operates an internal timer. It operates in isolation to the
main clock.
2.5.3.1 PINS ON PIC16F84A MICROCONTROLLER HAVE THE FOLLOWING
MEANING:
Pin no.1

RA2

Second pin on port A. Has no additional function.

Pin no.2

RA3

Third pin on port A. Has no additional function.

Pin no.3

RA4

Fourth pin on port A. TOCK1 which functions as a timer is also found on

this pin.
Pin no.4

MCLR Reset input and Vpp programming voltage of a microcontroller.

Pin no.5

Vss

Ground of power supply.

Pin no.6

RB0

Zero pin on port B. Interrupt input is an additional function.

Pin no.7

RB1

First pin on port B. No additional function.

Pin no.8

RB2

Second pin on port B. No additional function.

Pin no.9

RB3

Third pin on port B. No additional function.

Pin no.10 RB4

Fourth pin on port B. No additional function.


22

Pin no.11 RB5

Fifth pin on port B. No additional function.

Pin no.12 RB6

Sixth pin on port B. 'Clock' line in program mode.

Pin no.13 RB7

Seventh pin on port B. 'Data' line in program mode.

Pin no.14 Vdd

Positive power supply pole.

Pin no.15 OSC2

Pin assigned for connecting with an oscillator.

Pin no.16 OSC1

Pin assigned for connecting with an oscillator.

Pin no.17 RA2

Second pin on port A. No additional function.

Pin no.18 RA1

First pin on port A. No additional function.

The PIC16F84A belongs to the mid-range family of the PICmicro microcontroller devices
[28]. A block diagram of the device is shown in Fig.2.11

Fig.2.14; The block diagram of PIC16F84A microcontroller


23

2.5.3.2 MEMORY ORGANIZATION

There are two memory blocks in the PIC16F84A.These are the program memory and the data
memory. Each block has its own bus, so that access to each block can occur during the same
oscillator cycle.sss
2.5.3.3 MICROCONTROLLER BOARD
The simplest way of making microcontroller board is by connecting power supply, reset
circuit and oscillator circuit to PIC 16F84A. Such a configuration can be shown as:

Fig.2.15; PIC16F84A microcontroller board arrangement

24

2.5.3.4 PIC 16F84A LEAST CIRCUIT


Least circuit connected to PIC 16F84A are:

OSCILLATOR CIRCUIT

For simplicity, an RC oscillator can be used. However, if timer needs accurate time then use
crystal oscillator. Connection for RC oscillator is at pin 15 while crystal oscillator use both
pin 15 and 16. In this case only the input of the microcontrollers clock oscillator is used,
which means that the clock signal with the Fosc/4 frequency will appear on the OSC2 pin.
This frequency is the same as the operating frequency of the microcontroller, i.e. represents
the speed of instruction execution [26][27].
In applications where great time precision is not necessary, resonant frequency of RC
oscillator depends on supply voltage rate, resistance R, capacity C and working temperature.
It should be mentioned here that resonant frequency is also influenced by normal variations in
process parameters, by tolerance of external R and C components, etc.

Fig.2.16; PIC16F84A RC oscillator connection


Fig.2.13 shows how RC oscillator is connected with PIC16F84. With value of resistor R
being below 2.2k, oscillator can become unstable, or it can even stop the oscillation. With
very high value of R (ex.1M) oscillator becomes very sensitive to noise and humidity. It is
recommended that value of resistor R should be between 3 and 100k. Even though oscillator
will work without an external capacitor (C=0pF), capacitor above 20pF should still be used
for noise and stability.
No matter which oscillator is being used, in order to get a clock that microcontroller works
upon; a clock of the oscillator must be divided by 4. Oscillator clock divided by 4 can also be
obtained on OSC2/CLKOUT pin, and can be used for testing or synchronizing other logic
circuits.
25

RESET CIRCUIT

Reset circuit is important for after on power circuit, stabilize voltage source at fix length of
time and stabilize voltage for PIC 16F84A [26][25].
Reset is used for putting the microcontroller into a 'known' condition. That practically means
that microcontroller can behave rather inaccurately under certain undesirable conditions. In
order to continue its proper functioning it has to be reset, meaning all registers would be
placed in a starting position. Reset is not only used when microcontroller does not behave the
way we want it to, but can also be used when trying out a device as an interrupt in program
execution, or to get a microcontroller ready when loading a program.
In order to prevent from bringing a logical zero to MCLR pin accidentally (line above it
means that reset is activated by a logical zero), MCLR has to be connected via resistor to the
positive supply pole. Resistor should be between 5 and 10K. This kind of resistor, whose
function is to keep a certain line on a logical one as a preventive, is called a pull up.

Fig.2.17; PIC16F84A reset circuit.


2.5.3.5 MICROCONTROLLER PIC16F84A KNOWS SEVERAL SOURCES OF
RESETS:
a) Reset during power on, POR (Power-On Reset)
b) Reset during regular work by bringing logical zero to MCLR microcontroller's pin.
c) Reset during SLEEP regime
d) Reset at watchdog timer (WDT) overflow
e) Reset during at WDT overflow during SLEEP work regime.
26

The most important reset sources are a) and b). The first one occurs each time a power supply
is brought to the microcontroller and serves to bring all registers to a starting position initial
state. The second one is a product of purposeful bringing in of a logical zero to MCLR pin
during normal operation of the microcontroller. This second one is often used in program
development [17].
During a reset, RAM memory locations are not being reset. They are unknown during a
power up and are not changed at any reset. Unlike these, SFR registers are reset to a starting
position initial state. One of the most important effects of a reset is setting a program counter
(PC) to zero (0000h), which enables the program to start executing from the first written
instruction.
While the 12805/12509 microcontroller family has an internal 4MHz oscillator, other PICs
require external circuitry before they will spring to life. In situation where timing is noncrucial, the simple resistor-capacitor oscillator suffices. In fact these two components are
probably the simplest way of getting a 16F84A started.
2.5.3.6 THE REGISTERS
A register is a place inside the PIC that can be written to, read from or both. Table 2.2 below
shows the register file map inside the PIC16F84A [14].

27

Table 2.2; Register file map of PIC16F84A


Address

Bank 0

Bank 1

Address

00h

INDF

INDF

80h

01h

TMR0

OPTION

81h

02h

PCL

PCL

82h

03h

STATUS

STATUS

83h

04h

FSR

FSR

84h

05h

PORTA

TRISA

85h

06h

PORTB

TRISB

86h

07h

87h

08h

EEDATA

EECON1

88h

09h

EEADR

EECON2

89h

0Ah

PCLATH

PCLATH

8Ah

0Bh

INTCON

INTCON

8Bh

0Ch

GPR

8Ch

registers
68 bytes

Notice that some SFRs, such as the STATUS register and INTCON register, appear in both
banks and can be accessed from either Bank 0 or Bank 1.
2.5.3.7 PROGRAMMING THE MICROCONTROLLER.
The registers are split into two; Bank0 and Bank1. Bank1 is used to control the actual
operation of the PIC, for example to tell the PIC which bits of PORTA are inputs and which
are output. Bank0 is used to manipulate data. An example is as follows: Let us say we want to
make one bit on PORTA high. First we go to Bank1 to set the particular bit, or pin, on
PORTA as output. We then come back to Bank0 and send a logic high (1) to that pin.
The most common registers in Bank1 that are going to be used are the STATUS, TRISA,
TRISB. The first allows us to select which pins on PORTA are outputs and which are inputs,

28

TRISB allows us to select which pins on PORTB are output and which are input. The
STATUS (SELECT) register in Bank0 allows us to switch to Bank1.
2.5.3.7

STATUS REGISTER.
Table 2.3; The status register of PIC16F84A

R=Readable bit
W=Writable bit
To change from Bank 0 to Bank 1, we tell STATUS register on address03h of the register.
We do this by setting bit 5 of the STATUS register to 1. To switch to Bank 0, we set bit 5
of the STATUS register to 0.
This is one of the most important registers within a PIC chip in relation to programming. The
bits 0 to bit 2 are the status results from the ALU (Arithmetic Logic Unit), bits 3.4 are reset
status, and the remaining 3 relate to the bank selection [17].

The C flag, bit 0, is set to 1 whenever the results of an operation results in a carry from the
MSB.

The DC flag, bit 1 is set to 1 if the Z flag, bit 2, is set in the result of arithmetic or logical
operation results in all bits being 0 and vice versa for 1, using BTFSS and BTFSC
respectively for a it test.

2.5.3.8

TRISA AND TRISB.

These are located at addresses 85h and 86h respectively. To program a pin to be an output an
input, we simply send a 0 or a 1 to the relevant bit in the register. Now, this can either be
done in binary, or hex.
So, on Port A we have 5 pins, and hence 5 bits. If I wanted to set one of the pins to input, I
send a 1 to the relevant bit. If I wanted to set one of the pins to an output, I set the relevant

29

bit to 0. The bits are arrange in exactly the same way as the pins, in other words bit 0 is
RA0, bit 1 is RA1, bit 2 is RA2 and so on. Lets take an example. If I wanted to set RA0,
RA3 and RA4 as outputs, and RA1 and RA2 as inputs, I send this: 00110 (06h). Note that
bit zero is on the right, as shown in table 2.4 below [17][26].
Table 2.4; graphical illustration of port A
Port A Pin

RA4

RA3

RA2

RA1

RA0

Bit Number

Binary

The same goes for TRISB


2.5.3.9 PORTA AND PORTB.
To send one of our output pins high, we simply send a 1 to the corresponding bit in our
PORTA or PORTB register. The same format follows as for the TRISA and TRISB
registers. To read if a pin is high or low on our port pins, we can perform a check to see if
the particular corresponding bit is set to high (1) or set to low (0).
Before we go further, explanation will be given on two more register; W and f registers.
W-Register.
The W register is a general register in which you can put any value that you wish. Once you
have assigned a value to W, you can add it to another value, or move it. If you assign another
value to W, its contents are overwritten. On the other hand, f is any memory location
(PORTA or B).
Several languages are used when it comes to programming a microcontroller such programs
are the C-language, BASIC and Assembly language e.t.c. But for the sake of the project, the
Assembly language will be used to program the microcontroller.
Recall earlier as stated that Bank1 of the PIC register is used for operation while Bank0 is
used for data manipulation. Below are introduction of some couple of instructions along the
way. PORTA will be set up as input.

30

First, we need to switch from Bank 0 to Bank 1. We do this by setting the STATUS register,
which is at address 03h, bit 5 to 1.
BSF 03h, 5
The BSF Means Bit Set F. The letter F means that we are going to use a memory location, or
register. We are using two numbers after this instruction 03h, which is the STATUS
register address, and the number 5 which corresponds to the bit number. So, what we are
saying is Set bit 5 in address 03h to 1.
We are now in Bank 1.
MOVLW b11111
We are putting the binary value 11111 (the letter b means the number is in binary) into our
general purpose register W. We could of course have done this in hex, in which case our
instruction would be:
MOVLW 1Fh
Or
MOVLW 0X1F
Either works. The MOVLW means Move Literal Value into W, which in English means
put the value that follows directly into the W register.
Now we need to put this value onto our TRISA register to set up the port:
MOVWF 85h
This instruction means Move the Contents of W into the Register Address That Follows, in
this case the address points to TRISA.
Our TRISA register now has the value 11111 or shown graphically:

31

Table.2.5; Graphical illustration of TRISA


Port A Pin

RA4

RA3

RA2

RA1

RA0

Binary

Input/output

Now we have set up our Port A pins, we need to come back to Bank 0 to manipulate any
data.
BCF 03h, 5
This instruction does the opposite of BSF. It means Bit Clear F. The two numbers that
follow are the address of the register, in this case the STATUS register, and the bit number, in
this case bit 5. So what we have done now is set bit 5 on our STAUS register to 0
We are now back in Bank 0.
Here is the code in a single block:
BSF

03h,5

MOVLW

1Fh

MOVWF

85h

BCF
2.5.3.10

03h, 5

Go

;
;

to

Bank

Put

11111

into

Move

00110

onto

TRISA

; Come back to Bank 0

PROGRAM STRUCTURE FOR PIC 16F84A

The Assembly language programming has four fields which are the Label field (e.g.
START), Operand field, operation-code(op-code) and Comment fields [28].
Labels
Labels provide the easiest way of controlling the program flow. They are used to mark
particular lines in the program where jump instruction and appropriate subroutine are to be
executed.

32

Comments: Explain the purpose of the program, type of chip, clock type and
frequency, Date and authors name, etcBe descriptive about program but
not too lengthy.
;---------------------------------------------------*
;

Description

*
*

;---------------------------------------------------*
Header: Header contain instruction information of the type of chip and the
base of number system
;---------------------------------------------------*
List

p=16f84

Radix

hex

;---------------------------------------------------*
Initialization: Here, you define ports, variables
;--------------------------------------------------*
Porta equ

0x05

Portb equ

0x06

;--------------------------------------------------*
The above code tell the chip that porta is define at Hex address 05 and portb at 06
Program: You insert your program codes here
;----------------------------------------------------------------*

33

Start movlw 0xff; load w (working register) with 0xff


Movwf porta; teach portb to be an input
Movlw 0x00; load w (working register) with 0x00
Movwf portb; teach portb to be an output
;----------------------------------------------------------------*
Even though most books do this in the program section. I prefer initialize the
port in the Initialization section.
End:

The end statement tell the assembler that this is the end of the program

;----------------------------------------------------------------*
End
;----------------------------------------------------------------*

The symbol ; will tell the assembler to ignore everything after it on that
particular line.
2.5.3.11

PROGRAMMING CONCEPTS

The Instruction Set


The complete instruction for the PIC16F84A microcontroller comprises 35
instructions. For project purpose, the used instruction sets and the
interpretation of their subsets are given in the following table:

34

Table 2.6; the used instruction set for the Project.


Mnemonic

Operands Description

Bcf

f, b

Clear bit b of file f

Bsf

f, b

Set bit b of file f

Btfss

f, b

Test bit b of file f, skip the next instruction if the bit is set.
This is a conditional branch instruction.

Clrf

Clear file f

Goto

Unconditional branch to label k

Movf

f, d

Move file f (to itself if d = 1, or to working register if d = 0)

Movlw

Move the literal k to the working register

Movwf

Move working register to file f

Xorwf

f, d

Exclusive OR logic function between the w register and the


file register f. If d is 0 the result is stored back to the file
register. The status affected from this is the zero. The logic
operation performed is: Destination(d)=W.XOR.f
Where 0<=f<=127 i.e. 7fh or 1111111

Table 2.7; Op-Code Field Description


Field

Description

Register file address (0x00 to 0x7F)

Working register (accumulator)

Bit address within an 8-bit file register

Literal field, constant data or label

Dont care location (0 or 1). The assembler


will generate code with x=0. It is the
recommended form of use for compatibility
with all microchip software tools.

Destination select; d=0: store result in W,


d=1: store result in file register f.
Default is d=1

35

2.5.3.12

PIC INSTRUCTION SET BTFSS

Bit Test f Register Skip if Set. If the result of the test is 0 then the next instruction is carried
out, else it is replaced with NOP.
Let us assume we have an operation that would normally result in the carry bit being set in
the status register. We could use the BTFSS instruction to test the Status Register
Loop

BTFSS 03, 0

; testing bit0 of SR

Goto Loop

; Come out of loop if Carry is not Set

The alternative is the BTFSC which skips if the bit is clear.


Also, it is used to compare data in a program. For example, let say you want to check if your
input data from porta is arrange in binary base is equal to hex base 5. You would first read
move data from porta to Working Register. Then subtract this from hex number 5. Then we
will check the zero flag in the Status Register to see if it is set or not. If it is set, this mean
that result from the calculation is zero. Therefore out number is hex 5 [28][26].

Movf

porta, w

; load porta to Working register and then

Sublw

0x05

; subtract 5 from it. Result in W

Btfss

Status, 2

; check if zero flag is set

Goto

code here

; If not

Goto

code here

; if Yes...

Here is a useful table of to check for flag in the Status Register.


For this code:
Sublw N

; subtract N from W

36

Table 2.8; Flag check in the Status Register


Test For

Flag Tested

W=N

Z Set

W /= N

Z Clear

(not Equal)
W <= N

C Set

W>N

C Clear

2.5.3.13 THE XOR-TRICK


The XOR instruction can perform amazing results in a single instruction but it must be fully
understood before using it.
Most of the 35 instructions for the micros are easy to understand and it's easy to see a result,
but the XOR function must be checked by "by-hand" to prove what is happening. If you don't
do this, it will be impossible to find a problem, if a problem arises in a program [19].
Table 2.9; XOR Truth Table
Input A

Input B

A^B

The

XOR

function

is

used

to

detect

MATCH

between

two

files.

To find out if two numbers are the same, they are XOR-ed together. Since each binary digit
(bit) will be the same, the result will be (0000 0000). For example, if we have two files:
b00010011'

and b'0001 0011' bit 0 in each file is '1' bit1 in each file is "1" bit 2 in each

file is "0" etc. In fact all bits are the same. When all bits are the same, this will SET the zero
flag in the Status (03) file and by testing bit 2 (the z flag) you can include an instruction in

37

your

program

to

skip

the

next

instruction

when

the

bit

is

set.

Here are the instructions for matching two files:


match movlw 0Ch

; load 0Chex into w

xorwf motor

; see if "motor" file holds 0Chex

btfss status,2

; test the z flag to see if it is SET

goto

not same

;z flag is not set

goto

same

;z flag set = files are both 0Chex

2.5.3.14 POWER REQUIREMENTS


The PIC16F84A requires a 5-volt supply; actually, any voltage from 4.0 to 6.0 volts will do
fine, so you can run it from three 1.5-volt cells. The PIC consumes only 1 mA even less, at
low clock speeds but the power supply must also provide the current flowing through
LEDs or other high-current devices that the PIC may be driving [25][28].

2.5.4 SEVEN SEGMENT DISPLAY UNIT


There are many types of displays and some of them are composed of several dozen built-in
diodes which can display different symbols. Nevertheless, the most commonly used display is
a 7-segment display. It is composed of 8 LEDs. Seven segments of a digit are arranged as a
rectangle to display symbols, whereas the additional segment is used to display a decimal
point [21].
In order to simplify connection, anodes or cathodes of all diodes are connected to one single
pin so that there are common anode displays and common cathode displays, respectively.
Segments are marked with letters from a to g, plus dp, as shown in figure 2.15. When
connecting an LED display, each diode is treated separately, which means that each one must
have its own current limiting resistor

38

Fig.2.18; LED display anatomy.


Here are a few things that you should pay attention to when using LED displays:

As mentioned above, depending on whether anodes or cathodes are connected to the


common pin, there are common anode displays and common cathode displays. There
is no difference between them at all in their appearance so you are advised to double
check which one is to be used prior to installing it.

Maximum current that each microcontroller pin can receive or give is limited.
Therefore, if several displays are connected to the microcontroller then so called Low
current LEDs limited to only 2mA should be used.

Display segments are usually marked with letters from a to g, but there is no fast rule
indicating display pins they are connected to. For this reason, it is very important to
check connection prior to start writing a program or designing a device.
A multi digit number must be split into units, tens etc. in a specialized subroutine.
Then each of these digits must be stored in a specific byte. Digits get recognizable
appearance for humans by performing a simple procedure called masking.
In other words, a binary number is replaced with a different combination of bits. For
example, digit 8 (0000 1000) is replaced with the binary number 0111 1111 in order
to activate all LEDs displaying this digit. The only diode remaining inactive here is
reserved for the decimal point [21][27].

2.6

LM7805 VOLTAGE REGULATOR.

This is the most common voltage regulator that is still used in embedded system designs.
LM7805 voltage regulator is a linear regulator that reduces input DC voltage to 5v which is
used to power the microcontroller and the entire circuit [29].

39

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
They can come in several types of packages. For output current up to 1A there may be two
types of packages: TO-220 (vertical) and D-PAK (horizontal).

Fig.2.19; pin-out of Lm7805 voltage regulator


With proper heat sink these LM7805 types can handle even more than 1A current. They also
have Thermal overload protection, Short circuit protection.

40

CHAPTER THREE
DESIGN AND ANALYSIS
The digital underground cable fault locator is made up of four building blocks;

Detector circuit

Analogue-to-Digital converter/input.

Microcontroller

Digital display unit/output.

Detector
Circuit

Fig.3.1; Block diagram of digital underground cable fault locator (DUCLF)


The method of testing employed is called sectionalisation method. This type of test is best
known and cheapest of all the various methods and is used principally to locate underground
cable faults in sheathed-cable.

41

3.1

DETECTOR CIRCIUT.

U6
LM7805CT

T1

LINE
VREG
VOLTAGE
COMMON

V1
9V

R1
cable About 100R

GND
Vo

T2

R2
100

Ref

GND

Fig.3.2; Detector circuit

42

GND

The locator circuit which operates on voltage divider rule is made up of two probe terminals
T1 and T2 as shown in figure 3.2 and is fed by an input Vs.
By voltage divider rule VO =

2
2 +1

Where, Rx is the resistance of the faulty conductor from the probe terminal to the location of
the fault. The design is base on an underground cable with cross-sectional area of 35Sq.mm
having the resistivity of 3.5 10-4m.The device is also design to locate fault using
sectionalisation technique every 10m length.
The resistance of a cable is proportional to its length, L and inversely proportional to its
cross-sectional area.
i.e. =

3.5 104 10
=
= 100
35 106 2
3.2

ANALOGUE TO DIGITAL CONVERTER.

This comprises the switch circuit of the comparator and the ACTIVE LOW resistor
arrangement which induces a logic state of HIGH (1) and LOW (0) as shown in figure 3.3.
The principle of operation is based on the comparator operation to determine whether or not
to turn ON or remain OFF. At the point where the reference voltage (V1, V2, V3) exceeds or
equal the analogue input, the comparator output will not be switched ON. Similarly, at the
point where the analogue input, Vo

exceeds the reference voltage (V1, V2, V3) the

comparators output will be turned ON. In other words, the comparator is acting like a switch
[24].

43

VCC
5V

R1
cable About 100R

R3
R7 R9
1k 1k

1k
8

R8
1k

U2A

A2

1
2

R4
1k

LMV393M
GND

U3A

A3

1
2

R5
1k

LMV393M
GND

U4A

A4

1
2

R2
100

R6
1k

GND

GND

Ref

LMV393M

GND

Fig.3.3; Analogue to digital converter of the fault locator


By voltage divider technique
1 =

5(3)
4

= 3.75

2 =

5 (2)
= 2.50
4

3 =

5 (1)
= 1.25
4
44

When Rx is short circuited


= 0
= 5
Vo > V1; A2= Switch ON
Vo >V2; A3= Switch ON
Vo> V3; A4= Switch ON
When Rx is open circuited
=
= 0
Vo< V1; A2= Switch OFF
Vo< V2; A3= Switch OFF
Vo< V3; A4= Switch OFF

When Rx is normal or correct


= 100
= 2.50
Vo< V1; A2= Switch OFF
Vo=V2; A3= Switch OFF
Vo>V3; A4= Switch ON.
With respect to explanations given so far, to get the project started, it will have the following
circuitry.

45

VCC
5V
R3
10k

R1
10k

R2
10k
U1
17
18
1
2
3

RA0
RA1
RA2
RA3
RA4T0CKI

4
16

MCLR
OSC1CLKIN

VSS

VDD
RB0INT
RB1
RB2
RB3
RB4
RB5
RB6
RB7
OSC2CLKOUT

14
6
7
8
9
10
11
12
13
15

PIC16F84A
S1
C2
30pF

Key = Space
GND

C1
1F
GND

GND

Fig.3.4; The primary configuration of the project microcontroller


Connections on pin 15 and 16 form the RC oscillator for the circuit and pin4 connections are
for the microcontroller reset. The VDD (pin14) serves as the supply source for the
microcontroller while VSS (pin5) serves as the ground of the microcontroller.

3.3

INPUTS
Inputs to a PIC have the same 5V logic requirements, and just as outputs can be 'sink' or

'source', so the inputs can be active 'high' or active 'low'. Basically this is just a variation on
the same theme - but, depending on the actual input device, you may be forced to use a
particular method [17].

46

Active LOW

Active HIGH

Fig.3.5; Active Low/High arrangements


These are the two basic input alternatives, the 'Active LOW' example is the most common,
and simply because the Microchip PIC's usually have selectable 'weak pull-ups' on some
ports. The resistor R1 'pulls' the PIC input high (logic '1') - when you press the switch it pulls
the voltage down to zero, changing the input to logic '0'.
The 'Active HIGH' example works in the opposite way, R2 is a 'pull down' resistor, holding
the PIC input at logic 0; pressing the switch connects the PIC input to the 5V rail, forcing it
to logic '1'.
Figure 3.5 shows switches (S1 and S2), but these could just as easily be a switching
transistor, or the output from an IC, or simply an output pin from another PIC.
On the 16F84, only PORTB has internal pull-up resistors. The above circuit would have to
be used when switches are to be used as inputs on PORTA. For the sake of the project
design, the input arrangement takes the following circuitry.

47

U6

VCC
LM7805CT

5v
LINE

R10
1k

cable About 100R


8

R7
1k

VOLTAGE

R8 R12
1k 1k R13
1k

VREG

V1
9V

COMMON

U2A

GND

GND

3
1
2

U1

4 LMV393M

17
18
1
2
3

GND
8

U4A

RA0
RA1
RA2
RA3
RA4T0CKI

4 MCLR
16 OSC1CLKIN

1
2

VSS

VDD
RB0INT
RB1
RB2
RB3
RB4
RB5
RB6
RB7
OSC2CLKOUT

14
6
7
8
9
10
11
12
13
15

PIC16F84A
4 LMV393M

GND
8

U3A

3
1
2
4

LMV393M
GND

Fig.3.6; Input Circuitry to Port A of PIC16F48A


The LM393 Comparator act as a switch for this ACTIVE LOW circuitry for A 2,A3 and
A4 INPUTS of PORTA while input ports AO and A1 will be at logic 1 because the resistors
pulls the PIC input high [18].
3.4

Output

The project design is to locate underground cable fault and we have adopted
sectionalization method of test for the probe terminals I the range of every 10m. Open and
Short circuit fault will likely be encountered. In respect to this, the design is to make the
output to indicate Open, Short and Correct or Complete circuit condition by a sign of O,
S, and C respectively.

48

The seven segment display will be used to show result for our output interface with the
microcontroller PORTB.
3.4.1 SEVEN SEGMENT DISPLAY
This is used to show the result or display results on port B for indicating the state of faults
underground.
If the microcontroller port is connected to a display so as that bit 0 activates segment a, bit 1
activates segment b, bit 2 segment c etc., then table below shows appropriate binary mask
for each digit

Fig.3.7; microcontroller port B connections to the seven segment display


The resistors in between the seven segment display and the microcontroller are of the value
of 100 each and help in limiting the amount of current flowing to the LED [21].

49

Table 3.1 On/Off status in the common cathode abcdefg seven segment display for 0-9
Digits
to
display

Display Segments

Dp

In addition to digits (0-9), there are some letters of alphabet - a, c, e, j, f, u, h, l, b, c, d, o, r, tthat can also be displayed by masking.
In case that common anode displays are used, all ones contained in the table above should be
replaced with zeros and vice versa.
It is possible to represent hexadecimal unambiguously by using a mixture of letter cases
(AbCdEF is typical) and using a representation of 6 that has the top segment illuminated.
This is frequently used to output hexadecimal codes for troubleshooting purposes. Short
messages giving status information (e.g. "no disc" on a CD player) are also commonly
represented on 7-segment displays. In the case of such messages it is not necessary for every
letter to be represented, merely for a word as a whole to be readable.
A single byte can encode the full state of a 7-segment-display. The most popular bit
encodings are gfedcba and abcdefg - both usually assume 0 is off and 1 is on.

50

Table 3.2; The hexadecimal encodings for displaying the digits 0 to F


Digit Gfedcba Abcdefg

0x3F

0x7E

On On On on

On On Off

0x06

0x30

off

0x5B

0x6D

On On Off on

On Off On

0x4F

0x79

On On On on

Off Off On

0x66

0x33

off

0x6D

0x5B

On off

On on

Off On On

0x7D

0x5F

On off

On on

On On On

0x07

0x70

On On On off Off Off Off

0x7F

0x7F

On On On on

On On On

0x6F

0x7B

On On On on

Off On On

0x77

0x77

On On On off On On On

0x7C

0x1F

off

off

On on

On On On

0x39

0x4E

On off

Off on

On On Off

0x5E

0x3D

off

On On on

On Off On

0x79

0x4F

On off

Off on

0x71

0x47

On off

Off off On On On

On On off Off Off Off

On On off Off On On

On On On

In the case of the project, code 0x7Eh, 0x5Bh and 0x4E will be used to output on the seven
segment display for O symbolizing Open Circuit, 5 symbolizing Short Circuit and C
symbolizing Correct or Complete Cable respectively since seven segment display with
abcdefg arrangement or format will be used.

51

The circuit diagram for the digital underground cable fault locator is shown in Fig.3.8

U6
LM7805CT
LINE
VREG
VOLTAGE

V1
9V

COMMON

GND
R1
cable About 100R

R7 R9
1k 1k

R2
1k
8

R8
1k

R13
1k

GND

R14 R11 R12 R10


1k 10k
10k
10k

U2A
CK

3
1

U5

R3
1k

LMV393M
GND

U3A

RA0
RA1
RA2
RA3
RA4T0CKI

4 MCLR
16 OSC1CLKIN

1
2

R4
1k

U1
17
18
1
2
3

5
4

LMV393M
GND

U4A

VSS

VDD
RB0INT
RB1
RB2
RB3
RB4
RB5
RB6
RB7
OSC2CLKOUT

PIC16F84A
S1
Key = Space

AB CDE FGH

14
6
7
8
9
10
11
12
13
15

R15
100

R16R17R18R19R20 R21R22
100
100
100
100
100100
100

2
4

R6
100

R5
1k

GND

GND

Ref

C1
1F

LMV393M
C2
30pF

GND

GND

GNDGND

GND

Fig.3.8; Schematic diagram of digital underground cable fault locator (DUCFL)

52

3.5

PROGRAM FOR THE UNDERGROUND CABLE FAULT LOCATOR

The program is written in Assembly language which avails the opportunity to use the LABEL
field to mark conditions for our cable test indicating lines in the program where jump
instructions and appropriate subroutines are to be executed and the COMMENT field which
enable us to give proper description to the function of each common line.
From the ACTIVE LOW arrangement of PORTA of the microcontroller, it is expected to
have a bit pattern or a logic state of b00011 or 0x03h for short circuit condition, b01111
or 0x0Fh for correct cable and b11111 or 0x1Fh for an Open Circuit Condition.
Below is the program;
The addresses for the SFR (Special Function Register ) are automatically defined once the
processor files are loaded using INC directive.
STATUS

equ

03h

; Address of the STATUS register

TRISA

equ

85h

; Address of the tristate register for port A

PORTA

equ

05h

; Address of Port A

TRISB

equ

086h

; Address of tristate register for Port B

PORTB

equ

06h

; Address of Port B

ORG 0x00
Start

BSF

STATUS, 5

; Goto Bank1

MOVLW

0x1F

; Put 11111 into W

MOVWF

TRISA

; Move 11111 onto TRISA (operate as input)

MOVLW

0x00

; Move 00000000 into W

MOVWF

TRISB

; Move 00000000 onto TRISB (operate as


Output)

BCF

STATUS, 5

; Go back to Bank0

53

SHORT

CLRF

PORTA

; Clear Port A latches

CLRF

PORTB

; Clear all of Port B outputs latches

MOVLW

0x03

; Load W register with bit pattern 00011

XORWF

PORTA,0

; Compare the w-register with port A and store


The result in the accumulator.

CORRECT

BTFSS

STATUS,2

; Is the cable short-circuited?

GOTO

CORRECT

; No; check for correct cable

MOVLW

0x5B

; Cable is short-circuited

MOVWF

PORTB

; Display S on the output (LED)

GOTO

SHORT

; Loop continuously

MOVLW

0x0F

; Load w-register with bit pattern 01111

XORWF

PORTA, 0

; Compare the w-register with port A and store


The result in the accumulator

OPEN

BTFSS

STATUS, 2

; Is the cable correct?

GOTO

OPEN

;No; check for open cable

MOVLW

0x4E

; Cable is correct

MOVWF

PORTB

; Display C on the output (LED)

GOTO

CORRECT

; Loop continuously

MOVLW

0x1F

; Load w-register with bit pattern 11111

XORWF

PORTA, 0

; Compare the w-register with port A and store

54

Result in the accumulator


BTFSS

STATUS, 2

; Is the cable open circuited?

GOTO

SHORT

; No; check for short circuit cable

MOVLW

0x7E

; Cable is open circuited

MOVWF

PORTB

; Display O on the output

GOTO

OPEN

; Loop continuosly

END

55

CHAPTER FOUR
PROGRAM TESTING AND HARDWARE CONSTRUCTION

4.1 PROGRAMMING THE PIC (PERIPHERAL INTERFACE CONTROLLER)


MICROCONTROLLER.
Microcontrollers and humans communicate through the medium of the programming
language called Assembly language. More precisely, assembly language is only a passing
solution. In order that the microcontroller can understand a program written in assembly
language, it must be assembled into a language of zeros and ones. Assembly language and
Assembler do not have the same meaning. The first one refers to the set of rules used for
writing program for the microcontroller, while the later refers to a program on a personal
computer used to translate assembly language statements into the language of zeros and ones.
A compiled program is also called Machine Code. A "Program" is a data file stored on a
computer hard disc (or in memory of the microcontroller, if loaded) and written according to
the rules of assembly or some other programming language. Assembly language is
understandable for humans because it consists of meaningful words and symbols of the
alphabet. Let us take, for example the command "RETURN" which is, as its name indicates,
used to return the microcontroller from a subroutine. In machine code, the same command is
represented by a 14-bit array of zeros and ones understandable by the microcontroller. All
assembly language commands are similarly assembled into the corresponding array of zeros
and ones. A data file used for storing compiled program is called an "executive file", i.e.
"HEX data file". The name comes from the hexadecimal presentation of a data file and has a
suffix of "hex" as well, for example "probe.hex". After it has been generated, the data file is
loaded into the microcontroller using a programmer. Assembly language programs may be
written in any program for text processing (editor) able to create ASCII data files on a hard
disc or in a specialized work environment such as MPLAB [15].
PIC microcontrollers can be programmed in Assembly, C or a combination of the two. Other
high-level programming languages can be used but embedded systems software is primarily
written in C. Assembly language is used in the construction of the project.

56

Requirements:
- Development tools: MPLAB IDE (version 8.60)
- Programmer: Intelligent Universal programmer
- Dataman programmer software
4.2 MPLAB
MPLAB Integrated Development Environment (IDE) is a Windows program package which
enables easy program writing as well as easy program development. It is best to describe it as
development environment for a standard program language designed for PC programming.
MPLAB technically simplifies some operations consisting of a lot of parameters, which, until
the IDE environment* appeared, were executed from the command line. However, tastes are
different and there are some programmers who prefer standard editors and command line
compilers. Every program written in MPLAB is clear, but there are also help documentationjust in case.
MPLAB consists of several parts:

The program which sorts data files of the same project into one group (Project
Manager);

program for text generating and processing (Text Editor); and

Simulator used to simulate the operation of a program loaded into the microcontroller.

Besides, there are also built in programmers such as PICStart Plus and ICD (In Circuit
Debugger) that can be used to program software into PIC microcontroller device.

57

Fig.4.1; MPLab IDE (v8.60) window


As seen, MPLAB is similar to most Windows programs. Apart from the working area,
there are menus (contains options: File, Edit etc.), toolbars (contains different icons) and a
status bar at the bottom of the window. Similar to Windows, there is a rule to have shortcuts
for the most commonly used program options created in order to easily access them and
speed up operation therefore. These shortcuts are actually icons below the menu bar. In other
words, all options contained in the toolbar are contained in the menu too [16].
In order to make the project, it is necessary to click the option "PROJECT" and then
"PROJECT WIZARD". A welcome window appears.

Fig.4.2; MPLab IDE project welcome window

58

Fig.4.3; MPLab IDE project wizard window


Keep on project-making by clicking NEXT. Then select the microcontroller that will be used.
In our case, it is PIC16F84A microcontroller.
At the end, the project is assigned a name which usually indicates the purpose and the content
of the program being written. The project should be moved to the desired folder. It is best that
the folder associates with PIC microcontrollers (See figure below).

Fig.4.4; MPLab IDE project making window


Documents contained in the project do not always need to be written in MPLAB. Documents
written by some other program
may also be included in the project. In this example, there are no such documents. Just click
Next.

59

Fig.4.5; Finish window of project Initialization of MPLab IDE


Click FINISH to complete the project. The window itself contains project parameters.
4.3

WRITING THE PROGRAM

When the project is created, a window shown in figure 4.6 appears.

Fig.4.6; MPLab IDE project creation window


The next step is to write a program. Open a new document by clicking File>New. Text Editor
in MPLAB environment appears.
Save the document in the folder D:\PIC projects by using the File>Save As command and
name it "Cable locator.asm". Obviously you can locate your files wherever you wish, in
whichever hard drive you wish. Using a common directory to store all the different projects
and subdirectories in makes good sense.

60

4.4

SIMULATOR
A simulator is a part of MPLAB environment which provides better insight into the

operation of the microcontroller. Generally speaking, a simulation is an attempt to model a


real-life or hypothetical situation so that it can be studied to see how the system works. By
means of the simulator, it is also possible to monitor current values of variables, registers and
port pins states as well. A simulator is not of the same importance for all programs [15][16].
If a program is simpler (as in the project), the simulation may not be of great importance
because setting port B pins to logic zero (0) is not complicated at all. However, in more
complex programs containing timers, different conditions and requests (especially
mathematical operations), the simulator may be of great use. As the name itself indicates, a
simulation means to simulate the operation of microcontroller. Like the microcontroller, a
simulator executes instructions one after another (line by line) and constantly updates the
state of all registers. In this way, the user simply monitors program execution. At the end of
program writing, the user should first test it in the simulator prior to executing it in a real
environment. Unfortunately, this is one of many good things being overlooked by the
programmer because of its character as such and the lack of high-quality simulators as well.
Below is the break down of the simulation procedures;

Fig.4.7; MPLab IDE Debug pane window


Simulator is activated by clicking on DEBUGGER > SELECT TOOL > MPLAB SIM, as
shown in figure. As a result, several icons related to the simulator only appear.
Their meanings are as follows:

61

Starts program execution at full speed. In this example, the simulator executes the program at
full (normal) speed until it is halted by clicking the icon below.

Pauses program execution. Program can continue executing step by step or at full speed
again.

Starts program execution at optional speed. The speed of execution is set in dialog
Debugger/Settings/Animation/Real-time Updates.

Starts step-by-step program execution. Instructions are executed one after another.
Furthermore, clicking on this icon enables you to step into subroutines and macros.

This icon has the same function as the previous one except it has the ability to step into
subroutines.

Resets microcontroller. By clicking this icon, the program counter is positioned at the
beginning of the program and simulation can start [31].

62

Similar to real environment, the first thing that should be done is to reset the microcontroller
using the option DEBUGGER > RESET or by clicking reset icon. As the consequence of
this, a green line is positioned at the beginning of the program and program counter PCL is
cleared to zero. Refer to the window Special Function Registers shown in Fig.4.8.

Fig.4.8; MPLab IDE special function registers window


Apart from SFRs, it is good to have an insight in File Registers. A window containing them
appears by clicking the VIEW->FILE REGISTERS option.
If the program contains variables, it is good to monitor their values as well. Each variable is
assigned a window (Watch Windows) by clicking VIEW->WATCH option [32].

Fig.4.9; MPLab IDE watch window


If the program contains variables, it is good to monitor their values as well. Each variable is
assigned a window (Watch Windows) by clicking VIEW->WATCH option.

63

After all variables and registers of interest become available on the simulator working area,
the process of simulation can start.
The next instruction may be either Step into or Step over depending on whether you want to
step into subroutine or not. The same instructions may be set by using keyboard- pushbuttons <F7> or <F8> (generally, all important instructions have the corresponding
pushbuttons on the keyboard).
4.5

MPLAB PROGRAMMING

Files will now be added to project by right-clicking on Source Files in the Workspace
(window with the title <muc.mcw>) and selecting Add Files...

Fig.4.11; MPLab IDE build option window


Click right on the <muc.mcp> and select Build Options. The compile settings is added at this
point, e.g. additional include directories.

64

Fig.4.12; MPLab IDE compile setting window


Click now on the compile symbol and compile the source code. If the code contains any
includes (e.g. for the PIC), these files are added automatically to the section Header Files in
the project (here: muc.mcp). The output window there should read BUILD SUCCEEDED,
preceded by warnings that may appear. Click on the image for a larger image [16].

Fig.4.13; MPLab IDE header files window


Now we program the device using the appropriate buttons of the MPLAB IDE. Click on the
left icon (see image below) for downloading the code to the target [31]

Fig.4.14; MPLab IDE program target window


By clicking on the rising flank to start the program

65

Fig.4.15; MPLab IDE reset tool window


Programming HEX Files with MPLAB
To directly download hex files into a device, the following is done:

Close all open workspaces of MPLAB

Configure the programmer [32]

In MPLAB, click on 'File' and select 'Import'

It seems that nothing is happening, but the hex file is imported

Click on the programmer icon. The output window should state that the device is
programmed

In brief this will be


Give the project a name and directory and hit Next.

Fig.4.16; MPLab IDE naming project window


Hit OK to create directory, if needed.

66

Fig.4.17; MPLab IDE project directory window


Find the C18 lkr directory, usually C:\MCC18\lkr\18f458i.lkr, Hit Add>> and check box.

Fig.4.18; MPLab IDE check box window

Hit Next and then hit Finish. Go to Menu->Projecnt->Add New File to Project

.
Fig.4.19; MPLab IDE menu window
Browse and find your project directory.
To use MPLAB for an Assembly program, save a file with the .asm extension. MPLAB will
open the file.
67

Fig.4.20; MPLab IDE .asm extension window


Now type the Assembly code or insert the Assembly code into the file.

Fig.4.21; MPLab IDE assembly code editor window


The ORG value is already set by the linker; however, if you want to compile the program for
a different PIC. Processor you must copy and insert the new value for ORG which is found in
the .lkr file.

Fig.4.22; MPLab IDE .ikr file window


Click the Build Toolbar button to compile [16].

68

Fig.4.22; MPLab IDE code compiling window


To simulate the program go to Menu->Debug->Select Tool->3 MPLAB SIM.

Fig.4.23; MPLab IDE simulation/debug window

4.6

The Burning Process

At this stage, it is expected that the Dataman programmer software has been installed. Once
the software is written, the code is compiled to check for syntactical errors.
The first important step in the Burning processing is building the project. Before building
the
Project, one is sure the configuration bits are set appropriately by selecting Configure _
Configuration Bits. Then select Project _ Build All or hit Ctrl + F10 to build the project.
The output window will print the results of each step in the build process.
One will probably receive some warning or advisory messages. If the build process was
successful the output window should print a Memory Usage Map that looks like the
following:
BUILD SUCCEEDED: Sat Nov 18 01:34:23 Memory Usage Map:
69

Program space:
CODE used 21h (33) of 800h words (1.6%)
CONST used 0h (0) of 800h words (0.0%)
ENTRY used 0h (0) of 800h words (0.0%)
STRING used 0h (0) of 800h words (0.0%)
Data space:
BANK0 used 3h (3) of 60h bytes (3.1%)
BANK1 used 0h (0) of 50h bytes (0.0%)
COMBANK used 0h (0) of 10h bytes (0.0%)
EEPROM space:
EEDATA used 0h (0) of 100h bytes (0.0%)
ID Location space:
IDLOC used 0h (0) of 4h bytes (0.0%)
Configuration bits:
CONFIG used 0h (0) of 1h word (0.0%)
Summary:
Program space used 21h (33) of 800h words (1.6%)
Data space used 3h (3) of B0h bytes (1.7%)
EEPROM space used 0h (0) of 100h bytes (0.0%)
ID Location space used 0h (0) of 4h bytes (0.0%)
Configuration bits used 0h (0) of 1h word (0.0%).
When building project a large amount of files are created and stored in the project directory.
The most important file created is the hexadecimal file as shown in Fig.4.24

Fig.4.24; MPLab IDE project file directory window


This is the file that will be burned into the PIC microcontroller. Copy this HEX file and
take it to the computer connected to the programmer.
70

Below is the picture of universal programmer used for the burning [33];

Fig.4.25; Dataman intelligent universal programmer


The PIC microcontroller is placed in the black ZIF socket and place the silver lever in the
down position to clamp onto the I/O pins.
Start the Dataman Programmer software by going to Start _ All Programs _ Dataman
Programmers Dataman-48XP. There are basically three steps in the Dataman Programmer
Burning process:
1. Select device
2. Load HEX file
3. Program PIC
Select the Device _ Select Device from the menu or press Alt + C in order to choose your
PIC microcontroller. A large list of devices will be displayed in a window. Find you PIC and
press OK.
Select File _ Load File or click the Load button or press Alt + L in order to load the HEX file
from your project. The Dataman software should automatically detect the file as an Intel
HEX file.
Make sure one of the Clear Buffer radio buttons is selected and press OK. Now it is time to
program the PIC microcontroller. The correct device has been selected, the
HEX file has been loaded and configuration bits have been set. Select Device _ Program _
Auto
71

or press Alt + P to program your PIC microcontroller. You should see a progress bar at the
centre of the screen.

Fig.4.26; Dataman programmer software window


If the burn process has been successful a Programming Complete message will be
printed to the screen. There are many other functions provided by the software

4.7

SUMMARY OF PROJECT CONSTRUCTION AND RESULTS

A project directory was created and named cable fault locator.asm so that MPLab IDE can be
used for assembly program. Fig 4. Shows the screenshot of the result of the compilation from
clicking the Biuld Toolbar button

Fig.4. 27; Screenshot of the project compilation

72

4.7.1 PROGRAM DEBUGGING


The program was simulated by clicking to Menu->Debug->Select Tool->3 MPLAB SIM

Fig.4. 28; Screen shot of project single step debugging


To view the registers and variables Go to Menu->View->Watch. Select STATUS and TRISA
and hit Add SFR

Fig.4.29; Screen shot of STATUS register watch window

73

Fig.4.30; Screenshot of TRISA register watch window


To observe the values changing in Watch, hit the Run Toolbar button several times.
4.7.2 BURNING THE PROGRAM
After building the project, a large amount of files are created and stored in the project
directory. The most important file created is the hexadecimal file as shown in Fig.4.31

Fig.4.31; Screenshot of created files from project build

74

This is the file that will be burned into the PIC microcontroller. This HEX file was copied
and into the computer connected to the available programmer (Intelligent Universal
Programmer). The PIC microcontroller was placed in the black ZIF socket and the silver
lever was placed in the down position to clamp onto the I/O pins as shown in Fig.4.32 below

Fig.4.32 The programmer interface with the microcontroller


Dataman Programmer software was started by going to Start _ All Programs _ Dataman
Programmers Dataman-48XP. There are basically three steps in the Dataman Programmer
Burning process:
1. Select device
2. Load HEX file
3. Program PIC
Selecting the Device; Select Device from the menu or press Alt + C in order to choose the
PIC Microcontroller. A large list of devices will be displayed in a window. Then, the PIC
will be looked for and OK will be clicked.
To Select File _ Load File or click the Load button or press Alt + L in order to load the HEX
file from the project. The Dataman software will automatically detect the file as an Intel HEX
file. One must make sure one of the Clear Buffer radio buttons is selected and press OK and
is shown in Fig.4.33

75

Fig.4.33; Screenshot of Dataman software buffer radio window


Right now the HEX file has been loaded from the project directory into the Dataman buffer.
The PIC microcontroller isnt programmed yet! The Dataman software allows you to view
and edit the buffer as shown in Fig.4.34 below but this step should be unnecessary.

Fig.4.34; Screenshot of loaded HEX file on Dataman buffer


Now it is time to program the PIC microcontroller. The correct device has been selected, the
HEX file has been loaded and configuration bits have been set. Select Device _ Program _
Auto or press Alt + P to program your PIC microcontroller. A progress bar will be shown at
the centre of the screen.

76

Fig.4.35; Screenshot of Dataman software programming progress bar


At the end programming complete was printed on the screen.

4.7.3 COPY OF THE BURNT PROGRAM


;PGM 4 CABLE LOCATOR

LIST p=16F84A

LIST
; P16F84A.INC Standard Header File, Version 2.00 Microchip Technology, Inc.
NOLIST
; This header file defines configurations, registers, and other useful bits of
; Information for the PIC16F84 microcontroller. These names are taken to match
; the data sheets as closely as possible.

; Note that the processor must be selected before this file is


; included. The processor may be selected the following ways:

;
;
;
;
;

1. Command line switch:


C:\ MPASM MYFILE.ASM /PIC16F84A
2. LIST directive in the source file
LIST P=PIC16F84A
3. Processor Type entry in the MPASM full-screen interface

;==========================================================================
;
;

Revision History

77

;==========================================================================

;Rev: Date: Reason:

;1.00 2/15/99 Initial Release

;==========================================================================
;
;

Verify Processor

;
;==========================================================================

IFNDEF __16F84A
MESSG "Processor-header file mismatch. Verify selected processor."
ENDIF

;==========================================================================
;
;

Register Definitions

;
;==========================================================================

W
F

EQU
EQU

H'0000'
H'0001'

;----- Register Files------------------------------------------------------

INDF

EQU

H'0000'

TMR0

EQU

H'0001'

PCL

EQU

H'0002'

STATUS

EQU

H'0003'

FSR

EQU

H'0004'

PORTA

EQU

H'0005'

PORTB

EQU

H'0006'

EEDATA

EQU

H'0008'

EEADR

EQU

H'0009'

PCLATH

EQU

H'000A'

INTCON

EQU

H'000B'

OPTION_REG

EQU

H'0081'

TRISA

EQU

H'0085'

TRISB

EQU

H'0086'

EECON1

EQU

H'0088'

EECON2

EQU

H'0089'

;----- STATUS Bits --------------------------------------------------------

IRP

EQU

H'0007'

78

RP1

EQU

H'0006'

RP0

EQU

H'0005'

NOT_TO

EQU

H'0004'

NOT_PD

EQU

H'0003'

EQU

H'0002'

DC

EQU

H'0001'

EQU

H'0000'

;----- INTCON Bits --------------------------------------------------------

GIE

EQU

H'0007'

EEIE

EQU

H'0006'

T0IE

EQU

H'0005'

INTE

EQU

H'0004'

RBIE

EQU

H'0003'

T0IF

EQU

H'0002'

INTF

EQU

H'0001'

RBIF

EQU

H'0000'

;----- OPTION_REG Bits ----------------------------------------------------

NOT_RBPU

EQU

H'0007'

INTEDG

EQU

H'0006'

T0CS

EQU

H'0005'

T0SE

EQU

H'0004'

PSA

EQU

H'0003'

PS2

EQU

H'0002'

PS1

EQU

H'0001'

PS0

EQU

H'0000'

;----- EECON1 Bits --------------------------------------------------------

EEIF

EQU

H'0004'

WRERR

EQU

H'0003'

WREN

EQU

H'0002'

WR

EQU

H'0001'

RD

EQU

H'0000'

;==========================================================================
;

RAM Definition

;==========================================================================

__MAXRAM H'CF'
__BADRAM H'07', H'50'-H'7F', H'87'
;==========================================================================
;

Configuration Bits

;==========================================================================

_CP_ON

EQU

H'000F'

_CP_OFF

EQU

H'3FFF'

79

_PWRTE_ON

EQU

H'3FF7'

_PWRTE_OFF

EQU

H'3FFF'

_WDT_ON

EQU

H'3FFF'

_WDT_OFF

EQU

H'3FFB'

_LP_OSC

EQU

H'3FFC'

_XT_OSC

EQU

H'3FFD'

_HS_OSC

EQU

H'3FFE'

_RC_OSC

EQU

H'3FFF'

LIST

__CONFIG

start

ORG

0x00

BSF

0x03,5

3FFB

MOVLW 0x1F
MOVWF 0x85
MOVLW 0x00
MOVWF 0x86

SHORT

BCF

0x03,5

CLRF

0x06

MOVLW 0x03
XORWF 0x05,0
BTFSS

0x03,2

GOTO

CORRECT

MOVLW 0x5B
MOVWF 0x06
GOTO

SHORT

CORRECT MOVLW 0x0F


XORWF 0x05,0
BTFSS

0x03,2

GOTO

OPEN

MOVLW 0x4E
MOVWF 0x06
GOTO

OPEN

CORRECT

MOVLW 0x1F
XORWF 0x05,0
BTFSs

0x03,2

GOTO

SHORT

MOVLW 0x7E
MOVWF 0x06
GOTO

OPEN

END

80

4.7.4 BREADBOARDING AND TESTING


When bread boarding a PIC microcontroller the most important thing to remember (besides
how easily they can be destroyed) is the mandatory pin connections required to make the
program run. These connections will differ from device to device [30].

The following is the list of the components used alongside the microcontroller for the bread
boarding and testing;
9 pieces of

1k Resistor

10k Resistor

10

100 Resistor

LM393 Comparator

7805 Voltage regulator


Seven segment LED Display
Switch button
1f Capacitor
30pf Capacitor

After bread boarding and testing to be sure of the workability of the circuit, the result was
satisfactory and thus; transferred to the Vero board using soldering iron and lead.

Fig.4.36; picture of the completed project

81

CHAPTER FIVE
CONCLUSIONS AND FUTURE WORK
5.1 CONCLUSIONS
In this project, a methodology (sectionalisation) for an efficient, non-destructive digital
underground cable fault locator (DUCFL) was developed. The device can detect underground
cable faults such as short circuit and open circuit and also indicates a correct cable when the
cable is normal.

The digital cable fault locator is a precision instrument and easy to use. For sensing the data,
the instrument is provided with two terminals which are to be connected to the cable under
test. The built-in microcontroller with the locator circuit and analogue to digital converter
circuit collects analyses the data and spontaneously display the result (the particular type of
fault on the line) in digital format on the seven segment LED display unit within 10m range.

The digital underground cable fault locator developed was able to perform as expected on the
field and available fault scenarios. Its main limitation is the fact that the measurements and
monitoring must be conducted at regular uninterrupted intervals of 10m following the
underground mapping of the trouble spot.

5.3 FUTURE WORK


It is highly suggested that liquid crystal display (LCD) should be used to display SHORT
CIRCUIT OPEN CIRCUIT and CORRECT CABLE in full instead of the S, O and
C displayed for short, open and correct cable respectively by the seven segment display. In
addition, the device can be made universal to detect cable faults of cable having various
diameter dimensions by replacing the 100 resistor grounded at the locator circuit in Fig.3.
with a variable resistor so as to maintain the 2.5V at the analogue signal input of the
comparators if the cable is normal.
The future work may be done to investigate incipient faults with developed diagnosis system
to make decisions in sequential mode on a number of actual fault scenarios and the fault spots
should be displayed with high accuracy and precision. Nevertheless, the generalization
capability of the incipient fault detection system (IFDS) is a major topic for future work.

82

REFERENCE
[1] Underground Distribution System Design and Installation Guide, Washington D.C.:
National Rural Electric Cooperative Association, 1993.
[2] W. F. Buddy, The basics of power cables, IEEE Transactions on Industry Applications,
vol. 30, no. 3, pp. 506 509, May June 1994.
[3] S. Y. King and N. A. Halfter, Underground Power Cables, New York: Longman Inc.,
1982.
[4] M. J. Mousavi and K. L Butler-Purry, Study of thermal aging effects on distribution
transformer solid insulation, in Proceedings of 34th North American Power Symposium,
Tempe, AZ, Oct. 2002, pp. 160-167.
[5] J. Densley, Ageing mechanisms and diagnostics for power cables an overview, IEEE
Electrical Insulation Magazine, vol. 17, no. 1, January February, 2001, pp. 14 - 22.
[6] Evaluation and Qualification of Electrical Insulation Systems, IEC Standard 60505, 1999.
[7] N. H. Malik, A. A. Al-Arainy, and M. I. Qureshi, Electrical Insulation in Power Systems,
New York: Marcel Dekker, 1998.
[8] N. Srinivas, and N. Ahmed, Condition assessment of distribution and transmission class
voltage cable systems, in 2003 IEEE 10th International Conference on Transmission and
Distribution Construction, Operation and Live-Line Maintenance, Orlando, FL, Apr. 2003,
pp. 194-201.
[9] G. J. Paoletti and A. Golubev, Partial discharge theory and technologies related to
medium-voltage electrical equipment, IEEE Transactions on Industry Applications, vol.
37, no. 1, pp. 90 103, Jan. Feb. 2001
[10] S. M. Miri and A. Privette, A survey of incipient fault detection and location techniques
for extruded shielded power cables, presented at the 26th Annual Southeastern Symposium
on System Theory, Athens, OH, Mar. 20-22, 1994, pp.402 405.
[11] W. E. Anderson, J. D. Ramboz, and A. R. Ondrejka, The detection of incipient faults in
transmission cables using time domain reflectometry techniques: Technical challenges,
IEEE Transactions on Power Apparatus and Systems, vol. PAS-101, no. 7, pp. 19281934,
July 1982.
[12] DTE Energy, Technologies, accessed on May 2005. [Online]. Available:
http://www.dtetech.com/technologies/cablewise/
83

[13] EA Technology, Products, accessed on May 2005. [Online]. Available:


http://www.eatechnology.com/
[14]www.microchip[.com/download/en/devicedoc/33023a.pdf;accessed 7th July 2011
[15]www.mplab.com/intro; accesed 7thJuly 2011
[16]www.mplabhowto.com/ask/pr; accessed 10th July 2011
[17]www.pictutorials.com/bits_and_bytes.aspx; accessed 10th July 2011
[18]www.marksprojectpages.com/picprogramming/gettingstarted/input; accessed 20th July
2011
[19]www.talkingelectronics.com/xor-trick; accessed 20th July 2011
[20]www.wikipedia.com/comparator; accessed 1st August 2011
[21]www.wikipedia.com/seven_segment_display; accessed 1st August 2011
[22]www.national.com/lm193/lm193A/lm393; accessed 1st August 2011
[23]www.home.netcom.com/fastfwd/answers.html#pic16f84a; accessed 1st August 2011
[24] www.piclist.com/techref/postbot.asp?by=time&id=piclist/200/11/09/110325a; accessed
1st August 2011
[25] www.home.clear.net.nz/pages/joecloquitt/sxpins2.html; accessed14th August 2011
[26] www.myke.com/basic.html; accessed 14th August 2011
[27] www.talkingelectronics/piclab1/experiments-p1b.html; accessed 14th August 2011
[28] www.microchipdirect.com/productsearch.aspx?keywords=DV164120; accessed 14th
August 2011
[29]www.fairchild.com/KA7805; accessed 14th August 2011
[30]www.wikipedia.com/breadboard/circuits; accessed 6th October 2011
[31] www.best-microcontroller-projects.com/index.html; accessed 14th October 2011
[32] www.ccsinfo.com/devices.php?page=devices; accessed 14th October 2011

84

[33] www.best-microcontroller-projects.com/programming-microcontrollers-in-c.html;
accessed 14th October 2011.
[34] www.electricaltesting.co.uk/underground-cable-fault; accessed 4th March 2011
[35] www.valuetester.com/cable-fault-locator; accessed 4th March
[36] Paul Scherz: Practical Electronics for inventors, 1st edition, McGraw-Hill Companies,
2000.
[37]Francols Horlin and Andre Bourdoux: Digital Integrated circuit, 2nd edition, A John
Wiley and Sons Ltd. 2008.

85

Das könnte Ihnen auch gefallen