ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

15
Copyright © 2012 IUG. The 4 th International Engineering Conference –Towards engineering of 21 st century 1 ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER DISTRIBUTION SYSTEM Basil Hamed Associated Professor, Electrical Engineering, Dept., IUG, Palestine, [email protected] ABSTRACT: In the last few years we have witnessed a strong interest in the protection of Critical Infrastructures such as power distribution networks, power plants, refineries, water distribution, transportation systems, hospitals and telecommunication networks. This paper presents a full design of alerting system using PIC16F877A microcontroller for power distribution network. The proposed system is used to monitor the loads distribution of electrical cables, and works fast and easy to control the cables of distribution and measuring the loads and send warnings to the concerned authorities in case of fault. The alerting system aims to follow up the power meters of the electric company and make sure that all the cables running under allowed load without any defect (overload). The alerting system uses computers in monitoring and sending alerts in emergency situations from a safe place and away from the measuring devices ( in the control room of the company). Computers are connected to the control unit via telephone network, where the computer provided with monitoring, warning and communication program and send the warning voice messages; meanwhile the control unit is responsible for receiving data from the measuring devices and then sends this data continuously to the computer and the computer will store the data. This alerting system is applied as real time application to Gaza Electricity Distribution Company and works well and shows good result. KEYWORDS: Alerting System, PIC 16F877A, Power Distribution Lines, RS232. I. INTRODUCION: Electrical Power System protection is required for protection of the system equipment itself from fault; hence electrical power system is not allowed to operate without any protection devices installed. Power System fault is defined as undesirable condition that occurs in

Transcript of ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Page 1: ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century

1

ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER DISTRIBUTION SYSTEM

Basil Hamed

Associated Professor, Electrical Engineering, Dept., IUG, Palestine, [email protected]

ABSTRACT:

In the last few years we have witnessed a strong interest in the protection of Critical Infrastructures such as power distribution networks, power plants, refineries, water distribution, transportation systems, hospitals and telecommunication networks. This paper presents a full design of alerting system using PIC16F877A microcontroller for power distribution network. The proposed system is used to monitor the loads distribution of electrical cables, and works fast and easy to control the cables of distribution and measuring the loads and send warnings to the concerned authorities in case of fault. The alerting system aims to follow up the power meters of the electric company and make sure that all the cables running under allowed load without any defect (overload). The alerting system uses computers in monitoring and sending alerts in emergency situations from a safe place and away from the measuring devices ( in the control room of the company). Computers are connected to the control unit via telephone network, where the computer provided with monitoring, warning and communication program and send the warning voice messages; meanwhile the control unit is responsible for receiving data from the measuring devices and then sends this data continuously to the computer and the computer will store the data. This alerting system is applied as real time application to Gaza Electricity Distribution Company and works well and shows good result.

KEYWORDS:

Alerting System, PIC 16F877A, Power Distribution Lines, RS232.

I. INTRODUCION:

Electrical Power System protection is required for protection of the system equipment itself from fault; hence electrical power system is not allowed to operate without any protection devices installed. Power System fault is defined as undesirable condition that occurs in

Page 2: ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century

2

the power system. These undesirable conditions such as short circuit, current leakage, ground short, over current and over voltage. With the increasing loads, voltages and short-circuit duty in distribution system, over current protection has become more important today. The ability of protection system is demanded not only for economic reason but also ‘reliable’ service.

Figure (1): Power Feeder of Gaza Strip

The designed alerting system works on; how to access the reading measurements of electrical loads on the electricity cables in the border areas and transfer it via telephone lines to the control room of the Gaza Electricity Distribution Company. The system will send advance warning in case of emergency to the concerned authorities when these readings exceeded the allowable limit. Gaza power feeder is showing in Figure (1) [1]. In this paper three-phase component models for distribution systems are reviewed [2-5]. These models are used in the problem formulations and computer simulations for multi-phase distribution systems analysis.

II. HARDWARE COMPONENTS: This part will explain the hardware used in the design of the alerting system.

