Faculty Home - Universiti Teknologi Malaysia

advertisement

UNIVERSITI TEKNOLOGI MALAYSIA

COPYRIGHT

PSZ 19:16 (Pind. 1/07)

DECLARATION OF THESIS / UNDERGRADUATE PROJECT PAPER AND

Author’s full name : AHMAD FIRDAUS BIN RAZALI

: MARCH 25 TH 1985 Date of birth

Title : AUTOMATIC EARTH LEAKAGE CIRCUIT BREAKER

(AELCB)

Academic Session : 2008/2009

I declare that this thesis is classified as :

CONFIDENTIAL (Contains confidential information under the

Official Secret Act 1972)*

RESTRICTED (Contains restricted information as specified by the organisation where research was done)*

OPEN ACCESS I agree that my thesis to be published as online open access (full text)

I acknowledged that Universiti Teknologi Malaysia reserves the right as follows:

1.

The thesis is the property of Universiti Teknologi Malaysia.

2.

The Library of Universiti Teknologi Malaysia has the right to make copies for the purpose of research only.

3.

The Library has the right to make copies of the thesis for academic exchange.

Certified by:

SIGNATURE SIGNATURE OF SUPERVISOR

850325-05-5255 PROF DR RUZAIRI B HJ ABD RAHIM

(NEW IC NO. /PASSPORT NO.) NAME OF SUPERVISOR

Date : 8 MAY 2009 Date : 8 MAY 2009

NOTES : * If the thesis is CONFIDENTIAL or RESTRICTED, please attach with the letter from the organisation with period and reasons for confidentiality or restriction.

“I/We* hereby declare that I/we* have read this thesis and in my/our* opinion this thesis is sufficient in terms of scope and quality for the award of the degree of Bachelor of Electrical Engineering

(Control and Instrumentation)”

Signature :

Name of Supervisor :

Date :

....................................................

Prof. Dr. Ruzairi bin Hj Abd Rahim

15 May 2009

AUTOMATIC EARTH LEAKAGE CIRCUIT BREAKER (AELCB)

AHMAD FIRDAUS BIN RAZALI

A report is submitted in partial fulfilment of the requirement for the award of the degree of Bachelor in Electrical Engineering (Control and Instrumentation)

Faculty of Electrical Engineering

Universiti Teknologi Malaysia

MAY 2009

ii

I declare that this is thesis entitled ‘automatic earth leakage circuit breaker’ is the result of my on resource expect as cited in the references. The thesis is has not been accepted for any degree and is not concurrently submitted in candidature of any other degree.

Signature :

Name :

............................................................

Date :

iii

Dedicated, in thankful appreciation for support, encouragement, and understandings to:

My supervisor Prof. Dr. Ruzairi bin Hj Abdul Rahim

My beloved mother, Jemilah Bte Abdul Rahman and father, Razali Bin Mohd Yusof

My Brother and Sister, Ahmad Faisal and Siti Naquiah;

Also all my beloved friend SEI student batch 2006-2009,

And all person contribute to this project

iv

ACKNOWLEDGEMENT

Firstly, Alhamdulillah and thanks to the God. Because of ALLAH, this Final year project finally finished before the dateline. If not, this FYP will never finish.

I would like to express my special thanks to my supervisor, Prof. Dr. Ruzairi bin Hj Abdul Rahim for his advices, continual guidance and commitment in helping me doing the Final Year Project (FYP). He always gives the idea and knowledge in helping me to carry out the FYP in a better way. His knowledge is very useful for me to do the research appropriately. I also want to thanks for cooperation given by all my friend where are same supervisor as me. Like Mohd Firdaus bin Ahmad,

Suzanna Binti Ridzuan Aw @ Aw Yat Kwong, Muhammad Nazri Bin Samat,

Hafizul B Haron, and Henry Anak Sam. Their helpful attitude is under my appreciation and it’s not affordable pay with money.

Finally, the most important, my project would not be carried out smoothly without the continuing support and encouragement given by my parent, lecturers, tutors, SEI and SEM students, and Diploma-Degree student intake 2006. I would like to express my sincere gratitude to them especially for their helping during the time in need.

Thank you.

v

ABSTRAK

Alat pemutus litar sangat diperlukan di setiap rumah, kilang mahupun dimana sahaja tempat yang memerlukan bekalan kuasa. Alat ini berfungsi sebagai pemutus litar dari terima bekalan kuasa. Ada dua keadaan yang menyebabkan alat ini memutuskan litar, iaitu apabila berlakunya arus berlebihan atau voltan berlebihan.

Apabila litar elektrik diputuskan, pengguna perlu menolak semula suis bar untuk mendapatkan kembali bekalan kuasa. Namun, situasi ini hanya boleh berlaku sekiranya pengguna berada berhampiran dengan pemutus litar tersebut.

Walaubagaimanapun, ada juga produk pemutus litar dipasaran yang mampu menghidupkan litar setelah terputus dengan sendiri. Projek ini akan membincangkan untuk mengapplikasikan dua perkara. Pertama, akan membincangkan kaedah yang perlu digunakan untuk menjadikan pemutus litar ini dihidupkan tanpa perlu bantuan pengguna. Kedua, akan membincangkan kaedah yang perlu digunakan agar pengguna mengetahui berlakunya litar pintas tanpa perlu berada berhampiran dengan pemutus litar. Untuk perkara pertama, pemilihan mekanisma yang betul perlu dilakukan agar masalah daya tujah di bar suis itu dapat diatasi seperti penggunaan motor yang mempunyai daya yang kuat. Sementara itu, perkara kedua, pemilihan system GSM modem ( G lobal S ystem for M obile communication) adalah yang terbaik. Hal ini kerana, dengan mengguna GSM modem, pengguna akan dapat menerima pengetahuan situasi pemutus litar yang di rumah. Maka, bahasa AT-

Command digunakan untuk menggerakkan GSM modem. Pada masa yang sama,

PIC mikropengawal digunakan dalam projek ini untuk berfungsi sabagai mengawal segala perjalanan operasian. Projek ini bukan sahaja satu applikasi teknologi dalam kehidupan kita seharian, tetapi dapat menyelesaikan beberapa masalah. Contohnya, mengelak makanan beku cair dalam peti sejuk atau rumput mati kerana pemancut air tidak berfungsi. Secara keseluruhannya, system GSM bukan sahaja kita dapat gunakan di telefon bimbit sahaja, malah teknologi itu dapat diperluaskan penggunaannya dalam mempermudahkan kehidupan manusia.

vi

ABSTRACT

The earth leakage circuit breaker is important equipment to install at each of house, factory, or every place that need the power supply. This circuit breaker is use to trip the circuit in a specific condition. Usually, there have two conditions to trip.

There are when overload happen and over current happen. When the trip occurs, the user need to pull up the lever to back to normal condition. This situation can be happen if there has somebody nearby the circuit breaker. By the way, there are still has an automatic circuit breaker in the market. So, this project will discuss about two elements that will be applied. First element, we will discuss about the mechanism to use to pull up the lever of the Earth Leakage Circuit Breaker. Second element, we will discuss the method to use as an alert to the user if the trip occurs. For the first element, the force factor is needed to take as important thing to consider. So, the suitable mechanism with the high torque can be use to pull up the lever like DC motor. While, for the second element, the GSM modem is the good choose for the system. By using the GSM modem, the user can get the alert for the situation of the circuit breaker at home. So, the AT-Command language will be use to operate the

GSM modem. In the same time, PIC microcontroller is being use for this project to control overall flow operation. This project is one of the applications of technology in our life. Besides, it also can solve a few of problem that we face every day. Likes, food rots in the fridge or our farm may suffer serious damage because of the water sparkler cannot function. Lastly, the GSM modem system not only can use with our hand phone, but also this technology can broad use in way to make life become ease.

1

TABLE OF CONTENT

CHAPTER

DECLARATION

TITLE

DEDICATION

ACKNOWLEDGEMENT

ABSTRAK

ABSTRACT

TABLE OF CONTENT

LIST OF TABLE

LIST OF FIGURE

CHAPTER 1

1.1 Background of ELCB

