thesis final and modified

83
GSM BASED MONITORING OF DISTRIBUTION TRANSFORMER MUDASSAR KHALID YASIR ARAFAT December 2014 Department of Electrical Engineering COMSATS INSTITUTE OF INFORMATION TECHNOLOGY LAHORE – PAKISTAN

Upload: zsoomro32

Post on 10-Dec-2015

7 views

Category:

Documents


2 download

DESCRIPTION

GSM Based Distribution Transformer

TRANSCRIPT

Page 1: Thesis Final and Modified

GSM BASED MONITORING OF

DISTRIBUTION TRANSFORMER

MUDASSAR KHALIDYASIR ARAFAT

December 2014

Department of Electrical EngineeringCOMSATS INSTITUTE OF INFORMATION

TECHNOLOGYLAHORE – PAKISTAN

Page 2: Thesis Final and Modified

Submission Form for Final-Year

PROJECT REPORT

PROJECT ID 40 NUMBER OF MEMBERS 2

TITLE GSM BASED MONITORING OF DISTRIBUTION TRANSFORMER

SUPERVISOR NAME TRN Fahad Khan AL / EXTERNAL

MEMBER NAME REG. NO. EMAIL ADDRESS

MUDASSAR KHALIDBTE-SP11-039

b

[email protected]

YASIR ARAFATY

BTE-SP11-087 [email protected]

CHECKLIST:

Number of pages in this report

I/We have enclosed the soft-copy of this document along-with the codes and scripts created by myself/ourselves

YES / NO

My/Our supervisor has attested the attached document YES / NO

I/We confirm to state that this project is free from any type of plagiarism and misuse of copyrighted material

YES / NO

MEMBERS’ SIGNATURES

Supervisor’s Signature

COMSATS Institute of Information Technology, Lahore Campus Department of Electrical Engineering

Page 3: Thesis Final and Modified

This work, entitled “GSM Based Monitoring of Distribution Transformer”

has been approved for the award of

Bachelors in Electrical Engineering

Date

External Examiner:

Head of Department:

Department of Electrical EngineeringCOMSATS INSTITUTE OF INFORMATION

TECHNOLOGYLAHORE – PAKISTAN

Page 4: Thesis Final and Modified

Declaration

“No portion of the work referred to in the dissertation has been submitted in support of an

application for another degree or qualification of this or any other university/institute or

other institution of learning”.

MEMBERS’ SIGNATURES

ii

Page 5: Thesis Final and Modified

Acknowledgements

It is usual to thank those individuals who have provided particularly useful assistance, technical or otherwise, during your project.

Your supervisor will obviously be pleased to be acknowledged as he or she will have invested quite a lot of time overseeing your

progress.

In the name of God, the most kind and most merciful

I would like to thank <RELATIVES & FRIENDS> who kept backing me up in all the times,

both financially and morally…

I would also like to thank FAHAD KHAN for his guidance and encouraging me to work hard

and smart. I have found him very helpful while discussing the optimization issues in this

dissertation work. His critical comments on my work have certainly made me think of new

ideas and techniques in the fields of optimization and software simulation.

I am grateful to the God Almighty who provides all the resources of every kind to us, so that we

make their proper use for the benefit of mankind. May He keep providing us with all the

resources, and the guidance to keep helping the humanity.

iii

Page 6: Thesis Final and Modified

Abstract

Transformers have an important role in distribution system. Monitoring of transformer before any faults occur is very necessary and this process prevent us from a big loss. Currently used systems are able to provide information about the state of transformer but either they are offline or very expensive. Transformer is a very expensive device so we have to care about it. This project is about the design and implementation of hardware to monitor the useful parameters like ambient temperature, load currents, over voltage and oil level of distribution transformer. This project aim is to establish low cost solution for monitoring health condition of remotely located distribution transformers using GSM technology. An Embedded module is design to get data from electrical sensing system. The idea of on-line monitoring system is made up of a global service mobile (GSM) Modem, with a PIC microcontroller and different sensors. All this hardware is installed at the distribution site. The above defined parameters are recorded and processed if we find any abnormality then an emergency situation occur and an sms(short message service for mobile) is sent to the mobile engineer to take the notice of this situation.

iv

Page 7: Thesis Final and Modified

Table of Contents1 INTRODUCTION................................................................................................................................1

1.1 OVERVIEW....................................................................................................................................1

1.2 PROJECT SCOPE............................................................................................................................1

1.3 MOTIVATION.................................................................................................................................1

1.4 PROBLEM STATEMENT..................................................................................................................2

2 LITERATURE REVIEW..................................................................................................................3

2.1 MICROCONTROLLER.....................................................................................................................3

2.1.1 Pin Description........................................................................................................................3

2.1.2 Crystal Oscillator....................................................................................................................6

2.1.3 Reset.........................................................................................................................................7

2.2 GLOBAL SYSTEM FOR MOBILE (GSM).........................................................................................7

2.3 GSM MODULE..............................................................................................................................8

2.3.1 SIM900D..................................................................................................................................8

2.3.2 GSM Modem Instructions........................................................................................................9

2.3.3 Serial Communication...........................................................................................................10

2.4 TRANSFORMER............................................................................................................................10

2.4.1 Definition of Transformer......................................................................................................11

2.4.2 Working Principle..................................................................................................................11

2.4.3 Types of Transformer.............................................................................................................12

2.4.4 Faraday's Law of electromagnetic induction........................................................................12

2.5 SENSORS.....................................................................................................................................14

2.5.1 Potential Transformer (PT)...................................................................................................14

2.5.2 Current Transformer (CT).....................................................................................................14

2.5.3 Temperature Sensor (LM35)..................................................................................................15

2.5.3.1 Features.................................................................................................................................16

2.5.3.2 Application.............................................................................................................................16

2.5.3.4 Importance of LM35..............................................................................................................16

2.6 LIQUID CRYSTAL DISPLAY (LCD).............................................................................................16

3 HARDWARE DESCRIPTION........................................................................................................19

3.1 MICROCONTROLLER INTERFACING.............................................................................................19

3.2 TRANSFORMER............................................................................................................................20

3.3 PT SENSOR.................................................................................................................................21

3.4 CT SENSOR.................................................................................................................................21

3.5 TEMPERATURE SENSOR..............................................................................................................22

v

Page 8: Thesis Final and Modified

3.6 OIL LEVEL MEASURING SENSOR................................................................................................22

3.7 POWER SUPPLY...........................................................................................................................24

3.7.1 Voltage Regulator (7805)......................................................................................................25

3.8 MAX 232...................................................................................................................................25

3.9 RELAY.........................................................................................................................................27

4 FLOW CHART.................................................................................................................................28

REFERENCES..........................................................................................................................................29

APPENDIX A: HDL OR C SOURCE CODE.........................................................................................31

APPENDIX B: HARDWARE SCHEMATICS.......................................................................................32

APPENDIX C: LIST OF COMPONENTS.............................................................................................33

Appendix D: Project Timeline.....................................................................................................................34

vi

Page 9: Thesis Final and Modified

Table of Figures

FIGURE 2-1 AN EXAMPLE OF INSERTING FIGURE INTO YOUR PROJECT ERROR! BOOKMARK NOT DEFINED.

FIGURE 3-1 FUNCTIONAL REQUIREMENTS NUMBERING.......................ERROR! BOOKMARK NOT DEFINED.

FIGURE 4-1 EXAMPLE FIGURE FOR PROTOTYPE APPLICATION.............ERROR! BOOKMARK NOT DEFINED.