A. Power Meter UPM3100 The UPM3100 (Figure 2) is a multifunction metering device with advanced functionality features, suitable for electrical parameters measurement and power equality analysis. It is able to store the measured values according to programmable rate and the event when they occur. It provides accurate true RMS values on graphic LCD display, or via communication port. It performs clear graphical function such as: waveforms of voltage and current, harmonic spectrum, phasor diagrams, trends of measured values and consumption profiles. [6]

Page 3: ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century

3

B. PIC16F877A Microcontroller The PIC16F877A is a microcontroller from Microchip in a chip type of 40-pin PDIP packages. The principal characteristics by which this PIC was used are: digital I/O ports,

Figure (2): A. Power Meter UPM3100

analog inputs, analog to digital converter of 10 or 8- bit resolution, serial communication USART, memory storage EEPROM [7]. The PIC16F877A, has programmed routines process or features, such as analog to digital conversion to get the values from the sensors, storage of historic data in the internal EEPROM when an alert happened generates a detection range of values which can determinate whether the system suffered acceleration that cause an alert [8]

C. Voice Modem Voice generally means that the modem is capable, with appropriate software, of supporting telephone answering machine functions: the modem can 'record' and 'play' to the Windows wave device. The answering machine software will also use the sound card on the machine to play and record. The software may also include functions to dial or answer calls using your sound card's microphone and speakers or headphones. Windows comes with a Phone Dialer. This utility will dial a number with any type of modem; after Phone Dialer dials a number, you use any normal phone to complete a voice call [9].

III. SOFWARE COMPONENTS: This section presents the software’s used in the design of the alerting system

A. Micro C: Micro C is powerful, feature rich development tool for PIC micros. It designed to provide the programmer with the easiest possible for developing applications for embedded systems, without compromising performance or control [10].

B. Proteus 7 Professional: is an interactive system level simulator. Which combines

mixed mode circuit simulation, micro-processor models and interactive component models to allow the simulation of complete micro-controller based designs [11].

Page 4: ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century

4

C. Visual Basic: (VB) is an ideal programming language for developing sophisticated professional applications for Microsoft Windows. It makes use of Graphical User Interface for creating robust and powerful applications [12]. Coding in GUI environment is quite a transition to traditional, linear programming methods where the user is guided through a linear path of execution and is limited to small set of operations. In GUI environment, the number of options open to the user is much greater, allowing more freedom to the user and developer. Visual Basic is an event-driven programming language. Visual Basic enables the user to design the user interface quickly by drawing and arranging the user elements.

D. Hyper Terminal: is a computer networking assistance program for the Microsoft

Windows operating system from version 3.1 to Vista. HyperTerminal was designed to remotely connect to other computers as well as to provide diagnostic tools to the local computer system [13]. HyperTerminal is a text-based program, as opposed to a graphical one. Thus, it uses text commands to perform functions. HyperTerminal also has scroll functionality that enables us to view received text that has scrolled off the screen.

E. Serial Port Monitoring Serial Port Monitor is a professional and powerful system

utility for RS232/422/485 COM ports monitoring. The program monitors, displays, logs and analyzes all serial port activity in a system. This is an ideal way to track down problems that may occur during application or driver development, testing and optimization of serial devices, etc. Serial Port Monitor also offers advanced filtering and search, professional built-in terminal and data exporting options, user-friendly and flexible interface among its key advantages. It is a completely software solution, you don't need any additional hardware to use it [14], as shown in Figure (3).

Figure (3): Interface of Serial Port Monitoring Program

Page 5: ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century

5

IV. METHODOLOGY AND DESIGN:

This section explains the design of alerting system including hardware and software implementation. Figure (4) shows the complete alerting system design

Figure (4): Complete Alerting System

A. Circuits of the Alerting System

The circuits of the Alerting System are:

Storing circuit

This circuit is formed from PIC 16F877A and an external EEPROM (Figure 5), and explains the process of reading data and storing it in an external EEPROM 24C02.

Figure (5): Circuit Diagram of Storing Data

Page 6: ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century

6

