+ All Categories
Home > Documents > MICROCONTROLLER BASED PHASE DISPLACEMENT FOR...

MICROCONTROLLER BASED PHASE DISPLACEMENT FOR...

Date post: 28-Mar-2018
Category:
Upload: danglien
View: 228 times
Download: 3 times
Share this document with a friend
65
MICROCONTROLLER BASED PHASE DISPLACEMENT FOR PHASE COMPENSATION OF 3-PHASE INDUCTION MOTOR DURING A PHASE LOSS A PROJECT REPORT Submitted by ARAVINTHAN A (31509105014) BHARATH KUMAR J (31509105301) BHASKAR B (31509105023) in partial fulfillment for the award of the degree of BACHELOR OF ENGINEERING IN ELECTRICAL AND ELECTRONICS ENGINEERING SSN COLLEGE OF ENGINEERING, KALAVAKKAM-603110 ANNA UNIVERSITY : CHENNAI 600 025 MAY 2013
Transcript
Page 1: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

MICROCONTROLLER BASED PHASE

DISPLACEMENT FOR PHASE COMPENSATION OF

3-PHASE INDUCTION MOTOR DURING

A PHASE LOSS

A PROJECT REPORT

Submitted by

ARAVINTHAN A (31509105014) BHARATH KUMAR J (31509105301) BHASKAR B (31509105023)

in partial fulfillment for the award of the degree of

BACHELOR OF ENGINEERING

IN

ELECTRICAL AND ELECTRONICS ENGINEERING

SSN COLLEGE OF ENGINEERING, KALAVAKKAM-603110

ANNA UNIVERSITY : CHENNAI 600 025

MAY 2013

Page 2: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

ii

ANNA UNIVERSITY: CHENNAI 600 025

BONAFIDE CERTIFICATE

Certified that this project report “MICROCONTROLLER BASED PHASE

DISPLACEMENT FOR PHASE COMPENSATION OF 3-PHASE

INDUCTION MOTOR DURING A PHASE LOSS” is the bonafide work of

“A.ARAVINTHAN (31509105014), J. BHARATH KUMAR (3150 9105301)

and B.BHASKAR(31509105023)” who carried out the project work under my

supervision.

SIGNATURE SIGNATURE

Dr. V.KAMARAJ Mr. N. B. MUTHU SELVAN

HEAD OF THE DEPARTMENT SUPERVISIOR

PROFESSOR ASSISTANT PROFESSOR

Department of Electrical and Department of Electrical and

Electronics Engineering Electronics Engineering

SSN College of Engineering SSN College of Engineering

Kalavakkam Kalavakkam

Chennai -603110 Chennai – 603110

Tamilnadu, India Tamilnadu, India

Page 3: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

iii

VIVA-VOCE EXAMINATION

The viva-voce examination for the project work, “MICROCONTROLLER

BASED PHASE DISPLACEMENT FOR PHASE COMPENSATION OF 3-

PHASE INDUCTION MOTOR DURING A PHASE LOSS” submitted by

“A.ARAVINTHAN (31509105014), J. BHARATH KUMAR (3150 9105301)

and B.BHASKAR (31509105023)” held on ----------------------.

INTERNAL EXAMINER EXTERNAL EXAMINER

Page 4: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

iv

ACKNOWLEDGEMENT

Encouragement at the required moment and guidance in the right direction are

indispensible for the success of any project. We have received this in excess from

all corners from various people. We are glad to submit our gratitude to them.

We sincerely thank Dr.Shiv Nadar, Founder of SSN college of Engineering for

providing the best resources in the college.

We thank, Dr.S.Salivahanan Principal, SSN college of Engineering for being a

source of motivation to all staff and students.

We are very grateful to Dr.V.Kamaraj , Professor & HOD of the Department of

Electrical and Electronics Engineering for his constant support and cooperation.

We express our immeasurable gratitude to Mr.N.B.Muthu Selvan, Assistant

Professor Project guide for his advice, help and motivation at every stage of the

project.

We also thank immense pleasure in thanking all the faculty members of

Department of Electrical and Electronics Engineering for their constant guidance

and cooperation. We thank all lab assistants for providing the required material. Finally, we are indebted to our parents and friends without whom the completion

Page 5: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

v

of the project would have not been possible.

ABSTRACT

The power supplied to the rural areas in India is not always a three phase

supply. Sometimes during a day usually two phase supply is given to them. This

makes the agricultural community unable to irrigate during these times. For an

uninterrupted irrigation the three phase supply is obtained by converting the two

phase to a three phase by phase displacement from a healthy phase to a phase that

is not supplied by the producer. During normal three phase operation of motor

when a single phase gets disconnected, it leads to improper operation of motor. To

prevent this single phasing preventer is also implemented.

Keywords : 3 phase induction motor, phase compensation, microcontroller, phase loss

Page 6: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

vi

TABLE OF CONTENTS

CHAPTER TITLE PAGE

ABSTRACT v

LIST OF FIGURES

ix

LIST OF ABBREVIATIONS

xi

1

INTRODUCTION

1

1.1 THREE PHASE OPERATION OF MOTOR

1

1.2 SINGLE PHASING AND PREVENTION

2

1.3 PHASE COMPENSATION

2

2

PANEL BOARD CONSTRUCTION

3

2.1 BLOCK DIAGRAM

3

2.2 POWER SUPPLY

4

2.2.1 Transformer

5

2.2.2 Rectifier

6

2.2.3 Voltage Regulator

9

2.3 PROCESSOR

12

Page 7: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

vii

2.3.1 Ports and Registers

13

2.3.2 Adcon1

13

2.3.3 Pulldown Resistor

15

2.4 INPUT UNIT

16

2.5 OUTPUT UNIT

16

2.5.1 Optocoupler

17

2.5.2 Relay

18

2.5.3 Contactors

20

3

DESIGN OF CIRCUIT

22

3.1 PHASE SENSING CIRCUIT

22

3.2 POWER SUPPLY CIRCUIT

23

3.3 INTERFACING CIRCUIT

24

3.4 CONTACTOR CIRCUIT

25

4

OVERALL OPERATION

27

4.1 MODES OF OPERATION

27

4.1.1 TWO PHASE MODE

27

4.1.2 THREE PHASE MODE

27

4.2 FLOW CHART

29

5

PROGRAMMING

30

5.1 CODE

30

Page 8: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

viii

6

SIMULATION

38

6.1 NORMAL OPERATION OF MOTOR

38

6.1.1 MATLAB SIMULATION

38

6.1.2 STATOR CURRENT WAVEFORM

39

6.1.3 STATOR VOLTAGE WAVEFORM

39

6.2 PHASE COMPENSATED OPERATION