FIGURE 4-2 ARCHITECTURE OVERVIEW DIAGRAM...............................ERROR! BOOKMARK NOT DEFINED.

Figure 5-1 Example Figure for User Interface.............................................Error! Bookmark not defined.

vii

Page 10: Thesis Final and Modified

1 Introduction

In power systems, distribution transformer is an essential electrical equipment which distributes

power to the low-voltage users. Therefore, proper operation of distribution transformer is very

important for efficient power distribution. The life time of DT can be increased by operating it

under rated conditions. The performance of distribution transformer is severely affected if it is

subjected to any abnormalities such as over loading, reduced oil-level etc. The electric power

deficiency and various malpractices followed in Pakistan has lead to frequent power failures

among which distribution transformer over loading is main issue [10] . Although several

monitoring systems are used by electric utility companies, however, they are not efficient.

Therefore, real time monitoring of distribution transformer is a crucial task for reliable

operation of power system [1]. The status of distribution transformer is then transmitted to

control centre for necessary actions.

1.1 Overview

Distribution Transformer is the main equipment in the power system. The main purpose of this

project is real time monitoring of distribution Transformer. Real time monitoring of distribution

transformer is performed by deploying sensors which continuously examine the parameters such

as over voltage, oil-level etc. The monitored data from distribution transformer is processed by

microcontroller module which further transmits this data to the GSM module located at control

centre. On the basis of received of received data, the abnormalities in voltage, current and

temperature overcome by the central control system by performing necessary action against the

abnormality.

1.2 Project Scope

The real time monitoring of the distribution Transformer increase the reliability of power

distribution network and save extra cost needed for changing and replacing distribution

transformer. There are many other methods to monitor transformer but these are inefficient as

they do not provide timely information of distribution transformer.

1.3 Motivation

The traditional electric power system has proved to be incompetent. Therefore, there is a strong

need to upgrade the out dated electric power system with an efficient power network. In this

prospective, sensors and communication infrastructure can enhance the efficiency of traditional

power systems, by deployment of sensors at various stage of power system [1]. Since

1

Page 11: Thesis Final and Modified

distribution transformer is an expensive part of the power system, effort is required to enhance

the reliability and long life operation of distribution transformer [2]. This project provides a

solution to over loading and over voltage issues frequently countered in distribution transformer

by utilizing temperature and voltage sensors. The acquired data from the sensors is forward to

the central system where decisions are made to overcome abnormality [3][4].

1.4 Problem statement

Distribution transformers are one of the major parts of electric power system. The main problem

that Pakistan is facing now-a days and in past is that how to overcome with the issue of

electricity over loading which causes fatal damage to distribution transformers [10]. GSM based

monitoring of distribution transformers is a cheap and reliable source to overcome with these

problems. It provides real-time monitoring and reliable solution to the inherent in distribution

transformer operation. This gives in-time alert regarding any problem such as temperature

abnormality, over voltage and oil level etc.

2

Page 12: Thesis Final and Modified

2 Literature Review

This chapter provides a literature review of different modules utilized in this project.

2.1 Microcontroller

A microcontroller (sometimes abbreviated µC, uC or MCU) is a small computer on a single

integrated circuit containing a processor core, memory, and programmable input and

output peripherals [5][6]. There are many families of the microcontroller such as PIC, AVR and

8051 each having different features and specifications. In this project PIC18f452 is used the

microcontroller key features of PIC18f452 are following:

High Performance RISC (Reduced Instruction Set Computer) CPU.

Operating frequency is 40 MHz

Programme memory is 32 Kbyte and its instructions are 16384.

Data memory is 1536 bytes.

Data EEPROM Memory is 256 bytes.

Interrupt Sources are 18.

5 I/O ports A,B,C,D and E in which “A” port has 6 pins, B, C and D have 8 pins and

“E” port has 3 pins.

There are 4 timers.

There are 2 Capture/Compare/PWM Modules.

Serial Communications is MSSP, Addressable and USART.

There are 8 input channels which are 10-bit Analog-to-Digital Module.

Programmable Low Voltage Detection.

Instruction set is of 75 instructions.

40-pin DIP.

2.1.1 Pin Description [13]

PIN18f452 have five ports (A to E) and each port has 3 associated 8-bit registers “A”

register is used to reserve a memory location in RAM[5].

Port A:

Port A is a 6 pin wide bidirectional port and its resources are Timer0, low voltage

detects and ADC [13]. The pin description of this port following:

3

Page 13: Thesis Final and Modified

Pin-2: The name of this pin is RA0/AN0. Its basic functions are Input/output or

analog input 0.

Pin-3: This pin is called as RA1/AN1. Functionality of it is digital I/O, analog input

1

Pin-4: This pin is known as RA2/AN2, Vref-. Its basic functions are digital I/O,

analog input 2, A/D reference voltage (Low) input.

Pin-5: This pin known as RA3/AN3, Vref+. Functionality of this pin is digital I/O,

analog input 3 A/D reference voltage (high) input [14].

Pin-6: This pin is called as RA4/T0CKI. Basic function of this pin is as digital I/O,

open drain when configured as output and timer0 external clock input.

Pin-7: This pin is known as RA5/AN4/SS/LVDIN. Its functions are digital I/O,

analog input4 [15].

Figure: 2. PIC18F452 [5]

Port B:

It is 8-pin bidirectional port. PORTB can be software programmed for internal weak pull-ups on

all inputs. The resources of this port are Interrupts and Alt CCP2. The pin description of this

port is given below:

Pin-33: This pin is known as RB0/INT0. Functionality of this pin is digital I/O and external

interrupt 0.

4

Page 14: Thesis Final and Modified

Pin-34: It is called as RB1/INT1. Its basic function is external interrupt 1.

Pin-35: this pin is known as RB2/INT2. Its functionality is described as digital I/O, external

interrupt 2.

Pin-36: This pin is called as RB3/CCP2. Its functions are digital I/O, capture2 input, Compare2

output and PWM2 output.

Pin-37: This pin is denoted as RB4. Its basic functionality is Digital I/O, interrupt-on-change

pin.

Pin-38: This pin is known as RB5/PGM. Its functions are digital I/O, Interrupt-on-change pin.

Pin-39: This pin is called as RB6/PGC. Its functions are digital I/O, interrupt-on-change pin.

Pin-40: The name of this pin is RB7/PGD. Its functions are digital I/O, Interrupt-on-change pin,

in-circuit debugger and ICSP programming data pin.

Port C:

It is an 8 pin bidirectional port. Its resources are capture compares timers 1-3, SPI, I2 C, and

UART, the pin description of this port is given below:

Pin-15: This pin is known as RC0/T1OSO/T1CKI. Its functions are digital I/O, timer1 oscillator

output and Timer1/Timer3 external clock input.

Pin-16: we can call this pin as RC1/T1OSI/CCP2. Its basic functionality is digital I/O, timer1

oscillator input, capture2 input, compare2 output, and PWM2 output.

Pin-17: This pin is called as RC2/CCP1. its functions are digital I/O, capture1 input/compare1

and output/PWM1 output.

Pin-18: This pin known as RC3/SCK/SCL. Its basic functions are digital I/O, synchronous

serial clock input/output for SPI mode and synchronous serial clock input/output for I2 C mode.

Pin-23: This pin is called as RC4/SDI/SDA. Its functions are digital I/O, SPI Data In and I2 C

Data I/O.

Pin-24: we can call this pin as RC5/SDO. Its basic functions are digital I/O and SPI Data Out.