1.2 Objective of the Project

1.3 Scope of Works

1.4 Problem Statement

3

3

1

2 vi vii xii xiii

PAGE ii iii iv v vii

2 LITERATURE REVIEW

2.1 Circuit Breaker

2.1.1 Earthing System

2.1.2 Operation

2.1.3 Arc Interruption

2.1.4 Earth Leakage Circuit Breaker

2.1.5 Type of ELCB

2.1.5.1 Voltage Operated Type

2.1.5.2 Current Operated Type

2.1.6 Residual Current Circuit Breaker (RCCB)

2.1.6.1 The Operation of RCCB

2.2 Reclosed the ELCB Using Suitable Mechanism

2.2.1 Solenoid

2.2.1.1 Function of Solenoid

2.2.2 Servo Motor

2.2.2.1 Function of Servo Motor

2.3 Existing In the Market

2.3.1 Auto Reset ELCB System (ARES)

2.3.2 LTC1153 System

2.3.3 Gelco

8

9

4

5

15

17

18

20

23

24

26

10

11

12

13 viii

3

2.4 Global System for Mobile (GSM)

2.4.1 Technology Overview

2.4.2 Short Message Service (SMS)

2.4.3 SMS Protocol

2.4.3.1 Block Mode

2.4.3.2 Text Mode

2.4.3.3 PDU Mode

2.5 Serial Communication

2.5.1 RS 232

HARDWARE DESIGN

3.1 Mechanical Design

3.1.1 Mechanical Part and Component

3.1.2 Mechanical Model

3.2 Electronic Design

3.2.1 Circuit Block Diagram

3.2.2 Circuit Design

3.2.2.1 PIC Microcontroller Board

3.2.2.2 Dc Driver Motor Circuit

3.2.2.3 Voltage Regulator 5v Circuit

3.2.2.4 Max 232 Circuit

3.2.2.5 Switch and Led Circuit

30

32

32

33

34

27

28

29

39

40

41

43

44

45

46

47

48 ix

4

5

3.3 Model Design

3.4.2 Flowchart

3.4 Project Programming

3.4.1 Mikroelektronika-MikroC

50

52

54

RESULT AND TESTING

4.1 Torque Motor

4.2 AVR Output

4.3 PIC Microcontroller Board

4.4 DC Motor Driver Circuit

4.5 Max 232 through the Hyper Terminal

4.6 The GSM Modem through the Hyper Terminal

4.7 The PIC Microcontroller via MAX 232 Connect

the GSM Modem

4.8 Achievement and Final Result

4.9 Project problem

55

58

59

60

61

62

65

66

67

RECOMMENDATION AND CONCLUSION

5.1 Recommendation

5.2 Future Development

68

69 x

5.3 Conclusion

REFFERENCE

APPENDIX

69

70

72 xi

xii

LIST OF TABLE

TABLE NO.

2.1

2.2

3.1

4.1

4.2

Pin connection and function

The voltage limit

The I/O port list

TITLE

The value of measurement

Table of AT command for the GSM modem

PAGE

36

37

44

58

64

xiii

LIST OF FIGURE

2.7

2.8

2.9

2.10

2.11

2.12

2.13

2.14

FIGURE

2.1

2.2

2.3

2.4

2.5

2.6

2.15

2.16

2.17

2.18

2.19

2.20

3.1

TITLE

Voltage Operated Type (ELCB)

Current Operated Type (RCCB)

The Residual Current Circuit Breaker

Inside the RCCB

Magnetic Field Created By Solenoid

Solenoid Structure with Core

Position of Solenoid when normal condition

Position of Solenoid after Re-closed the ELCB

Sample of the servomotor

Relationship between the pulse and the angular position

A servo motor is disassembled

The view of the Syahrun Nizam’s design

The view of the Auto reset ELCB system (ARES)

The view of circuit design LTC 1153

The graph shown the trip delay timer

The sample of the LT 1153 Integrated Circuit

The model of Gelco ELCB

Simple RS 232 Null Modem

The view of IC MAX 232

Inside the MAX 232

Type of aluminium

21

22

23

25

18

18

19

20

PAGE

11

12

13

14

15

16

25

26

26

36

37

38

39

3.12

4.4

4.5

4.6

4.7

4.8

4.9

3.13

3.14

3.15

3.16

3.17

4.1

4.2

4.3

3.2

3.3

3.4

3.5

3.6

3.7

3.8

3.9

3.10

3.11

Nuts, Bolts, Sliding Door Roll and screws

The cut and bent part of aluminium

The Mechanical Part

The DC motor’s housing

The block diagram

The PIC microcontroller board

The DC Driver Motor Circuit

The Voltage regulator 5V circuit

The view of MAX 232 pin

The connection of MAX232 with GSM modem and PIC microcontroller

The LED circuit

The switch circuit

The black box, inside black box and ELCB side

The overall view of the model

Interfacing of Mikroelektronika mikcoC

Flowchart of the project

Sample RC Servo motor

Sample of LINIX stepping motor

Sample of DC motor

The Automatic Voltage Regulator circuit

PIC microcontroller board

DC Motor Driver circuit

Result from the hyper terminal A

Result from the hyper terminal B

Overview of GSM modem connection

39

41

42

42

43

45

46

47

48

48

49

58

59

60

62

63

65

54

56

56

57

50

51

51

53 xiv

CHAPTER 1

INTRODUCTION

1.1

Background of Earth Leakage Circuit Breaker (ELCB)

An Earth Leakage Circuit Breaker (ELCB) is a safety device used in electrical installations with high earth impedance to prevent shock. It also known as a device that protect consumer from electric shock. This gadget must be fitted in every electric assembly. ELCBs were mainly used on TT earthing systems or dry local ground conditions. The ELCBs have two type of operated. There are voltage operand and current operand.

Nowadays, ELCBs have been mostly replaced by Residual-current devices

(RCDs). The RCD is current operand ELCBs type. Few years ago, there was voltage operand ELCBs, but its utilisation was currently had been abolished because it was less effective. So, the voltage operand ELCB needs to be replaced with the current operand ELCB. Accredited electric wireman service or electric contractor who registered with Energy Commission is required to replace this ELCB, because current operand ELCB is more sensitive to any damaged in assembly and electrical

2 appliances at your house. The RCD is an electrical wiring device that disconnects a circuit whenever it detects that the electric current is not balanced between the phase conductor and the neutral conductor. Such an imbalance is sometimes caused by current leakage through the body of a person who is grounded and accidentally touching the energized part of the circuit. A lethal shock can result from these conditions; RCDs are designed to disconnect quickly enough to mitigate the harm caused by such shocks.

Earth Leakage Circuit Breaker is one of the home safety systems in our life today.

ELCB must to reset button which is to reclosed circuit breaker when the tripping occur. Today, many of people busy with work and usually not at home. The problem are when the over voltage or current leakage at live conductor, it can trip the circuit breaker and the whole house will not get the power supply. This situation can make certain important component or equipment cannot to operate, this situation take time to switch on the button at circuit breaker when user not at home. When the circuit breaker is tripping, it must to user for reclosed manually.

1.2 Objective of the Project

The objective of this project is to make a system that can tell an alert to the house’s owner if the earth leakage circuit breaker (ELCB) trip occur at home especially when nobody at home. And also the owner can send sms to command the system to reclosing the ELCB. Beside, by using my project it can prevent some of problems become serious after the ELCB trip and nobody nearby not known. Likes food rots in fridge and plant wither through lack of water.

3

1.3 Scope of the Work

The scopes of this project are firstly by understanding the overview concept of the operation of the Earth Leakage Circuit Breaker. Secondly, I need to find the suitable mechanism to pull back the ELCB. Studying and analysis the operation of the Global

System for Mobile communications (GSM) especially the command to send and receive the message. Thirdly, get to know how to use the PIC microcontroller model

PIC16F873A especially the connection for the input and output, writing and assembly the program, and the other circuit need to support the microcontroller like oscillator circuit.

1.4 Problem of Statement