DURING PHASE LOSS

40

6.2.1 MATLAB SIMULATION

40

6.2.2 STATOR CURRENT WAVEFORM

41

6.2.3 STATOR VOLTAGE WAVEFORM

41

7

CONCLUSION

42

APPENDIX 1

43

APPENDIX 2

44

APPENDIX 3

46

REFERENCES

52

Page 9: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

ix

LIST OF FIGURES

FIGURE PAGE

2.1 Block diagram of project

3

2.2 Operation of bridge rectifier during positive half cycle 7

2.3 Operation of bridge rectifier during negative half cycle 8

2.4 Circuit diagram of 78XX

11

2.5

Circuit Diagram for Pulldown Register

15

2.6

Schematic Diagram of MCT2E

17

2.7

Circuit symbol for Relay

18

2.8

Circuit Diagram of Relay

19

2.9

Industrial Contactor

21

3.1

Phase sensing circuit

22

3.2

Power supply circuit

23

3.3

Interfacing circuit

24

3.4

Contactor circuit

26

4.1

Flow chart

29

6.1

Matlab simulation for normal operation

38

6.2

Current waveform for normal operation

39

6.3

Stator voltage waveform for normal operation

39

Page 10: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

x

6.4 Matlab simulation for compensated operation 40

6.5 Stator current waveform for compensated operation

41

6.6

Stator current waveform for compensated operation

41

Page 11: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

xi

LIST OF ABBREVIATIONS

NC

Normally closed

NO

Normally open

LED

Light emitting diode

ADCON

Analog to digital converter

RA

Register of port A

RB

Register of port B

MC

Main contactor

SPP

Single phase prevention

TCC

Touch capacitor contactor

TPSC

Two phase switching contactor

Page 12: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

1

CHAPTER 1

INTRODUCTION

The three phase motors are used widely for the industrial and domestic

purposes. They work properly when three phase supply is given to them. But when

a two phase supply is given to it, the working is not the same as with three phase

supply. To avoid a condition like that either the supply should be cut-off for the

good of the motor or some arrangements could be made to supply balanced three

supply to the motor. This project aims at the protection of the three phase

induction motor against sudden phase loss and operation in two phase by

compensation of the lost phase to increase the continuity of motor operation.

1.1 THREE PHASE OPERATION OF MOTOR

The motor is connected to the three phase supply directly. A 3 phase

induction motor derives its name from the fact that the rotor current is induced by

the magnetic field, instead of electrical connections. The operating principle of a 3

phase induction motor is based on the production of r.m.f. The AC induction motor

is a rotating electric machine designed to operate from a three-phase source of

alternating voltage. The stator is a classic three-phase stator with the winding

displaced by 120°. The rotor has a skewed rotor conductors which are short

circuited by end ring for squirrel cage induction motor. The rotor may also have

winding which are connected to slip ring for slip ring induction motor.

The motor draws twice that of the rated current during starting for a short -

time and runs below the rated current during normal operation. The starting

Page 13: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

2

current is limited by the starters like star-delta starter, rotor resistance starter.

1.2 SINGLE PHASING AND ITS PREVENTION

There actually is no such thing as 2 phase. Only single phase (As most/all

residential services), or three phase (primarily in commercial/industrial) is

available.

When a normal three phase motor 'loses a phase' (blown fuses, open

winding, bad contactor, etc...) while running, the motor continues running due the

flux produced by the other two phases known as ‘single phasing’. This operation

of motor draws more current in other two phases, causes burning of winding.

While it probably will not operate very long, the motor would over heat, and

loose speed rapidly, and they will sometimes make noise. To avoid single phasing

simple method is to simply disconnect the motor.

1.3 PHASE COMPENSATION

When one phase of the three phase supply is not provided by the supplier a

virtual phase is created by the disconnection of particular phase from supply and

inclusion of capacitor which provides phase displacement. It is to compensate the

loss of phase by providing the third phase from the supply. This is done by phase

shifting one of the phases of the healthy phase and giving it to disconnected phase.

This is the main method of this project.

Page 14: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

PANEL BOARD CONSTRUCTION

The construction of

given below.

2.1 BLOCK DIAGRAM

3

CHAPTER 2

PANEL BOARD CONSTRUCTION

The construction of the panel board is as follows. The block diagram is

BLOCK DIAGRAM

Figure 2.1 Block diagram of project

the panel board is as follows. The block diagram is

Page 15: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

4

The block diagram of Fig. 2.1 explains the complete operation. The

phase sensing circuit detects the availability of the three phases and gives status

signals to the microcontroller.

The microcontroller gives the output signals as per input status

signals and operational modes to operate the relay and contactors. The power

supply circuit gives the proper voltage for the operation of microcontroller and

relay. The motor is connected to the supply only through the contactor.

2.2 POWER SUPPLY

The power which is required for the operation of the Microcontroller

board is provided by the power supply unit. . The rectifier board which provides

constant +5v for proper operation of microcontroller. A +12v power supply is

provided for the relay operation.

This unit consists of the following,

1. Transformer,

2. Bridge Rectifier,

3. Voltage Regulator and

4. Capacitor.

Page 16: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

5

The rectifier circuit consists of the full wave bridge rectifier MIC

W10M. From the bridge rectifier the voltage is regulated through the voltage

regulator IC 7805 .Then the voltage is given to the microcontroller as input. This

rectifier circuit is used for sensing the phases. The stepped down voltage of 6 volts

is given as input to rectifier for rectification (230/6 volt transformer). If all the

phases are present the rectifier output for corresponding phase is 4.24 volts. The

voltage regulator IC maintains the output voltage at a constant value. IC7805

provides +5V regulated power supply. Capacitors of suitable values can be

connected at input and output pins depending upon the respective voltage levels. If

all the phases are present, then the output is +5 volts to microcontroller otherwise

zero volts.

The 230v single phase ac supply is given to the input for the transformer

primary and this voltage is stepped down to 12v. The output from the transformer

secondary is given to the bridge rectifier. The bridge rectifier will converts the

given ac supply into dc. The output of the rectifier would have ripples, to reduce

the ripple the output is passes through the filter circuit. Then the filtered output is

given as the input for the voltage regulator, this will produce the constant 5v dc.

2.2.1 TRANSFORMER

A transformer is a device that transfers electrical energy from one circuit to

another through inductively coupled conductors—the transformer’s coils. A

varying current in the first or primary winding creates a varying magnetic flux in

the transformer's core and thus a varying magnetic field through the secondary

winding. This varying magnetic field induces a varying electromotive force

(EMF), or "voltage", in the secondary winding. This effect is called inductive

coupling.

Page 17: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

6

If a load is connected to the secondary, current will flow in the secondary