Pin-25: This pin is denoted as RC6/TX/CK. Its functions are digital I/O, USART asynchronous

transmit and USART synchronous clock [16].

Pin-26: The name of this pin is RC7/RX/DT. Its functions are digital I/O, USART

asynchronous receive and USART synchronous data.

Port D:

It is 8 pin bi-directional I/O port, or a Parallel Slave Port (PSP) for interfacing to a

microprocessor port. These pins have TTL input buffers when PSP module is enabled, the pin

description of this port are given below:

Pin-19: This pin is called as RD0/PSP0.

Pin-20: This pin is known as RD1/PSP1.

Pin-21: This pin is denotes as RD2/PSP2.

Pin-22: This pin is called as RD3/PSP3.

5

Page 15: Thesis Final and Modified

Pin-27: This pin is known as RD4/PSP4.

Pin-28: This pin is denotes as RD5/PSP5.

Pin-29: This pin is called as RD6/PSP6.

Pin-30: This pin is known as RD7/PSP7.

The basic functionality of all above defined pins is digital I/O.

Port E:

It is 3 pin bidirectional port. It is also parallel slave port.

Pin-8: This pin is known as RE0/RD/AN5. Its basic functions are digital I/O, read control for

parallel slave port and analog input 5.

Pin-9: This pin is denotes as RE1/WR/AN6. Its functionalities are as digital I/O, write control

for parallel slave port and analog input 6.

Pin-10: This pin is called as RE2/CS/AN7. Functions of this pin are digital I/O, chip select

control for parallel slave port and analog input 7.

Pin-12 & 31: The function of these pins is to provide ground for logic and I/O pins.

Pin-11 & 32: These pins are used to provide supply to logic and I/O pins.

2.1.2 Crystal Oscillator

Crystal oscillators are also called ceramic resonator. They are used to generate desired

frequency by varying the capacitance of the oscillator[5]. By increasing the capacitance stability

will also increase, however, startup time will also increase. In this project, a crystal oscillator of

20 MHz with two capacitors of 33pF used which provide stable operation [15].

Figure: 2.2 [5]

6

Page 16: Thesis Final and Modified

2.1.3 Reset

External power-on reset circuit is required only if the VDD power-up slope is too slow. The

circuitry for operation of reset is pin1 as shown in figure (2.1). The diode D helps to discharge

the capacitor quickly when VDD power is down, R < 40 kΩ is recommended to make sure that

the voltage drop across R does not violate the device’s electrical specification [6]. Moreover, R1

should be from 100Ω to 1 kΩ will limit any current flowing into MCLR from external capacitor

C, in the event of MCLR/VPP pin breakdown due to electrostatic discharge (ESD) or electrical

overstress (EOS).

Figure: 2. 3 [5]

2.2 Global System for Mobile (GSM)

GSM (Global System for Mobile communications) network is the most deployed mobile

communication network [8]. European Telecommunications Standards Institute (ETSI)

developed this standard for 2G advanced digital cellular systems utilized by mobile phones. It is

an open, advanced digital cellular technology utilized for transmitting mobile voice and data

services [8]. GSM supports voice calls and data transfer speeds up to 9.6 kbps, together with the

transmission of SMS. The important features of GSM are following:

Without any loss in audio quality GSM gives mobility.

Minimum Interference.

Encryption procedures utilized gives high security as a part of the air Interface and also

use of SIM.

SMS (short message services).

Emergency calls

These are different variants of GSM standards which are listed below [7]:

1. GSM 900:

Uplink is from 890 to 915 MHz [8]

Downlink is from 935 to 960 MHz

2. GSM 1800:

Uplink is from 1710 to 1785 MHz7

Page 17: Thesis Final and Modified

Downlink is from 1805 to 1880 MHz

3. GSM 1900:

Uplink is from 1850 to 1909 MHz

Downlink is from 1930 to 1989 MHz

For GSM services this project utilized GSM module. The discussion of GSM module is given

below.

2.3 GSM Module

A GSM module is a specific sort of modem which often accepts any SIM card, and runs

spanning a request with a cell phone agent, just like a cell phone. The function of GSM modem

is similar to a cell phone [7]. Different parts of GSM module are hi-lighted in fig (2.4).

Figure: 2. 4 GSM Module

2.3.1 SIM900D

Simultaneous communication (SIMCom) provides an ultra-compact in addition to reliable

wireless module SIM900D [7]. This can be a complete Quad-band GSM/GPRS module in the

SMT variety and built with a really powerful single-chip processor chip integrating

AMR926EJ-S key, allowing someone to benefit through small measurements and cost-effective

solutions. The SIM900D delivers GSM/GPRS 850/900/1800/1900MHz frequencies for voice.

Features of SIM900D are following:

It weighs about 6.2g

It is Controlled via AT commands

8

Page 18: Thesis Final and Modified

Supplies a voltage range of 3.2 to 4.8V 

Consumes low power approximately 1.0mA(sleep mode)

Operation temperature is about -40 °C to +85°C

2.3.2 GSM Modem Instructions

GSM module follow AT Commands, where AT stands for attention commands. AT commands

[17] are classified as the instructions used for controlling a modem. Every command line starts

with "AT" or "at". For example, when AT dial is passed. Many of the commands are used for

managing wired dial-up modems [7]. AT commands are supported by GSM/GPRS modems and

mobile phones.

There are two types of AT commands [17]:

Basic commands: These commands are AT commands that do not start with "+". For

example, D (Dial), A (Answer), H (Hook control) and O (Return to online data state)

are basic commands.

Extended commands: These commands are AT commands that start with "+". All GSM

AT commands are extended commands. For example, +CMGS (Send SMS message),

+CMSS (Send SMS message from storage), +CMGL (List SMS messages) and

+CMGR (Read SMS messages) are extended commands.

9

Page 19: Thesis Final and Modified

2.3.3 Serial Communication

In this project, serial communication from modem to microcontroller is provided by connecting

Tx and Rx pins to modem Rx and Tx pin respectively [18]. The third pin of modem is

grounded. In this project MAX232 or RS232 is used to communicate and get proper result

between microcontroller and GSM module. Max232 or RS232 both are utilized as logic

converter [7]. If microcontroller works in TTL level and GSM modem works in CMOS level

then logic converter like RS232 is interfaced to get same logic level. However, this project

operates both Microcontroller and GSM modem in TTL logic level.

Figure: 2. 5 Interfacing Microcontroller and GSM modem using MAX232

2.4 Transformer

The history of transformer was commenced in early 1880's. First constant potential transformer

was invented in 1885, in the year 1950, 400KV electrical power transformer was introduced in

high voltage electrical power system [10]. In the early 1970s, unit rating as large as 1100MVA

was produced and 800KV and even higher KV class transformers were manufactured in year of

1980. Transformers have become essential for the AC transmission, distribution, and

utilization of electrical energy.

Figure: 2.5 Transformer

10

Page 20: Thesis Final and Modified

2.4.1 Definition of TransformerA transformer is an electrical device that transfers energy between two or more circuits

through electromagnetic induction Electrical power transformer is a static device which

transforms electrical energy from one circuit to another without any direct electrical connection

and with the help of mutual induction between two windings. It transforms power from one

circuit to another without changing its frequency but may be in different voltage level [10]. 

2.4.2 Working Principle

In a transformer, two coils are arranged concentrically so that the magnetic field generated by

the current in one coil induces a voltage in the other. This physical principle can only be applied

in AC systems, as only a time-varying magnetic field is able to induce a voltage [24]. By using

