Report on an electronic escape lock

Report on an electronic escape lock

School of Engineering and Technology Axxium Limited,2e Queensway Enterprise Centre, Stem Lane,Hampshire,BH25 5N T2640 Electnc Escape Lock Supervised by : Johann Siau Prepared by : ZABER RIZVI The project consisted of developing hardware circuitry (PCB etc. ) and software development for the Electric Escape lock which has selfactivated mechanism and access control system. The PCB design was created from the specifics of the physical lock unit using Altium designer. The microcontroller was programmed using C programming language in MPLABX.

The complete system operates successfully and erforms selfactivation and automatic operation of 3 seconds delay. The current development is enriched up to version 1 level with provision to further development to version 2 and three. T2640 ELECTRIC ESCAPE LOCK TABLE OF CONTENTS TABLE OF CONTE NTS ??” ii LIS T OF FIGURES GLOSSARY Introduction 4 Aim Objectives 4 1. 1 Background ??” 4 List of Components Used 5 1. 2. 1 1 . 2. 2 PIC Microcontroller ??” 6 1 . 2. 3 Sensor-Hall Effect ??” 7 1 . 2. 4 Sensor- Opto Sensor ??” 8 1 . 2. 5 Voltage Regulator 1 . 2. 6 2.

Motor controller Multiple Capacitors, Resistors, Connectors and diode Methodology…………….. ??” 92 1 2. 2 PCB Design… ……………………………………………………………………………………….. 1 1 2. 3 3. Schematic Design 9 Software Development 13 Tests Result and ……. 14 3. 1 3. 2 3. 3 Software Errors ……. 15 3. 4 4. Hardware Errors ??” Solution ??” Conclusions .. 16 4. 1 Further ……. 17 4. 1. 1 Version 2…………. 4. 1 . 2 Version 3…………………………………………………………………………………..

BIBLIOGRAPHY ??” 17 APPENDICES ??” O Operation BD6221 pin diagram ??” 6 Figure PIC16F88 Pin diagram 6 7 Figure 5 Opt o-Sensor Pin diagram ??” 8 Figure 6 Voltage Regulator Characteristics LIST OF FIGURES Figure 1 H-bridge Figure 4 Hall-E ffect Sensor Pin- 5 Figure 2 8 Figure 7 Figure 8 The final Schematic in Altium ??” ….. 10 Figure 9 The final ……… 11 Figure 10 The PCB Door contact detection ??” ….. 12 Figure 11 The deadbolt thrown and withdrawn detection ??” ……. 12 Figure 12 The microcontroller-lock 1/0 pin ….. 12 Figure 13 The softwarew Flow chart ….. 3 Figure 14 The motor simulation connection ??” … 14 Figure 15 The complete system in bredboard PCB = Printed Circuit Board PWM = Pulse Width Modulation PIC = Programmable Integrated Circuit ACS = Access Control System SMD = Surface-Mounted Device DIP = Dual in line package Vs = Supply Voltage GND = Ground Connection DBMI = Deadbolt Monitoring Switchl- Hall Effect Sensor monitoring deadbolt in thrown position DBM2 = Deadbolt Monitoring switch I-Hall effect Sensor monitoring deadbolt in withdrawn position Tl = Timer Relay] 1.

Introduction The T2640 Electric Escape lock was designed to have a 12v motor as an actuator. The operation of the lock is based on signals and data received from several designated ensors for different roles, which in turn gets processed by the microcontroller which instructs the motor to operate the dead bolt accordingly. The lock was to be designed so that the electrical operation complies with the mechanical operation, which dictates that the inside handle over rides all other operations and to withdraw the deadbolt and the latchbolt at a single action.

The mechanical operation also dictated the following: deadbolt withdrawal through mechanical key operation and outside handle to withdraw latchbolt only when dead bolt is withdrawn. The Electrical peration is to have the deadbolt thrown and withdrawn by the a linear motor upon responding to command from the manual option of Access Control System, or the automatic programmed option of having the deadbolt thrown when the door is that if the deadbolt is thrown manually, even when the door is open, the linear motor is to push the deadbolt back to withdrawn position.

