Design And Implementation Of A Door Locking System Using .

Transcription

INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 6, ISSUE 08, AUGUST 2017ISSN 2277-8616Design And Implementation Of A Door LockingSystem Using Android AppAgbo David O., Madukwe Chinaza, Odinya Jotham O.Abstract: The Android Operating System finds wide use in smart phones and tablets and is thus suitable for home controllers. This project presents asmart home controller that uses the Bluetooth in an Android device to control the operation of an automated security door system. The software wasdesigned using an Android app that generates a password that is recognized by the Bluetooth to control the opening and closing of the door located atsome distance from the user. The Bluetooth module that is installed on the door receives the commands from the android phone, and passes thesecommands to the microcontroller that controls the opening and closing of the door. The design was simulated in Proteus integrated developmentenvironment after which the hardware was built on experimental boards. The performance of the system agrees excellently with its conception. Thesystem can be used in various situations where access to an enclosure need to be securedKeywords: Android Smart Phone, Arduino Uno, Door Automation, Bluetooth, Servomotor, Bluetooth module (HC-05), Liquid Crystal display, Proteus,Door security system.—————————— ——————————1.0 INTRODUCTIONBluetooth is a wireless technology standard for exchangingdata over short distances (using short-wavelength UHF radiowaves in the ISM band from 2.4 to 2.485 GHz) from fixed andmobile devices, and for building personal area networks(PANs). Invented by telecom vendor Ericsson in 1994 [1], itwas originally conceived as a wireless alternative to RS-232data cables. It can connect to several devices [2], overcomingproblems of synchronization. Bluetooth exists in manyproducts, such as telephones, tablets, media players, roboticssystems, handheld, laptops and console gaming equipment,and some high definition headsets, modems, and watches.The technology is useful when transferring informationbetween two or more devices that are near each other in lowbandwidth situations.1.1 LITERATURE REVIEWIn this section, we review projects and paper works related tothis project. We focus on papers studying Bluetooth enableddoor lock. In [3], the Bluetooth communication link wasbetween two laptops with Bluetooth stack resident on theLaptop connected with the Ericsson ROK 101007 Bluetoothmodule via the Universal Serial Bus (USB). The motiondetector was connected to one of the laptop via the serial link(serial cable between the motion detector and the laptop) andthe status of the system, connection and detection wasmonitored directly on computer screen. This project had morefocus on PIR sensor where the distance of detection isconfigured and monitored in real time. In spite of havingBluetooth technology, the system’s drawback is that it is notportable since it uses two laptops. SOREX Wireless SolutionGmbH [4] had commercialized their Bluetooth based alarmsecurity system. Their product was very similar to the projectbeing developed but different in approach.SOREX uses Bluetooth as a key where mobile phoneBluetooth used to open auto gate and magnetic locked doors.Taking SOREX Wireless Key Basic for example, it uses mobilephone Bluetooth’s as access key and registered device can beup to ten (10) phones. As the user approaches a door, themobile communicates automatically with the SOREX module.It is up to the user if the door shall open automatically whenthey approach or push a button as alternative. The productseems to be more passive since it is physical keyreplacement. There also will be issue on locking functionduring electricity blackout. Richard Hoptroff [5] developed anaccess control system in which each user has a separatepassword, and a log is kept of time and person accordingly. Nocustom transmitter is needed but any suitable mobile phone orhandhelds would do. Relay is used to provide an isolatedswitch for opening the electric lock. Relay and electric lockusually require high voltage to operate which make the systemrequire supply from main or socket outlet. During electricalblackouts, the system becomes easily vulnerable and a userwill be trapped until the supply is restored. This system is lowcost, easy to implement and use for home security.2. Materials and MethodsFigure 1 shows the block diagram of the automated doorsecurity system using Android app. The android app wasdesigned to first display menu to enter password before themenu of the command of either open or closing will appear ifthe right password was entered. The app can be installed onany android phone to control a hardware section installed on adoor that controls the locking or unlocking and to controlclosing or opening of the door where it is installed.BluetoothSignal Agbo David O., Madukwe Chinaza, Odinya Jotham O. Department of Electrical/Electronic Engineering, FederalUniversity of Agriculture, P.M.B. 2373, Makurdi, Benue State, Nigeria Email: uetoothModule(Hc-05)LCDARDUINO MCU(UNO)ServoMotorRelayFigure 1: Block diagram of the automated door securitysystem using android app.198IJSTR 2017www.ijstr.org

INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 6, ISSUE 08, AUGUST 2017The Android app based door Security System consists of anandroid app that can be installed on android phones as shownin Figure 2. The hardware that can be installed on the door isshown in Figure 3. The android app was designed usingandroid studio (A complete development environment AndroidStudio was installed which is then used to design theapplication with the help of java development kit (JDK) andsoftware development kit (SDK)) [6].The Android platformincludes support for the Bluetooth network stack, which allowsa device to wirelessly exchange data with other Bluetoothdevices. The application framework provides access to theBluetooth functionality through the Android BluetoothApplication Program Interface (API). These APIs letapplications connect wirelessly to other Bluetooth devices,enabling point-to-point and multipoint wireless features. All ofthe Bluetooth APIs is available in the Android Bluetoothpackage, which can be installed on any android phone. Theapp displays the first menu where the correct password has tobe entered before the second menu can appear for theconnection to the Bluetooth module of the door. The Bluetoothmodule used in this project is HC-05[7].The Bluetooth module(HC-05) pops up in the smartphone waiting for a pairingprocess to establish communication between the smartphoneand the HC-05.When the android app has connected to theHC-05,the displays to either open or close the door becomesactive. The app uses the Bluetooth of the android phone tosend a serial command of either open or close message to theexternal Bluetooth module (HC-05) that is connected to theArduino Uno that controls the locking or unlocking operation ofthe door. The opening or closing of the door forms thehardware of the security door locking system. If the rightpassword is entered the menu for opening and closing will popup, but if a wrong password is entered the menu for openingand closing will not pop up. The entire operation of thehardware section of the project is centred on the Arduino Unothat has been programmed. Upon power ON the liquid crystaldisplay (LCD), initializes its programme by displaying“Welcome to Door Automation” then it displays “SystemInitialization” and finally displays “Waiting for a command ”on the LCD’s screen. When the open door button on the menuis pressed, the phone sends strings command to the HC-05Bluetooth which sends the command to automatically open thedoor. The LCD displays “Waiting for a command ” on theLCD’s screen again, waiting for close door button on the menuto be pressed. If the button is pressed the phone sends stringscommand to the HC-05 Bluetooth which sends the commandto automatically close the door. The servomotor is a highquality geared DC motor fitted with an electronic circuit forcontrolling the direction and position of the DC motor rotation.A standard servo is capable of rotating somewhere around120- 180 degrees in the clockwise and counter clockwisedirections [8]. The servomotor is used for the opening andclosing of the door while relay is used for the locking andunlocking of the door.ISSN 2277-8616Figure 2: Two Buttons Display on the appFigure 3: The circuit diagram of the android based automateddoor security systemFigure 4 shows the flowchart, which is the step by stepapproach that was followed in writing of the automated doorsecurity program, which enables the execution of commandfrom the android application.199IJSTR 2017www.ijstr.org

INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 6, ISSUE 08, AUGUST 2017ISSN 2277-8616STARTEnter passwordfrom phoneIs correct passwordentered?Figure 5: The picture of the installed android app.Connect toBluetooth moduleIs correct passwordentered?Open doorcommandIs door open?(6a): Initialization of the door security hardware designClose doorcommandIs door open?YesFigure 4: Flowchart of the designed android based door lock3. Results and DiscussionThe program for theArduino Uno microcontroller was written inC language and was then compiled into an executable fileusing the ArduinoIDE [9]. The executable file was nextimported into the Proteus Design Suite IDE [10], where thehardware circuit shown in figure 3 was designed andsimulated. Figure 5 shows the installed android app on aSamsung J7 phone, Figures 6(a) to 6(f) show the Proteussimulation of the door security system results for each processof entering the correct and wrong passwords respectively.Upon successful completion of the software simulation, thesystem’s hardware was constructed on a bread board andprogramming of the arduino microcontroller was carried outusing Arduino IDE. The hardware construction withconnections and various operations of the system are shownin Figure 7. Figure 8(a) to 8(f) shows the operations of theinstalled app on the Samsung J7 phone and Figure 9(a) to 9(f)shows the response of the hardware of the security door whencommunicating with the app.(6b): Door opening operation of the door security hardwaredesign200IJSTR 2017www.ijstr.org

INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 6, ISSUE 08, AUGUST 2017(6c): Door closing operation of the door security hardwaredesignISSN 2277-8616(8b): Entering of passwordFigure 6: Proteus simulations of the door security hardwaredesign(8c): When the correct password is enteredFigure 7: Implementation of the door security hardware design(8d) Selection of hardware Bluetooth(8a): Door security app.201IJSTR 2017www.ijstr.org

INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 6, ISSUE 08, AUGUST 2017ISSN 2277-8616(9b) Initialization of the hardware(8e) Opening of door command(9c) Waiting for command from the app(8f)Closing of door commandFigure 8: Implementation results of android appcommunicating with the hard ware.(d) When the commend open door is selected(9a): Powering of the hardware202IJSTR 2017www.ijstr.org

INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 6, ISSUE 08, AUGUST 2017ISSN 2277-8616[3]. Specification of devices which Bluetooth operates h#cite note-7[4]. ireless-solutions-gmbh/ 2004[5]. Richard Hoptroff”Remote Control from Your 20Mobile%20Phone.pdf 2004[6]. com/studio/index.html(e) Waiting for command from the android phone[7]. ttachments/dsh.772148.1.pdf[8]. mech.northwest.edu/design ref/actuators/servomotor intro.html[9]. le:[10]. "Proteus PCB Design & Simulation software LabcenterElectronics", labcenter.com/.[Accessed: 05- May- 2017].(f) When the command close door is selectedFigure 9: Implementation of the hardware door securitysystem communicating with the android phone app.5.3 CONCLUSIONIn conclusion, it was discovered that the project performedaccording to specification and can be implemented or set up invarious places such as home, offices and industrial areas. TheAutomated door lock system can provide added security toinstitution or organizations that use the system. It can thus beconcluded that the initial objectives which we set out toachieve as stated in this report has being successfully attainedwhich were:1. To design password GUI in an android phone2. Develop mobile phone application that can be installed inany android operated phone.3. To design a hardware Bluetooth locking system4. To interface the Android phone to the hardware lockingsystem by writing a C programREFERENCE[1]. a.org/wiki/Bluetooth#cite note-5[2]. Brief history of Phone Bluetooth. cite note-8203IJSTR 2017www.ijstr.org

android studio (A complete development environment Android Studio was installed which is then used to design the application with the help of java development kit (JDK) and software development kit (SDK)) [6].The Android platform inclu