a different number of winding turns in the two coils, a higher or lower voltage can be obtained.

The working principle of transformer is based on Faraday's Law of electromagnetic

induction. A varying current in the transformer's primary winding creates a varying magnetic

flux in the core [10]. This varying magnetic field at the secondary induces a varying

electromotive force (emf) or voltage in the secondary winding.

Figure: 2.7 Transformer working principal

11

Page 21: Thesis Final and Modified

2.4.3 Types of Transformer

There are two types of transformers [10] which are discussed below:

Step-Up Transformer:

Step up transformer has greater number of turns in secondary winding [24].

Therefore, the output voltage is greater than input voltage.

Step Down Transformer:

Step-down transformer basically step down the voltage because it has less numbers

of turns in secondary winding. Consequently output voltage at secondary winding (VS) is

given by:

Np/Ns=Vp/Vs (2.1)

Where:

NP = Number of turns on primary coil

NS = Number of turns on secondary coil

VP = Primary voltage

VS = Secondary voltage

2.4.4 Faraday's Law of electromagnetic induction

Faraday's law of induction is a basic law of electromagnetism. It is the fundamental operating

principle of transformers.

Whenever a conductor is placed in a varying magnetic field an EMF gets induced across the

conductor, and if the conductor is a closed circuit then induced current flows through it

[24].

Magnetic field can be varied by following:

By moving magnet

By moving the coil

By rotating the coil relative to magnetic field

The magnitude of induced emf is equal to the rate of change of flux linkages with the coil. The

flux linkages is the product of number of turns and the flux associated with the coil.

Consider the conductor is moving in magnetic field. The flux at initial (Φ1) and final (Φ2)

position is given by following relation:

Φ1 = NΦ1 (2.2)

Φ2 = NΦ2 (2.3)

Where N is speed of the motor and Φ is flux.

Change in flux (∆Φ) is calculated by:

12

Page 22: Thesis Final and Modified

∆Φ = N (Φ1 - Φ2) (2.4)

let   Φ1 - Φ2 = Φ (2.5)

Therefore, change in the flux linkage = NΦ

and, rate of change in the flux linkage = NΦ/t

so rate of change of flux linkages = N (dΦ/dt)

According to Faraday's law of electromagnetic induction, rate of change of flux linkages is

equal to the induced emf so,

E = N (dΦ/dt)    (volts) (2.6)

Faraday's law tells us that a changing magnetic flux will induce an emf in a coil. The induced

emf for a coil with N loops is:

E = -N (dΦ/dt) volts (2.7)

Place two coils next to each other. If the first coil has a current going through it, a magnetic

field will be produced, and a magnetic flux will pass through the second coil [10]. Changing the

current in the first coil changes the flux through the second, inducing an emf in the second coil,

which is known as mutual inductance.

Figure: 2.8

13

Page 23: Thesis Final and Modified

2.5 Sensors

Sensors are installed on transformer site which reads and measures the physical quantity from

the distribution transformer and then it converts it into the analog signal. Sensor are used for

sensing load current, ambient temperature, winding temperature and oil level. A sensor is a

device which receives and responds to a signal when touched. A multitude of different

measurable variables can be collected for on-line monitoring. However, it is very rarely useful

to use the entire spectrum. Therefore, sensor technology must be adjusted to the specific

requirements of a particular transformer depending on their age and condition. Following

general set-up of sensors for example is proposed for the use at a Distribution transformer

2.5.1 Potential Transformer (PT)

Voltage and potential transformers are utilized to quantify voltage (potential). The secondary

voltage is significantly corresponding to the primary voltage and contrasts from it in phase by

an angle that is roughly zero. Voltage and potential transformers that are intended for checking

single-phase and three-phase line voltages in power metering applications are utilized primarily

as venture down gadgets. They are intended for interfacing line-to-line or line-to-neutral in the

same path as standard voltmeters [24]. The secondary voltage has an altered relationship to the

primary voltage with the goal that a change in potential inside the primary circuit is checked

precisely by meters associated over the secondary terminals [10].

Voltage and potential transformers can be utilized with voltmeters for voltage estimations, or

with current transformers for wattmeter or watt-hour meter estimations. Voltage transformers

and potential transformers are likewise used to work defensive transfers and gadgets, and in

numerous different applications. Since they are utilized basically as a part of an observing limit,

notwithstanding, voltage or potential transformers by and large oblige more prominent

precision. For illustrations, items utilized by open utilities for deciding power use must be exact

since these voltage or potential transformers are utilized for charging clients.

2.5.2 Current Transformer (CT)

The Current Transformer (C.t), is a sort of "instrument transformer" that is intended to create a

substituting current in its secondary winding is corresponding to the current being measured in

its primary [24].

Current transformers decrease high voltage currents and flows to a much lower esteem and give

an advantageous method for securely observing the real electrical current streaming in an AC

14

Page 24: Thesis Final and Modified

transmission line utilizing a standard ammeter. The main of operation of a current transformer is

the same as that of a conventional transformer [10].

Not at all like the voltage or Power Transformer took a gander at formerly, the current

transformer comprises of stand out or not very many turns as its primary winding . This primary

winding be of either a solitary level turn, a loop of substantial obligation wire wrapped around

the centre or simply a conveyor or transport bar put through a focal gap as demonstrated.

Because of this kind of game plan, the current transformer is regularly alluded as well as an

"series transformer" as the primary winding, never has more than a not very many turns, is in

arrangement with the current convey conductor [24].

The secondary winding have an expansive number of loop turns wound on an overlaid centre of

low-misfortune attractive material which has an extensive cross-sectional region so that the

attractive flux thickness is low utilizing much littler cross-sectional range wire, contingent on

how much the current must be ventures down. This auxiliary slowing down normally evaluated

at a standard 1 Ampere or 5 Amperes.

There are three fundamental sorts of current transformers: "wound", "toroidal" and "bar".

For most current transformers the primary and secondary currents are communicated as a

proportion, for example, 100/5. This implies that when 100 Amps is streaming in the primary

winding will bring about 5 Amps streaming in the secondary winding. By expanding the

quantity of secondary windings, N2, the primary current can be made much littler than the

current in the primary circuit being measured. As it were, as N2 builds, I2 goes around a relative

sum.

Turns Ratio = n = Np /NS = Is/IP (2.8)

Secondary Current, Is = IP (NP/NS) (2.9)

2.5.3 Temperature Sensor (LM35)

This framework spares vitality by effective power administration of a room which utilizes

certain controlling instruments oversaw by a microcontroller. Temperature readings are taken

from an LM35 sensor and contrasted and the client characterized limit threshold

The LM35 [25] series are precision integrated-circuit temperature sensors, whose output voltage

is linearly proportional for the Celsius (Centigrade) temperature. The LM35 thus comes with an

edge over linear temperature sensors calibrated in Kelvin, since the user is not required to

subtract a substantial constant voltage from its output to have convenient Centigrade scaling. It

draws59 μA by its supply, It has very low self-heating, less as compared to 0.1°C.

15

Page 25: Thesis Final and Modified

Figure: 2.9 LM35

2.5.4 Features [25]

The features of LM35 are:

Calibrated instantly with ° Celsius (Centigrade).

Rated full −55° to +150°C range.

Created for remote applications.

Low cost due in order to wafer-level trimming.

Performs from 4 to 30volts, 5v or 12v are used mostly.

Less when compared with 59 μA current drain.

Low self-heating, 0.08°C.

2.5.5 Application