By default the PIC 16F877A reads and stores data from UPM in the EEPROM, at this moment this circuit works to make scan for the readings and check if it reaches the limited rang. If it reaches the limited range, it will give alert on the software interface. The software program makes a call with a number has already been stored in the program. This call will give a voice message that tells the value of the current especially if it reaches a danger value. In this case the action indicator (led) will be on. This circuit has three main roles:

• Scanning data (reading from UPM). • Storing latest data (in external memory). • Giving Alert (on a software). When user make a call for data from the software program the storing circuit will stop scanning that will be cleared by the waiting indicator (led), and it will be in the waiting mode. At this moment the transmitting circuit will be in action mode. Transmitting circuit: This circuit combine of 2 PIC 16F877A; the first PIC which will return the storing data in the EEPROM 24C03 to the software program serially through a telephone cable. The second PIC will translate the instructions to know which data needed exactly; in this case the circuit will be in action mode. Before any call; instruction reach the storing circuit the circuit will be in waiting mode that indicated by the led as seen in Figure (6). The two circuits can be combined in one circuit but we choose to separate them to two circuits for two reasons: • The instructions are so large on the PIC that increases the chance probability of error. • The external memory can't read and write in the same time.

Figure (6): Circuit Diagram of Transmitting Data

Page 7: ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century

7

Max circuit The previous two circuits need a power supply with different values large and small values. PIC doesn't need more than 5 volts; however the modem needs more than 12 volts. It is costly to put more than one power supply especially they will be in place; that is difficult to reach. So the use of transformer was a suitable to give the power needed as shown in Figure (7). This circuit has two roles;

• Give two different voltages. • Protract the other circuit.

Figure (7): MAX Circuit

B. Software of the Alerting System This part shows & explains the software of the alerting system, Visual basic language is used to build this program. The goal of this part is to separate the data in an arranged way that help the user to get the needed information directly. Figure (8) shows the interface of the program, it is divided into many parts arranged from the left down to the right: 1-Voltage window: include 3 phase system, phase to line voltages and line to line voltages. 2- Current window: include 3 phase system, line Currents. 3- The line Details window. 4- Power factors window: include 3 phase system, line P.Fs. 5-Apparent power window: include 3 phase system, line apparent power. 6- Active power window: include 3 phase system, line active power. 7- Reactive power window: include 3 phase system, line reactive power. 8 - Active energy acquired. 9 - Frequency used.

Page 8: ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century

8

Users: Users is divided to; administrators, and observers. Administrators have full command of the software can add new users and delete old users (Figure 9). Observers can only observe the software and cannot make any change in the software (Figure 10).

Figure (8): The Interface of the Program

Figure (9): Use Interface

Figure (10): System Login

Page 9: ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century

9

Setting It contains three subset lists: 1. Change Password: Before entering the program will ask the password programmed by the crew of surveillance in the control room in the electricity distribution company as shown in Figure (11).

Figure (11): Change Password

2. Call Setting: To enter the internal characteristics of the communication process with UPM is to access this submenu where it can change any settings as shown in Figure 12: • (Time between two calls) to determine the needed time between any two connections

between the console and Control Unit (UPM and PC) per minutes. • (Number of Reading) to determine the number of readings during the time between any

two readings per every calls . • (Server phone number) is intended to receive a message warning in case of emergency.

Figure (12): Call Setting 3. Alert Setting: This sub menu can determine Contact Line, and the needed line to be

under control.

Page 10: ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century

10

Contact Lines Add the name of the line in the first box; in the second box you add the special number of the contact line UPM device to be linked. The third box is the phone number of the line which connects to the system during the data transfer, meanwhile in the latter box; add the phone number of the person that will receive a voice message in case of emergency.

Figure (14): Edit Control Lines

Reports To view all data sent from the console to a computer is a report containing all the readings as shown in Figures 15.

Figure (15): Database Report

To view the readings you press the "Preview" button, Figures 16

Figure (16): Reading View

Page 11: ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century

11