Nowadays, most of the ELCB at our home usually when trip, it need the user reclose manually. However, some of the problem will occurs and become serious problem when nobody nearby or if the trip is not known. This problem can be prevent by make the ELCB is be able reclose without need anybody nearby. Then, we need to find out the suitable mechanism to use pull back or reclose the ELCB. This mechanism supposes to be able pull back the ELCB by implementing the appropriate force. This mechanism will operate by following the order from the PIC microcontroller. In the same time, some of rule and regulation from Garis Panduan

Pendawaian Elektrik Di Bangunan Kediaman by Suruhanjaya Tenaga Malaysia need to followed. Beside, this ELCB will reclose not by itself but it will reclose by follow demand from the house’s owner.

CHAPTER 2

LITERATURE REVIEW

2.1 Circuit Breaker

A circuit breaker is an automatically-operated electrical switch designed to protect an electrical circuit from damage caused by overload or short circuit. Unlike a fuse, which operates once and then has to be replaced, a circuit breaker can be reset (either manually or automatically) to resume normal operation. Circuit breakers are made in varying sizes, from small devices that protect an individual household appliance up to large switchgear designed to protect high voltage circuits feeding an entire city.

Usually, the automatic circuit breaker can use to protect the electric circuit by equipped with trip coil which is connected to the relay. The relay is creating for open the circuit breaker in automatically when the abnormal situation happens like over current.

2)

3)

4)

5

The circuit breakers duties are;

1) Will bring current to the full load continuously without causing the over heat and destroy.

Will open and close the circuit when no load.

Make or break the current in normal operation.

Connect and break the short circuit until back to normal

2.1.1 Earthing System

In electricity supply systems, an earthing system is defined as the electrical potential of the conductors relative to that of the Earth's conductive surface. The choice of earthing system involve for the safety and electromagnetic compatibility of the power supply. For your information, regulations for earthing (grounding) systems differ considerably between different countries.

A protective earth (PE) connection ensures that all exposed conductive surfaces are at the same electrical potential as the surface of the Earth. This PE is to avoid the risk of electrical shock if a person touches a device in which an insulation fault has occurred. It ensures that in the case of an insulation fault (a "short circuit"), a very high current flows, which will trigger an overcurrent protection device (fuse, circuit breaker) that disconnects the power supply.

6

A functional earth connection serves a purpose other than providing protection against electrical shock. In contrast to a protective earth connection, a functional earth connection may carry a current during the normal operation of a device.

Functional earth connections may be required by devices such as surge suppression and electromagnetic interference filters, some types of antennas and various measurement instruments. Generally the protective earth is also used as a functional earth, though this requires care in some situations.

There are two main approaches to the problem of how to disconnect power when a live wire comes into contact with metalwork attached to the earthing system: One way is to get the resistance through the fault path and back to the supply very low by having a metallic connection from the earth back to the supply transformer (a TN system). Then when a fault happens a very high current will flow rapidly blowing a fuse (or tripping a circuit breaker).

The second approach, where such a direct connection is not used (a TT system), the resistance of the fault path back to the supply is too high for the branch circuit overcurrent protection to operate (blow a fuse or trip a circuit breaker). In such case a residual current detector is installed to detect the current leaking to ground and interrupt the circuit.

2.1.2 Operation

All circuit breakers have common features in their operation, although details vary substantially depending on the voltage class, current rating and type of the circuit breaker. The circuit breaker must detect a fault condition; in low-voltage circuit breakers this is usually done within the breaker enclosure. Circuit breakers

7 for large currents or high voltages are usually arranged with pilot devices to sense a fault current and to operate the trip opening mechanism. The trip solenoid that releases the latch is usually energized by a separate battery, although some highvoltage circuit breakers are self-contained with current transformers, protection relays, and an internal control power source.

Once a fault is detected, contacts within the circuit breaker must open to interrupt the circuit. Some mechanically stored energy within the breaker is used to separate the contacts, although some of the energy required may be obtained from the fault current itself. The stored energy may be in the form of springs or compressed air. Small circuit breakers may be manually operated; larger units have solenoids to trip the mechanism, and electric motors to restore energy to the springs.

The circuit breaker contacts must carry the load current without excessive heating, and must also withstand the heat of the arc produced when interrupting the circuit. Contacts are made of copper or copper alloys, silver alloys, and other materials. Service life of the contacts is limited by the erosion due to interrupting the arc. Miniature circuit breakers are usually discarded when the contacts are worn, but power circuit breakers and high-voltage circuit breakers have replaceable contacts.

When a current is interrupted, an arc is generated - this arc must be contained, cooled, and extinguished in a controlled way, so that the gap between the contacts can again withstand the voltage in the circuit. Different circuit breakers use vacuum, air, insulating gas, or oil as the medium in which the arc forms. Different techniques are used to extinguish the arc including:

Lengthening of the arc

Intensive cooling (in jet chambers)

Division into partial arcs

Zero point quenching

8

Finally, once the fault condition has been cleared, the contacts must again be closed to restore power to the interrupted circuit.

2.1.3 Arc Interruption

Miniature low-voltage circuit breakers use air alone to extinguish the arc. Larger ratings will have metal plates or non-metallic arc chutes to divide and cool the arc.

Magnetic blowout coils deflect the arc into the arc chute. In larger ratings, oil circuit breakers rely upon vaporization of some of the oil to blast a jet of oil through the arc.

Gas (usually sulfur hexafluoride) circuit breakers sometimes stretch the arc using a magnetic field, and then rely upon the dielectric strength of the sulfur hexafluoride

(SF6) to quench the stretched arc.

Vacuum circuit breakers have minimal arcing (as there is nothing to ionize other than the contact material), so the arc quenches when it is stretched a very small amount (<2-3 mm). Vacuum circuit breakers are frequently used in modern medium-voltage switchgear to 35,000 volts. Air circuit breakers may use compressed air to blow out the arc, or alternatively, the contacts are rapidly swung into a small sealed chamber, the escaping of the displaced air thus blowing out the arc. Circuit breakers are usually able to terminate all current very quickly: typically the arc is extinguished between 30 ms and 150 ms after the mechanism has been tripped, depending upon age and construction of the device.

9

2.1.4 Earth Leakage Circuit Breaker

There are several types of circuit breaker such as Mole Case Circuit Breaker

(MCCB), Miniature Circuit Breaker (MCB), Earth Leakage Circuit Breaker (ELCB),

Vacuum Circuit Breaker (VCB), Oil Circuit Breaker (OCB), and others. For this literature review, I will focus on the ELCB only.

An Earth Leakage Circuit Breaker (ELCB) is a safety device used in electrical installations with high earth impedance to prevent shock. Many electrical installations have relatively high earth impedance. This may be due to the use of a local earth rod (TT systems), or to dry local ground conditions.

These installations have a major problem if no ELCB or RCD is used. During live to earth fault current, two conditions occur. Because earth impedance is high,

1. Not enough current exists to trip a fuse or circuit breaker, so the condition persists unclear indefinitely

2. The high impedance earth cannot keep the voltage of all exposed CPC connected metalwork to a safe voltage - all such metalwork may rise to close to live conductor voltage.

This is a dangerous condition, and was a safety risk in historic electrical installations.

The ELCB makes such installations much safer by cutting the power if these dangerous conditions occur.

10

2.1.5 Type of ELCB

There are two types of common ELCB which are: i) Voltage Operated Type ii) Current Operated Type

2.1.5.1 Voltage Operated Type

Figure 1 shows the internal circuit of voltage operated type of ELCB that consist of test button, test winding and main switch. Two earth terminals are required which are the frame earth to which all non-conducting metallic parts of equipment are connected and the ELCB reference earth. This ELCB will normally operate when the voltage across the coil, which depends to voltage of the frame earth with respect to the reference earth, exceeds more than 40V. Even though, ELCB not preferable now day because of not efficient and not suitable to protect the building. The ELCB instalment also complex and need to make sure the earth electrode buried far away from other iron materials that can less the efficient of device reaction. This is also because of behaviour during leakage current, current flowing through human body most hazardous compare to voltage. Today, this type of ELCB is not allowed use by the Suruhanjaya Tenaga Malaysia to residential area.