The LM35 can be connected effectively in the same route as other coordinated circuit

temperature sensors. It can be stuck or established to a surface and its temperature will be

around 0.01°Cof the surface temperature

2.5.6 Importance of LM35

We can measure temperature more precisely than using a thermistor. The LM35 creates a higher

yield voltage than thermocouples and may not oblige require that the yield voltage be enhanced

or amplified. A characteristic for the LM35 is that it draws just 60 micro amps from its supply

and has a low self-heating ability [25]. We will need to utilize a voltmeter to sense Vout

16

Page 26: Thesis Final and Modified

2.6 Liquid Crystal Display (LCD)

The display utilized is 20x4 LCD (Liquid Crystal Display); which implies 20 characters every

line by 4 lines. The standard is alluded as JHD204A, which suggest to the controller chip which

gets information from an outside source (PIC18F452) and communicates or interact with the

LCD [23].

EN, RS, and RW are control lines.

The EN line is called "Enable." This control line is utilized for telling the LCD that we are

sending information. For sending information to the LCD, the program should verify that the

line is low (0) and afterward set the other two control lines or put information on the data bus.

At the point when alternate lines are prepared totally [23], bring EN high (1) and should hold up

for the base time needed by the LCD datasheet and end by bringing it low (0) once more.

The RS line is "Register Select" line. At the point when RS is low (0), the information is treated

with a charge or extraordinary guideline, (for example, clear screen, position cursor). At the

point when the RS is high (1), the information sent is text data which is shown on the screen.

For instance, to show the letter "B" on the screen you would set RS high (1).

The RW line is "Read/Write" control line. At the point when RW is low (0), the data on the data

bus is written or composed to the LCD [23]. At the point when RW is high (1), the program is

effectively addressing (or reading) the LCD. One instruction only ("Get LCD status") is read

command. All the others are write commands so RW will dependably be low.

Figure: 2.10 LCD [23]

The pin description of LCD is given in table(2.1)

17

Page 27: Thesis Final and Modified

Table: 2.1 Pin description of LCD

Pin Number Name Descriptions

1 VCC Ground

2 VSS Power supply (+5)

3 VEE LCD contrast

4 RS Control pin

5 R/W Control pin

6 E Control pin

7 DB0 Not required in 4-bit operation

8 DB1 Not required in 4-bit operation

9 DB2 Not required in 4-bit operation

10 DB3 Not required in 4-bit operation

11 DB4 Data or address pin

12 DB5 Data or address pin

13 DB6 Data or address pin

14 DB7 Data or address pin

15 LED+ LED Backlight Anode (+)

16 LED- LED Backlight Cathode (-)

18

Page 28: Thesis Final and Modified

3 Hardware Description

This chapter provides detailed description of different modules of hardware user in in this

project. The hardware component consists of transformer, sensors, GSM module and

microcontroller etc.

3.1 Microcontroller Interfacing

Interfacing [16] of microcontroller with other modules in this project are given in the fig (3.1)

Figure: 3.

19

Page 29: Thesis Final and Modified

Pin description of PIC18F452 which utilized in this project is listed below:

Pin-1: Reset pin

Pin-2: Interface PT sensor 1

Pin-3: Interface CT sensor 1

Pin-4: Interface PT sensor 2

Pin-5: Interface CT sensor 2

Pin-7: Interface temperature sensor (LM35) 1

Pin-8: Interface temperature sensor (LM35) 2

Pins-17, 18 and 19: Interfacing oil level of transformer

Pin-21, 22, 23, 24, 28, 29 and 30: interfacing with LCD

Pin-25: Interfacing MAX232

Pin-15: Interfacing GSM module

Pin-33: Interfacing buzzer

Pin-35: Interfacing relay 2

Pin-34: Interfacing relay 1

Pin-11 and 32: +5V supply

Pin-12 and 31: Grounded

Pin-13 and 14: Interfacing crystal oscillator

3.2 Transformer

The transformer used in this project is an isolation transformer [24]. In this project we monitor

the parameters of this transformer because at that level we can’t use 11 KVA transformers. With

this transformer we install some sensors which measure the parameters of this transformer. It is

a 200W or 0.25KVA transformer.

Figure: 3.2 Isolation transformer20

Page 30: Thesis Final and Modified

3.3 PT Sensor

In order to measure different parameters of the transformer sensors are deployed with

distribution transformer. PT sensor is installed at the transformer side to measure the voltage of

the transformer. This sensor comprises of a step-down transformer which take 220 AC voltage

and

provides 12V

AC which is further

passed to bridge

for

rectification. The

output of rectifier

which is 12V

DC is then further

minimized using

variable resistance. Moreover, this final output is provided to the microcontroller as shown in

fig (3.3)

Figure: 3.3 hardware design of PT sensor

3.4 CT Sensor

CT sensor is also installed at the transformer side it is responsible to the measure of current of

the transformer and response when the current exceeds from its threshold value. This sensor

21

Page 31: Thesis Final and Modified

comprises of a step up transformer, diode (1N4007), variable resistance and a capacitor as

shown in fig (3.4). In CT sensor step-up transformer is connected parallel to the source and load

to measure current. Here is also a scaling factor used which take 1A current and gives 1V DC or

2A and give 2V DC then this output give to the Microcontroller.

Figure: 3.4

3.5 Temperature Sensor

Temperature sensor is used to measure the temperature of the transformer [25]. This sensor

wills response when temperature of the transformer will go beyond the prescribed limit. LM35

sensor is used which has 3-pins and it operate at +5V DC. It convert 10mV to 1 0C. In this

project LM35 is used. The pin description of LM35 is given as:

Pin 1: Input voltage unto 5.5v

Pin 2: Analog voltage out

Pin 3: Ground

Figure: 3.5

3.6 Oil Level Measuring

Sensor

Oil level measuring sensor also

installed at transformer side. It measures the oil level of the transformer because many

transformers are damaged or spoiled due to the oil level decreasing. Therefore, proper operation

22

Page 32: Thesis Final and Modified

of distribution transformer

can be established by ensuring

appropriate oil level. It has

three level low, medium and

high. Hardware design [20]

[21] shown in fig (3.6)

Figure: 3.6

The circuit configuration

of oil level sensor

depicted in figure (3.7) ,

F is the common pin,

A is the low pin, B is

the medium pin and C is the high pin for detecting the oil level of the transformer.

23

Page 33: Thesis Final and Modified

Figure: 3.7

3.7 Power Supply

Power supply is the circuit from which we get our desired dc voltage to run other circuits. The

voltage we get from the principle line is 230V AC yet alternate parts of our circuit require 5V

DC. Consequently a step-down transformer is utilized to get 12V AC which is later changed

over to 12V DC utilizing a rectifier shown in fig (3.8). The yield of rectifier still contains a few

ripples despite the fact that it is a DC signal because of which it is called as Pulsating DC. To

remove the ripples and get smoothed DC power filter circuits are utilized. Here a capacitor is

utilized. The 12V DC is rated down to 5V utilizing a positive voltage controller chip 7805.

Therefore an altered DC voltage of 5V is acquired. Block diagram of power supply is given

below

Input

230 AC

main

Power

supply

Transformer Rectifier Smoothing Voltage

Regulator

Output

Regulated

5V DC

Transformer: A transformer is an electrical device that exchanges energy between two or more

circuits through electromagnetic induction and it steps down high voltage AC to low voltage

AC.

Rectifier: Electrical device that changes AC to DC.

Smoothing: Smooth’s the DC to get rid of ripples.

