Your SlideShare is downloading. ×
  • Like
.doc
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply
Published

 

Published in Business , News & Politics
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
623
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
16
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Access Control & Security System Final Report Presented By Syed A. Ali George Kutsaftis Zachary J. Maura Chuong Nguyen Jonathan Vanase Advisors Dr. John Chandy Dr. Rajeev Bansal
  • 2. _______________________________________________________________________ _ Table of Contents Table of Contents.................................................................................................................2 Background..........................................................................................................................3 Summary..............................................................................................................................3 Competitive Analysis...........................................................................................................4 Door Access Interface .........................................................................................................4 Product Security Interface...................................................................................................5 Component Level Module ..................................................................................................6 Design Components.............................................................................................................7 Microcontroller....................................................................................................................7 Card Reader.........................................................................................................................9 Electric Door Strike ..........................................................................................................11 Schlage Lock.....................................................................................................................11 Wireless Units....................................................................................................................12 Wireless ConnexLink .......................................................................................................13 Texas Instruments TI-Tags................................................................................................14 Display...............................................................................................................................15 Power Management ..........................................................................................................16 Regulated Power Supply....................................................................................................16 Driving Circuitry...............................................................................................................17 Control Software................................................................................................................18 Current System Functionality............................................................................................20 Possible Future Modifications...........................................................................................21 Timeline.............................................................................................................................22 Parts List............................................................................................................................23 Budget................................................................................................................................24 Team Members Participation.............................................................................................24 Conclusion.........................................................................................................................25 Index..................................................................................................................................25 FIGURE 1 CORE SYSTEM MAPPING......................................................................................................7 FIGURE 2 QIK START PIC EDUCATION BOARD /W CAN................................................................8 FIGURE 3 BLOCK DIAGRAM OF 16F874...............................................................................................9 FIGURE 4 MSR200-33R CARD READER...............................................................................................10 FIGURE 5 SMART HOME SA TYPE DOOR STRIKE..........................................................................11 FIGURE 6 SCHLAGE LOCK.........................................................................................................11 FIGURE 7 CONNEXLINK UNIT.............................................................................................................13 FIGURE 8 DISPLAY OF SECURITY SYSTEM......................................................................................15 FIGURE 9 POWER MANAGEMENT CIRCUITRY..............................................................................16 2
  • 3. FIGURE 10 DRIVING CIRCUIT...............................................................................................................18 FIGURE 11 SCREENSHOT OF THE GUI...............................................................................................19 FIGURE 12 SOFTWARE EXTERNAL STRUCTURE...........................................................................20 _______________________________________________________________________ _ Background Due to missing equipment from the design and computer labs the ECE department had decided that they would like to secure these locations by using a card swipe and surveillance type security system. All labs will have the card access system installed as part of the project. .The University of Connecticut currently uses a decentralized card access security system called “Husky One Card”, which the card contains students school’s identity number and social security number. We were assigned the task of designing a card swipe based security and surveillance interface based on the “Husky One Card” system. The security system was required to be a completely operational “Door Access System” based on authentication. It will also monitor the flow of equipment in the room using RFID Technology. _______________________________________________________________________ _ Summary The Building Security System has been designed to reduce the amount of stolen equipment from the Senior Design Labs in the Information Technologies Engineering building. It makes use of card swipes for user authentication along with a locking system on the doors to allow entry only to authorized students. The doors open from the inside without authentication for compliance with fire codes and for an acceptable level of usability. For ease of application the authentication is transmitted wirelessly throughout 3
  • 4. the building from door unit to authentication unit. This main authentication unit is capable of allowing entry to designated labs, logging traffic, and is easily programmable. Residing on a Windows based PC the program to control authentication and access logging is easily portable to most of today’s PC market. The Building Security System also protects units in the room from thief by means of radio frequency tracking. Small RF tags concealed within units trigger an alarm when removed from the room. The combination of these two subsystems composes the Access Control & Security System. The ability to track user access and protect devices at the same time should allow the labs to operate under normal conditions while preventing the theft of expensive devices used within the labs. _______________________________________________________________________ _ Competitive Analysis Door Access Interface During our research period we looked into a complete system used by many large hotel chains from the company “vingcard”. This product seemed to be an appropriate solution to the project’s chief dilemma. This system included an all in one door lock, handle and card reader. It also had a manual override (in case of power outage and emergency). This full system also incorporated a card encoder, which would program the cards with access to the appropriate doors. This system seemed to be a great resolution, yet it still had several drawbacks. First, the system would not utilize the “Husky one-card” system that the university already uses. This would force the administrators to key many cards and attempt to distribute them to the appropriate students and cause this process to be repeated once a card was reported stolen or lost. The other chief shortcoming was the 4
  • 5. cost of this system which was found to be approximately ten thousand dollars, which did not satisfy our prescribed budget. We decided to use an independent card reader and built up the rest of the system around this card reader. A little research revealed a myriad of card readers to choose from. Anything over the price of two hundred dollars was removed from the running. Also only RS-232 based readers were considered for the project. Another qualification the card readers must meet was versatility. A card reader must read tracks 1, 2 and 3 of almost any card. Another prerequisite for the card reader was that it must be sturdy enough to handle frequent use while still being reasonably compact. After all was said and done we found our card reader. Its price was only one hundred and sixty dollars, slightly under our price ceiling. It was also a RS-232 reader that read all three tracks of the standard swipe card. It also appeared to be of sturdy build and moderate proportions. Of all the card readers that were found this was the only one to meet or exceed all of demands, hence we decided to choose MR-232 card reader. Product Security Interface One of the goals of this project was to design a system that would protect equipment from the lab something that will trigger an alarm if lab equipment (such as a computer or signal generators) was taken outside the designated area. This had proven difficult but a few possible solutions were considered. The first was the EAS towers, which are commonly employed in most stores. A small magnetic strip would be hidden securely on an item; this strip can be deactivated to allow passage through the towers. If the strip is not deactivated and one tries to pass through the towers an alarm would sound. At first look this is a good solution; the magnetic strips are very cheap and disposable. The system is very simple to use and effective, hence its use in stores. In retrospect this is not a feasible due to the fact the towers themselves cost upwards of two thousand dollars; which would not satisfy the budget limitation for this project. 5
  • 6. Another solution to this problem came by way of a company whose products seemed to be a reasonable solution. The company claimed to equip their customer with sensors that would create “containment fields”, and transmitters that would trigger an alarm if a piece of equipment breeched on of these “containment fields”. The system would then transmit an automated message to a pager or walkie-talkie telling the administrators which piece of equipment was being stolen and from where. A very novel idea, however a minimum purchase and a high starting price made this an impractical solution The most acceptable solution we found was from Texas Instruments. The company is in a phase of developing RFID devices that operates on the principle of passive transmitters. These RFID tags can store a small amount of information about the device it is attached to and then transmit this information to a reader. This system also includes an interface to communicate with a PC, so we found it possible to incorporate the TI-Tag system into our project. _______________________________________________________________________ _ Component Level Module 6
  • 7. Figure 1 Core System Mapping The Figure above shows all the major components involved and how they are connected. The yellow block is what’s been mounted on or near the door, the pink block is what’s been mounted in the vicinity of the labs near the door or window etc and the blue block is control system which is a windows based PC connected to a wireless server transceiver. _______________________________________________________________________ _ Design Components Microcontroller During the initial design phase we had the microcontroller serve a dual purpose in this project. It will both bridge the gap between the card reader and the wireless unit along with controlling the door lock and the alarm. The bridging operation was to allow us to parse the output stream of the card reader and determine which action to take. This RS232 I/O will also allow us to communicate with the wireless transmitter/receiver. This 7
  • 8. will ensure that the only data sent via the wireless channels are valid authentication information. Later we made some modifications to the design and limited the usage of the microcontroller to receiving commands from the control unit when it authorizes user or component access and active the alarm and the door lock respectively. In this case the data is being taken from the wireless receiver and needs to be communicated to the door lock and alarm. The connections between the wireless receiver and the microcontroller will still use RS232, while the microcontroller will communicate with the door lock through signal the door lock receives. If the microcontroller receives a signal from the wireless receiver designated to allow the door to unlock, then the microcontroller will relay this information into control circuitry and will unlock the door. This completes the full loop of needed communications handled by the microcontroller. Figure 2 Qik Start PIC education board /w CAN The microcontroller (PIC kit) is introduced in this project an alternative solution to a sequential circuit. The core of PIC kit is Microcontroller 16F874, 8-bit high performance RICS CPU with plenty of powerful features. Shown below is block diagram of 16F874. 8
  • 9. Figure 3 Block diagram of 16F874 Operation USART unit in the diagram above can communicate with peripheral devices such as A/D or D/A integrated circuits, modem (DCE) or terminals (DTE). The program running on PIC configures the USART unit as full-duplex asynchronous system. Port D is programmed to operate as output where control signals to activate the door lock or alarms are generated. In terms of functionality, the PIC-microcontroller plays the role of receiver and driver. As a receiver, the program running in the PIC keeps polling and scanning the serial input of USART until an entire 8-byte command is obtained from the host computer. After processing the command, PIC continues to do the polling process. As a driver, the PIC will compare 8-bit data received from host computer with sample commands stored in PIC memory. If they are matched, an appropriate pin on Port D will be driven High. Card Reader 9
  • 10. The Card Reader is part of the front end user interface in our design, so the challenge was to get something rugged, reliable, compact and presentable, but at the same time compatible with the Back-End design. We recommended the MSR200-33R Card Reader, manufactured by Semicron Corporation. Some of the features this reader provides are • Decoded Magnetic Stripe Reader • Low power CMOS design • Keyboard emulation • Reads dual and triple track cards • Bi-directional read capability • Conforms to ISO 7811, ANSI x4.16 & • AAMVA (Driver Licenses) standards • May be mounted on a keyboard or a flat surface. • Provides feedback by LED and buzz • Interfaces Available are PC XT/AT, PS/2, and RS232 For our design we needed a card reader which would have a RS232 port interface because the wireless device had a RS232 interface. The card reader and the PIC Microcontroller kit was bridged through a port splitter with one wireless device. This allowed us to eliminate one wireless device. Another feature which triggered us to choose this particular card reader was the fact that it can read dual and triple track cards and Conforms to ISO 7811 and ANSI x4.16 standards. Since we are using the Husky One Card as an Access Interface card, these features are very flexible in that respect. Figure 4 MSR200-33R Card Reader 10
  • 11. Electric Door Strike The electric door strike is the electro-mechanical release mechanism that unlocks the door when it receives a 12V signal. When no power is sent to the door strike it remains locked. It is used in conjunction with a Schlage Lock as shown in the picture below. The electric door strike is used in place of the strike that comes with the Schlage Lock. This strike is reversible for left or right-handed doors. Once installed, the door can still be operated using a key. To power the door strike we will use a 12-volt DC 500mA power supply that can be bought with the door strike. When operating off the DC power supply a gentle 'click' is heard when unlocked. We will also place a push button on the inside of the room so that people can easily leave with out unlocking the Schalage Lock. Figure 5 Smart home SA Type Door Strike Schlage Lock This Schlage Lock has a keyed exterior and it has a turn button on the interior that will lock or unlock both levers. This Schlage Lock is used the same way as the locks on your home. Therefore, in the case of power outages the door could still be unlocked using a key. Schalage locks work for doors between (35 mm - 48 mm) thick. A schematic of a Schalage Lock and how it put together is given below. Figure 6 Schlage Lock 11
  • 12. Wireless Units Wireless connectivity is quickly becoming recognized as a flexible and reliable medium for data communications across a broad range of applications. A wireless solution in our system eliminates the need for cabling from the central PC to the access point. Advantages: • Wireless interrogation speeds data collection. • Equipments (computer, card reader, etc.) can be moved without regard to location of network. • Effective communication over distances of up to 500 feet indoors or several miles line-of-sight. • High frequency 2.4GHz or 900MHz, employing frequency hopping spread spectrum technology, providing resistance to interference and highly reliable data communication. • Lowers cost, time and effort of installation. • Ideal for retrofits in buildings not wired for electronic access. • Proprietary protocol & FHSS for security & interference rejection. • 2.4GHz, 900MHz and 868MHz for virtually worldwide suitability. • Isolated collocated networks. • Small enough to fit into virtually any enclosure. • Low power consumption. • Industry standard interfaces. • Seamless integration as direct cable replacement For low data rate applications, such as remote keyboard or mag-stripe readers, the transceivers are ideal. They transmit up to 500 feet indoors through walls or a couple of miles line-of-sight. Key benefits for access control are long ranges achievable from 900MHz, and incredible cost efficiency for a radio with the protocol RS232. 12
  • 13. Wireless ConnexLink Physically, one transceiver is connected to a serial port (COM port) on the central computer, while the other will link to the card reader and the PIC kit. The RS232 interface is a key protocol in communication. The interface program running on the central computer will scan and detect the signal from card reader through transceivers. Figure 7 ConnexLink Unit Card Central Reader Computer Transceiver Transceiver Block Diagram of transceiver arrangement in the wireless security system 13
  • 14. Texas Instruments TI-Tags The TI-Tag system has just 2 major components. The first is the tags themselves. These tags each contain a small amount of information that can catalog the device they are attached to. The tags act as passive wireless transmitters, and when run through a field produced by the receiver, they transmit the data that they store. The range, orientation of transitions and amount of data stored vary depending on the model of the tag, but there are a variety of different tags available. The second component is a receiver that produces the read field. This system stick reader can have its range extended with additional antennas placed around the original receiver. The default range of 1 meter should work for our evaluation purposes. The key part of the receiver is the RS232 interface that allows it to hook into the rest of our system. Using this, we will be able to track the devices and compare the data received with our database to take appropriate action. While dealing with the RFID device we had to face a lot of connectivity issues because the device did not come with any development software. But we resolved these issues by introducing our own java based serial communication interface which allowed us to communicate with the microcontroller in the RFID device. Another problem we had to face while dealing with the RFID device was the limited range for tag detection. Texas instrument promised us a range of 1 meter with the standard antenna but after testing we found out that the range was limited to only few inches. When we contacted the Texas instrument engineering department they apologized for the inconvenience and could not provide any reason for the limited range, they recommended another external antenna which had a retail price of $400. Due to high cost of the antenna and poor technical support we had lost faith in Texas instrument’s engineering department thus we decided to build our own antenna. But due to time limitation we weren’t able to design a impedance matched antenna which would allow better range. Thus at this time for demonstration purposes we have mounted the RFID device to the door frame so that we can at least have a range clearance of 2 to 3 inches. 14
  • 15. _______________________________________________________________________ _ Display Figure 8 Display of security system This display is made of wood for the customization options inherent in this material. Before building this display a diagram was created to help with making decisions on proper material for the job. The diagram above has the dimensions and pointers of the various parts of the display. This display is made from a eight foot 2x4, eight foot 4x4, 18” wide door, door lock, two hinges, card swipe and equipment box with many electronics inside including the wireless devices. The door was cut to the height of 48”. The eight foot 4x4 was cut in half for the two sides of the frame. Then the 2x4 was cut into two 25” peaces for the two tops of the frame. The remainder of the 2x4 was cut in half for the two legs of the display for stability. The door knob whole was drilled out and the hinges on the door and frame had to be indented with a motto tool so that they sat flush. The door strike had to also be fit into the 4x4 so that it was almost flush. Ass easy as it sounds working with wood is a lot harder than it seems especially getting things such as the strike and hinges flush. 15
  • 16. _______________________________________________________________________ _ Power Management Power management circuitry was designed to fulfill the needs of various devices involved Device Voltage Specification RFID Device & PIC Kit 9V Wireless Units 7.5V Card Reader & Relay Circuitry 5V Door Strike 12 V 9V U 2 7809 U 1 7805 1 2 1 2 C O M C O M IN O U T IN O U T 5V 12V unregulated 3 3 C 3 C 2 C 1 .01 .01 .01 GND 3 D 1 D 2 C O M 1 2 1 2 1 2 IN O U T 7.5V 1N4007 1N4007 U 3 7809 Figure 9 Power management circuitry Regulated Power Supply The circuit simply applies widely used regulators such as 7805, 7809 providing Regulated 5V and 9V at their outputs. Input: 12VDC unregulated Output: 9V - 7.5V – 5V regulated 16
  • 17. Since wireless transceivers require DC power of 7.5 VDC, so at the output of regulator 7809, two diodes are introduced to drop 1.5V across these diodes (since each diode holds 0.75V). As result, we obtain 9v – 1.5v = 7.5v at output. _______________________________________________________________________ _ Driving Circuitry In order to trigger the alarm and the door strike when the microcontroller signals activation of each device, following relay based circuitry was designed. Input Signal from port D1 (or portD4) of microcontroller. This signal is applied to Base of transistor-Q1 through resistor R2, 4.7K. Output Status Close/Open of contact of relay U1 ( or U2). Load Alarm (or Door Lock) Operation Simply, the control signal from microcontroller will drive relay U1 (or U2) through transistor Q1(or Q2). Depending on this signal is at High or Low level, transistor Q1 (or Q2) will be On/Off respectively. If transistor Q1 (Q2) is ON, contact of relay U1 (U2) is CLOSE and alarm (lock) will be energized by 12V (unregulated). Otherwise, contact of relay U1 (U2) is OPEN and alarm (lock) is not energized. State table shown in the figure below: l Signal from Microcontroller TransistorQ1 (Q2) Relay U1 (U2) Alarm(Lock) Low OFF OPEN OFF High ON CLOSE ON 17
  • 18. 12V (unregulated) DOOR LOCK ALARM N O N C N O U5 N C U4 Relay Relay C O M B A C O M B A D 4 D 3 1 2 1 2 1N 4500 1N 4500 R 2 Q1 R 1 Q2 From PIC kit / PortD1 4.7K 4.7k R 4 R 3 47K 47k From PIC kit / PortD4 5V Figure 10 Driving Circuit _______________________________________________________________________ _ Control Software The control software acts as a server for the hardware located near the entrance way to communicate with. It is designed to interpret responses from the door modules and take appropriate action. There are three main functions that the control software performs. These are keeping track of who/what has access, administering access, and controlling the RFid module. The Graphical User Interface or GUI of the program is used to keep track of what is allowed access to the room. The program can enter two modes, one to track personnel and one to track devices. In each mode the program performs the same steps, but with different prompts. To change the program between the two modes, there are two buttons located in the left panel of the GUI labeled “Personnel” and “Equipment”. Clicking one of these two buttons will update the display in the right panel of the GUI accordingly. The right panel displays one page (10 entries) of items designated from the current mode. If you are in personnel mode the display fields are First Name, Last Name, and Social Security Number. In Equipment mode the display fields are PartID, and Description. Along with these fields to identify the entries is a drop down menu used to designate 18
  • 19. access to the entry. Selecting “Access” or “No Access” will immediately update the data structure accordingly. The third option from the dropdown menu is Delete, and this will remove the item immediately also, without prompt. There is a delete button located in the left panel of the GUI, but clicking it will only give you a reminder to “please use the dropdown menu”. In addition to being able to delete entries, you can add an entry by clicking the Add button in the left panel. Depending on the mode you are in (Equipment or Personnel) this will show an appropriate window for entry of information about the new item. The remaining two buttons in the left panel of the GUI are the Previous and Next Page buttons. Clicking one of these buttons will scroll through the data in the right panel of the GUI in the corresponding direction to allow the user to view more than 10 entries. Figure X. shows a screenshot of the GUI with a dropdown menu being selected. Figure 11 Screenshot of the GUI One of the functions of the software that is not visible to the user is interpreting the signals sent from the card swipe unit. When a user swipes a card a signal is transmitted wirelessly and picked up by a server running the control software. This command sequence is interpreted by the software as a Social Security Number. The SSN is then checked against the internal database to see if that user has access to the room or not. If the user does not have access, the system does nothing and the user will not be able to open the door. If the user does have access to the room the program will transmit a 19
  • 20. special command sequence to be interpreted by the microcontroller on the other side and subsequently unlock the door. Figure 12 Software external structure The only continuous function of the Control Software is the control of the RFid unit. The unit requires a command signal before it will poll the field for tags. This signal is continuously sent from the control software across the wireless device to the unit at a rate of 4 timer per second. If a tag is found in the read zone the RFid sends back a response, or if no tag is found it sends back an “empty” response. In each case the response is interpreted as an RFid response and converted to a partID. If this particular partID is found in the database and the part does NOT have access, a signal is send to the microcontroller to trigger an alarm. This unauthorized access is also logged in a logfile stored on the server. _______________________________________________________________________ Current System Functionality The user swipes his card in the card swipe. The card swipe then outputs the card data to the wireless unit for transmission to the other wireless unit. The other wireless unit is located far away in the administrator’s office. This Wireless unit is connected to a computer that has a Java program on it. This program is connected to the database and searches the database for the card data. If the card data is in the data base then a signal is sent back to the microcontroller telling it to unlock the door. Data is not in the database then nothing happens and the door remains locked. The door always remains locked from the outside while the inside of the door is always unlocked. If the power is to fail 20
  • 21. then an administrator has a key to let people in the room. Once the key is removed from the lock the door will be locked again. The RFID system is used to keep track of the flow of equipment leaving and entering the room. The RFID system is activated by being told to search for RFID tags. Once a tag passed through the read range of the RFID system it then sends the information on the tag wirelessly to the Java program. This program then decides if the tag data is in this database and weather is allowed to leave. If the Item is allowed to leave then it can be passed with no interference. On the other hand if item is not granted access to leave the room then an alarm will sound and the tag data will be logged. The Java Program is the brains to this whole system and without it this system would not work. This program allows the administrator to add or remove persons to the database making it possible for them to enter the room. Also the administrator can add and remove devices from another data base. Although this may not sound like much to some people creating the GUI interface and functionality of this program is very complicated and Jon should be commended for implementing it. ________________________________________________________________ Possible Future Modifications First and the most important future modification would be the use of an antenna that is matched to the impedance of our RFID system. This is an expensive but very important part our tracking needs. Because we don’t know the input impedance of our RFID system it would be almost useless to try to build one not knowing this information. That is why it would be best to buy the antenna that is matched for this RFID system. Next and not as important a part of any future modifications could be the use of cameras. We could add a few video cameras to the inside of the room and store the video on a hard drive for use if something is stolen. They make cameras that are even wireless so we could store them in a different room. Also a digital camera could be added to the door to take a picture of a person each time they swipe there card in the door. This could also be stored on a hard drive and sent wirelessly to a secure position. With all of this wireless 21
  • 22. date being sent around it would be smart to use some kind of encryption technique. This would be so that people are not able to hack into our wireless data network causing our security system to fail. We set our RFID system to not allow people from taking certain equipment. Well what if one of our Administrators should have access to a device but no one else should. The answer is a special RFID override tag given to the administrator. This tag when run through the RFID read range with the device will allow the administrator the freedom to come and go as he pleases with the device while keeping the device secure from others. In the setting of this last idea we will talk about or final possibility being the use of RFID tags to enter the room. This could make everything a whole lot easer if done the right way. The only thing about this is it should not be done until everyone on campus uses a RFID card for their student activities. _______________________________________________________________________ Timeline 1st Quarter 2nd Quarter 3rd Quarter Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 1 Brainstorming 2 Project Specification 3 Weekly report 4 Research 5 Web Updates 6 Project Statement 7 Parts Listing 8 Ordering Components 9 Modifications 10 Proposal 11 Proposal Presentation 12 Building & Testing Parts 13 Wireless Testing 22
  • 23. 14 RFID Device Testing 15 Control Circuitry 16 Software Development 17 Basic Testing 18 Preliminary Assembly 19 Debugging Prototype 20 Preliminary Demo 21 Finished Prototype 22 Final report _______________________________________________________________________ _ Parts List Item # Symbol Name Description 1 C1 0.01u 2 C2 0.01u Multilayer ceramic capacitor 3 C3 0.01u 4 D1 1N4007 5 D2 1N4007 6 D3 1N4007 General purpose diode 7 D4 1N4007 8 Q1 2N2222 9 Q2 2N2222 General purpose amplifier NPN 10 R1 4.7K 1/8W 11 R2 4.7K 1/8W 12 R3 47K 1/8W Metal film resistor 13 R4 47K 1/8W 14 U1 LM7805 Regulator 5V 15 U2 LM7809 Regulator 9V 16 U3 LM7809 17 U4 Relay Relay: Coil: 5VDC - Contact: 5A/24Vdc 18 U5 Relay 19 Alarm Working voltage: 6Vdc -- 48 Vdc 20 Electronic lock Working voltage: 12 Vdc 21 Card Reader MSR200-33R 22 PIC Kit PIC 16F874 Microcontroller 23 RFID Device TI RFID S4100 series 24 Wireless Device Connexlink CL4490 25 Door Strike Smart home 5190S 23
  • 24. 26 Door Lock SCHLAGE Lock Al series _______________________________________________________________________ _ Budget Hardware Card Reader $ 160 PIC Kit $ 175 Wireless Units $ 250 Door Lock $ 100 Door Lock – Electrical Interface $ 50 RF Surveillance Kit from TI $ 650 Product Display Interface & Connectors $ 75 Total $1,460 ______________________________________________________________________ Team Members Participation Syed A. Ali (EE) - Project Management - Design Circuitry & Connectivity - Card Reader & Wireless Support - Documentation & Presentation Chuong Nguyen (CMPE) - Microcontroller Programming - Alternate Software Development - Card Reader & Wireless Support - System testing & troubleshooting Jonathan Vanase (CMPE) - Chief Software Development & Testing - RFID Research & Support - Serial Communication - Web Updates & Project Progress Reports George Kutsaftis (CMPE) - Front-End Demonstration Display - Comparative Analysis - RFID Antenna design Zachary J. Maura (EE) - Front-End Demonstration Display - Future Modification Analysis - Product Ordering ______________________________________________________________________ 24
  • 25. Conclusion In conclusion, we were very successful at finding devices that will fit the needs of this project. In addition, we were able to provide sufficient evidence that our project is of valid consideration. The cost involved in our project makes it much more affordable than comparable products, but ours also allows for the exact type of security that we wish to provide. By staying well within budget on our parts estimations, and selecting many devices that use universal communications standards, we have successfully completed out project. ______________________________________________________________________ Index PIC Microcontroller Code ;********************************************************** ; SENIOR DESIGN PROGRAM: Do polling command from host ;computer and generating control signal to activate Alarm ;or Door Lock ;********************************************************** list P=PIC16F874, F=INHX8M, C=160, N=77, ST=OFF, MM=OFF, R=DEC, X=OFF #include P16F874.inc __config(_CP_OFF & _PWRTE_ON & _XT_OSC & _WDT_OFF & _BODEN_OFF) errorlevel -302 ;************** Equates ***************************** Bank0RAM equ H'20' ;Start of Bank 0 RAM area Bank1RAM equ H'A0' ;Start of Bank 1 RAM area ;************** Variables *************************** cblock Bank0RAM 25
  • 26. TEMP1 ;Temporary variable for Character subroutine TEMP_DISP ;temp store for display Counter LCD_TEMP ;keep track of LCD vector RXBuf Match length TempW TempFSR TempTemp Buffer:8 Buffer2:8 TEMPSTG:8 endc MOVLF macro literal,dest movlw literal movwf dest endm MOVFF macro source,dest movf source,W movwf dest endm BANK0 macro bcf STATUS,5 ; Select bank 0 endm BANK1 macro bsf STATUS,5 ; Select bank 1 endm ;******************** Program Code *********************** org H'000' ;Reset vector call Initial ;Initialize everything goto Receiving ;****************** Initial subroutine ******************* ; This subroutine performs all initializations of variables and registers. ;********************************************************* Initial BANK1 ;Set register access to bank 1 26
  • 27. bsf PIE2,CCP2IE ;set CCP2 interrupt MOVLF B'00000100',ADCON1 ;Select PORTA pins for ADC or digital I/O MOVLF B'00001011',TRISA ;Set I/O for PORTA MOVLF B'11100001',TRISB ;Set I/O for PORTB; 1-4=out ; MOVLF B'10xxxxxx',TRISC; set c7 to input,c6 to output MOVLF B'10010111',TRISC ;Set I/O for PORTC-bit 1 makes CCP2 an input MOVLF B'00000100',TRISE ;Set I/O for PORTE MOVLF 95,PR2 ;Set up Timer2 for a Delay of 10 ms MOVLF B'01000100',OPTION_REG ; Initialize option register for 32:1 ;prescale MOVLF B'10100100',TXSTA ;set txsta int BRG,8 bit,asynch,hi spd MOVLF 47,SPBRG ; set baud rate w/7.37 MHz Xtal MOVLF B'10000000',TRISC; set c7 to input,c6 to output BANK0 ;Set register access back to bank 0 bcf RCSTA,SPEN bcf RCSTA,CREN clrf TMR0 ;initialize timer 0 clrf TMR1L ;initialize to zero low and high bytes of timer 1 clrf TMR1H ; clrf T1CON ;to turn on set bit 0 to 1 (TMR1ON bit) bsf T1CON,TMR1ON ;start timer1 MOVLF B'01011111',T2CON;Finish set up of Tmr2, pre=16,post=12 MOVLF H'01',Buffer ;beginning of 1st reference command MOVLF H'03',Buffer+1 MOVLF H'05',Buffer+2 MOVLF H'07',Buffer+3 MOVLF H'09',Buffer+4 MOVLF H'0B',Buffer+5 MOVLF H'0D',Buffer+6 MOVLF H'0F',Buffer+7 27
  • 28. MOVLF H'00',Buffer2 ;beginning of 2nd reference command MOVLF H'02',Buffer2+1 MOVLF H'04',Buffer2+2 MOVLF H'06',Buffer2+3 MOVLF H'08',Buffer2+4 MOVLF H'0A',Buffer2+5 MOVLF H'0C',Buffer2+6 MOVLF H'0E',Buffer2+7 clrf CCPR2L ;init CCPR2 registers clrf CCPR2H clrf PORTD ;Turn off LEDs clrf PORTB clrf PORTE clrf INTCON ;initialize interrupt control register bsf PIE1,RCIE ; ENABLE INTERRUPT RCIE bsf INDF,RCIE ; enable receiver irq bsf INTCON,T0IE ;enable timer 0 [bit5] bsf INTCON,PEIE ;enable peripheral interrupts for capture bsf INTCON,GIE ;global interrupt enable [bit7] return ;*********************** CompareSubroutine *************** ; This subroutine compares receiving command and reference command. ; if they match --> set 1 to Match, otherwise set 0. ; *********************************************************** ****************** Compare clrf Match ; initialize Match = 0 LoopCompare xorwf INDF,w btfss STATUS,Z goto Compare_Done incf FSR ; next byte in reference key MOVFF FSR,TempFSR ;save FSR to TempFSR incf TempTemp ; next byte in input- buffer 28
  • 29. MOVFF TempTemp,FSR ; point at that byte in input-buffer MOVFF INDF,TempW ; read that byte into W MOVFF TempFSR,FSR movf TempW,w decfsz length goto LoopCompare ; compare rest of command MOVLF 1, Match ; return 1 if match successful return Compare_Done clrf Match return ;*********************** Receiving subroutine ************ ; This subroutine compares receiving command and reference command. ; if they match --> activate ALARM or Lock Door appropriately. ; *********************************************************** **** Receiving MOVLF 8,length ; length of command clrf TRISD ; all LEDs are off MOVLF TEMPSTG,TempTemp MOVLF Buffer,TempFSR ; save start address of Buffer MOVLF Buffer,FSR ; load address of Buffer into pointer FSR movfw TEMPSTG Call Compare btfsc Match,0 goto Alarm ; if match --> activate Alarm Call Compare ; else check for DoorLock btfsc Match,0 goto LockDoor goto Activate_Done Alarm 29
  • 30. MOVLF H'F0',TRISD ; set signal High to activate Alarm MOVLF 200,Counter ; to ON state long enough Loop1 call Delay decfsz Counter goto Loop1 MOVLF 0,TRISD ; reset signal Low to deactivate Alarm goto Activate_Done ; polling again LockDoor MOVLF H'0F',TRISD MOVLF 200,Counter Loop2 call Delay decfsz Counter goto Loop2 Activate_Done MOVLF 0,TRISD bsf RCSTA,SPEN ;enable serial port bsf RCSTA,CREN movlw TEMPSTG call RX goto Receiving ;********************** Receiving Subroutine ******* ; This subroutine is called to check if any data is available in input buffer. It uses indirect addressing to ; avoid problems on interrupt with banks. ;********************************************************** RX movwf FSR ;Save pointer MOVLF 8,Counter RX_ready btfss PIR1, RCIF ; check for received byte goto RX_ready ; Rcv_Done movfw RCREG ; get char from RCREG and store in rx buffer 30
  • 31. movwf INDF ; RXBuf incf FSR,1 bcf PIR1, RCIF ; Reset rcv flag bcf RCSTA, CREN ; clear then set CREN to bsf RCSTA, CREN ;clear all errors. decfsz Counter goto RX_ready bcf RCSTA, CREN bcf RCSTA,SPEN ; disable serial port return ;********************** Delay subroutine ****************** ; This subroutine waits for Timer2 to complete its ten millisecond count sequence.; ; Creates a 10 ms loop time using timer 2 ;for 7.37 MHz clock need 18425 counts = 96*12*16 ; *********************************************************** *************** Delay btfss PIR1,TMR2IF ;Check whether ten milliseconds are up goto Delay bcf PIR1,TMR2IF ;Clear flag movlw b'00100000' xorwf PORTA,F return end 31
  • 32. Java Class Descriptions commPort.java – This class initializes the communications port to ready it for use in the program. It has the values needed for proper communication with our other hardware hard coded. It also contains the code for timing the RFid polling operations. addPerson.java – This class initializes the window that allows you to add a Person to the database. It also handles the action of inserting the entered data into the database. addPart.java – This class initializes the window that allows you to add a Part to the database. It also handles the action of inserting the entered data into the database. SerialConnection.java – This class was modified by one provided from the Sun website. The modified version handles the incoming serial data coming onto the port and sends an appropriate response based upon the received information. It also contains the method that sends the command for the RFid device to poll its read field. PersonsDB.java – This class initializes and handles access to the database that contains personnel information. Persons.java – This class contains access to the 4 fields that describe an item of a personnel database. PartsDB.java – This class initializes and handles access to the database that contains items. Parts.java This class contains access to the 3 fields that describe an item of the parts database. Interface.java – This class draws the main window for the program. It handles all button clicks associated with the main window and links with all the other classes to perform the desired function. 32
  • 33. commPort.java methods • commPort Type – Constructor Function – initializes the comport and the timer to control the RFid polling. addPerson.java methods • addPerson Type – Constructor Function – Used to instantiate the class so that it can be called to draw the window. • show_addPerson Type – void Function – Brings the addPerson window back to the foreground. • initialize_addPerson Type – void Function – Adds the items to the window to add personnel. addPart.java methods • addPart Type – Constructor Function – Used to instantiate the class so that it can be called to draw the window. • show_addPart Type – void Function – Brings the addPart window back to the foreground. • initialize_addPart Type – void Function – Adds the items to the window to add equipment. serialConnection.java methods This class is provided by java.sun.com. The source was modified to include the parameters we needed into the constructor along with the event listener performing additional actions for our program. PersonsDB.java methods • PersonsDB Type – Constructor 33
  • 34. Function – Used to instantiate the personnel database. • insertNewPerson Type – void Function – Adds a new entry into the personnel database. • deletePerson Type – boolean Function – Deletes an entry from the personnel database if there is a match found using parameter SSN. If a match is found returns true, otherwise returns false. • updatePersonAccess Type – boolean Function – Modifies the Access field of an entry in the database with the Access_ parameter if a match is found using the SSN parameter. If a match is found returns true, otherwise returns false. • findPerson Type – Persons Function – Searches for a personnel entry based upon the SSN field. If a match is found the returned value is the matching Persons profile. • findFirstPerson Type – Persons Function – Returns the first entry in the database. This also sets an internal counter back to 0. This is used in conjunction with findNextPerson to scroll through entries in the database. • findNextPerson Type – Persons Function – Returns the next entry in the database based upon the index that is started in findFirstPerson. • sortPersons Type – void Function – Sorts the database alphabetically by last name. • getNumberOfPersons Type – int Function – returns the total number of personnel currently in the database. • initializeDataBase Type – void Function – Writes all the values from a stored file into the programs internal database. 34
  • 35. • writeToDatabase Type – void Function – Writes all the values from the programs database into a file. PartsDB.java methods • PartsDB Type – Constructor Function – Used to instantiate the equipment database. • insertNewPart Type – void Function – Adds a new entry into the equipment database. • deletePart Type – boolean Function – Deletes an entry from the equipment database if there is a match found using parameter PartID. If a match is found returns true, otherwise returns false. • updatePartAccess Type – boolean Function – Modifies the Access field of an entry in the database with the Access_ parameter if a match is found using the PartID parameter. If a match is found returns true, otherwise returns false. • findPart Type – Parts Function – Searches for an equipment entry based upon the PartID field. If a match is found the returned value is the matching Persons profile. • findFirstPart Type – Parts Function – Returns the first entry in the database. This also sets an internal counter back to 0. This is used in conjunction with findNextPart to scroll through entries in the database. • findNextPart Type – Parts Function – Returns the next entry in the database based upon the index that is started in findFirstPart. • sortParts Type – void Function – Sorts the database alphabetically by PartID. 35
  • 36. • getNumberOfParts Type – int Function – returns the total number of equipment currently in the database. • initializeDataBase Type – void Function – Writes all the values from a stored file into the programs internal database. • writeToDatabase Type – void Function – Writes all the values from the programs database into a file. Persons.java methods • Persons Type – constructor Function – Allocated a Persons type object. • getLastName Type – String Function – Returns the lastName field of the calling object. • getFirstName Type – String Function – Returns the firstName field of the calling object. • getSSN Type – String Function – Returns the SSN field of the calling object. • getAccess Type – boolean Function – Returns true is the calling object’s Access field is true, otherwise false. • updateLastName Type – void Function – Sets the lastName field of the calling object. • updateFirstName Type – void Function – Sets the firstName field of the calling object. • updateSSN Type – void Function – Sets the SSN field of the calling object. 36
  • 37. • updateAccess Type – void Function – Sets the Access field of the calling object. Parts.java methods • Parts Type – constructor Function – Allocated a Parts type object. • getPartID Type – String Function – Returns the PartID field of the calling object. • getDescription Type – String Function – Returns the Description field of the calling object. • getAccess Type – boolean Function – Returns true is the calling object’s Access field is true, otherwise false. • updatePartID Type – void Function – Sets the PartID field of the calling object. • Update Description Type – void Function – Sets the Description field of the calling object. • updateAccess Type – void Function – Sets the Access field of the calling object. Interface.java methods • createAndShowGUI Type – void Function – Initializes a new interface type and calls it to be displayed • showInterface Type – void Function – Adds all the GUI objects to the main window and displays it. Also initializes the serial communications classes. • updateDisplay Type – void 37
  • 38. Function – Updates the display pane of the main display window with the current information. This should be called anytime a change is made to the data structure to ensure that it is properly displayed. 38