11

Figure 2.1

: Voltage Operated Type (ELCB)

2.1.5.2 Current Operated Type

Figure 2 shows the internal circuit of current operated type of ELCB that consist of test button, test resistor, main winding, and damage winding. Current operated type will function by detect leakage current to earth compare to voltage operated type will function by detect leakage voltage. Current operated type also known as Residual

Current Circuit Breaker (RCCB). The operation is based on a fault current, causing a difference between the line current and neutral current. This difference is used to energize the solenoid, which causes the switch to open. Under normal operating condition, two identical windings will carry the main current. Since the currents are equal and opposite through the two windings, so there will be no induced electromagnetic field on the detector winding. Thus the operating coil will not be energized. However, in case of a fault the line and neutral currents will not equal and the trip coil will be energized due to the induced currents in the detector winding.

12

Figure 2.2: Current Operated Type (RCCB)

2.1.6 Residual Current Circuit Breaker (RCCB)

A residual current circuit breaker (RCCB) is similar to that of a residual current device (RCD), is an electrical wiring device that disconnects a circuit whenever it detects that the electric current is not balanced between the phase conductor and the neutral conductor. Such an imbalance is sometimes caused by current leakage through the body of a person who is grounded and accidentally touching the energized part of the circuit. A RCCB is without integral overcurrent protection, the circuit breaker is a residual current operated switching device not designed to perform the functions of protection against overload and/or short-circuit.

Figure 2.3

: The Residual Current Circuit Breaker

13

14 mechanically and therefore trips out on power failure, a useful feature for equipment that could be dangerous on unexpected re-energisation.

Figure 2.4: Inside the RCCB

The incoming supply live and the grounded neutral conductors are connected to the terminals at (1) and the outgoing load conductors are connected to the terminals at

(2). The earth conductor (not shown) is connected through from supply to load uninterrupted. When the reset button (3) is pressed the contacts ((4) and hidden behind (5)) close, allowing current to pass. The solenoid (5) keeps the contacts closed when the reset button is released.

The sense coil (6) is a differential current transformer which surrounds (but is not electrically connected to) the live and neutral conductors. In normal operation, all the current down the live conductor returns up the neutral conductor. The currents in the two conductors are therefore equal and opposite and cancel each other out. Any fault to earth, for example caused by a person touching a live component in the attached appliance, causes some of the current to take a different return path which means there is an imbalance (difference) in the current in the two conductors (single phase case), or, more generally, a nonzero sum of currents from among various conductors

(for example, three phase conductors and one neutral conductor).

15

This difference causes a current in the sense coil (6) which is picked up by the sense circuitry (7). The sense circuitry then removes power from the solenoid (5) and the cts (4) are forced apart by a spring, cutting off the electricity supply to the appliance. The device is designed so that the current is interrupted in a fraction of a second, greatly reducing the chances of a dangerous electric shock being received. est button (8) allows the correct operation of the device to be verified by passing a small current through the orange test wire (9). This simulates a fault by creating an imbalance in the sense coil. If the RCCB does not trip when this button is

2.2.1 Solenoid dimensional coil. In physics, the term solenoid refers to a loop of wire, often wrapped around a metallic core, which produces a magnetic field when an electric current is passed through it.

The term solenoid refers specifically to a magnet designed to produce a uniform

Figure 2.5: Magnetic Field Created By Solenoid

16

Solenoid energize homogenous magnetic field. Magnetic field in solenoid can be determined by total up the energized magnetic field of N turn coil. This magnetic field can calculate using Ampere’s Law principle.

Figure 6 shows the solenoid structure. A solenoid is a coil of insulated or enamelled wire wound on a rod-shaped form made of solid iron, solid steel, or powdered iron. Devices of this kind can be used as electromagnets, as inductors in electronic circuits, and as miniature wireless receiving antennas. In a solenoid, the core material is ferromagnetic, meaning that it concentrates magnetic lines of flux.

This increases the inductance of the coil far beyond the inductance obtainable with an air-core coil of the same dimensions and the same number of turns. When current flows in the coil, most of the resulting magnetic flux exists within the core material.

Some flux appears outside the coil near the ends of the core, a small amount of flux also appears outside the coil and off to the side.

Figure 2.6: Solenoid Structure with Core

17

A solenoid chime is wound on a cylindrical, hollow, plastic, or phenolic form with a movable, solid iron or steel core. The core can travel in and out of the coil along its axis. The coil is oriented vertically; the core normally rests somewhat below the coil centre. When a current pulse is applied to the coil, the magnetic field pulls the core forcefully upward. Inertia carries the core above the centre of the coil, where the core strikes a piece of metal similar to a xylophone bell, causing a loud ding.

2.2.1.1 Function of Solenoid

The solenoid will be consider to use in this project as a device that functions to pull back the ELCB lever after tripping occurred. The rating of this solenoid is

240V AC and has pulling force of 1.5kg. For reference, figure 7 and figure 8 were taken from past year student. This student name is Wan Rusmaezame. The photos showed how he uses the solenoid as the mechanism to pull back the ELCB lever.

Figure xx shows the position of solenoid during trip condition. For his project, the system is taking 10 seconds for solenoid to function and re-closed the ELCB. Figure xx shows the position of solenoid after successfully re-closed the ELCB and the electricity now at normal condition.

Figure 2.7

: Position of Solenoid when normal condition

18

Figure 2.8: closed the ELCB

2.2.2 Servo Motor train, a potentiometer, an integrate d circuit, and an output shaft bearing. Of the three wires that stick out from the motor casing, one is for power, one is for ground, and

19 one is a control input line. The shaft of the servo can be positioned to specific signal. As long as the coded signal exists on the input line, the servo will maintain the angular position of the shaft. If the coded signal changes, then the angular position of the shaft changes. Servos are used

Figure 2.9: Sample of the servomotor

Figure 2.10

: Relationship between the pulse and the angular position principle is the same.

20

21

You can also see the 3 wires that connect to the outside world. One is for power

(+5volts), ground, and the white wire is the control wire.

The servo motor has some control circuits and a potentiometer that is connected to the output shaft. In the figure 11, the potentiometer can be seen on the right side of the circuit board. This potentiometer allows the control circuitry to monitor the current angle of the servo motor. If the shaft is at the correct angle, then the motor shuts off. If the circuit finds that the angle is not correct, it will turn the motor the correct direction until the angle is correct. The output shaft of the servo is capable of travelling somewhere around 180 degrees. Usually, it’s somewhere in the

210 degree range, but it varies by manufacturer. A normal servo is used to control an angular motion of between 0 and 180 degrees. A normal servo is mechanically not capable of turning any farther due to a mechanical stop built on to the main output gear.

Figure 2.11: A servo motor is disassembled

22

The amount of power applied to the motor is proportional to the distance it needs to travel. So, if the shaft needs to turn a large distance, the motor will run at full speed. If it needs to turn only a small amount, the motor will run at a slower speed. This is called proportional control.

The control wire (white wire) is used to communicate the angle. The angle is determined by the duration of a pulse that is applied to the control wire. This is called Pulse Coded Modulation. The servo expects to see a pulse every 20 milliseconds (.02 seconds). The length of the pulse will determine how far the motor turns. A 1.5 millisecond pulse, for example, will make the motor turn to the 90 degree position (often called the neutral position). If the pulse is shorter than 1.5 ms, then the motor will turn the shaft to closer to 0 degrees. If the pulse is longer than

1.5ms, the shaft turns closer to 180 degrees.

The servomotor will be also consider to use in this project as a device that functions to pull back the ELCB lever after tripping occurred. For reference, photo xx and was taken from past year student. This student name is Syahrun Nizam. The photos showed how he uses the servomotor as the mechanism to pull back the ELCB lever.

Figure 2.12: the view of the Syahrun Nizam’s design

2.3 Existing In the Market

2.3.1 Auto Reset ELCB System (ARES)

23

Figure 2.13: The view of the Auto reset ELCB system (ARES)