Regulator: A voltage controller is intended to naturally keep up a consistent voltage level.

24

Page 34: Thesis Final and Modified

Figure: 3.8

3.7.1 Voltage Regulator (7805)

Voltage regulator, any electrical device that keeps up the voltage of a power source inside

acceptable limits [12]. The voltage regulator is expected to keep voltages inside the

recommended range that can be endured by the electrical equipment utilizing that voltage. Such

a device is widely utilized as a part of motor vehicles of different sorts to match the yield

voltage of the generator to the electrical load and to the charging requirements of the battery.

Voltage controllers likewise are utilized as a part of electronic supplies in which excessive

variations in voltage would be detrimental.

e

Figure: 3.9

3.8 MAX 232

MAX 232 is use for serial communication of microcontroller and PC. Its configuration is given

in the figure (3.10)

25

Page 35: Thesis Final and Modified

Figure: 3.10

In this figure (3.11) pin-12 is Rx and pin-11 is Tx both are connected to the pin 26 and 25 of the

microcontroller.

26

Page 36: Thesis Final and Modified

Figure: 3.11

3.9 Relay

Relay is an electrical switch that uses an electromagnet to move the change from the OFF to ON

position rather than an individual moving the switch from OFF to ON. It takes a generally little

amount of power to turn on a relay yet the relay can control something that draws significantly

more power.

Figure: 3.12

3.10 Buzzer

A buzzer is an audio signalling device, it may be electromechanical or mechanical. Use

of buzzers include alarm devices and conformation of user input. These buzzers or beeper are

applicable to automobile equipment’s and its pin type terminal construction enables direct

mounting on to printed circuit boards. The circuit of buzzer is shown in the figure given below:

27

Page 37: Thesis Final and Modified

Figure: 3.13

Electronic symbol of buzzer is shown by figure given below:

Figure: 3.14

4 Flow Chart

28

µc

Initialize

Read voltages

of transform

Page 38: Thesis Final and Modified

Yes

No

Yes

No

Yes

5 Methodology

The methodology for this project is briefly described in the fig (3.15)

29

If

(volts>26

0)

Relay 1 ON

Send SMS

Read current

of transform

If

(amps>6

0)

Buzzer ON

Dial number

Read

temperature

Measure oil

level

Send to PC

Send message

Values

If

(counter>6

0)

Page 39: Thesis Final and Modified

Figure: 3.15

6 Results

The results of this project are given in following figures (3.16)

30

Page 40: Thesis Final and Modified

Figure: 3.16

Different readings of transformer and temperature are given in the following figure (3.17)

Figure: 3.17

Over voltage of transformer is given in figure (3.18)

31

Page 41: Thesis Final and Modified

Figure: 3.18

32

Page 42: Thesis Final and Modified

7 Conclusion

The GSM based monitoring of distribution transformer is useful as compared to manual

monitoring. It is also reliable as it is impossible to monitor the oil level and overloading etc.

After receiving message of any abnormality we can take action regarding any failure occurrence

in the transformers. In power distribution network there are several distribution transformer and

connecting each transformer with such system we can easily figure out that which transformer is

giving abnormal readings with the help of messaged received. So, there is no need for checking

all transformers. The time for getting messages may vary because of GSM network traffic but

still it is better than manual monitoring.

7.1 Future work

For receiving and storing transformer parameters information periodically about all the

distribution transformers of a particular utility in a database application a server module can be

included to this system. This database will be a useful source of information on the utility

transformers. Analysis of these stored data helps the utility in monitoring the behavior of their

distribution transformers and identify faults before any fatal failures. Thus, it will be cost saving

as well as improves system reliability.

33

Page 43: Thesis Final and Modified

References

[1] Leibfried, T, “Online monitors keep transformers in service”, Computer Applications in

Power, IEEE, Volume:11 Issue: 3 , July 1998 Page(s):36 -42.

[2] Chan, W. L, So, A.T.P. and Lai, L., L.; “Interment Based Transmission Substation

Monitoring”, IEEE Transaction on Power Systems, Vol. 14, No. 1, February 1999,

pp. 293-298.

[3] Akbari, A “ A new method for monitoring of distribution transformers”,

Environment and Electrical Engineering (EEEIC), 2012 11th International

Conference on, 18-25 May 2012, pages 632 – 636

[4] Wei He ; Zhanlong Zhang ; Kang Ju ; Jun Deng, “A Distribution transformer

electromagnetic environment multi-parameter monitoring system”, Automation

Congress, 2008. WAC 2008. World, Sept. 28 2008-Oct. 2 2008, Page(s):1 – 4

[5] http://www.microchip.com/wwwproducts/Devices.aspx?product=PIC18F452

[6] http://www.warburtech.co.uk/products/pic/microcontrollers/

40.pin.pic.microcontrollers/microchip.pic18f452.microcontroller/

[7] Huang Yinghong ; Zhang Kun ; Li Zhuang, “General Application Research on

GSM Module” , Internet Computing & Information Services (ICICIS), 2011

International Conference, 17-18 Sept. 2011, Page(s):525 – 528

[8] Rahnema, M., “Overview of the GSM system and protocol architecture”,

Communications Magazine, IEEE (Volume:31 , Issue: 4 ), Page(s):92 – 100

[9] Thomas, James W, Industry and General Applications, IEEE Transactions on

(Volume:IGA-6 , Issue: 6 ), Page(s):563 – 569

[10] Mack, James E.; Shoemaker, Thomas (2006). "Chapter 15 - Distribution

Transformers". The Lineman's and Cableman's Handbook (11th ed.). New York:

McGraw-Hill. pp. 15–1 to 15–22. ISBN 0-07-146789-0

[11] data sheet for 7805 , http://www.engineersgarage.com/electronic-components/7805-

voltage-regulator-ic

[12] 7805 VOLTAGE REGULATOR IC CIRCUIT, http://www.rakeshmondal.info/IC-

7805-Voltage-Regulator

[13] PICmicro™, Mid-Range MCU Family Reference Manual, (Last Accessed on March

2014), http://ww1.microchip.com/downloads/en/devicedoc/33023a.pdf

[14] PIC Microcontroller Memory Organization Tutorial, (Last Accessed on May, 2014),

http://www.microcontrollerboard.com/pic_memory_organization.html

[15] A PIC Microcontroller Introduction (Last Accessed on May 2014), http://www.best-

microcontroller-projects.com/pic-microcontroller.html

34

Page 44: Thesis Final and Modified

[16] PIC 18F452 Product Features, (Last Accessed on June 2014),

https://www.microchip.com/wwwproducts/devices.aspx?dDocName=en010296

[17] GSM AT Commands, (Last Accessed on July 2014),

http://m2msupport.net/m2msupport/sms-at-commands/

[18] Joe Campbell, “C Programmers Guide to Serial Communication” 1st edition, April

1st 1987 by SAMS

[19] Milan Verle, “PIC Microcontrollers”, 1st Edition, 2008 by mikroElektronika, ISBN:

978-86-84417-15-4, http://www.mikroe.com/products/view/11/book-pic-

microcontrollers/

[20] Robert L. Boylestad, Louis Nashelsky, “Electronic Devices and Circuit Theory”, 9th

Edition, 2005 by Prentice Hall, ISBN: 0131189050

[21] Bernard Grob, “Grob Basic Electronics”, 8th Edition, Jan 1997 by McGraw-Hill,

ISBN: 002802253X

[22] PIC Analog to Digital Converter Tutorial, (Last Accessed on August 2014),