Furthermore, the deadbolt is to change to thrown position from withdrawn position, had someone used ACS to unlock but door contact status is unchanged. Develop the hardware and software for a commercial T2640 Electric Escape Lock. Objectives 0 Research and identify appropriate components as per lock control requirements Design the PCB with fixed dimensions in accordance to the space available in the lock unit 0 Develop the software in Automatic escape lock function for Version 1 level Background Electric Escape Locks has been for commercial use since the 1970s.

There have been various versions and numerous methods of electric Locks. In principle, these locks have two basic types of mechanisms, “prevention mechanism” and “operation mechanism”. Generally, these types of locks use magnets, solenoids or motors as actuators. Electronic locks provide a number of means for authentication, however some methods such as phrases/Numerical Code passwords, security tokens, key cards), as well as Biometrics or RFID are considered to be not exhaustive.

Electronic locks with motors as actuators are quite popular throughout Europe, which categorised in two modes, (i) Day mode: having only the latch as electrically operated and (it) Night mode: more secure type with electrically operated dead bolt. The project was part of a wider collaboration between Axxium Limited and University of Hertfordshire under Knowledge for Business program, who conducts several esearch and development ventures in smart technology to aid InterHome-Assisted living programs. The lock was mainly developed for commercial use.

T2640 ELECTRIC ESCAPE LOCK by 1. 2 The initial research of investigating the necessary components were base d on given situational variables to be used in the lock unit. These variables are of door contact status, latchbolt position and deadbolt position. The document suggested these variables to be identified by using singular Hall Effect Sensor for sensor for capturing door contact status, which is to be design and placed appropriately so that it can ense for a disc magnet placed under the strike plate.

A Transmitter/receiver type opto sensor looking at the underside of the latchbolt, which is activate when the latchbolt is not fully engaged in the strike plate. Further two Hall Effect sensors were to be placed to identify deadbolt position. Two small magnets are to be fitted in the deadbolt to trigger the sensor. BD6221 was identified as the most suitable H-bridge drivers for brush motor applications with each IC can operate at a wide range of power supply voltages (from 3V to 36V), supporting output currents of up to 2A

The main operation of the lock unit is to be controlled by a linear motor influencing the position of the deadbolt. In order to ensure lock and unlock operation, the direction of the rotation of the motor needs to be controlled. Several theoretical concepts can be applied when it comes to motor control. Installation of a device which operates in H-Bridge principal was identified as a reliable, cost-efficient and simple solution for the microcontroller to be able to control the motor. The H-bridge principal works by swapping and switched direction of the current flow.

An anti-clockwise current will induce backward motion of the motor causing the deadbolt to be withdrawn. Similarly, a clockwise current will induce forward motion of the motor causing the deadbolt to be thrown. Figure 1 H-bridge Operation The forward rotation is said to occur when OUTI Pin is high and OUT2 pin is low. So current flows from OUTI to OUT2. This operation further requires the Vrefto be connected with the VCC pin. The reverse mode turns on at the event when OUTI Pin is low and OUT2 pin is high, when current flows from OUT2 to OUTI ..

This operation further also requires the Vref to be Figure 2 BD6221 pin diagram PIC Microcontroller PIC16F88 was chosen for having 16 1/0 pins total of 18 pins. The microcontroller works as the central processing unit for the entire electronic lock system. Research identified that, in order to make the system cost-efficient, the chosen microcontroller must be reasonably priced. PIC microcontrollers were identified as the most suitable type. Investigations were made on finding out the most appropriate type of microcontroller. PIC16 series was identified as the most suitable.