winding, and electrical energy will be transferred from the primary circuit through

the transformer to the load. In an ideal transformer, the induced voltage in the

secondary winding (Vs) is in proportion to the primary voltage ( Vp) and is given

by the ratio of the number o f turns in the secondary (Ns) to the number of turns in

the primary (Np) as follows:

��

��=��

��

By appropriate selection of the ratio of turns, a transformer thus enables an

alternating current (AC) voltage to be "stepped up" by making Ns greater than Np,

or "stepped down" by ma king Ns less than Np.

The transformer which is used here step down the voltage level from 230v to

6v, ac and the current rating is 500ma. Then this voltage is given as the input for

the bridge rectifier.

2.2.2 RECTIFIER

A diode bridge is an arrangement of four (or more) diodes in a bridge circuit

configuration that provides the same polarity of output for either polarity of input.

When used in its most common application, for conversion of an alternating

current (AC) input into direct current a (DC) output, it is known as a bridge

rectifier. A bridge rectifier provides full-wave rectification from a two-wire AC

input, resulting in lower cost and weight as compared to a rectifier with a 3-wire

input from a transformer with a center-tapped secondary winding.

Page 18: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

The essential feature of a diode bridge is that the polarity of the output is the

same regardless of the polarity at the input.

The current is assumed to flow through electrical conductors from the

positive to the negative pole. In actuality, free electrons in a conductor nearly

always flow from the negative to the positive pole. In the vast majority of

applications, however, the actual direction of current flow is irrelevant.

In the diagrams below, when

diamond is positive, and the input connected to the right corner is a negative,

current flow from the upper supply terminal to the right through diode D1

(positive) to the output, and returns to the lower suppl

(negative).

Figure 2.2 Operation of bridge rectifier

7

The essential feature of a diode bridge is that the polarity of the output is the

same regardless of the polarity at the input.

The current is assumed to flow through electrical conductors from the

to the negative pole. In actuality, free electrons in a conductor nearly

always flow from the negative to the positive pole. In the vast majority of

applications, however, the actual direction of current flow is irrelevant.

In the diagrams below, when the input connected to the left corner of the

diamond is positive, and the input connected to the right corner is a negative,

current flow from the upper supply terminal to the right through diode D1

(positive) to the output, and returns to the lower supply terminal via diode D3

Operation of bridge rectifier during positive half cycle

The essential feature of a diode bridge is that the polarity of the output is the

The current is assumed to flow through electrical conductors from the

to the negative pole. In actuality, free electrons in a conductor nearly

always flow from the negative to the positive pole. In the vast majority of

applications, however, the actual direction of current flow is irrelevant.

the input connected to the left corner of the

diamond is positive, and the input connected to the right corner is a negative,

current flow from the upper supply terminal to the right through diode D1

y terminal via diode D3

during positive half cycle

Page 19: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

When the input connected to the left corner is negative, and the input

connected to the right corner is positive, current flows from the upper

terminal to the right through diode D4 (positive) to the output, and returns to the

lower supply terminal via the diode D2 (negative).

Figure 2.3 Operation of bridge rectifier

In each case, the upper right output remai

negative. Since this is true whether the input is AC or DC, this circuit not only

produces a DC output from an AC input, it can also provide what is sometimes

called "reverse polarity protection".

8

When the input connected to the left corner is negative, and the input

connected to the right corner is positive, current flows from the upper

terminal to the right through diode D4 (positive) to the output, and returns to the

lower supply terminal via the diode D2 (negative).

Operation of bridge rectifier during negative half cycle

In each case, the upper right output remains positive and lower right output

negative. Since this is true whether the input is AC or DC, this circuit not only

produces a DC output from an AC input, it can also provide what is sometimes

called "reverse polarity protection".

When the input connected to the left corner is negative, and the input

connected to the right corner is positive, current flows from the upper supply

terminal to the right through diode D4 (positive) to the output, and returns to the

during negative half cycle

ns positive and lower right output

negative. Since this is true whether the input is AC or DC, this circuit not only

produces a DC output from an AC input, it can also provide what is sometimes

Page 20: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

9

2.2.3 VOLTAGE REGULATOR

A voltage regulator is designed to automatically maintain a constant voltage

level. If the output voltage is too low (perhaps due to input voltage reducing or

load current increasing), the regulation element is commanded, up to a point, to

produce a higher output voltage–by dropping less of the input voltage (for linear

series regulators and buck switching regulators), or to draw input current for longer

periods (boost-type switching regulators); if the output voltage is too high, the

regulation element will normally be commanded to produce a lower voltage.

However, many regulators have over-current protection, so that they will

entirely stop sourcing current (or limit the current in some way) if the output

current is too high, and some regulators may also shut down if the input voltage is

outside a given range. We are using IC7805 here.

The 78xx (sometimes LM78xx) is a family of self-contained fixed linear

voltage regulator integrated circuits. The 78xx family is commonly used in

electronic circuits requiring a regulated power supply due to their ease-of-use and

low cost. For ICs within the family, the xx is replaced with two digits, indicating

the output voltage (for example, the 7805 has a 5 volt output, while the 7812

produces 12 volts). The 78xx lines are positive voltage regulators: they produce a

voltage that is positive relative to a common ground. These devices support an

input voltage anywhere from a couple of volts over the intended output voltage, up

to a maximum of 35 or 40 volts, and typically provide 1 or 1.5 amperes of current.

Page 21: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

10

ADVANTAGES

1. 78xx series ICs do not require additional components to provide a constant,

regulated source of power, making them easy to use, as well as economical

and efficient uses of space. Other voltage regulators may require additional

components to set the output voltage level, or to assist in the regulation

process. Some other designs (such as a switched-mode power supply) may

need substantial engineering expertise to implement.

2. 78xx series ICs have built-in protection against a circuit drawing too much

power. They have protection against overheating and short-circuits, making

them quite robust in most applications. In some cases, the current-limiting

features of the 78xx devices can provide protection not only for the 78xx

itself, but also for other parts of the circuit.

78xx ICs are easy to use and handle but these cannot give an altering voltage

required so Lm317 series of ICs are available to obtain a voltage output from 1.25

volts to 37 volts.

7805 is a voltage regulator integrated circuit. It is a member of 78xx series

of fixed linear voltage regulator ICs. The voltage source in a circuit may have

fluctuations and would not give the fixed voltage output. The voltage regulator IC

maintains the output voltage at a constant value. The xx in 78xx indicates the fixed

output voltage it is designed to provide. 7805 provides +5V regulated power

supply. Capacitors of suitable values can be connected at input and output pins

depending upon the respective voltage levels.

Page 22: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

11

