Вы находитесь на странице: 1из 22

DEDICATIONS I dedicate this project to my late mother, Miss.

Miriam Mwewa Bimba who went through thick and thin to singly raise me and ensure that my life is a success story. Mum, I wish you where here to see me become what you had always wanted me to be. May your soul rest in peace, and you will always have a special place in my heart. To my Uncle and my Auntie Mr. and Mrs Nkonge Musenge, am at loss of words but your support, sacrifice and care is what has made me to be what I am today. Your efforts have not been in vain but will soon come to fruition. May the Almighty God deservedly bless you? To my Grandparents Mr. and Mrs. Chilekwa, to Uncle Lyondo, to my three sisters, Angela, Womba and Nyampasa, and to my family, your support and encouragement has been and will always be priceless. Most important of all, I thank GOD THE ALMIGHTY for guiding me throughout the journeyand for proving to me that He is the source of my strength, knowledge and refuge. Indeed, I returned, and saw under the sun, that the race is not to the swift, nor the battle to the strong, neither yet bread to the wise, nor yet favour to men of understanding, nor yet favour to men of skill; but time and chance happens to them all ( Ecclesiastes 9:11).

ACKNOWLEGDEMENTS It is with great gratitude and pleasure to acknowledge and thank the people who greatly contributed to the completion of this project. Firstly, it is cardinal to indicate that the various people to whom I feel indebted may be difficult to identify and adequately acknowledge. However, this project will not go without making special mention of some individuals either for their invaluable inspiration, support or for be arance. I am grateful to my supervisor Mr. G Mufungulwa for his heart-felt, timely encouragements and concern towards my progress in the project, reading and commenting on each section of theproject, thereby offering a well guided supervision of my work. Special thanks are also extended to Mr Chikowa and Dr H. Mulenga, who did not only sacrifice their time to offer extra guidance in my career, suggestions and insights, but also acted to me like a father to his son. I also wish to thank the lecturers of the Department of Computer Science who include Mr Nkonde (H.O.D), Mr Kayula, Mr. A.S Sakala, Dr. H.M Libati (Dean), Mr Chaamwe(Assistant Dean), Mrs S. Mbewe, and Mr. D. Ntalasha for their special contribution to ourcareers. I would like to thank my friends, Justin Nyirongo, Justo, Kaunda Chonde Musebe, ChiMonk, Kabaso Musebe, ShiMalama, Mwiche Namukoko, Hendrick Kapepa, Victor Miti,Vix and Shephat Phiri King Shepha. Thank you guys, for being there for me in allsituations, both challenging and encouraging. You have added a dimension to my life andbecause of this; I guarantee you a special place in my heart. Special acknowledgements also goes to the musicians, Kenny G, England Dan & John McFord,Bob Dylan, PK Chishala (Late), Mike and The Mechanics, Bee Gees, Marc Cohn, Cece Winans,Don Moen, 4Him, Maranatha, Carrie Underwood, Alfred Kalusa Chisala (Late) and Peter SosiJuma (Late) for keeping me awake with their music during my sleepless nights. Special and unreserved acknowledgements also go to my classmates and friends. You guyshave been a great family and source of happiness throughout my stay at the CopperbeltUniversity. Finally, I thank the Copperbelt University for educating me not only academically but sociallytoo. I further extend my acknowledgements to the Zambian Government for the financialsupport.

ABSTRACT In computers, ports are used mainly for two reasons: Device control and communication. It is possible to program PC's Parallel ports for both. Parallel ports are mainly meant for connecting the printer to the PC. But we can program this port for many more applications beyond that. With the advancements in computer technology, the parallel port can now be used for performing more tasks than was originally thought. An example of such uses is parallel port programming. Parallel port programming uses the same principle of interaction between the printer and the computer to enable the computer to send and receive data bits to and from the peripheral connected to it. The Automated Gate Pass System (AGPS) is a parallel port programmed system designed to demonstrate how the parallel port can be used to automate the operation of gates in organizations. AGPS aims at proving that the operation of the gate can be done without physically moving to the gate, which is a cumbersome process. In achieving this, AGPS has transferred and translated the manual routines of gate operation into computer logic capable of doing the same task in a more flexible and convenient manner. Automated gate pass systems have become popular in many developed countries. This has led me to the development of a model automated gate pass system that will be used to automatically operate the gate, recording of problems that gate has experienced and producing administrative reports.

