Building Security and Access Control System Group Members: Abdulrahman Daher Saeed199901447 Khalid Younus Ali Kalbat199900132 Mohammed Ramadan Sarhan199905274.

Slides:



Advertisements
Similar presentations
Sensing and Control.
Advertisements

Electronics Design Lab TUTORIAL PIC Microcontrollers Francesco Tenore 2/10/2006.
INPUT-OUTPUT ORGANIZATION
EMS1EP Lecture 4 Intro to Programming Dr. Robert Ross.
MC68HC11 System Overview. System block diagram (A8 version)
What is Arduino?  Arduino is a ATMEL 168 micro-controller kit designed specially for small projects  User friendly IDE(Integrated Development Environment)
Input/Output (I/O) Ports and Interfacing
Indian Institute of Technology Hyderabad ROBOTICS LINE FOLLOWER HARI KISHAN TANDEY – ES12B1008 DILIP KONDAPARTHI – ES12B1010 SAI KARTIK – CE12B1015.
Counter Circuits and VHDL State Machines
Starting with serial Chapter Ten 10.1, 10.2,
Technion – Israel Institute of Technology Department of Electrical Engineering High Speed Digital Systems Lab Project performed by: Safi Seid-Ahmad Emile.
The Solar Tracker. Solar Tracking Project Team Members: –Cristian Ruvalcaba –Ken Seal –David Clark –Mark McKinley –Richard DeJarnatt.
Coordinate Based Tracking System
ASPPRATECH.
1. S U I I T PROJECT PRESENTATION: Sambalpur University Institute of Information Technology.
Microcontroller Architecture PIC18F Family
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
INPUT-OUTPUT ORGANIZATION
Edited by Mandar More Technical Manager, Ninad`s Research lab Ninad243.weebly.com MODERN OFFICE MANAGEMENT TOOL FOR SELECTIVE DATA.
Smart-grid Interface with Photovoltaic Installation – Phase 2 PP-01 Team members: Matt Koresh Ivan Mills Matt Martin Advisor: Dr. Aliprantis.
Microcontroller Programming How to make something almost do something else Raffi Krikorian MAS November 2003.
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
Serial Communication ETEC 6416.
Department of Electronic & Electrical Engineering Embedded system Aims: Introduction to: Hardware. Software Ideas for projects ? Robotics/Control/Sensors.
One of the most important feature of the microcontroller is a number of input/output pins used for connection with peripherals. In the case of PIC 167CX,
Other Chapters From the text by Valvano: Introduction to Embedded Systems: Interfacing to the Freescale 9S12.
HARDWARE INTERFACE FOR A 3-DOF SURGICAL ROBOT ARM Ahmet Atasoy 1, Mehmed Ozkan 2, Duygun Erol Barkana 3 1 Institute of Biomedical Engineering, Bogazici.
Chapter 2 Introducing the PIC Mid-Range Family and the 16F84A The aims of this chapter are to introduce: The PIC mid-range family, in overview The overall.
Designing a Voice Activated Compartmentalized Safe with Speech Processing using Matlab Preliminary Design Review Amy Anderson Ernest Bryant Mike Joyner.
ELECTRIC LINE MAN SAFETY WITH PASSWORD BASED CIRCUIT BREAKER Under the Guidance of Submitted by Project Title.
July 18, UCSD - R.A. de Callafon Short Intro to Micro Processors and I/O functions of our Kinetic Sculpture Control Box Raymond de Callafon.
Department of Electronic & Electrical Engineering LCD character display (parallel interface). How to interface a LCD character display to a PIC.
Features of the PIC18 microcontroller - 8-bit CPU - 2 MB program memory space (internal 32KB to 128KB) bytes to 1KB of data EEPROM - Up to 4096 bytes.
Department of Electronic & Electrical Engineering Lecture 2 ● Introduction to IO ● Using a subroutine ● Driving a 7seg display.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Submitted by:.  Project overview  Block diagram  Power supply  Microcontroller  MAX232 & DB9 Connector  Relay  Relay driver  Software requirements.
BLDC Motor Speed Control with RPM Display. Introduction BLDC Motor Speed Control with RPM Display  The main objective of this.
Programming PIC 16F84A in Assembly. PIC16F84 pin-out and required external components.
SUBMITTED BY EDGEFX TEAM PORTABLE CODED WIRELESS MESSAGE COMMUNICATION BETWEEN TWO PARTIES SECRETLY WITH LCD DISPLAY.
WATER LEVEL INDICATOR AND AUTOMATIC MOTOR SWITCHING SYSTEM
ARM CORTEX (STM32) BASED MOTOR SPEED CONTROL SUBMITTED BY EDGEFX TEAM.
1. PIC ADC  PIC18F877 has 8 analog input channels i.e. port A pins(RA0 to RA5) and port E pins(RE1 and RE2). These pins are used as Analog input pins.
ENERGY METER TO INDICATE BILLING IN RUPEES FOR LOAD WISE OR DAY WISE
Project Title PASSWORD BASED CIRCUIT BREAKER CONTROL TO ENSURE ELECTRIC LINE MAN’S SAFETY Under the Guidance of Submitted by.
ARDUINO BASED UNDERGROUND CABLE FAULT DETECTION
Scrolling LCD using Arduino.
SUBMITTED BY EDGEFX TEAM
Fundamentals of Computer Engineering
ARDUINO BASED AUTOMATIC TEMPERATURE BASED FAN SPEED CONTROLLER
ULTRASONIC DISTANCE METER USING 8051
Arduino BASED RFID Device Access
SUBMITTED BY EDGEFX TEAM
PC Mouse operated Electrical Load Control Using VB Application
Chapter 10 PIC18 Serial Port Programming in Assembly
Microcontroller Based Digital Code Lock
SUBMITTED BY EDGEFX TEAM
DIGITAL CALCULATOR USING 8051
OBJECTIVE AND FEATURES:
SMART CARD ENABLED EMPLOYEE IDENTIFICATION FOR SECURITY PURPOSE
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
‘SONAR’ using Arduino & ultrasonic distance sensor
RAILWAY TRACK SNAP NOTIFICATION
SUBMITTED BY EDGEFX TEAM
Programming Boe-Bots (Part 1)
EET 2261 Unit 11 Controlling LCD and Keypad
Introduction to Microprocessors and Microcontrollers
EET 2261 Unit 11 Controlling LCD and Keypad
8051 Micro Controller.
PIC Serial Port Interfacing
PIC Serial Port Interfacing
Presentation transcript:

Building Security and Access Control System Group Members: Abdulrahman Daher Saeed Khalid Younus Ali Kalbat Mohammed Ramadan Sarhan Mohammed Numan Shehadeh

Executive Summary Designing and implementing a secure access and control system for an office building Designing and implementing a secure access and control system for an office building The system consists of two sites. The system consists of two sites. –system site –local site The two sites are connected using serial communication RS-232 The two sites are connected using serial communication RS-232

Executive Summary Local Site: where the personal computer is located and a user interface program is installed Local Site: where the personal computer is located and a user interface program is installed System site: a keypad and a Liquid Crystal Display (LCD) are located at the entrance of the system System site: a keypad and a Liquid Crystal Display (LCD) are located at the entrance of the system The LCD is used to show all the needed messages to the user to inform him/her about what to do at the entrance The LCD is used to show all the needed messages to the user to inform him/her about what to do at the entrance

Introduction The importance of this project lies in the fact that it serves the security for offices, hospitals, businesses or institutional buildings The importance of this project lies in the fact that it serves the security for offices, hospitals, businesses or institutional buildings The system is environmentally friendly, it doesnt pollutes the environment. The system is environmentally friendly, it doesnt pollutes the environment. The system gives access to any person who has an authorized User ID and password The system gives access to any person who has an authorized User ID and password

Introduction System Operation: System Operation: –The LCD will show a message to the user asking him to enter his/her User ID and password –Then it will show a wait message while the data will be transmitted to the PC via RS-232 interface –The PC compares the data with the database to check if the person should be allowed to enter or not

Introduction System Operation: System Operation: –If a valid User ID and password were entered, the LCD will show an acceptance message –The stepper motor will start rotating and open the door to give the person the permission to enter the building –Otherwise, if the User ID and the password were not valid, another message will be displayed showing INVALID on the LCD

Project Description The project is basically a Microcontroller based system The project is basically a Microcontroller based system Microchip PIC16F877 microcontroller was selected Microchip PIC16F877 microcontroller was selected The different components of the system are controlled by microcontroller The different components of the system are controlled by microcontroller

Project Description The system consists of the following major components: Liquid Crystal Display (LCD) System Liquid Crystal Display (LCD) System Microcontrollers and other chips Microcontrollers and other chips Sensors (Opto-Switches) Sensors (Opto-Switches) Stepper motor Stepper motor Keypad Keypad

System Block Diagram

Microcontrollers There are many companies which provide series of microcontrollers There are many companies which provide series of microcontrollers –Atmel –Motorola –Microchip Technology. The PIC16F877 microcontroller was selected The PIC16F877 microcontroller was selected The PIC microcontroller series are produced by Microchip Technology The PIC microcontroller series are produced by Microchip Technology

Microcontrollers The PIC microcontroller has many powerful features. The PIC microcontroller has many powerful features. It has low cost compared to other products It has low cost compared to other products It is available in the Electrical Engineering Department with its programming tools It is available in the Electrical Engineering Department with its programming tools

Microcontrollers Main Features: Main Features: –256 Bytes EEPROM data memory –Interrupt capability (up to 14 sources) –Three different built-in timers –8 channels 10-bit analog-to-digital converter –Universal Synchronous Asynchronous Receiver Transmitter (USART)

Development Tools MPLAB IDE is a Windows based Integrated Development Environment (IDE) MPLAB IDE is a Windows based Integrated Development Environment (IDE) MPLAB IDE is used to write, debug, and optimize programs in Assembly language MPLAB IDE is used to write, debug, and optimize programs in Assembly language

Development Tools MPLAB IDE tools is used to: MPLAB IDE tools is used to: –Assemble, compile, and link source code –Debug the executable logic by watching program flow with the simulator –Make timing measurements –View variables in watch windows –Program firmware with PICSTART Plus

Development Tools PICSTART PLUS is used to PICSTART PLUS is used to Program micrcontrollers PICSTART PLUS makes designing simple. PICSTART PLUS makes designing simple.

PIC16F877 Pin Configuration

Keypad Interface Keypad is used for command and data input in computer systems Keypad is used for command and data input in computer systems The user can enter the User ID number and the password by the keypad The user can enter the User ID number and the password by the keypad

Keypad Interface keypads are usually arranged as a simple matrix of conductors keypads are usually arranged as a simple matrix of conductors switches connect each row to each column switches connect each row to each column

Keypad Interface Keypad scanning mechanism: –Forcing the rows to zero by making the appropriate Port B pins outputs and writing 0s to these pins –Making the pins associated with the columns inputs and checking these pins to determine if any are 0 –Forcing the columns to zero by making the appropriate Port pins outputs and writing 0s to these pins

Keypad Interface Keypad scanning mechanism: –Making the pins associated with the rows inputs and checking these pins to determine which row is zero –Using the row and column numbers to look-up the key value in a table and returning this value in the W accumulator –Returning from the subroutine.

Stepper Motor The stepper motor is used to open and close the door The stepper motor is used to open and close the door The stepper motor moves one step at a time The stepper motor moves one step at a time In order to rotate the stepper motor specific sequence of voltages should be applied to the stator coils In order to rotate the stepper motor specific sequence of voltages should be applied to the stator coils

Stepper Motor Unipolar stepper motor is used since its easy to control Unipolar stepper motor is used since its easy to control Permanent magnet is used for the rotor and coils are put on the stator Permanent magnet is used for the rotor and coils are put on the stator 4 poles stepper motor has step angle of 90 degrees 4 poles stepper motor has step angle of 90 degrees

Stepper Motor The turn of the motor is controlled by the electric current which passes into the motor terminals The turn of the motor is controlled by the electric current which passes into the motor terminals The motor can rotate in clockwise direction or counterclockwise direction The motor can rotate in clockwise direction or counterclockwise direction

Stepper Motor Turning off coil A and turning on coil B will rotate the rotor in clockwise direction Turning off coil A and turning on coil B will rotate the rotor in clockwise direction Turning off coil B and turning on coil C will move the rotor one step further Turning off coil B and turning on coil C will move the rotor one step further

Stepper Motor Control The microcontroller was used to control the stepper motor The microcontroller was used to control the stepper motor A program was written in assembly language to control the speed and the direction of rotation of the stepper motor A program was written in assembly language to control the speed and the direction of rotation of the stepper motor

Stepper Motor

Opto-Switch The Opto-Switch is a special type of sensors used as a switch The Opto-Switch is a special type of sensors used as a switch Consists of two sections: Consists of two sections: –Infrared LED –Phototransistor There is a small gap between the two sections There is a small gap between the two sections

Opto-Switch The Opto-switches were used to provide a feedback to the microcontroller while the door is moving The Opto-switches were used to provide a feedback to the microcontroller while the door is moving There are three Opto-switches located on the track on which the door is sliding There are three Opto-switches located on the track on which the door is sliding The microcontroller senses the changes on these sensors and performs the proper action The microcontroller senses the changes on these sensors and performs the proper action

Liquid Crystal Display (LCD) LCD can operate in one of the two modes: LCD can operate in one of the two modes: –8 bits data interface mode –4 bits data interface mode 8 bits mode is easier to implement because it requires less memory size but it also requires more additional I/O lines 8 bits mode is easier to implement because it requires less memory size but it also requires more additional I/O lines

Liquid Crystal Display (LCD) The LCD has 11 data and control pins The LCD has 11 data and control pins D0-D7 is the bi-directional data bus D0-D7 is the bi-directional data bus R/W determines if we read from or write to the LCD R/W determines if we read from or write to the LCD According to RS pin, the data on the data bus is treated either as a command or character data According to RS pin, the data on the data bus is treated either as a command or character data

Liquid Crystal Display (LCD)

Power Supply The power supply is needed to operate the microcontroller and the other components: The power supply is needed to operate the microcontroller and the other components: –5 Vdc is needed to operate the microcontroller, LCD, and sensors –12 Vdc is needed to operate the stepper motor

Power Supply

System Integration The microcontroller supports five ports with a width of 8 bits each except for the ports A and E The microcontroller supports five ports with a width of 8 bits each except for the ports A and E The first four pins of PORTA(RA0:RA3) are configured as output ports to control the stepper motor by setting the corresponding register TRISA to ones The first four pins of PORTA(RA0:RA3) are configured as output ports to control the stepper motor by setting the corresponding register TRISA to ones The keypad is connected to seven pins of PORTB(RB1:RB7) The keypad is connected to seven pins of PORTB(RB1:RB7)

System Integragtion RB0 is reserved to be used as an interrupt pin to open the door directly from the computer RB0 is reserved to be used as an interrupt pin to open the door directly from the computer The three sensors used in the system are connected to PORTC(RC0:RC2) The three sensors used in the system are connected to PORTC(RC0:RC2) RC6 (TX) and RC7 (RX) are configured to send/receive data to/from the microcontroller at a baud rate of 9600 RC6 (TX) and RC7 (RX) are configured to send/receive data to/from the microcontroller at a baud rate of 9600

System Integration PORTD and PORTE are reserved for the LCD display module PORTD and PORTE are reserved for the LCD display module PORTD is connected to the bi-directional data bus (D0-D7) of the LCD PORTD is connected to the bi-directional data bus (D0-D7) of the LCD The three pins of PORTE(RE0:RE2) are connected to RS, RW and EN, respectively The three pins of PORTE(RE0:RE2) are connected to RS, RW and EN, respectively

System Integration The assembly code to configure the ports: The assembly code to configure the ports: BANKSEL ADCON1 MOVLW 0X06 MOVWF ADCON1 BANKSEL TRISE MOVLW 0X00 MOVWF TRISE MOVLW 0X00 MOVWF TRISD MOVLW 0X00 MOVWF TRISA

System Integration The assembly code to configure the serial port: The assembly code to configure the serial port: MOVLW 0xC7 MOVWF TRISC MOVLW SPBRG_VAL MOVWF SPBRG MOVLW 0x24 MOVWF TXSTA BANKSEL PORTE MOVLW 0x90 MOVWF RCSTA

System Integration A user defined byte is used for the purpose of building multifunctional subroutines (AUX) A user defined byte is used for the purpose of building multifunctional subroutines (AUX) Only six bits of the AUX byte are used by the program Only six bits of the AUX byte are used by the program UP EQU 0;USERNAME/PINCODE VINV EQU 1;INVALID/VALID MOT EQU 2;NOT MOTOR/MOTOR OPCL EQU 3;OPENNING/CLOSING WNW EQU 4;WAITING/NOT WAITING DOFFON EQU 5;DOOR OFF/ON

System Integration LCD initialization: LCD initialization:LCD_INIT MOVF COUNT,W CALL INIT MOVWF DAT CALL COMMANDIN INCF COUNT, F MOVLW 0X08 SUBWF COUNT,W BTFSS STATUS, Z GOTO LCD_INIT

System Integration After initializing the LCD module, the main part of the program starts After initializing the LCD module, the main part of the program starts The microcontroller sends commands to the LCD to write a message ENTER USERNAME The microcontroller sends commands to the LCD to write a message ENTER USERNAME The data are stored in a subroutine called USRNM_DATA The data are stored in a subroutine called USRNM_DATA

System Integration A memory location (DIGITS) is initialized so that the user can enter only four digits A memory location (DIGITS) is initialized so that the user can enter only four digits The data entered by the user is processed in a loop call DATAL The data entered by the user is processed in a loop call DATAL The data entered by the user is also sent to the LCD and computer The data entered by the user is also sent to the LCD and computer

System Integration Controlling the stepper motor Controlling the stepper motor –After entering 4 digits by the user, PLS_WAIT subroutine will be called to poll if the PIN code is valid or invalid –If the pin cod is invalid, the user will have another chance to enter his/her PIN code and only for three times –If the PIN code is valid, the program will activate the motor by setting DOFFON and WNW bits in the AUX memory location

System Integration

Database Program Database is used to store the users information such as: –User Name –User ID Numbers –User Password

Database Program Database usually consists of tables. Database usually consists of tables. Tables consists of fields Tables consists of fields In our case there are three fields which are: In our case there are three fields which are: –User Name –User ID –Password

Database Program There are several methods which are used to locate specific records in database tables There are several methods which are used to locate specific records in database tables FindFirst method is one of these methods FindFirst method is one of these methods In the visual basic program the method will try to match the input to the system with the data in the table In the visual basic program the method will try to match the input to the system with the data in the table The value of the NoMatch property indicates the success or the failure of the search operation The value of the NoMatch property indicates the success or the failure of the search operation

Database Program Another method is looping through all the records and testing the EOF property in each iteration Another method is looping through all the records and testing the EOF property in each iteration The EOF property indicates the end of the records in a table The EOF property indicates the end of the records in a table The above method is slower than the previous one in large databases The above method is slower than the previous one in large databases

Database Program The second method was used in the project to locate the records of the users The second method was used in the project to locate the records of the users The implemented code in visual basic can be divided into three parts: The implemented code in visual basic can be divided into three parts: –Declarations –Initializations –Loop

Database Program Declarations: Declarations: –Dim Db As DAO.Database –Dim Rst As DAO.Recordset –Dim Found As Boolean Initializations: Initializations: –Found = False –Set Db = CurrentDb() –Set Rst = Db.OpenRecordset("User)

Database Program Loop: Loop: Do While Not Rst.EOF And Not Found If Rst("User ID") = Val(Text1.Text) Then MsgBox "Match Found Found = True End If Rst.MoveNextLoop If Not Found Then MsgBox "No Match Found"

Local Site Interface The visual basic program is installed in a PC located in the local site The visual basic program is installed in a PC located in the local site The interface shows the User Name text box and the User ID text box The interface shows the User Name text box and the User ID text box There is a command button used to open the door directly from the PC There is a command button used to open the door directly from the PC

Local Site Interface

System Operation The LCD continuously shows a message to enter the User ID number The LCD continuously shows a message to enter the User ID number

System Operation If the user enters the number, the microcontroller reads the number and transmits it through a serial port to the computer while the LCD shows Please Wait message If the user enters the number, the microcontroller reads the number and transmits it through a serial port to the computer while the LCD shows Please Wait message

System Operation The visual basic program checks the existence of the user in the users database The visual basic program checks the existence of the user in the users database If the user is a registered user in the system, a valid signal is sent to the microcontroller through the serial port If the user is a registered user in the system, a valid signal is sent to the microcontroller through the serial port The microcontroller writes VALID message on the LCD The microcontroller writes VALID message on the LCD

System Operation Then the user is allowed to enter the pin code Then the user is allowed to enter the pin code The LCD shows ENTER PINCODE message The LCD shows ENTER PINCODE message

System Operation If the pin code is correct the visual basic program sends another valid signal to the microcontroller If the pin code is correct the visual basic program sends another valid signal to the microcontroller The microcontroller operates and controls the stepper motor to open the door for the user The microcontroller operates and controls the stepper motor to open the door for the user There are three sensors which provide the feedback to the microcontroller to control the opening and closing operation There are three sensors which provide the feedback to the microcontroller to control the opening and closing operation

System Operation If the user is not registered in the system, the local site program sends an invalid signal to the microcontroller. If the user is not registered in the system, the local site program sends an invalid signal to the microcontroller. The LCD shows INVALID message The LCD shows INVALID message

Conclusion & Recommendations Conclusion: Conclusion: –The system controls the access to a building using PIC microcontroller and personal computer –The implemented system is effective in terms of the cost –Low level and high level programming languages were used effectively in the project –System integration was successful

Conclusion & Recommendations Recommendations: Recommendations: –Microcontroller based systems should be given more interest from the department. –The students from the electrical department should learn how to implement a circuit in a printed circuit board. –The labs should be available for students at the evening time.