ARES provide the automatic reset for the circuit breaker. When the power trip at remote power station or main supply, ARES will be reset automatically without need anybody nearby to pull the lever. The built-in intelligence system can differentiate between permanent fault and temporary fault. Upon power trip, the power supply wills cut-off entire circuit. The power will then be restored immediately after automatic reset based on the fault only. The automatic reset timer can be setting for different time frames. For the power supply is use Single Phase, the reset timer can be set to 1 minute, 30 minute, or an hour. While, for the power supply is use Three

Phase, the reset timer can be set to 10 second, 30 second, 1 minute, 5 minute, 10 minute, or 20 minute. The Auto reset mode also can be by passed or self-testing without interrupting the life circuit. In such instance, there will be no down time. The

Reset Counter record the number of resets, thus obtains accurate statistic for better

24 planning. This ARES shall minimize service downtime, optimize service availability fore more revenue generation. Next, it minimizes operation cost with the simple installation process, and has no efficient way to auto reset the entire nuisance trip, reducing the operation cost. Finally, it minimizes maintenance cost and provides a reliable system.

2.3.2 LTC1153 System

The LTC 1153 is also known as Electronic Automatic Reset Circuit Breaker. The delay for the circuit breaker program is 15 µ s to not more than 100ms. The trip for current breaker program is 1ms until not more than 10s. The power supply range for the electronic circuit is 4.5V to 18V. So, this electronic circuit breaker drives a low cost N-channel MOSFET to interrupt power to a sensitive electronic load when the trip occurred or an over-current condition. The external timing capacitor will make the breaker remains tripped for a period of time. The period of time will be automatically reset. This cycle will continuous until the over-current condition is over. This situation is useful for protect both the sensitive load and the MOSFET switch. The trip current, trip delay time and auto-reset period are programmable over a wide range to accommodate a variety of load impedances. An open-drain output is provided to report breaker status to the microprocessor.

Application LTC 1153

Power bus circuit breaker

Regulator over-current protection

Battery short circuit protection

Sensitive power current interrupt

Figure 2.14

: The view of circuit design LTC 1153

Figure2.15

: The graph shown the trip delay timer

25

26

2.3.3 Gelco

Figure 2.16: The sample of the LT 1153 Integrated Circuit

Figure 2.17: The model of Gelco ELCB

GELCO Electronic PVT LT D manufactures of GELCO brand electronics control equipments energy saving devices are pioneers in the field for more than 25 years. This organization gets the accreditation from SGS U.K, ISO/9001/2000 certification.

27

GELCO offer all products as per ISI specification and some products with ISI specification and some products with ISI marking. All products are tested and approved at reputed test houses like ERDA-Barode, CPRI, Bangalore, ISRO,

Ahmedabad and each other.

So, one of the GELCO Electronic PVT LTD product is GELCO ELCB.

Gelco Earth Leakage Circuit Breaker with high sensitive current operated are designed to give protection by disconnecting the power supply to avoid from dangerous and possible lethal electronic shocks. It detects dangerous leakage current exceeding the generally accepted safe limit of 30mA and isolated the effected section of installation. It confirms to BS standard 4293:1983.

Gelco high sensitive current operated Earth leakage Circuit Breaker incorporates an active current transformer, to sense the sum of all current to be normally zero. Any leakage to earth is sensed as unbalance creates small voltage signal in secondary winding fed to highly sensitive electronic circuit, where it actuates the relay which triggers the tripping mechanisms of MCB. The sensitivity of current operated EL + MCB & Shockguard (ELCB) is usually stated in terms of their rated tripping current, say generally accepted limit of 30 mA (can be upto 100 mA).

It trips within 30 msec when leakage exceeds the safe limit.

Gelco EL+MCB consist of MCB which gives protection against overload & short circuit. It can be easily reset by MCB lever. It also gives High/Low voltage protection (optional). Gelco Shockguard (ELCB) does not provide overload and short circuit protection. It has High/Low voltage protections. To check the operation of the EL+MCB & Shockguard (ELCB), test CKT is incorporated, by pressing push button on from side, artificial leakage is created. Electronic circuit senses the leakage current & trips the EL+MCB & Shockguard (ELCB) in order of sensitivity.

28

2.4 Global System for Mobile Communication (GSM)

Global System for Mobile communications (GSM: originally from Groupe

Spécial Mobile) is the most popular standard for mobile phones in the world. GSM is used by over 3 billion people across more than 212 countries and territories. Its ubiquity makes international roaming very common between mobile phone operators, enabling subscribers to use their phones in many parts of the world. GSM differs from its predecessors in that both signaling and speech channels are digital, and thus is considered a second generation (2G) mobile phone system. This has also meant that data communication was easy to build into the system.

The ubiquity of the GSM standard has been an advantage to both consumers

(who benefit from the ability to roam and switch carriers without switching phones) and also to network operators (who can choose equipment from any of the many vendors implementing GSM). GSM also pioneered a low-cost, to the network carrier, alternative to voice calls, the Short message service (SMS, also called "text messaging"), which is now supported on other mobile standards as well. Another advantage is that the standard includes one worldwide Emergency telephone number.

This makes it easier for international travelers to connect to emergency services without knowing the local emergency number.

Newer versions of the standard were backward-compatible with the original

GSM phones. For example, Release '97 of the standard added packet data capabilities, by means of General Packet Radio Service (GPRS). Release '99 introduced higher speed data transmission using Enhanced Data Rates for GSM

Evolution (EDGE).

29

2.4.1 Technology Overview

GSM Network comprises three parts, Mobile Station (MS) which is similar to a cordless phone with extra features, the Base Transceiver Station (BTS) that controls the connection with the Mobile Station, the Base Station Controller (BSC) that controls multiple Base Transceiver Stations. A digital mobile phone and a SIM card make up the Mobile Station. The SIM (Subscriber Identity Module) is a card that fits into the handset and is one of two sizes, either full size (same size as a credit card) or the smaller plug in version. The SIM microprocessor is based on a silicon chip which is designed to tolerate temperatures between -25 Degrees Celsius and

+70 Degrees Celsius, and will also withstand up to 85% humidity. The SIM contains all of the user’s information details, such as the IMSI (International Mobile

Subscriber Identity). This is a numeric string, where the first 3 digits represent the country where the SIM is from, the next represent the operator in that specific country. The other digits represent the subscriber’s identity in his home network), phone memories, billing information, SMS text messages, pin numbers and international roaming information.

2.4.2 Short Message Service (SMS)

SMS stands for short message service. Simply put, it is a method of communication that sends text between cell phones, or from a PC or handheld to a cell phone. The "short" part refers to the maximum size of the text messages: 160 characters (letters, numbers or symbols in the Latin alphabet). For other alphabets, such as Chinese, the maximum SMS size is 70 characters. SMS was designed to deliver short bursts of data such as numerical pages. To avoid overloading the system with more than the standard forward-and-response operation, the inventors of

SMS agreed on a 160-character maximum message size. But the 160-character limit

30 is not absolute. Length limitations may vary depending on the network, phone model and wireless carrier. Some phones don't allow you to keep typing once the 160character limit is reached. You must send your message before continuing.

However, some services will automatically break any message you send into chunks of 160 characters or less. So, you can type and send a long message, but it will be delivered as several messages. When someone tries to call you, the tower sends your phone a message over the control channel that tells your phone to play its ringtone. The tower also gives your phone a pair of voice channel frequencies to use for the call. When a friend sends you an SMS message, the message flows through the SMSC (short message service center), then to the tower, and the tower sends the message to your phone as a little packet of data on the control channel. In the same way, when you send a message, your phone sends it to the tower on the control channel and it goes from the tower to the SMSC and from there to its destination.

2.4.3 SMS Protocol

There were 3 ways to implement SMS control, the original Block Mode, AT commands-based Text Mode, and AT commands-based PDU Mode. These fought it out in the market place, and although the SMS Block Mode was included in Nokia's

Cellular Data Card for the 2110 in 1994, the Block Mode has now faded away and been replaced by PDU Mode.

31

2.4.3.1 Block Mode