TABLE OF CONTENTS Contents DECLARATION DEDICATIONS ACKNOWLEDGEMENTS ABSTRACT CHAPTER 1 1.1 Introduction 1.2 Statement of the problem 1.3 Rationale of the study 1.4Scope of the Study 1.5 Research Methodology CHAPTER 2 LITERATURE REVIEW 2.0 The Standard Parallel Port 2.2 Description of the parallel port 2.3 Parallel Port Addressing 2.4 Electronic Components CHAPTER 3 SUCCESS CRITERIA 3.0 Success Criteria 3.1 Scope and objectives 3.2 Proposed system 3.3 Benefits of the proposed system 3.4 Functional Requirements 3.5 Non-functional Requirements 3.6 User Responsibilities 3.7 Reliabilities 3.8 System recovery and backup strategies PROJECT OVERVIEW Page ii iii iv vi 1 2 2 2 3 3 4 5 8 9 10 12 13 13 14 14 15 17 17 18 18

CHAPTER 4 DESIGN SPECIFICATIONS 4.1 Systems Design 4.2 Scope and objectives 4.3 Data Design 4.4 Application Design 4.5 User Interface Design 4.6 Hardware Design 4.7 Security Design CHAPTER 5 IMPLEMENTATION 5.0 Implementation 5.1 Graphical User Interface 5.2 User Training 5.3 System Conversion CHAPTER 6 TESTING 6.1 Objectives of the test plan 6.2 Method of Testing 6.3 Access Control CHAPTER 7 CONCLUSIONS AND RECOMMENDATIONS 7.1 Conclusions 7.2 Recommendations REFERENCES Appendix I Source Code Appendix II Installation Manual Appendix III User Manual

19 20 20 21 33 39 41 42 46 47 50 51 52 53 54 54 54 59 60 61 63 64 91 97

1.1 INTRODUCTION The coming of automatic programming equipment eventually brought about operation of most electromechanical equipment becoming completely automatic. The Automated GatePass System [AGPS] is a system that aims to replace the manual gate pass system used at theCopperbelt University with an automatic system which has the capability of handling gateusage and operation with little or no human intervention. The Automated Gate Pass Systemplaces emphasis on improved security, efficiency, ease of gate operation and maintenance of accurate records. 1.2 STATEMENT OF THE PROBLEM The current gate pass system used at the Copperbelt University is manual resulting in a lot of inefficiency and unaccountability as concerning managing the gate. Manual gate pass system are not only inconsistent in maintaining security say for a production plant, but also cumbersome in record keeping as records may not be traced at times. 1.3 RATIONALE OF THE STUDY The summary of the main objectives is as follows: The system drastically reduces the presence of security guards who are usually inefficient. This improves efficiency of the security system in the organization. The system keeps up to date information about gate usage. The system also reduces on the number of illegitimate people entering the organization premises. Entrance is restricted to authorized personnel only

1.4 SCOPE OF THE STUDY This exclusively analyzed the existing manual gate system used by the Copperbelt Universityand came up with an efficient and effective Automated Gate Pass System to control the usage of the gate for security and accountability purposes. The project is in two parts: the software which includes the server and the client and the hardware, which includes the model and its connection to the parallel port. 1.5 RESEARCH METHODOLOGY Collection of vital data to help me with the system analysis and design was acquired through the following activities: Constant consultation with the project supervisor on how best to go about developing the system and the CBU Electrical department. Interviews with relevant officials from CBU who are responsible for the usage of the gate such as security department, dean of student and the transport department. Review of literature and documentation on similar projects from the CBU and other libraries, encyclopedia etc. Browsing the internet for any information concerning the system under consideration