Figure 2.4 Circuit diagram of 78XX

The microcontroller board and the relay need the power supply. The

power supply is given from this rectifier circuit board . It consists of two bridge

rectifiers and two voltage regulators ( ICs 7805 and 7812)as the Rectifier circuit

1.The input to the rectifier board is from the 230/6 volt transformers . The two

outputs from the voltage regulators are 12 Volts and 5 Volts . The 5 Volts is given

to the Microcontroller and the 12 Volts is given to the Relay circuit .

Page 23: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

12

2.3 PROCESSOR

A Microcontroller is used in the circuit for the continuous routine

operation that is done for the working of the whole setup. The processor may

obtain certain signals and operate as per the prescribed instructions. The speed of

the processor depends on the oscillator circuit or crystals connected. The processor

has some cache memory to store the recent events of the processor. The output

signals of the controller is not efficient to drive any components hence we provide

buffers and interfacing circuits. The microcontroller used is PIC18f4550 , 40 pin

microcontroller with 4 ports that can be used as both Input-output ports. The

microcontrollers have inbuilt timers/counters, some memory.

The microcontroller responds to the condition of the phases by sending out

the corresponding control signals as its output. The Microcontroller can be

programmed as many times as possible . Once it is programmed it can be put in the

circuit to process and give out control signals. The Microcontroller is programmed

using PICkit. PICkit is a family of programmers for PIC microcontrollers made by

Microchip Technology. They are used to program and debug microcontrollers, as

well as program EEPROM. The PICkit programmes the Microcontroller according

to the code given. The software toolkit MPLAB Integrated Development

Environment (IDE) is used for writing codes . The codes are written in the

computer language “C”. Microcontroller can also be coded by assembly language.

Page 24: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

2.3.1 PORTS & REGISTERS

It consists of five ports PORT A, PORT B,PORT C ,PORT D and PORT

E. All the ports function both as input

digital ports with pins 1-

well.

2.3.2 ADCON1

For the pins of ports to work as the analog port ,the configuration register has

to be set . Since we use port A pins as analog pins the ADCON1 register should be

configured as below.

13

PORTS & REGISTERS

It consists of five ports PORT A, PORT B,PORT C ,PORT D and PORT

E. All the ports function both as input-output ports. All pins of all the ports are

-6 of PORT A and pins 1-3 of PORT E as analog ports as

For the pins of ports to work as the analog port ,the configuration register has

to be set . Since we use port A pins as analog pins the ADCON1 register should be

It consists of five ports PORT A, PORT B,PORT C ,PORT D and PORT

output ports. All pins of all the ports are

3 of PORT E as analog ports as

For the pins of ports to work as the analog port ,the configuration register has

to be set . Since we use port A pins as analog pins the ADCON1 register should be

Page 25: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

Table 2.1

The output to the microcontroller is given to the relays via optocoupler to

provide isolation. Opto-coupler IC MCT2E is used for the isolation between the

relay and the microcontroller

14

Table 2.1 A/D Port Configuration bits

The output to the microcontroller is given to the relays via optocoupler to

coupler IC MCT2E is used for the isolation between the

relay and the microcontroller side.

The output to the microcontroller is given to the relays via optocoupler to

coupler IC MCT2E is used for the isolation between the

Page 26: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

2.3.3 PULL-DOWN RESISTOR

Pull-down resistors are used in logic circuits to provide of a current path

between common or ground of a circuit and the inputs of logic device (And gate,

Or gate, Inverter, etc). Use of a pull

expected logic level signal is present at the input of an unused logic device, or one

that is connected to intermittently

The idea of a pull

logic device that it is connected to towards the common, thus the device sees a

"Low" logic signal. The resistor is intentionally of a high enough value that if

something else strongly pulls the input toward Vcc, it (the input) wil

"High" logic signal.

The input of the Microcontroller from t

in the state of zero when the phase loss occurs. To ensure the grounding of the

input the microcontroller the pull

Figure 2.5

15

DOWN RESISTOR

down resistors are used in logic circuits to provide of a current path

between common or ground of a circuit and the inputs of logic device (And gate,

Or gate, Inverter, etc). Use of a pull-down resistor insures the presents of an

expected logic level signal is present at the input of an unused logic device, or one

intermittently active external device such as a switch.

The idea of a pull-down resistor is that it weakly "pulls" the input of the

logic device that it is connected to towards the common, thus the device sees a

"Low" logic signal. The resistor is intentionally of a high enough value that if

something else strongly pulls the input toward Vcc, it (the input) wil

The input of the Microcontroller from the phase sensing circuit may no

in the state of zero when the phase loss occurs. To ensure the grounding of the

input the microcontroller the pull-down resistors are used here.

5 Circuit Diagram for Pulldown Register

down resistors are used in logic circuits to provide of a current path

