This is a mini report for a circuit available in ELECTRONICSFORU. The link is- http://www.electronicsforu.com/electronicsforu/circuitarchives/view_article.asp?sno=238&article_type=1&id=347&tt=unhot...
Full description
Gives an idea of High Pressure Heat Exchanger with special construction
lock boxFull description
learn how to pick a lock
Security is the most common aspect of today's world, when all things are going to digitize then make them secure over the communication channel has become the prime aim of the digital service providers. Although many encryption and decryption techniq
Descripción: Financial Service
Preventive Controls are really important when building the digital banking security capabilities. Focusing to much of the detective and curative controls will surely diminished the chance of…Full description
Digital Security is the 6th Flag of Flag Theory – introduced in the early 2000’s. It focused on protecting your online privacy, and communicating securely without having compromises. Our intellectu...
ABSTRACT This project is a digital security lock made by using AT89S52 microcontroller. It is designed for automobiles (i.e. SUZUKI MEHRAN). It will be attached on its dashboard the user has a keypad for interaction and an LCD for instruction. The user will enter the code when the instruction “Enter the Code” will appear on the LCD. In case of right code it will grant the access to the user otherwise it will ask again three times. Failing to do this the user have to enter the master code which is six digit if it is right then the user have access to start the car otherwise the car will be locked and a security alarm start to ring.
HITEC University Taxila
2
Digital Security Lock
INTRODUCTION TO THIEF LOCK Thief Lock contains a Keypad and an LCD screen. When the user wants to start the car he will enter the six digit code the Microcontroller Unit will check the code for match; If the code is verified then the car will start otherwise it will show an error message. The user can enter wrong code for 3 times after that it will require the master code to start the car.
S COPE This project has huge industrial applications. It can be used as automobiles Thief Lock and can also be used as a code lock at many places. This code lock can be made more secure by introducing finger print sensor with code.
HITEC University Taxila
3
Digital Security Lock
TECHNICAL BACKGROUND Security is a major concern in today world. The automobiles need new technologies for their security. Different industries are working on automobiles security project such as car tracker or digital locks. These code locks contains different techniques. Many of the code lock are quite expensive which can‟t be used everywhere. We have also designed a digital security lock for a car which contains a keypad to enter the code and an LCD to display instructions on it. It consists on a microcontroller to control its operation. It is simple but secure code lock which cost much less than the code locks manufactured by different industries. It can be mounted on a car or can be attached separately with any automobile. The same code lock can be used as a door lock the user has to interface the motor and alarm with it.
HITEC University Taxila
4
Digital Security Lock
Technical Approach The design process of digital security lock consists on four steps. 1. Preliminary Design 2. Programming the Microcontroller 3. Circuit Designing and Simulation 4. Practical Implementation 5. Troubleshooting
P RELIMINARY D ESIGN Due to knowledge, gained till now, it has decided by our team that the design should be as simple and secure as possible. Our motto was to design a simple and secure security lock which can be usable for common person. Other factors for this consideration are cost effect and limitation to embedded system design.
P ROGRAMMING THE M ICROCONTROLLER After preliminary design our next job is to programme the microcontroller. We have used C language to program the MCU (Microcontroller unit) in Keil. Keypad is interfaced with port 1 and port 2 of MCU. LCD data pins are interfaced with port 3. Relays and control pins of LCD are connected with port 0. Programming of MCU consists on three different stages: I. II. III.
Writing a pseudo-code (Flow Chart) Programming the LCD, Keypad and main circuit Testing
HITEC University Taxila
5
Digital Security Lock
P SEUDO -C ODE & F LOW C HART Flow chart of the program explains the logic of whole program. The flow chart is given in figure-3.1 Pseudo Code for Keypad input: Pins of Port 1 & Port 2 connected to row wires Ro to R3 are set as input and the pins connected to column wires C0 to C3 should be set as outputs. (That is, pins 0–3 are inputs, and 4–7 are outputs). The outputs (bits 4–7) should be set to 0. Whichever input (bits 0–3) reads in as 0 indicates the row of the pressed key. Port 1 & Port 2 should then be reconfigured to have the pins connected to row wires R0 to R3 set as outputs, and the pins connected to column wires C0 to C3 should be set as inputs. (That is, bits 0–3 are outputs, and 4–7 are inputs). The outputs (bits 0–3) should be set to 0. Whichever input (bits 4–7) reads in as 0 indicates the column of the pressed key. Now that the row and column of the pressed key are known, the key can be located by checking column and row position.
Pseudo-Code for LCD: Check the D7 pin for busy condition of LCD (if D7=1 then wait until D7=0). Send the data to D0-D7 (0x38) to initialize 5X7 matrix, (0x01) to clear screen, (0x02) to go to home, (0x80) to go to the beginning of 1st line, (0xC0) to move to the beginning of 2nd line or (0x0F) to set the cursor blinking. Set Rs & Rw ‘0’ and apply a 20ms high to low pulse to use it as a command. Send the char as a data on D0-D7. Set Rs=1 & Rw=0 and apply a 20ms high to low pulse to use it for printing data.
HITEC University Taxila
6
Digital Security Lock
T ESTING After completing the whole code the program was debugged using KEIL debug tool. The errors were corrected easily. We have created the object file in KEIL in INTEL *.hex file format. The clock speed used was 11.0592MHz.
C IRCUIT D ESIGNING AND S IMULATION We have used Proteus 7.1 to simulate the circuit. After the placement of components and connecting the wires we started the simulation. The AT89S52 Microcontroller was used as a MCU. The INTEL *.hex generated by KEIL was selected as a source file. Clock frequency was set to 11.0592MHz. The schematic diagram of the circuit is given in Figure 4.1
Figure 3.1 Schematic Diagram During Simulation
HITEC University Taxila
7
Digital Security Lock
P RACTICAL I MPLEMENTATION After completing the simulation we have generated its PCBs using ARES a package of Proteus. We placed the PCB packages of all the components we have used in schematic diagram. After completing the PCB layout we have implemented it through the following processes:-
Figure 4.1 PCB Layout of Power Board PCB layout of power board is shown in the figure 4.1. This layout was printed on the paper and then converted to printed circuit board. PCB layout of microcontroller module is shown in figure 4.2. There was no PCB for LCD board we made its circuit on zero board because it was a simple circuit and we have to connect the wires parallel to the LCD.
HITEC University Taxila
8
Digital Security Lock
Figure 4.2 PCB layout of Microcontroller Module.
T ROUBLESHOOTING Troubleshooting is one of the difficult task in designing a prototype of a project. After completing all the circuits and making necessary connections we have faced some problems in LCD display. The keypad and other circuits were working properly. LCD does not display text: The whole port 3 and 3 pins of port 0 were checked. The pin P0^0 was damaged so pin P0^1 was used in its place. Text doesn’t hold on the LCD: Pins RS and E were interchanged so they were corrected. LCD didn’t show complete words: LCD didn‟t show complete words. Some of the characters in a word were replaced with unwanted symbols. The reason for it is that we haven‟t initialized the LCD before use but it work properly during simulation because it doesn‟t need initialization.
HITEC University Taxila
9
Digital Security Lock
Circuit Explanation The complete circuit consists on the following three portions. Microcontroller Module Power Board LCD Board
Figure 6.1 Schematic capture of Thief Lock. (Proteus 7.1)
M ICROCONTROLLER M ODULE A microcontroller module has been used as a main circuit. It has parallel as well as serial port communication circuits in it.
HITEC University Taxila
10
Digital Security Lock
Figure 6.2 Circuit diagram of microcontroller module. We have used parallel port communication. It has four IDC connectors connected to its four ports. Clock and reset circuit are also on it.
P OWER BOARD
Figure 6.3: 3D circuit layout of Power board
HITEC University Taxila
11
Digital Security Lock The four output ports are connected on the power board through IDC connectors. Port 1 and Port 2 are used for keypad. We have used four pins of each port for keypad. An eight bit connector was used to connect the eight pins of two ports (4 pins per port). The keypad is connected to this eight bit connector. Port 3 is connected with eight bit data bus of LCD. Rs, R/W and E (enable) pins are used from port 0. VCC, VEE & VDD are provided externally from the power board. These 14 pins are connected to another IDC connector which connects these 14 pins with LCD on another board. Two outputs from Port 0 are connected to ULN2003A which act as a current buffer. First output is applied at pin 1A (pin # 1) and its output from pin 1C (pin # 14) is again connected to pin 6A (pin # 6) and final output is taken at pin 6C (pin # 11). Second output is applied at pin 2A (pin # 2) and its output from pin 2C (pin # 13) is again connected to pin 7A (pin # 7) and final output is taken at pin 7C (pin # 10). This is done due to two reasons. 1st is that the ULN2003 act as a logic inverter. It converts a „1‟ into „0‟ and second time it is again inverted from „0‟ to „1‟. So we finally get the same output which we have applied as an input with a current amplification. 2nd is that we need more current to turn the relay on so due to double buffer we get enough current to derive a relay. The output of 1st relay is connected to the ignition coil of a car. The car will not start till then relay is on (conducting). When the relay is off (cut) the signal will not reach to the ignition coil so it will not start. When logic „1‟ came it gets amplified from ULN2003 and turns the relay on so the car will start. The output of second relay is connected to a ringer. When the user enter the Master (Administrator) password wrong for three attempts the ringer will start ringing.
LCD BOARD A small circuit is made using zero board. The 8 pin IDC connector take the LCD data inputs from power board (Port 3) and connect them with this board. Here these pins are connected with pin 7 to pin 14 of LCD. Pin 4, 5 & 6 are connected to port „0‟. A 5V power is also provided on LCD board. Pin 1, 3 and 16 are connected to ground. Pin 2 and 15 are connected to +5V VCC.
HITEC University Taxila
12
Digital Security Lock
Results and Conclusions We were exposed to high levels of difficulty while we were working with the project. It was a very good learning experience and at times we had to work with circuits and concepts which were very new to us. We have tested it many times and also attached it with a motor bike for practical testing. It worked well and was proved as a good digital lock.
FUTURE WORK This project can be used as a door lock at secure places by addition of finger prints sensor module. The person has to enter the code and then finger print sensor will scan its finger prints and then it will grant access. Also it can be used as a wireless digital lock for automobiles. The person has to enter the code from handheld module which will transmit then signal after verification to open the car then he can start it. I am also working on it if a person breaks the whole system and directly start the car then the handheld module or through mobile communication the user can stop the car. It will send a signal to another module which directly cut the ignition coil from batteries and it will stop. The car can also be tracked later on.
Compatible with MCS®-51 Products 8K Bytes of In-System Programmable (ISP) Flash Memory Endurance: 1000 Write/Erase Cycles 4.0V to 5.5V Operating Range Fully Static Operation: 0 Hz to 33 MHz Three-level Program Memory Lock 256 x 8-bit Internal RAM 32 Programmable I/O Lines Three 16-bit Timer/Counters Eight Interrupt Sources Full Duplex UART Serial Channel Low-power Idle and Power-down Modes Interrupt Recovery from Power-down Mode Watchdog Timer Dual Data Pointer Power-off Flag Fast Programming Time Flexible ISP Programming (Byte and Page Mode) Green (Pb/Halide-free) Packaging Option
AT89C51 is available in three packages PDIP, PLCC and PQFP. We have used dual in line package. Pin configuration of DIP with pin numbering is shown in figure A1.
HITEC University Taxila
1
Digital Security Lock
Figure A1: Pin-Configuration of ATMEL AT89S52
Figure A2: Block diagram of AT89S52
HITEC University Taxila
2
Digital Security Lock
ULN2003A D ATASHEET [2]
Figure A3: Pin-Configuration of ULN2003A Pin configuration with block diagram of ULN2003A is shown in figure A3. It has seven input pins and seven output pins in front of the corresponding inputs for the purpose of simplicity.
Figure A4
HITEC University Taxila
3
Digital Security Lock Series circuit of ULN2003A for single driver is shown in figure A4.
ABSOLUTE MAXIMUM RATINGS Symbol Vo Vin IC IB Tamb Tstg TJ
Value Output Voltage Input Voltage Continuous Collector Current Continuous Base Current Operating Ambient Temperature Range Storage Temperature Range Junction Temperature
Parameter 50 30 500
Unit V V mA
25
mA
-20 to 85
o
-55 to 150
o
150
o
C C C0
Table A1 for absolute maximum ratings of ULN2003Q
HITEC University Taxila
4
Digital Security Lock
BIBLIOGRAPHY
R EFERENCES [1] Datasheet, Type “ATMEL AT89S52”, Link http://www.google.com [2] Datasheet, Type “ULN2003”, Link http://www.google.com
BOOKS 1) The 8051 Microcontroller and Embedded Systems, Edition “2 nd”, Author “Muhammad Ali Mazidi”, Publisher “Printice Hall” 2) Microcontroller 8051, Author “Hasanpur”, Company “Tehran University”