2.1 THE STANDARD PARALLEL PORT The parallel port is used to generally manage printers. However, since this port has a group of inputs and digital outputs, it can be used in making practical experimental reading of data and controlling of devices. This work seeks to describe how the standard parallel port operates in interfacing the computer and the system model. 2.1.1 TYPES OF PARALLEL PORTS Newer Parallel Ports are standardized under the IEEE 1284 standard first released in1994.This standard defines 5 modes of operation which are as follows, 1. Compatibility Mode. 2. Nibble Mode. (Protocol not Described in this Document) 3. Byte Mode. (Protocol not Described in this Document) 4. EPP Mode (Enhanced Parallel Port). 5. ECP Mode (Extended Capabilities Port). All the input and outputs use transistor logic (TTL) signal levels, where a low (logic 0) is equivalent to 0 volts and a high (login 1) is equivalent to a voltage of 5 volts. 2.1.2 INPUT OUTPUT PORTS The input output ports constitute the means for which the microprocessor of a computer communicates with its environment. The personal computer can address up to 64k ports of input output. This project will allow the input of up to 9 bits or the output of 12 bits at any one given time. The parallel port is commonly found on the back of the computer as a D-Type 25 Pin female connector. This project makes use of the standard parallel port (LPT1).The port is composed of: 4 control lines, 5 status lines and 8 data lines, The remaining 8 pins are grounded.

Figure 2.0: A 25- way female D-Type connector (printers parallel port)

Figure 2.0: A 25- way female D-Type connector (printers parallel port) (Source:www.electrosofts.com)

Table 2.0: Pin assignment for the 25 way female D-Type standard parallel portconnector. Pin Description Notes 1 /Strobe PC Output (OC)2 Data_0 PC Output3 Data_1 PC Output4 Data_2 PC Output5 Data_3 PC Output6 Data_4 PC Output7 Data_5 PC Output8 Data_6 PC Output9 Data_7 PC Output10 /ACK PC Input11 Busy PC Input12 Paper Empty PC Input13 Select PC Input14 /Autofeed PC Output15 /Error PC Input16 Init Printer PC Output17 /Select_Input PC Output18-25 Ground

2.2 DESCRIPTION OF THE PARALLEL PORT The parallel port is now commonly included in the main board of the computer(motherboard). This port uses a female connector DB25 in the computer and a special connector called the male centronic that has 36 pins. It is possible to connect the DB25 with25 pins to the centronic of 36 pins since nearly half of the pins of the centronic are grounded(earthed) and they are not connected with DB25.This project makes use o

Figure 2.1: Description of the connector DB25 of the computer (Source:www.electrosofts.com) The parallel port consists of 17 lines of signs and 8 earth lines. The lines of signs are categorized into three groups: 8 lines of data 4 control lines 5 status lines

The data lines are used for transferring data. The range is D0 D7. The control lines can be used for outputting but can also be used for inputting. The range is like in data ports C0-C7 but C4, C5, C6, C7 are invisible in the connector. These are used to interface, control and exchange messages between the computer and the printer.

The status lines are made for reading signals. The range is like in data ports which are S0-S7.But S0, S1, S2 are invisible in the connector. These lines read state indicators from the printer to the computer (lack of paper, busy, error in printer).These lines are connected to the Data, Control and Status registers internally. The parallel port has three registers namely: Data register Status register Control register

As their names specify, Data register is connected to Data lines, Control register is connected to Control lines and Status register is connected to Status lines. (Here the word connection does not mean that there is some physical connection between data/control/status lines. The registers are virtually connected to the corresponding lines.) The register of our interest in this project is the statuses register which inputs signals to the port so that the status of the model can be known. 2.3 PARALLEL PORT ADDRESSING The Parallel Port has three commonly used base addresses. LPT1 is normally assigned base address 378h, while LPT2 is assigned 278h. However this may not always be the case as explained later. 378h & 278h have always been commonly used for Parallel Ports. The lowercase h denotes that it is in hexadecimal. These addresses may change from machine to machine. The assignment of the port address is usually as follows:

These registers are I/O mapped and will have a unique address. For a typical PC, the base address of LPT1 is 0x378 and of LPT2 is 0x278. The Data register resides at this base address, Status register at base address + 1 and the control register is at base address + 2. The table below shows the register addresses of LPT1 and LPT2. Register LPT1 LPT2

2.4 ELECTRONIC COMPONENTS 1. RELAYS Two twelve volts relays are used to interface the motors and the parallel port of the computer. The twelve volts relays are used in the movements segment. The relay contains two contacts, one normally open and the other normally closed. When coils of the relay are energized, they will generate a magnetic filed which will reverse the initial state of the contacts, that is, the contact, which was