between common or ground of a circuit and the inputs of logic device (And gate,

wn resistor insures the presents of an

expected logic level signal is present at the input of an unused logic device, or one

active external device such as a switch.

"pulls" the input of the

logic device that it is connected to towards the common, thus the device sees a

"Low" logic signal. The resistor is intentionally of a high enough value that if

something else strongly pulls the input toward Vcc, it (the input) will see it as a

he phase sensing circuit may not be

in the state of zero when the phase loss occurs. To ensure the grounding of the

it Diagram for Pulldown Register

Page 27: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

16

2.4 INPUT UNIT

The input to the Microcontroller is the +5 or zero volts from rec tifier

circuit used for sensing. There are five inputs .

• Three inputs - to detect phases from rectified inputs

• One input - to set Mode ( Two phase or Three phase ) from mode switch

• One input - to switch ON/OFF.

2.5 OUTPUT UNIT

The five output of the microcontroller are to operate

• Main contactor ,

• Two phase mode contactor ,

• Touching capacitor contactor,

• Indication of single phase preventer and

• Indication of error signal

These outputs cannot be connected directly to the microcontroller pins since

the controller pins doesn’t have the capability to withstand the current. So we

introduce a interfacing circuit such as optocoupler and relay circuit. A separate

supply is provided to prove the isolation of power and control circuit. The

indications of the single phase preventer and error signal are done by commercial

leds. As they draw very less power they don’t need any isolation so they are

directly connected to the microcontroller pin.

Page 28: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

2.5.1 OPTOCOUPLER

Optocoupler is a component that transfers electrical signals between two

isolated circuits by using light. The optocoupler MCT2E is put between relay and

microcontroller for isolating control signals from high power circuit .

Figure 2.6

OPERATION

An opto-isolator contains a source (emitter) of light, almost always a near

infrared light-emitting diode (LED), that converts electrical input signal into light,

a closed optical channel (also called dielectrical channel, and a photosensor, which

detects incoming light and either generates electric energy directly, or modulates

electric current flowing from an external power supply. The sensor can be a

photoresistor, a photodiode, a phototransistor, a silicon

or a triac. Because LEDs can

17

is a component that transfers electrical signals between two

d circuits by using light. The optocoupler MCT2E is put between relay and

microcontroller for isolating control signals from high power circuit .

Figure 2.6 Schematic Diagram of MCT2E

isolator contains a source (emitter) of light, almost always a near

emitting diode (LED), that converts electrical input signal into light,

a closed optical channel (also called dielectrical channel, and a photosensor, which

light and either generates electric energy directly, or modulates

electric current flowing from an external power supply. The sensor can be a

photoresistor, a photodiode, a phototransistor, a silicon-controlled rectifier (SCR)

or a triac. Because LEDs can sense light in addition to emitting it, construction of

is a component that transfers electrical signals between two

d circuits by using light. The optocoupler MCT2E is put between relay and

microcontroller for isolating control signals from high power circuit .

of MCT2E

isolator contains a source (emitter) of light, almost always a near

emitting diode (LED), that converts electrical input signal into light,

a closed optical channel (also called dielectrical channel, and a photosensor, which

light and either generates electric energy directly, or modulates

electric current flowing from an external power supply. The sensor can be a

controlled rectifier (SCR)

sense light in addition to emitting it, construction of

Page 29: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

symmetrical, bidirectional opto

relay contains a photodiode opto

complementary pair of MOSFETs. A slo

light and a sensor, but its optical channel is open, allowing modulation of light by

external objects obstructing the path of light or reflecting light into the sensor.

2.5.2 RELAY

The output from the mi

.The relay is given a +12 volts power supply from power supply circuit. A relay is

an electrically operated switch. Current flowing through the coil of the relay

creates a magnetic field which attracts

Figure 2.7

18

symmetrical, bidirectional opto-isolators is possible. An optocoupled solid state

relay contains a photodiode opto-isolator which drives a power switch, usually a

complementary pair of MOSFETs. A slotted optical switch contains a source of

light and a sensor, but its optical channel is open, allowing modulation of light by

external objects obstructing the path of light or reflecting light into the sensor.

The output from the microcontroller via the optocoupler is given to relay

.The relay is given a +12 volts power supply from power supply circuit. A relay is

an electrically operated switch. Current flowing through the coil of the relay

creates a magnetic field which attracts a lever and changes the switch contacts.

Figure 2.7 Circuit symbol for relay

isolators is possible. An optocoupled solid state

isolator which drives a power switch, usually a

tted optical switch contains a source of

light and a sensor, but its optical channel is open, allowing modulation of light by

external objects obstructing the path of light or reflecting light into the sensor.

crocontroller via the optocoupler is given to relay

.The relay is given a +12 volts power supply from power supply circuit. A relay is

an electrically operated switch. Current flowing through the coil of the relay

a lever and changes the switch contacts.

Page 30: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

Figure 2.

The coil current can be on or off so relays have two switch positions and

most have double throw (changeover) switch contacts. Relays

switch a second circuit which can be completely separate from the first.

Relays are usually SPDT or DPDT but they can have many more sets of

switch contacts, for example relays with 4 sets of changeover contacts are readily

available.

The relay's switch connections are usually labeled COM, NC and NO.

� COM = Common, always connect to this, it is the moving part of the switch.

� NC = Normally Closed, COM is connected to this when the relay coil is off.

� NO = Normally Open, COM is

� Connect to COM and NO if you want the switched circuit to be on when the

relay coil is on.

19

Figure 2.8 Circuit Diagram of Relay

he coil current can be on or off so relays have two switch positions and

most have double throw (changeover) switch contacts. Relays allow one circuit to

switch a second circuit which can be completely separate from the first.

Relays are usually SPDT or DPDT but they can have many more sets of

switch contacts, for example relays with 4 sets of changeover contacts are readily

The relay's switch connections are usually labeled COM, NC and NO.

COM = Common, always connect to this, it is the moving part of the switch.

NC = Normally Closed, COM is connected to this when the relay coil is off.

NO = Normally Open, COM is connected to this when the relay coil is on.

Connect to COM and NO if you want the switched circuit to be on when the

he coil current can be on or off so relays have two switch positions and

allow one circuit to

switch a second circuit which can be completely separate from the first.

Relays are usually SPDT or DPDT but they can have many more sets of

switch contacts, for example relays with 4 sets of changeover contacts are readily

The relay's switch connections are usually labeled COM, NC and NO.

COM = Common, always connect to this, it is the moving part of the switch.

NC = Normally Closed, COM is connected to this when the relay coil is off.

connected to this when the relay coil is on.

Connect to COM and NO if you want the switched circuit to be on when the

Page 31: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

20

� Connect to COM and NC if you want the switched circuit to be on when the

relay coil is off.

ADVANTAGES OF RELAYS

• Relays can switch AC and DC, transistors can only switch DC.

• Relays can switch higher voltages than standard transistors.

• Relays are often a better choice for switching large currents (> 5A).

• Relays can switch many contacts at once.

DISADVANTAGES OF RELAYS

• Relays are bulkier than transistors for switching small currents.

• Relays cannot switch rapidly (except reed relays), transistors can switch

many times per second.

• Relays use more power due to the current flowing through their coil.

• Relays require more current than many ICs can provide, so a low power

transistor may be needed to switch the current for the relay's coil.

2.5.3 CONTACTORS

A contactor is an electrically controlled switch used for switching a power

circuit, similar to a relay except with higher current ratings. A contactor is

controlled by a circuit which has a much lower power level than the switched

circuit. The contactor is actuated by the low power relay circuit . The contactor

consists of a electromagnetic coil which attracts the moving contacts by changing

Page 32: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

the contact positions. Contactor is of two types namely normally closed (NC) and

normally open (NO).

Figure 2.

21

the contact positions. Contactor is of two types namely normally closed (NC) and

Figure 2.9 Industrial Contactor

the contact positions. Contactor is of two types namely normally closed (NC) and

Page 33: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

3.1 PHASE SENSING CIRCUIT

Figure 3.1 Phase sensing circuit

The above circuit shows the connections for phase sensing circuit. The three

individual phases RYB are connected to three individual transformer(230v/6v)

with respect to neutral. The stepped down 6v is rectified to dc supply by bridge

rectifier. Then the rectified supply is regulated to constant 5v dc by 7805 voltage

regulator. The negative of the three rectified output are common grounded to the

ground of the microcontroller. The positive

22

CHAPTER 3

DESIGNING OF CIRCUIT

PHASE SENSING CIRCUIT

Figure 3.1 Phase sensing circuit

The above circuit shows the connections for phase sensing circuit. The three

individual phases RYB are connected to three individual transformer(230v/6v)

with respect to neutral. The stepped down 6v is rectified to dc supply by bridge

rectified supply is regulated to constant 5v dc by 7805 voltage

regulator. The negative of the three rectified output are common grounded to the

ground of the microcontroller. The positive signal is given input to microcontroller.

The above circuit shows the connections for phase sensing circuit. The three

individual phases RYB are connected to three individual transformer(230v/6v)

with respect to neutral. The stepped down 6v is rectified to dc supply by bridge

rectified supply is regulated to constant 5v dc by 7805 voltage

regulator. The negative of the three rectified output are common grounded to the

given input to microcontroller.

Page 34: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

3.2 POWER SUPPLY CIRCUIT

Figure

This circuit gives the power supply for microcontroller and relay operation.

A 230/(6-0-6) secondary center tapped transformer is connected to two rectifier

circuit and regulator circuit. The 5v rectifier circuit is

transformer whereas 12v rectifier is connected to 6

The 5v &12v supply is regulated by 7805 &7812 respectively.

23

POWER SUPPLY CIRCUIT

Figure 3.2 Power supply circuit

This circuit gives the power supply for microcontroller and relay operation.

6) secondary center tapped transformer is connected to two rectifier

circuit and regulator circuit. The 5v rectifier circuit is connected to 6

transformer whereas 12v rectifier is connected to 6-6 terminals of the transformer.

The 5v &12v supply is regulated by 7805 &7812 respectively.

This circuit gives the power supply for microcontroller and relay operation.

6) secondary center tapped transformer is connected to two rectifier

connected to 6-0 taps of

6 terminals of the transformer.

Page 35: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

3.3 INTERFACING CIRCUIT

24

INTERFACING CIRCUIT

Figure 3.3 Interfacing circuit

Page 36: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

25

The fig 3.3 shows the connection diagram of the microcontroller to the input and

output. The port A bits (RA0 – RA4) of pin no 2,3,4,5,6 respectively are

configured as input ports. The port B bits (RB3 – RB7) of pin no 36,37,38,39,40

respectively are configured as output ports. A external oscillator circuit is

connected to the pin no 13 & 14 respectively. The power supply of +5v is

connected to the pin no 11 & 32 with respect to ground connected to the pins 12 &

31.

The inputs from phase sensing circuit, mode selection switch and start button

are connected through pulldown resistor to provide correct logic level to

microcontroller. The pins 1,11, 12,40,39 are taken out in the order as numbered to

write or read the program from or to computer.

3.4 CONTACTOR CIRCUIT

The figure 3.4 shows the connection of power circuit for the operation. The

three contactors are main contactor, two phase switching contactor, touch capacitor

contactor. The MC and TC contactor are of fully normally open (NO) type. The

TPS contactor has three NO contact and one NC contact.

The MC connects the supply to the motor in both operational mode. The

disconnecting phase in two phase mode is taken through the NC contact which

disconnects the phase from supply during two phase mode. Here we consider Y-

phase as the disconnecting phase. The TC adds the capacitor value during the

starting operation.

Page 37: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

Figure 3.4 Circuit Diagram of Contactor

26

Figure 3.4 Circuit Diagram of Contactor

Page 38: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

27

CHAPTER 4

OVERALL OPERATION

The switching operation is based upon the two operating modes.

4.1 MODES OF OPERATION

4.1.1 TWO PHASE MODE

This mode is programmed to operate during a phase loss by including a

capacitor to phase shift, thereby giving the motor a virtual three phase supply

continuously. The phase that is absent is cutoff from the supply.

During the operation in this mode TPS contactor and TC contactor are switched

on first to isolate the absent phase from supply and includes the capacitor to the

absent phase of motor and another live phase. Thus a phase shift in ac waveform is

obtained to produce a virtual three phase supply.

4.1.2 THREE PHASE MODE

This mode is programmed to operate only when all the three phases are

present in the supply grid .Otherwise supply is cutoff to motor. So the motor will

be ON only when all the three phases are alive. In this mode the normal operation

during the three supply is only desired and the compensated is not desired here.

Page 39: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

28

STATE TABLE

THREE PHASE MODE

TWO PHASE MODE

R-phase Y-phase B-phase Contactor enabled

Motor operation

Error signal

1 0 1 MC,TPS,TC ON OFF

OTHER POSSIBLE STATES --- OFF ON

MC—MAIN CONTACTOR TPS—TWO PHASE SWITCH TC—TOUCHING CAPACITOR

R-phase Y-phase B-phase

Contactor enabled

Motor operation

Single phasing

preventer

Error signal

1 1 1 MC ON OFF OFF

OTHER POSSIBLE STATES --- OFF ON ON

Page 40: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

4.2 FLOWCHART

Figure 4.1 Flow chart for working

29

Figure 4.1 Flow chart for working

Page 41: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

30

CHAPTER 5

PROGRAMMING

The programmed microcontroller is used for the setup as processing unit .The

Microcontroller is programmed using the Pickit 2 . The codes are in C and

compiled through the software MPLAB.

5.1 CODE

#include<p18f4550.h>

#include<delays.h>

void main(void)

{

int a1,b1,c1,d1,x=0,i,s;

ADCON1=0x0F; //configure all pins of port'A' as digital pins

TRISA=0xFF; //make all port 'A' pins as input

TRISB=0x00; //make all port 'B' pins as output

TRISC=0x00;

Page 42: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

31

TRISD=0x00;

TRISE=0x00;

//Initialize all output ports to ‘0’

PORTB=0x00;

PORTC=0x00;

PORTD=0x00;

PORTE=0x00;

while (1)

{

// Read the input from port 'A'

a1=PORTAbits.RA0; //phase 'R' reference

b1=PORTAbits.RA1; //phase 'Y' reference

c1=PORTAbits.RA2; //phase 'B' reference

d1=PORTAbits.RA3; //mode reference

Page 43: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

32

s=PORTAbits.RA4; //switch signal

if(s==0) // checks for switch OFF

{

//set the motor off

PORTBbits.RB7=0; //Main contactor OFF

PORTBbits.RB6=0; //Two phase switching contactor OFF

PORTBbits.RB5=0; //Touching capacitor contactor OFF

PORTBbits.RB4=0; //Error signal (Single phase prevention)

x=0; //flag

}

if(d1==0) //checks for 3 phase mode

{

//checks whether all phases are present and switch in ON

Page 44: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

33

if( (a1==1) && (b1==1) && (c1==1) && (s==1) ) {

//Connects 3phase supply to motor

PORTBbits.RB7=1;

PORTBbits.RB6=0;

PORTBbits.RB5=0;

PORTBbits.RB4=0;

}

else

{

//Disconnects 3phase supply to motor

PORTBbits.RB7=0;

PORTBbits.RB6=0;

PORTBbits.RB5=0;

Page 45: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

34

PORTBbits.RB4=1;

}

}

else if(d1==1) //Checks for two phase mode

{

//checks for phase loss, switch ON and switch OFF

if ( (a1==1) && (b1==0) && (c1==1) && (s==1) && x==0 )

{

//includes capacitor in phase 'Y'

PORTBbits.RB7=0;

PORTBbits.RB6=1;

PORTBbits.RB5=0;

PORTBbits.RB4=0;

Page 46: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

35

//delay to prevent shorting

for(i=0;i<50;i++)

Delay10KTCYx( 10 );

//include touching capacitor

PORTBbits.RB7=1;

PORTBbits.RB6=1;

PORTBbits.RB5=1;

PORTBbits.RB4=0;

//delay

for(i=0;i<50;i++)

Delay10KTCYx( 30 );

//disconnects touching capacitor

PORTBbits.RB7=1;

PORTBbits.RB6=1;

Page 47: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

36

PORTBbits.RB5=0;

PORTBbits.RB4=0;

x=1;

}

else if ( (a1==1) && (b1==0) && (c1==1) && (s==1) && x==1 )

{

//two phase mode operation

PORTBbits.RB7=1;

PORTBbits.RB6=1;

PORTBbits.RB5=0;

PORTBbits.RB4=0;

x=1;

}

else

Page 48: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

37

{

PORTBbits.RB7=0;

PORTBbits.RB6=0;

PORTBbits.RB5=0;

PORTBbits.RB4=0;

}

}

}

}

Page 49: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

6.1 NORMAL OPERATION OF MOTOR

6.1.1 MATLAB SIMULATION

Figure 6.1 Matlab Simulation for normal operation

38

CHAPTER 6

SIMULATION

NORMAL OPERATION OF MOTOR

SIMULATION

Figure 6.1 Matlab Simulation for normal operation

Figure 6.1 Matlab Simulation for normal operation

Page 50: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

6.1.2 STATOR CURRENT WAVEFORM

The stator current waveform during

order of waveform is phase a , b and c.

Figure 6.2 Stator current waveform for normal operation

6.1.2 STATOR VOLTAGE WAVEFORM

The stator voltage waveform during normal operat

waveform is phase a,

Figure 6.3 Stator voltage waveform for normal operation

39

STATOR CURRENT WAVEFORM

The stator current waveform during normal operation is given below. The

rder of waveform is phase a , b and c. Magnitude of all three phases are same

Figure 6.2 Stator current waveform for normal operation

STATOR VOLTAGE WAVEFORM

The stator voltage waveform during normal operation is given below. T

waveform is phase a, b and c. Voltage of all three phases are same.

Figure 6.3 Stator voltage waveform for normal operation

normal operation is given below. The

Magnitude of all three phases are same.

Figure 6.2 Stator current waveform for normal operation

ion is given below. The order of

c. Voltage of all three phases are same.

Figure 6.3 Stator voltage waveform for normal operation

Page 51: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

6.2 PHASE COMPENSATED OPERATION DURING PHASE LOSS

6.1.1 MATLAB SIMULATION

Simulation of three phase induction motor during a phase loss which

compensated by adding capacitor to a healthy phase thereby supplying three phase

supply.

Figure 6.4 Matlab simulation for compensated operation

40

PHASE COMPENSATED OPERATION DURING PHASE LOSS

MATLAB SIMULATION

of three phase induction motor during a phase loss which

by adding capacitor to a healthy phase thereby supplying three phase

Figure 6.4 Matlab simulation for compensated operation

PHASE COMPENSATED OPERATION DURING PHASE LOSS

of three phase induction motor during a phase loss which is

by adding capacitor to a healthy phase thereby supplying three phase

Figure 6.4 Matlab simulation for compensated operation

Page 52: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

6.2.1 STATOR CURRENT WAVEFORM

Figure 6.5 represents

order of waveform is phase a,

of ‘a’ phase current is greater than b and c.

Figure 6.5 Stator current waveform for compensated operation

6.2.2 STATOR VOLTAGE WAVEFORM

Figure 6.6 explains the stator voltage waveform

Figure 6.6 Stator current waveform for compensated operation

41

STATOR CURRENT WAVEFORM

represents the stator current waveform during a phase loss

of waveform is phase a, b and c. Phase ‘a’ is compensated

greater than b and c.

current waveform for compensated operation

STATOR VOLTAGE WAVEFORM

stator voltage waveform in the order phase

current waveform for compensated operation

t waveform during a phase loss. The

is compensated here. Magnitude

current waveform for compensated operation

order phase a, b and c.

current waveform for compensated operation

Page 53: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

42

CHAPTER 7

CONCLUSION

Thus phase displacement for phase compensation of three-phase induction

motor during a phase loss was designed using microcontroller. Powersupply

circuit, phasesensing circuit and interface circuit using pic18f4550 was designed

with three separate pcb board. Interface circuit is used to interface the

supplycircuit and phase sensing with contactor. After testing each PCB board,

entire hardward is implemented. Then program is done. After that the whole setup

is tested for the problem statement. This system have lot of scope whenever and

wherever an uninterrupted operation of three phase motor is required.

SCOPE FOR FUTURE WORK

The project can be improved to provide faster response using high power

switching device .The processor could be updated similarly to provide fast

processing speed using Arduino,Xilinx,etc. The use of solid state devices instead

of contactor such as IGBT.To run motor in two phase mode when any one of the

three phase is absent.

Page 54: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

PIN DIAGRAM OF 78XX

PIN DESCRIPTION

Pin No

1

2

3

IC 7805

IC 7812

43

APPENDIX 1

PIN DIAGRAM OF 78XX

Function

Input voltage (5V-18V)

Ground (0V)

IC 7805 -Regulated output; 5V

IC 7812 -Regulated output; 12V

Name

Input

Ground

Output

Page 55: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

PIN DIAGRAM OF OPTOCOUPLER MCT2E

FEATURES

1. 2500 or 1500 V Isolation.

2. High DC Current Transfer Ratio.

3. Low Cost Dual-In-Line Package.

DESCRIPTION

The MCT2E, MCT2 are optically coupled isolators consisting of a Gallium

Arsenide infrared emitting diode and an NPN silicon phototransistor mounted in a

standard 6-pin dual-in

All electrical parameters are 100

guaranteed to a cumulative 0.65% AQL.

44

APPENDIX 2

PIN DIAGRAM OF OPTOCOUPLER MCT2E

2500 or 1500 V Isolation.

High DC Current Transfer Ratio.

Line Package.

The MCT2E, MCT2 are optically coupled isolators consisting of a Gallium

Arsenide infrared emitting diode and an NPN silicon phototransistor mounted in a

in-line package. Surface Mount Option Available.

All electrical parameters are 100% tested by manufacturing. Specifications are

guaranteed to a cumulative 0.65% AQL.

The MCT2E, MCT2 are optically coupled isolators consisting of a Gallium

Arsenide infrared emitting diode and an NPN silicon phototransistor mounted in a

line package. Surface Mount Option Available.

% tested by manufacturing. Specifications are

Page 56: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

MCT2E—Characteristics

45

Characteristics TA=25°C

Page 57: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

46

APPENDIX 3

Page 58: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

47

Page 59: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

48

ARCHITECTURE

Page 60: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

PIN DIAGRAM OF PIC18F4550

49

OF PIC18F4550

Page 61: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

50

PIN DESCRIPTION OF PIC18F4550

Pin No. Name Description Alternate Function

1 MCLR/VPP/RE3 Master clear

Vpp: programming voltage input RE3: I/O pin of PORTE, PIN 3

2 RA0/AN0

PortA I/O Pins 1-6

AN0: Analog input 0 3 RA1/AN1 AN1: Analog input 1

4 RA2/AN2/VREF-/CVREF

AN2: Analog input 2 VREF-: A/D reference voltage (low) input. CVREF: Analog comparator reference output.

5 RA3/AN3/VREF+ AN3: Analog input3 VREF+: A/D reference voltage (high) input

6 RA4/T0CKI/C1OUT/RCV

T0CKI: Timer0 external clock input. C1OUT: Comparator 1 output RCV:External USB transceiver RCV input.

7 RA5/AN4/SS/HLVDIN/C2OUT

AN4: Analog input 4 SS: SPI slave select input HLDVIN: High/Low-Voltage Detect input. C2OUT: Comparator 2 output.

8 RE0/AN5/CK1SPP

PortE I/O Pins 1-3

AN5: Analog input 5 CK1SPP: SPP clock 1 output.

9 RE1/AN6/CK2SPP AN6: Analog input 6 CK2SPP: SPP clock 2 output

10 RE2/AN7/OESPP AN6: Analog input 7 OESPP : SPP Enabled O/P

Page 62: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

51

11 VDD

Positive supply

12 Vss Ground

13 OSC1/CLKI Oscillator pin 1

CLKI: External clock source input

14 OSC2/CLKO/RA6 PortE I/O Pin 7

CLKO: External clock source output OSC2: Oscillator pin 2

15 RC0/T1OSO/T13CKI

PortC I/O Pins 1-3

T1OSO :Timer1 oscillator output T13CKI: Timer1/Timer3 external clock input.

16 RC1/T1OSI/CCP2/UOE

T1OSI: Timer1 oscillator output CCP2:Capture 2 input/Compare 2 output/PWM2 output UOE: External USB transceiver OE output

17 RC2/CCP1/P1A

CCP1: Capture 1 input/Compare 1 output/PWM1 output. P1A :Enhanced CCP1 PWM output, channel A.

18 VUSB Internal USB 3.3V voltage regulator output, positive supply for the USB transceiver.

19 RD0/SPP0 PortD I/O Pins 1-4

SPP0-SPP4 Streaming Parallel Port data

20 RD1/SPP1 21 RD2/SPP2 22 RD3/SPP3

23 RC3/D-/VM

PortC I/O Pins 5-6

D-: USB differential minus line (input/output) VM: External USB transceiver VM input.

24 RC4/D+/VP

D+: USB differential plus line (input/output). VP: External USB transceiver VP input.

Page 63: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

52

25 RC6/TX/CK

PortC I/O Pins 7-8

TX: EUSART asynchronous transmit. CK: EUSART synchronous clock (see RX/DT).

26 RC7/RX/DT/SDO

RX: EUSART asynchronous receive. DT: EUSART synchronous data (see TX/CK). SDO: SPI data out.

27 RD4/SPP4

PortD I/O Pins 5-8

SPP4:Streaming Parallel Port data

28 RD5/SPP5/P1B

SPP5:Streaming Parallel Port data P1B: Enhanced CCP1 PWM output, channel B

29 RD6/SPP6/P1C

SPP6:Streaming Parallel Port data P1C: Enhanced CCP1 PWM output, channel C

30 RD7/SPP7/P1D

SPP7:Streaming Parallel Port data P1D: Enhanced CCP1 PWM output, channel D

31 Vss Ground

32 VDD

Positive supply

33 RB0/AN12/INT0/FLT0/SDI/SDA PortB I/O Pins 1-8

AN12: Analog input 12. INT0: External interrupt 0. FLT0: Enhanced PWM Fault input (ECCP1 module). SDI: SPI data in. SDA: I2C data I/O.

34 RB1/AN10/INT1/SCK/SCL

AN10: Analog input 10. INT1: External interrupt 1. SCK: Synchronous serial clock input/output for SPI

Page 64: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

53

mode. SCL: Synchronous serial clock input/output for I2C mode.

35 RB2/AN8/INT2/VMO

AN8: Analog input 8. INT2: External interrupt 2. VMO: External USB transceiver VMO output.

36 RB3/AN9/CCP2/VPO

AN9: Analog input 9. CCP2: Capture 2 input/Compare 2 output/PWM2 output. VPO: External USB transceiver VPO output.

37 RB4/AN11/KBI0/CSSPP

AN11: Analog input 11. KBI0: Interrupt-on-change pin. CSSPP: SPP chip select control output.

38 RB5/KBI1/PGM

KBI1: Interrupt-on-change pin. PGM: Low-Voltage ICSP Programming enable pin.

39 RB6/KBI2/PGC

KBI2: Interrupt-on-change pin. PGC: Low-Voltage ICSP Programming enable pin.

40 RB7/KBI3/PGD

KBI3: Interrupt-on-change pin. PGD: In-Circuit Debugger and ICSP programming data pin.

Page 65: MICROCONTROLLER BASED PHASE DISPLACEMENT FOR …retawprojects.com/uploads/Batch-17-2009-13-Project-Report.pdf · microcontroller based phase displacement for phase compensation of

54

REFERENCES

1. Electrical Machines by D P Kothari and I J Nagrath. 2. Solid State Starter with Single Phasing preventer for Three Phase Induction Motor K.L. Mokariya, K.I. Patel 3.Electrical Machines by B.L.Theraja

4. Programming in ANSI C by Balagurusamy

5. PIC18F4550 reference : http://www.microchip.com


Recommended