http://www.microcontrollerboard.com/analog-to-digital-converter.html

[23] LCD 20x4 datasheet, (Last Accessed on June 2014),

https://www.google.com.pk/#q=lcd+20x4+datasheet

[24] Abulsalam, “Fundamental of electric machines”, edition illustrated, pages 376

[25] Temperature sensor LM35 specification, (Last accessed on July),

http://www.facstaff.bucknell.edu/mastascu/elessonshtml/sensors/TempLM35.html

35

Page 45: Thesis Final and Modified

Appendix A: C Source Code

#include <18F452.h> // ic number define

#device adc=10 //adc 10 bit

#use delay (clock=20000000) // 20mhz

#use rs232(baud=9600,STREAM=pc)

#use rs232(baud=9600,stream=gsm)

#include<lcd.c>

void process_volt_1_ac();

void process_amps_1_ac();

void process_temp_1();

void process_volt_2_ac();

void process_amps_2_ac();

void process_temp_2();

void process_send_pc();

void process_oil_level();

int32 adc_value;

int16 ac_volt_1,ac_volt_2;

int16 ac_amps_1,ac_amps_2;

int16 temp_1,temp_2;

int8 volt1_1,volt1_2,volt1_3;

int8 amps1_1,amps1_2,amps1_3;

int8 temp1_1,temp1_2,temp1_3;

int8 volt2_1,volt2_2,volt2_3;

int8 amps2_1,amps2_2,amps2_3;

36

Page 46: Thesis Final and Modified

int8 temp2_1,temp2_2,temp2_3;

int1 flag1,flag2,flag3,flag4;

int8 counter1;

#DEFINE buzzer PIN_B0

#DEFINE relay1 PIN_B1

#DEFINE relay2 PIN_B2

#DEFINE led1 PIN_D1

#DEFINE oil_l PIN_C2

#DEFINE oil_m PIN_C3

#DEFINE oil_h PIN_D0

void main(){ // main loop

SETUP_ADC_PORTS(ALL_ANALOG); // adc initialize

setup_adc(ADC_CLOCK_INTERNAL);

output_low(relay1);

output_low(relay2);

output_high(buzzer);

output_high(led1);

delay_ms(1000);

output_low(buzzer);

output_low(led1);

delay_ms(100);

flag1 = TRUE;

flag2 = TRUE;

flag3 = TRUE;

flag4 = TRUE;

37

Page 47: Thesis Final and Modified

counter1 = 0;

fprintf(pc,"TRANSFORMER PROJECT\n\r");

delay_ms(100);

lcd_ini(); // lcd initialize

delay_ms(300);

lcd_line1(0);

printf(lcd_data,"LCD_TEST");

fprintf(gsm,"AT\r");

delay_ms(500);

fprintf(gsm,"AT+CMGF=1\r");

delay_ms(500);

fprintf(gsm,"AT+CMGD=1\r");

delay_ms(500);

fprintf(gsm,"AT+CMGS=\"03446656938\"\r");

delay_ms(500);

fprintf(gsm,"System Initialize\r");

delay_ms(500);

output_high(buzzer);

output_high(led1);

delay_ms(1000);

output_low(buzzer);

output_low(led1);

delay_ms(100);

while(true){ // start while loop

38

Page 48: Thesis Final and Modified

output_toggle(led1);

process_volt_1_ac();

process_amps_1_ac();

process_temp_1();

process_volt_2_ac();

process_amps_2_ac();

process_temp_2();

process_water_level();

process_send_pc();

counter1++;

if(counter1>60){

counter1 = 0;

fprintf(gsm,"AT+CMGF=1\r");

delay_ms(500);

fprintf(gsm,"AT+CMGD=1\r");

delay_ms(500);

fprintf(gsm,"AT+CMGS=\"03446656938\"\r");

delay_ms(500);

fputc('T',gsm);

fputc('1',gsm);

fputc('_',gsm);

fputc('V',gsm);

fputc('=',gsm);

fputc(volt1_3,gsm);

fputc(volt1_2,gsm);

fputc(volt1_1,gsm);

39

Page 49: Thesis Final and Modified

fputc('V',gsm);

fputc('T',gsm);

fputc('2',gsm);

fputc('_',gsm);

fputc('V',gsm);

fputc('=',gsm);

fputc(volt2_3,gsm);

fputc(volt2_2,gsm);

fputc(volt2_1,gsm);

fputc('V',gsm);

fputc('T',gsm);

fputc('1',gsm);

fputc('_',gsm);

fputc('A',gsm);

fputc('=',gsm);

fputc(amps1_3,gsm);

fputc('.',gsm);

fputc(amps1_2,gsm);

fputc(amps1_1,gsm);

fputc('A',gsm);

fputc('T',gsm);

fputc('2',gsm);

fputc('_',gsm);

fputc('A',gsm);

fputc('=',gsm);

fputc(amps2_3,gsm);

fputc('.',gsm);

fputc(amps2_2,gsm);

fputc(amps2_1,gsm);

fputc('A',gsm);

fputc('T',gsm);

fputc('E',gsm);

fputc('M',gsm);

40

Page 50: Thesis Final and Modified

fputc('P',gsm);

fputc('1',gsm);

fputc('=',gsm);

fputc(temp1_2,gsm);

fputc(temp1_1,gsm);

fputc('C',gsm);

fputc('T',gsm);

fputc('E',gsm);

fputc('M',gsm);

fputc('P',gsm);

fputc('2',gsm);

fputc('=',gsm);

fputc(temp2_2,gsm);

fputc(temp2_1,gsm);

fputc('C',gsm);

delay_ms(500);

}

} //end while loop

} //end main loop

void process_volt_1_ac()

{

set_adc_channel(0); // adc channel select

adc_value=read_adc();

ac_volt_1 = adc_value;

volt1_3 =0x30+ ac_volt_1/100; //bcd

volt1_2 =0x30+ (ac_volt_1/10) % 10;

volt1_1 =0x30+ (ac_volt_1/1) % 10;

lcd_line1(0);

printf(lcd_data,"T1_V=");

lcd_data(volt1_3);

lcd_data(volt1_2);

41

Page 51: Thesis Final and Modified

lcd_data(volt1_1);

lcd_data('V');

if(ac_volt_1>260){

output_high(relay1);

delay_ms(10);

if(flag3){

flag3 = false;

fprintf(gsm,"AT+CMGF=1\r");

delay_ms(500);

fprintf(gsm,"AT+CMGD=1\r");

delay_ms(500);

fprintf(gsm,"AT+CMGS=\"03446656938\"\r");

delay_ms(500);

fprintf(gsm,"Transformer1 Over Volts\r");

delay_ms(500);

}//end flag3

}

else{

flag3 = true;

output_low(relay1);

delay_ms(10);

}

}

42

Page 52: Thesis Final and Modified

void process_amps_1_ac()

{

set_adc_channel(1); // adc channel select

adc_value=read_adc();

ac_amps_1 = adc_value;

amps1_3 =0x30+ ac_amps_1/100;

amps1_2 =0x30+ (ac_amps_1/10) % 10;

amps1_1 =0x30+ (ac_amps_1/1) % 10;

lcd_line1(10);

printf(lcd_data,"T1_A=");

lcd_data(amps1_3);

lcd_data('.');

lcd_data(amps1_2);

lcd_data(amps1_1);

lcd_data('A');

if(ac_amps_1>60){

output_high(buzzer);

delay_ms(200);

output_low(buzzer);

printf("temp2 ");

delay_ms(200);

if(flag1){

flag1 = false;

fprintf(gsm,"AT+CMGF=1\r");

delay_ms(500);

fprintf(gsm,"AT+CMGD=1\r");

43

Page 53: Thesis Final and Modified

delay_ms(500);

fprintf(gsm,"ATD03446656938;\r");

delay_ms(500);

}//end flag1

}

else{

flag1 = true;

printf("temp3 ");

delay_ms(200);

}

}