In order to stay within strict dimensional boundaries, the smallest type suitable type had higher reference. Figure 3 PIC16F88 Pin diagram The PIC 16F88 was identified to be operating only in the range of 4v-5. 5v. Furthermore it’s fairly widespread, which facilitates by having resourceful internet footprints. These types of microcontroller come in both DIP types and SMD types. The device required the all of its components to be of SMD type. Sensor-Hall Effect ALLEGRO MICROSYSTEMS – A3213EUA-T – HALL EFFECT SWITCH MICROPOWER, SIP3 was chosen as a cost effective and fit for purpose magnetic hall-effect sensor.

This sensor has the necessary switching effect for the recognising different state of the eadbolt of the lock as well the sensing door contact. The sensor has three pins. The detection of door contact operation will be applied by a magnetic field induced by the disc magnet fitted to the underside of the stainless steel strike plate. The sensor will detect magnetic influence through the strike plate and the lock for end. The deadbolt position would be sensed by two of these sensors, each designated for either thrown or withdrawn position.

Small magnet fitted in the deadbolt to trigger the sensors. Figure 4 Hall-Effect Sensor Pin-diagram The supply voltage range is 2. 4Vto 5. 5V. The output is would be zero during absence f magnetic field in the close proximity. Sensor- Opto Sensor HLCI 395 was chosen as a cost effective and fit for purpose opto se nsor. This sensor is to be used for Latchbolt detection. It is a reflective infra-red sensor. This is to emit infra-red light and activate when the infra-reflected by the latchbolt distended into the lock case.

Hence showing latchbolt is not fully engaged in the strike plate. The sensor had three pins, Pin 1 is an Anode, Pin 2 is Common, and Pin3 is collector. Its features includes Side-looking plastic package ??? Phototransistor output IR emitter and phototransistor detector in a ingle package ??? Low profile for design flexibility ??? Designed for short distance detection ??? High sensitivity Figure 5 Opto-Sensor Pin diagram ??? Unfocused for sensing diffused surfaces The HLCI 395 is a miniature infrared sensor designed to sense reflective objects at short distances.

Both the GaAs IRED and the NPN phototransistor are mounted side by side in a single black plastic package with an integral barrier to minimize crosstalk. The sensor is confgured with the IRED cathode and the phototransistor emitter connected to a common lead. The housing consists of an opaque polysulfide uter shell with transfer-moulded, IRtrans missive epoxy encapsulated. Housings are soluble in chlorinated hydrocarbons and ketones. Recommended cleaning agents are methanol and isopropanol. 1. 2. L78M05ABD was selected as the essential voltage regulator to maintain harmony between the PIC and the motor built in the lock. The characteristics of the regulator are given below. Two capacitors were added to each end of the regulator to clear the tension. Further insight is provided in the methodology section. Two more capacitors were added in the PCB with each increasing the safety and reliability of different components. Furthermore a resistor and a diode are also connected with the connector for PIC programming communication.

This is necessary the control the reverse current. 2. Methodology The design and planning of the electrical part of the lock was built around the provided lock and the 12V motor connected to the levers triggering the latchbolt and the deadbolt. The design of the electronic unit was created based on the lock, i. e. based on the dimensions of the lock, compatibility of the motor and the documentations provided. The initial step involved research and planning the operation of the motor along with the sensors and other suggested components.

The task was divided in two sectors of hardware development and software development. The hardware development involved drawing a schematic leading to a PCB design with appropriate dimension of the lock. The software development included development of a software suitable for the different desired conditions so that the microcontroller can successfully process all instructions. 2. 1 This state diagram is a simplified form of the operation of the electronic unit. The construction and planning of the schematic design was based on Figure7. SENSORS VOLTAGE REGULATOR CONTROL SYSTEM MOTOR CONTROLLER

Figure 7 State diagrams of lock operation SUPPLY The schematic design required component selection for practical implementations. This selection involved through research of the datasheets and understanding operations, parameters and dimensions of all the components then using embedded systems design software (Altium Designer) to draw. The pin mapping and output signal of each component to the Pic microcontroller were thoroughly learnt from the datasheets and implemented while drawing of the schematic. Careful consideration of appropriate connections and dimensions of the footprints was successfully carried out.