normally open, becomes closed and that which was normally closed becomes open rotating the motor in one direction. The change in directions of the motor rotation is done by reversing connection of the other two relays 2. DIODES The diodes are used to suck any remaining current in the coil when the relay is off. This protects the motor from any damage which might be caused due to counteracting currents when power flows in the opposite direction with the sending of a new signal. 3. RECTIFIER The rectifier will be used in converting an alternating current (AC), which flows back and forth in a circuit, to direct current (DC), which flows only in one direction. It will also permit current to pass in only one direction, effectively blocking its flow in the other direction, is inserted into the circuit for the purpose. 4. TRANSFORMER The step down transformer is used to reduce the voltage from 240 volts to twelve (12) volts to accommodate the relays which will be used. 5. SOLID STATE RELAYS Two solid state relays are used to control the two voltages that is, voltage from the computer and the voltage used on the control IC. The voltage coming from the computer which is five volts can be used to move the motor because the voltage required is 12 volts. 3.0 SUCCESS CRITERIA A success criterion is establishing the circumstances under which the work would be considered successful. An outline of the functional and non-functional requirements of the system is given herein. 3.1 SCOPE AND OBJECTIVES3.1.1 EXISTING SYSTEM There are a few existing gate systems which are only mechanized and use remote controls. But these systems are insecure because in a situation where a remote control is a stolen or lost, it is not easy to prevent someone using the stolen remote control from opening the gate. The only solution is to either change the system or intensify security (by deploying security guards who should keep track of who enters or leaves the premises) which would result in incurring unnecessary expenses. The current gate pass system used at the Copper belt University is solely manual and has no provision for the maintenance of an accurate and consistent record of gate usage, and it has no capabilities for keeping track of the number of people who enter or leave the premises. The current system is completely handled or managed by security guards and thus security is compromised since these guards can easily be manipulated. 3.1.2 LIMITATIONS OF THE EXISTING SYSTEM The limitations of the existing system include the following: It is very costly to maintain. It involves the use of security guards, thus management incurs some cost to pay security guards. At each gate there are at least two guards. There is inconsistent and in accuracy in the maintenance of records on gate usage. Guards are the ones who are responsible for the maintenance of record. Records are kept in log books. These records can easily be entered incorrectly.

It is very insecure. Human beings are used as a mode of security at the gate and its a known fact that human beings are open systems by nature, thus it is easy to bribe a security guard. The opening and closing of the gate has is done physically which makes it cumbersome.

3.2 PROPOSED SYSTEM The proposed system accomplished the following objectives: Replace the physical handling of the gate with software that can do the same task efficiently and effectively. Maintain accurate and consistent records on gate usage

3.3 BENEFITS OF THE PROPOSED SYSTEM The benefits of the proposed system are: Gate opening and closing, which involves the opening of the gate once a legitimate user swabs a valid card in the card reader. This replaces the physical handling of the gate with software that can do the same task efficiently and effectively Accurate maintenance of accurate and consistent records on gate usage. TheAGPS aim is to improve consistence and accuracy of records on gate usage. The system keeps an accurate log of who enters or leaves the premises and when. It will also keep a record of the number of people who enters or leaves the premises on a particular day. Improved efficiency and effectiveness as well as flexibility of operation. The system also reduces on the number of illegitimate people entering the organization premises. Entrance is restricted to authorized personnel only. Improved security. Humans are open systems which are affected by their environment, thus if security guards are to be given sole responsibility for the handling of gate then definitely security will be compromised. AGPS is a stable system which drastically improves security. The system will provide a 24hour service security. In cases where a card is lost or stolen it is very easy to prevent anyone using the stolen card from entering the premises. If a person tries to use the stolen card to enter the premises the alarm is raised or rung instead of opening the gate. 3.4 FUNCTIONAL REQUIREMENTS Functional requirements are statements of services the system provides, how the system reacts to particular inputs and how the system behaves in particular situations. These requirements describe the system services in detail. The requirements can be described in terms of outputs and inputs to the system. The following are the functions: 3.4.1 Data Input Data entered includes user details, card details which will include the card number and type. 3.4.2 System processes This refers to the operations performed on data entered to generate output. This includes, entering users, editing user details, viewing users, reports and management of the database.