void process_volt_2_ac()

{

set_adc_channel(2); // adc channel select

adc_value=read_adc();

ac_volt_2 = adc_value;

volt2_3 =0x30+ ac_volt_2/100;

volt2_2 =0x30+ (ac_volt_2/10) % 10;

volt2_1 =0x30+ (ac_volt_2/1) % 10;

lcd_line2(0);

printf(lcd_data,"T2_V=");

lcd_data(volt2_3);

lcd_data(volt2_2);

lcd_data(volt2_1);

lcd_data('V');

if(ac_volt_2>260){

44

Page 54: Thesis Final and Modified

output_high(relay2);

delay_ms(10);

if(flag4){

flag4 = false;

fprintf(gsm,"AT+CMGF=1\r");

delay_ms(500);

fprintf(gsm,"AT+CMGD=1\r");

delay_ms(500);

fprintf(gsm,"AT+CMGS=\"03446656938\"\r");

delay_ms(500);

fprintf(gsm,"Transformer2 Over Volts\r");

delay_ms(500);

}//end flag3

}

else{

flag4 = true;

output_low(relay2);

delay_ms(10);

}

}

void process_amps_2_ac()

{

set_adc_channel(3); // adc channel select

adc_value=read_adc();

45

Page 55: Thesis Final and Modified

ac_amps_2 = adc_value;

amps2_3 =0x30+ ac_amps_2/100;

amps2_2 =0x30+ (ac_amps_2/10) % 10;

amps2_1 =0x30+ (ac_amps_2/1) % 10;

lcd_line2(10);

printf(lcd_data,"T2_A=");

lcd_data(amps2_3);

lcd_data('.');

lcd_data(amps2_2);

lcd_data(amps2_1);

lcd_data('A');

if(ac_amps_2>60){

output_high(buzzer);

delay_ms(200);

output_low(buzzer);

printf("temp4 ");

putc('\0');

putc(13);

putc(10);

delay_ms(200);

if(flag2){

flag2 = false;

fprintf(gsm,"AT+CMGF=1\r");

delay_ms(500);

fprintf(gsm,"AT+CMGD=1\r");

delay_ms(500);

fprintf(gsm,"ATD03446656938;\r");

46

Page 56: Thesis Final and Modified

delay_ms(500);

}//end flag1

}

else{

flag2 = true;

printf("temp5 ");

delay_ms(200);

}

}

////////////////////////////////////////////////////////////

void process_temp_1()

{

set_adc_channel(4);

adc_value=read_adc();

temp_1 = adc_value;

temp1_3 =0x30+ temp_1/100;

temp1_2 =0x30+ (temp_1/10) % 10;

temp1_1 =0x30+ (temp_1/1) % 10;

lcd_line3(0);

printf(lcd_data,"TEMP1=");

lcd_data(temp1_2);

lcd_data(temp1_1);

lcd_data('C');

}

47

Page 57: Thesis Final and Modified

void process_temp_2()

{

set_adc_channel(5);

adc_value=read_adc();

temp_2 = adc_value;

temp2_3 =0x30+ temp_2/100;

temp2_2 =0x30+ (temp_2/10) % 10;

temp2_1 =0x30+ (temp_2/1) % 10;

lcd_line3(10);

printf(lcd_data,"TEMP2=");

lcd_data(temp2_2);

lcd_data(temp2_1);

lcd_data('C');

}

void process_send_pc(){

fputc('C',pc);

fputc('N',pc);

fputc('T',pc);

fputc('1',pc);

fputc(' ',pc);

fputc(volt1_3,pc);

fputc(volt1_2,pc);

fputc(volt1_1,pc);

fputc('V',pc);

fputc('C',pc);

fputc('N',pc);

fputc('T',pc);

fputc('2',pc);

fputc(' ',pc);

fputc(volt2_3,pc);

48

Page 58: Thesis Final and Modified

fputc(volt2_2,pc);

fputc(volt2_1,pc);

fputc('V',pc);

fputc('C',pc);

fputc('N',pc);

fputc('T',pc);

fputc('3',pc);

fputc(' ',pc);

fputc(amps1_3,pc);

fputc('.',pc);

fputc(amps1_2,pc);

fputc(amps1_1,pc);

fputc('A',pc);

fputc('C',pc);

fputc('N',pc);

fputc('T',pc);

fputc('4',pc);

fputc(' ',pc);

fputc(amps2_3,pc);

fputc('.',pc);

fputc(amps2_2,pc);

fputc(amps2_1,pc);

fputc('A',pc);

fputc('C',pc);

fputc('N',pc);

fputc('T',pc);

fputc('5',pc);

fputc(' ',pc);

fputc(temp1_2,pc);

fputc(temp1_1,pc);

fputc('C',pc);

fputc('C',pc);

49

Page 59: Thesis Final and Modified

fputc('N',pc);

fputc('T',pc);

fputc('6',pc);

fputc(' ',pc);

fputc(temp2_2,pc);

fputc(temp2_1,pc);

fputc('C',pc);

delay_ms(100);

}

void process_oil_level(){

if(!input(oil_l) && input(oil_m) && input(oil_h)){

lcd_line4(0);

printf(lcd_data,"OIL_LEVEL= LOW ");

delay_ms(10);

}

else if(!input(oil_l) && !input(oil_m) && input(oil_h)){

lcd_line4(0);

printf(lcd_data,"OIL_LEVEL= MEDIUM");

delay_ms(10);

}

else if(!input(oil_l) && !input(oil_m) && !input(oil_h)){

lcd_line4(0);

printf(lcd_data,"OIL_LEVEL= HIGH ");

delay_ms(10);

}

else{

lcd_line4(0);

printf(lcd_data,"OIL_LEVEL= EMPTY ");

delay_ms(10); } }

50

Page 60: Thesis Final and Modified

Appendix B: Hardware Schematics

51

Page 61: Thesis Final and Modified

Appendix C: List of Components

Power supply:

Power supply 230VAC

Transformer 200 W or 0.25 KVA

Voltage regulator IC7805

LED 1.63V to 4.8V

Capacitor Different types

Embedded system:

Microcontroller PIC18F452

Crystal oscillator 20 MHz

LCD 20*4

GSM module:

GSM module SIM900D

Sensors:

Sensors CT, PT, LM35 and oil level sensor

MAX232

52

Page 62: Thesis Final and Modified

Appendix D: Project Timeline

DATE

PROJECT ID 40TOTAL NUMBER

OF WEEKS IN PLAN

36

TITLE GSM Based Monitoring Of Distribution Transformer

No.STARTING

WEEKDESCRIPTION OF MILESTONE DURATION

1 1 Study of GSM System & Working 3 weeks

2 4 Study of transformer over load and power loss issues 3 weeks

3 7 Study for Database development/Programming 4 weeks

4 11 Familiarity with Complete System & Put it all together 4 weeks

5 15 Project Design 4 weeks

6 19 Hardware Implementation 6 weeks

7 25 Testing and Results Analysis 6 weeks

8 31 Documentation/Thesis Writing 6 weeks

* You can provide Gantt chart instead of filling this form, if you like

53