Graphs In this menu a graph for the stored data can be viewed. This graph can be voltage data or current data or power data. To draw the graph need to follow these steps: Choose the line that you need to draw the voltage data for. Then choose the time period you need to see the stability of the data in it. Choose the beginning time of the period from. Choose the end time of the period from To Date choice. Click draw button in the voltage graph window, then the graph will appear as shown in Figure (18). It will be repeated three times to give sure and accuracy

Figure (18): Draw Voltage View

The previous steps can be done for the current data and power data. Call

This is the most important menu. The data can be done as follow: Click on the menu, the contact lines that are edited in the setting list will appear then choose the contact line you need to get the data for. The widow will appear as in Figure 19.

Figure (19): Call Line

C. Users Guide to Deal with the Alert System The console: The console must connect with UPM to transfer the data and store it in the console then send to computer. Also the console must connect with electricity and phone line to send data through it. The surveillance program: the software is installed on computer as shown in Figure (20)

Page 12: ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century

12

Figure (20): Opening the Program

Enter user name, password, and choose the line from the list as shown in Figure (21).

Figure (21): Making Call

Next window appears will have the line name, SN of the modem in control unit, phone number and alert phone number as in Figure (22) After call activation, the yellow light appears that mean the connection between external modem in control unit and internal modem in computer will start as shown in Figure (23)

Page 13: ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century

13

Figure (22): Activate the Call

Figure (23): Beginning of the Call Then the green light will appear (active call) as in Figure (24)

V. CONCOLUSTION A simple and cost-effective system is developed in this paper. It is an implementation of low cost power alert monitor based on PIC16F877A micro controller. It can measure and monitor electrical power parameters to avoid disturbances. A new application capable to detect faults in power transmission lines presented to this system is capable to give instantaneous notice to the user about problems in distribution line via telephone line.

Page 14: ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century

14

Figure (24): Active Call

VI. ACKNOWLEDGMENT I would like to thank and express my appreciation to the engineers; Asmaa El Akhras, Fedaa Awad, Nedaa Hajjaj, and Nisreen AbuTaha for their work in this project. (This project was their senior project as electrical engineering department requirement for graduation).

VII. REFERNCES

[1] Technical Statistics, Statistics & Report, Gaza Distribution Electric Company, 2011, Uhttp://www.gedco.ps/e/under.phpU

[2] R. D. Zimmerman, "Comprehensive Distribution Power Flow: Modeling, Formulation, Solution Algorithms and Analysis," Ph.D. Dissertation, 1995.

[3] M. S. Chen and W. E. Dillon, "Power system modeling," in Proc. of IEEE, vol. 62, pp. 901-915, 1974.

[4] K. N. Miu and H.-D. Chiang, "Existence, uniqueness, and monotonic properties of the feasible power flow solution for radial three-phase distribution networks," Circuits and Systems I: Fundamental Theory and Applications, IEEE Transactions on [see also Circuits and Systems I: Regular Papers, IEEE Transactions on], vol. 47, pp. 1502-1514, 2000.

[5] W. H. Kersting, Distribution system modeling and analysis. Boca Raton: CRC Press, 2002.

[6] Uhttp://img.directindustry.com/pdf/repository_di/14108/upm3100-din-144x144-lcd-quality-power-meter-36435_1b.jpgU

[7] PIC16F87XA Datasheet, Pin Enhanced Flash Microcontrollers, Microchip Technology Inc., 2003.

Page 15: ALERTING SYSTEM DESIGN USING PIC16F877A FOR POWER ...

Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century

15

[8] Joaquin Rodriguez, Carlos Tello “Intelligent Wireless System to Monitoring Mechanical Fault in Power Transmission Lines” Electronics, Robotics and Automotive Mechanics Conference 2008

[9] http://modemsite.com/56k/voice.asp [10] PIC Microcontrollers 1st EDITION (2008) Milan Verle, mikroElektronika [11] Proteus Professional PCB Design and Simulation www.labcenter.co.uk/ [12] Osama El Huseni, “Visual Basic for Windows,” IbnSina Library, 1994 [13] [14] Serial Port Monitor;

http://www.wisegeek.com/what-is-hyperterminal.htm http://www.eltima.com/products/serial-port-monitor/