Block Mode is a binary synchronous protocol for text with a defined end and a defined beginning. Block Mode constructs TPDUs within block markers and is entered be sending the AT command AT+CESP. The application can then request groups of operations such as the following: a) List all short messages held in the mobile phone b) Transfer all or specified short messages from the mobile phone c) Set the mobile phone so that all new incoming short messages are passed immediately to the application d) Submit short messages for transmission e) Delete short messages from the mobile phone

Block mode commands and responses are generated by constructing a predefined set of components or information elements in binary. For example, an

‘Insert SMS’ command, used to transfer a short message to the mobile phone, is constructed by stringing together the information elements “Message Type”, “Insert

Type”, “RP-Destination Address” and “SMS-TPDU”. The SMS-TPDU consists of the user data itself along with other parameters such as the Data Coding Scheme.

However, due to its built-in error correction in the form of a block check sum, Block Mode is highly suited to applications where the GSM radio link may not be completely reliable. Besides, it allows the control of remote terminals and also as a long established and proven standard compared to the other two. Block Mode also allows the efficient transfer of binary encoded user data because AT commands do not need to be repeated for each instruction. In fact, Block Mode is effectively a string of Protocol Data Units (PDUs) without the AT commands.

32

Although there are some advantages, a PC or some other intelligent device is required to implement the Block Mode protocol. Block Mode is used exclusively for

SMS when an application commands the mobile phone to enter Block Mode; the mobile phone is not available for voice or data calls until this mode is terminated.

Neither Text Mode nor PDU Mode imposes this restriction and the poor support among hardware manufacturers also limits the spread of this protocol. Block Mode characters can sometimes conflict with flow control at serial ports.

2.4.3.2 Text Mode

Text Mode allows the transfer of text one character at a time based on AT commands. Unlike Block Mode, with Text mode, the application first sets up fixed parameters such as the SMS Centre address. The mobile phone then uses those parameters to construct a PDU when the application requests it to send a short message. The Text Mode is simple enough to be suitable for terminal emulators and dumb terminals. It is inexpensive to implement a solution or test proof a concept before commencing more serious development work. This mode is the only mode which has an interface readily understood by non-technical people due to its similarity with our language system.

The Text Mode is still not widely implemented by manufacturers. The message header information has to be input separately in Text Mode. Both Text

Mode and PDU Mode are capable of responding to AT+CNMI settings to forward the full message.

33

2.4.3.3 PDU Mode

PDU Mode shares some characteristics with each of the other two modes. In common with Block Mode, it uses a TPDU, but rather than using raw binary, each character is encoded using HEX (the characters 0...9, A...F). In fact, if user wants to encode a Block Mode TPDU as HEX, user must have a PDU. In common with Text

Mode, PDU Mode is implemented through an identical series of AT commands.

PDU Mode is suitable for AT command-based software drivers that do not understand the content of the message blocks.

The PDU Mode can be automated and binary coded data can be sent as well as characters. It receives the fullest manufacturer support; hence it allows hardware to interact with Data and Fax as well as SMS. PDU Mode does not have flow control issues as characters transferred at the serial port are A...F, 0...9. Manufacturers have interpreted the European Telecommunications Standards Institute (ETSI) specification inconsistently. Thus we have around 9 different implementations of

PDU Mode, all of which conform to the specification. For example, Nokia alone has three different versions in its product range. Although it receives the most popularity, the PDU Mode is not as suitable as Block Mode for binary data or continuous SMS operation and it is quite inefficient because of the need to repeat the

“AT=” command. However, this is not a rate determining factor in the submission of short messages.

34

2.5 Serial Communication

In telecommunication and computer science, serial communication is the process of sending data one bit at one time, sequentially, over a communication channel or computer bus. This is in contrast to parallel communication, where several bits are sent together, on a link with several parallel channels. Serial communication is used for all long-haul communication and most computer networks, where the cost of cable and synchronization difficulties makes parallel communication impractical. At shorter distances, serial computer buses are becoming more common because of a tipping point where the disadvantages of parallel busses (clock skew, interconnect density) outweigh their advantage of simplicity (no need for serializer and deserializer (SERDES)). Improved technology to ensure signal integrity and to transmit and receive at a sufficiently high speed per lane has made serial links competitive. The migration from PCI to PCI-Express is an example.

2.5.1 RS 232

In telecommunications, RS-232 (Recommended Standard 232) is a standard for serial binary data signals connecting between a DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly used in computer serial ports. In RS-232, user data is sent as a time-series of bits. Neither synchronous nor asynchronous, both of it are supported by the standard. Referring to data sheet, the standard defines a number of control circuit used to manage the connection between DTE and DCE. Only one direction for each data can operate, that is, signalling from a DTE to the attached DCE or the reverse. Because of transmit and receive data are separate circuits, the interface can operate in a full duplex manner,

35 supporting concurrent data flow in both directions. The standard does not define character framing within the data stream, or character encoding.

RS-232 devices may be classified as Data Terminal Equipment (DTE) or

Data Communications Equipment (DCE); this defines at each device which wires will be sending and receiving each signal. According to the standard, terminals and computers have male connectors with DTE pin functions, and modems have female connectors with DCE pin functions. Other devices may have any combination of connector gender and pin definitions. Many terminals were manufactured with female terminals but were sold with a cable with male connectors at each end; the terminal with its cable satisfied the recommendations in the standard.

Now, many PIC microcontroller devices have a built in USART and it is one of the most commonly used serial interface peripherals. It is also known as the Serial

Communications Interface, or SCI. The three most common asynchronous communications interfaces used with USART are RS 232, RS 422, and RS 485.

Many personal computers have one or more COM port that use the RS 232 interface and it is common to use this interface to communicate with a PIC micro device using the USART.

A Null Modem is used to connect two DTE’s together. It only requires 3 wires (TD, RD, & SG) to b wired straight through thus is more cost effective to use with long cable runs. The theory of operation is reasonably easy. The aim is to make to computer think it is talking to a modem rather than another computer. Any data transmitted from the first computer must be received by the second thus TD is connected to RD. The second computer must have the same set-up thus RD is connected to TD. Signal Ground (SG) must also be connected so both grounds are common to each computer. Figure shows a simple RS 232 null modem connection.

36

Figure 2.18

: Simple RS 232 Null Modem

Connector 1 Connector 2 Function

2

3

5

3

2

5

Rx

Tx

Tx

Rx signal ground

Table 2.1

: Pin connection and Function

The signal level of the RS 232 pins can have two states. A high bit, or working state is identified by a negative voltage;-3V to -25V for a “Mark” (logic 1) and low bit or space state uses a positive value;+3V to +25V to signify a “Space”

(logic 0). Any voltage in between these region (+3 to -3) is undefined. This might be a bit confusing because in normal circumstances, high logical values are also defined by high voltages.

37

RS 232 voltage values level Transmitter capable (V)

Receiver capable (V)

Space state (0) +5 ... +15 +3 ... +25

Mark state (1) -5 ... -15 -3 ... -25

Undefined - -3 ... +3

Table 2.2: The voltage limit

Almost all digital devices which we use require either TTL or CMOS logic levels. Therefore the first step to connecting a device to the RS 232 port is to transform the RS 232 levels back into 0V to 5V. This is done by RS 232 Level

Converters. The most common RS 232 Level Converter used is the MAX 232 device. It includes a Charge Pump, which generates +10V and -10V from single 5V supply. This IC also includes two receivers and two transmitters in the same package.

Figure 2.19

: The view of IC MAX 232

Figure 2.20

: Inside the MAX 232

38

CHAPTER 3

HARDWARE DESIGN

3.1 Mechanical Design

For this project mechanical design is important. In order to build this part, the most important is the material selection. Parts and components used also need to be considered because using wrong parts will cause the motor cannot afford to pull the lever’s ELCB according as a plan. So, the mechanical design need to careful and creative. The torque element needs consideration to make sure the motor running in smoothly.

40

3.1.1 Mechanical Part and Component

To design this part, we need aluminium bar, screws, bolts, sliding door roll, and nuts. The aluminium which is use for this project has three types. There are L shape, 12mm width, and 37 width. All aluminium are been cut and bend to get the right shape we needed.

Figure 3.1

: Type of aluminium

Figure 3.2: The cut and bent part of aluminium