3.4.3 Search and retrieval Search by user number, gate number, card number given a key field, the system is able to retrieve specific user, gate or card details from the database. The key field is the user number. 3.4.4 Storage The results are stored in the respective tables on the main database. All other modules save and retrieve their data from the database. 3.4.5 Updating i .Adding Records AGPS allows users authorized by the system Administrator to add new records. Additions are done based on the key fields, user number, gate number, card number. In case a record with an existing key field is inadvertently entered, an error message is generated indicating that the record already exist .ii.Editing: AGPS permits system users to edit certain fields of the records as provided by the level of access. Other fields cannot be edited once entered. Critical fields, for which the system does not provide an editing function input, have their values input thrice i.e. first input, second input and then third input for confirmation. 3.4.6 Output The system provides the following output :I Screen output : The system provides appropriate views for the user to enter and view gate, user and card details. Editing function is provided depending on the level of access .ii.Printed output : The system is able to generate forms and printouts of the gates, cards and users. 4.1 SYSTEMS DESIGN Systems design was concerned with effectively and efficiently meeting the systems requirements identified in the preceding systems analysis. It was the bridge between software requirements and an implementation that satisfies those requirements. The design specification was a blueprint of the system to be implemented. This document outlines the design based on the requirements specification, with particular emphasis on data description, logical system structure, user interface and security features incorporated in the system. 4.2 SCOPE AND OBJECTIVES This document describes how the system was developed and how it works. It particularly describes the structure of the system, the data interface and the user interface, the hardware component and security. The model used for the database was the relational database. This is simply a collection of tables stored in a computers memory and designed for easy access by authorized users. The data may be in the form of text, numbers, or encoded graphics. The design of the Automated gate pass system can be best described by partitioning it into five sections of concern:-

i. Data Design Entity relationships in the system and data tables are described in this section. ii. Application Design This section describes the decomposition of the system, describing the modules and flow of data through the system. iii. User Interface Design - The design of the interface and the kind of interface to be used is outlined in this section. iv. Hardware design -This will explain how the hardware part (the model) of the automated gate passes system works and how it is be integrated in the system. v. Security Design The security policies that have been applied in the system are described in this part of the document 4..2.1 REQUIREMENTS DETERMINATION The requirements of the proposed system were determined mainly through research on the internet regarding on automated systems that have been developed and the various standards followed when designing such systems. The other area of research was that of parallel port programming in visual basic. 4.3 DATA DESIGN In this section, the document describes the data used in the system database and illustrates by means of Entity-Relationship (ER) diagrams and tables resulting from these entity relationships. 4.3.1 Entity-Relationship Diagrams The following entities were identified: GATE: The entity that gives a general description of the gate attributes. ADMINISTRATOR: The entity that describes the attributes of the Administrator. CARD: The entity that describes the attributes of the card. USER: The entity that describes the attributes of the User. LOG: The entity that describes the attributes of the log. MESSAGE: The entity that describes the attributes of the message The attributes of each entity are described in their respective tables. The diagrams that follow are as a result of a thorough analysis of the entities, their attributes and relationships The attributes of each entity are described in their respective tables. The diagrams that follow are as a result of a thorough analysis of the entities, their attributes and relationships

The Simplified Entity-Relationship Diagram for the Proposed System is as follows

Figure 4.3.1 ER Diagram

4.3.2 DATA TABLES The following are the normalized tables derived from the Entity Relationship Modelshowing the fields, their respective data types, and a brief description of each field.

4.4 APPLICATION DESIGN Top-Down approach is used to decompose the system. The system was broken intomodules and using step-wise refinement these modules are further decomposed until therequired detail is achieved. The system modules interact with a central database. 4.4.1 System Modules

The main system modules are shown in figure 4 below. Figure4.4.1a:

Figure 4.4.1a Visual Table of Contents

1.0 Automated Gate Pass System2.0 User Management 2.1 New user record2.2 View user2.3 Edit user record 3.0 Card Management 2.1 New card record2.2 View report. Automated Gate Pass System [AGPS] Design Specifications [Chapter Four] 34 | P C a h g i e y e s u K a l a b a 2 0 0 8

2.3 Edit card record 4.0 Gate Management 4.1 New gate record4.2 View report4.3 Edit Gate record 5.0 Logs 5.1 View Logs5.2 Delete Log 6.0 Messaging

6.1 Send Message6.2 Read Message6.3 Delete Message 4.4.1.1 User Management Module This module performs the function of adding, editing and deleting user profiles. It alsoconsists of various querying capabilities. Reports are generated based on these queries.The reports include: UserID: details of an individual with entered UserID Department/School/Company: all individuals with belonging to the enteredDepartment/School/Company. Disabled: All users whose accounts have been disabled Assigned Cards: All users who have been assigned cards.

Вам также может понравиться