41

Figure 3.3: The cut and bent part of aluminium

After all the part is done as a plan, bolt and nuts are using to joints all the part together.

3.1.2 Mechanical Model

After all aluminium part is a ready, use bolts, and nuts to joint it’s together.

All bolts and nuts must screw tightly to firmly fix. This will make sure when the motor is running, the torque from the motor will not break the aluminium joint. By using the perspex and aluminium L type, use it to built housing for the DC motor.

This housing will hold the DC motor’s body to make sure the coupling can turn and the same time can pull up the lever’s ELCB.

Figure 3.4: The Mechanical Part

Figure 3.5: The DC motor’s housing

42

3.2 Electronic Design

Figure 3.6: The block diagram

43

44

3.2.2.1 PIC microcontroller Board

PIC18F452 microcontroller from Microchip is employed as the brain for the system. The microcontroller has 40 pins and five ports of input and output (I/O) contributing to 33 I/O ports all together.

The following table shows the connectivity between the main I/O

(input/output) ports of microcontroller with other electronic components and devices.

Port:

Port B1

Port B2

Port B3

Port B7

Port B5

Port D7

Port D6

Port C7

Port C6

Function:

Forward DC motor

Reverse DC motor

LED indicator(ELCB)

LED indicator (send sms)

LED indicator (receive sms) switch (temporary interrupt) switch (permanent interrupt)

Rx for MAX 232

Tx for MAX 232

Table 3.1: The I/O port list

The figure below is show the basic connection for PIC microcontroller board. The push button is use for reset the programming return to the starting program. While, the crystal is use as a timer for the cycle’s programming inside the PIC microcontroller. The value of the crystal is 20 MHz and the value for a pair of capacitor which is connecting to the crystal is depending on the standard. The standard we can get from the datasheet.

order.

Figure 3.7: The PIC microcontroller board

45

Figure 3.8:

Both of relay are use to active the circuit for reverse direction or forward direction. The diodes which flow to the DC motor. The current need to control to make sure the DC motor will turning either to the forward direction or reverse direction.

3.2.2.3 Voltage Regulator 5V Circuit

The board is sup

The power source will be used for DC motors and circuit board. A voltage regulator

(7805) is used to provide stable voltage of 5V for the microcontroller circuitry.

Figure shows the voltage regulator

Referring to Figure , four capacitors are used to enhance the stability of the regulator output voltage. Diode D1 is used as the safety measurement for the voltage regulator circuit. If the power supplies accide

47 voltage regulator 7805 will be protected from burned by the diode. The green LED

LinASIC

TM

library.

Figure 3.9: The Voltage regulator 5V circuit

Figure 3.10: The view of MAX 232 pin

48

Figure 3.11: The connection of MAX232 with GSM modem and PIC microcontroller

The MAX232 circuit is a medium to transmit data communication between

PIC microcontroller and GSM modem. The PIC microcontroller only sends and receives the signal 0 to 5V only. While, the GSM modem only send and receive the signal -12V to +12V. So, the MAX232 will reduce or increase the voltage to make the PIC microcontroller and the GSM modem capable communicate. In the same time, the signal will be make sure do not having data lost.

3.2.2.5 Switch and LED Circuit

The switch and LED circuit is the simplest circuit. It is easy to implement.

For this project, the switch and LED are use as an indicator only.

3.3 Model Design

The last part for hardware design after mechanical design and electronic design is model design. For the model, I was separated it into two sides. First side is for the ELCB. At this side, we have a set and the mechanical part. Second side is the black box. The black box is use to store all circuit, power supply and all wiring. At above of the box, have the LEDs and switches for indicators.

Figure 3.14: The black box, inside black box and ELCB side

Figure 3.15: The overall view of the model

52

3.4 Project Programming

3.4.1 Mikroelectronika-MikroC

MikroC is a powerful, feature rich development tool for PICmicros. It is designed to provide the programmer with the easiest possible solution for developing applications for embedded systems, without compromising performance or control.

PIC and C fit together well: PIC is the most popular 8-bit chip in the world, used in a wide variety of applications, and C, prized for its efficiency, is the natural choice for developing embedded systems. mikroC provides a successful match featuring highly advanced IDE, ANSI compliant compiler, broad set of hardware libraries, comprehensive documentation, and plenty of ready-to-run examples.

MikroC allows you to quickly develop and deploy complex applications:

Write your C source code using the built-in Code Editor (Code and

Parameter Assistants, Syntax Highlighting, Auto Correct, Code Templates, and more…)

Use the included mikroC libraries to dramatically speed up the development: data acquisition, memory, displays, conversions, communications…

Practically all P12, P16, and P18 chips are supported.

Monitor your program structure, variables, and functions in the Code

Explorer.

Generate commented, human-readable assembly, and standard HEX compatible with all programmers.

Inspect program flow and debug executable logic with the integrated

Debugger.

Get detailed reports and graphs: RAM and ROM map, code statistics, assembly listing, calling tree, and more…

53

We have provided plenty of examples for you to expand, develop, and use as building bricks in your projects. Copy them entirely if you deem fit – that’s

Figure 3.16: Interfacing of Mikroelektronika mikcoC

54

3.4.2 Flowchart

This section is to show the flow of the system is running. By referring

Figure 3.17: Flowchart of the project

CHAPTER 4

RESULT AND TESTING

4.1 Torque Motor

There are three type of motor are in consideration to use for this project when in planning and research the material. There are; a) RC servo motor

Specification;

Plastic Gear with Ball Bearing

Standard size servo: 40.7mm x 20mm x 37mm

Torque: 4.1kg.cm

Speed: 0.17 sec / 60 Degrees

Weight: 41g

Maximum Movement Angle: 180 degrees

Operating Voltage: 4.5V - 6.0V

Price: RM99.00

Figure 4.1: Sample RC Servo motor b) LINIX stepping motor

Specification; phases stepper motor.

6 lead wire.

Size: 42m

1.8 Degree per step

Current: 0.5A

Holding Torque: 3.5Kg.cm

Price: RM154.00

56

Figure 4.2

: Sample if LINIX stepping motor

c) DC MOTOR SPG50

Specification;

DC12V

Output Power:

Maximum Current: 1.1A

Rated Speed: 34RPM

Rated Torq

Price: RM95.00

Figure 4.3: Sample of DC motor

1.

Lower price than other

2.

High torque

3.

Simple to program

4.

Simple to use and connect

57

5.2 Automatic Voltage Regulator

Figure 4.4

: The Automatic Voltage Regulator circuit

Objective : To measure the output is equal to 5V

Equipment : battery 12V, 5V and volt meter

Method:

1) Connect the AVR circuit with the 12V power supply.

2) Take the volt meter and take the reading

3) Repeat method (1) and (2) with 5V

Result:

SUPPLY MEASURE VALUE (5V) % DIFF

12V 4.9 0.83

5V 4.8

Table 4.1: The value of the measurement

1.67

So, it shows that the condition of the AVR circuit is in good condition.

58

59

4.3 PIC Microcontroller Board

Figure 4.5: PIC microcontroller board

Objective: to check the continuity and functional of PIC

Equipment: battery 12V and software mikcoC

Method:

1.

Write a simple program using mikroC and burn into PIC like blinking LED.

2.

Connect the 5V battery supply to supply voltage to the circuit.

3.

Connect LED to the any pin at portB.

Result:

The LED is blinking. It shows that the connection and condition for this circuit is good condition.

60

Figure 4.6

: DC Motor Driver circuit

Objective : for ensure the circuit can drive DC motor to forward & reverse

Equipment : Battery 12V and 5V voltmeter, mikroC, DC motor, and DC motor

Method:

1.

Connect the battery 12V to the DC motor and 5V to the driver circuit.

2.

Give 5V to the point A from the circuit. Check the movement.

3.

Repeat method (2) to the point B. make sure the motor movement is different

4.

Connect pin A and B to the PIC. Burn the forward reverse motor program into the PIC.

5.

Give power supply at PIC microcontroller to run the process.

61

Result:

The DC motor can run in forward-reverse direction. There is no problem occur when DC motor is run neither by supply 5V nor by use PIC microcontroller to control the motor.

4.5 MAX232 through the Hyper Terminal

Objective : to check the condition connection between PIC microcontroller and

MAX 232

Equipment : PIC circuit, MAX 232 circuit, serial communication cable,

HyperTerminal and mikroC.

Method:

1.

Burn simple USART AT command programming into PIC circuit.

2.

Connect PIC circuit with MAX 232. Use serial cable to connect through the

PC.

3.

Run the HyperTerminal to receive the AT command from PIC.

Result:

After complete the testing, we can get the result like as the figure below. It shows that the hyper terminal can receive the AT- command from the PIC microcontroller via MAX232.

62

Figure 4.7: Result from the hyper terminal

Objective

Equipment : GSM modem,SIM card, serial communication cable, HyperTerminal

Method:

1.

Connect the GSM modem to the PC by using serial communication cable.

2.

Use the Hyper Terminal to write the AT command.

3.

Follow the command in the table below. See the response.

63

Figure Result from the hyper terminal

Result:

Table 4.2

: Table of AT command for GSM modem

64

Objective

Equipment : GSM modem, SIM card, serial communication cable, PIC

Method:

1.

Connect the GSM to the PIC microcontroller

2.

Use the serial communication cable to connect between MAX 232 and the

GSM modem.

Result:

Figure 4.9: Overview of GSM modem connection

66

4.8 Achievement and Final Result

Automatic Earth Leakage Circuit Breaker (AELCB) had been considered successfully achieved some of its objectives and expected result. The achievement of this project can be categorized into two major parts. Firstly, this project is able to successful achieved all expected result for my Final Year Project semester I.

Secondly, this project is capable to achieve some of expected result for my Final

Year Project semester II.

Finally, I can conclude for the final result that not the entire objectives of this project are successfully achieved. However, the concept of this project I can get and present from the hardware part. The parts for this project is successful are:

1.

The DC motor is the right choice for this project because it can handle on the pulling up the lever’s ELCB

2.

All mechanical part is good condition include the housing for the DC motor.

3.

The GSM modem is in good condition. By using the hyper terminal, the

GSM modem can operate as I wanted.

4.

All inputs and outputs is good condition. There is no problem on its except using the GSM modem as I/O

67

4.9 Project Problem

Not all we are planning will be end exactly as we want. For my project, there were few of problem occurs during the period from the start until the end. So, I was investigate and listed the problem occurs during the period.

1) Wrong decision. At the starting my project, the Servo Motor is my chosen to pull up the lever. However in the middle of the project, realize that the DC motor is better.

2) Careless. This problem is always I face it during the period that I use to finish my hardware part works.

3) Over confident. Some time, I always confident about the materials that have at me is enough.

4) Lack of resource. Some of part in this project is hard to find the solution.

CHAPTER 5

RECOMMENDATION AND CONCLUSION

5.1 Recommendations

The main problem that makes this project not successfully achieve the entire objectives is at the GSM modem. The GSM modem is in good condition by proving the testing that has been done. However, the problem is occur when the GSM modem connect to PIC microcontroller via MAX232 circuit. There has a problem that I cannot identity the solution for it. For my observation, all the connection and C programming for this operation is running smoothly. For continuo this project, we need to do a lot of research about the GSM modem operation. Besides, we also need to find someone who is already success use the GSM modem for their project.

69

5.2 Future Development

This project has been able to upgrade to be a better than before or maybe can add some features. Its better if add the sensor that can recognized either the fault is temporary or permanent. For make the scope of the project is bigger, we can apply this GSM application at other equipment in the house. Especially security system for our home or can just remote all electronic equipment at home just only using SMS order like switch ON the light.

5.3 Conclusion

This project has been able to achieve some of its objectives, designing and building a model of Automatic Earth Leakage Circuit Breaker. The major thing problem is only at the GSM modem. From my observation, there is little possibility that cause the GSM modem cannot interface with the PIC microcontroller. There are;

1) C programming. Maybe, I was careless on writing a C programming. So, there was a word or command that I was missed. Although I was making double-check repeatedly.

2) Maybe I am not enough understanding very clearly about operation of the

GSM modem.

3) Problem in connection. Maybe, there are need a little adjustment at the circuit where is existed now.

Finally, even my project is not fully success, but this project was bringing me to learn a lot of new knowledge by myself.

70

REFERENCE

1.

Syahrum Nizam bin Md Arshad (2008). “Development of Earth Leakage

Circuit Breaker to operate automatic Reclosed Using PIC Microcontroller.”

Universiti Teknologi Malaysia: Bachelor thesis

2.

Wan Rusmaezame bin Wan Mahmood (2008). “Development of Earth

Leakage Circuit Breaker Using solenoid.” Universiti Teknologi Malaysia:

Bachelor thesis.

3.

Mohd Haris bin Md Afandi (2008). “Vacuum Cleaner via SMS” Universiti

Teknologi Malaysia: Bachelor thesis.

4.

Lynn Wong Jin Su (2008). “A Biologically Inspired Cricket Robot.”

Universiti Teknologi Malaysia: Bachelor thesis

5.

Garis Panduan Pendawaian di Kawasan Kediaman, Suruhanjaya Tenaga,

Malaysia

6.

PIC18F452 datasheet, Microchip

7.

MAX232 datasheet, Texas Instrument

8.

LTC 1153 datasheet, Linear Technology

9.

http://www.wikipedia.com

10.

http://www.cytron.com.my

11.

http://www.gelco-world.com

71

APPENDIX A

PIC 18F452 Datasheet

72

73

APPENDIX B

MAX232 Datasheet

74

APPENDIX C

LTC 1153 Datasheet

75

76

APPENDIX D

C Programming For Forward-Reverse DC Motor Driver

#define forward PORTB.F1

#define reverse PORTB.F2

void main()

{

TRISB.F1 = 0;

TRISB.F2 = 0;

forward=0;

reverse=0;

delay_ms (500);

forward=0;

reverse=1;

delay_ms (1300);

forward=1;

reverse=0;

delay_ms (1300);

forward=0;

reverse=0;

}

77

APPENDIX E

C Programming For USART Communication

#define ready PORTB.F7

#define request PORTB.F6

void sendsms();

void sendhyper(char*string);

void ctrlz();

unsigned char i=0X00;

unsigned char ki[]="AT+CMGF=1";

unsigned char ka[]="AT+CMGS=0137027385";

unsigned char ku[]="\n";

unsigned char ko[]="ELCB is shutdown";

unsigned char kk[]="AT+IPR=19200";

void main()

{

Usart_Init (19200);

RCSTA.CREN=1;

RCSTA.SPEN=1;

TRISC.F6=0;

TRISC.F7=1;

78

sendhyper (&kk);

sendhyper (&ku);

delay_ms (5000);

sendhyper (&ki);

sendhyper (&ku);

delay_ms (5000);

sendsms();

sendhyper(&ko);

delay_ms (5000);

ctrlz();

}

void sendsms ()

{

sendhyper (&ka);

sendhyper (&ku);

delay_ms (5000);

delay_ms (500);

sendhyper (&ku);

79

}

void sendhyper (char *string)

{

while ((*string)!=0)

{

Usart_Write (*string++);

}

}

void ctrlz ()

{

TXREG=0X1A;

delay_ms (5000);

}

80

APPENDIX F

GSM overview

81

APPENDIX G

Gantt chart for FYP 1

Monthly

Information gathering

Literature reviews

Proposal drafts submission

Studying the suitable mechanism to use for push up the switch

July August September October

Try to design the model for the mechanism which is will use

Official proposal submission

82

Get the GSM terminal from the supplier

Learning and studying how to operate the GSM terminal

Study how to use the PIC microcontroller

“Seminar 1” presentation

Preparation of report

83

Gantt chart for FYP 2

Monthly

Continue the previous undone work from semester 1

January February March April

Start to write the program

Get ready all the input and output to use

Connect all i/o to the microcontroller

Fabricate the model

84

Testing and run the system

Preparation of report

Presentation and demo

Thesis submission

85

Related documents
Download