Smart Lock

Download Full-Text PDF Cite this Publication

Text Only Version

Smart Lock

Harshil Shah Information Technology Vidyavardhinis College

of Engineering and Technology Vasai, Palghar

Harsh Timbadia Information Technology Vidyavardhinis College

of Engineering and Technology Vasai, Palghar

Manish Lad Information Technology Vidyavardhinis College

of Engineering and Technology Vasai, Palghar

AbstractThe significance of security framework cant be denied in the present crime-ridden society. Nowadays, we cansay that security is backbone which is extremely required for individual protection. Protection from burglary, trespassing are the most vital prerequisites of security systems for individuals. Mostly, CCTV Camera are used most commonly for security purpose. The problem with CCTV camera is that it is not only costly but also requires a special (Trustworthy) person to monitorthat. So, we came up with a solution that is not only cost effective but also does not require ant third person for monitoring. Once Raspberry Pi is activated, a video is triggered via Pi camera module. IOT based applications can be used remotely to view image and get notification or can be viewed on the mobile app.

Index TermsRaspberry pi 4 , Open CV , Haar-Cascade, Face Detection, LBPH face recognizer , Android Studio


    Nowadays, the security has became an main concern for every individual as we have seen there are many cases of robbery all over the world and this leads the loss of the moneyand other expensive belongings of the people and as we know that getting the latest home security or any other securitysystem are expensive to implement. Therefore, by using Iot based system we can make an smart security system with effective costing and more reliable. The Internet of Thing IoT set out the network of physical objectsthingsthat are embedded with different types of technological components like software and hardware with the help of internet. The devices can range from simple daily house related objects to sophisticated industrial tools. With more than 7 billion connected devices today over the internet, it is estimated by theexperts that this number will help in the growth of using IoT inour daily life. In simple words, the IoT is basically the mixture of physical devices with software and network connectivityto collect and exchange data. IoT makes day to day tasks automate and easy to understand and use the household tasks, without requiring any manual intervention. In a world where IoT is rising tremendously, IoT plays a prominent role inour lives. It has created an ecosystem that connects different systems for performing smart. The creation of IoT has created a new evolution of smart devices and other embedded system application that are all connected to the internet. They have impeccably integrated communication in a method we never even imagined. Every few minutes, a robbery, break-in, theft, stealing of valuable assets all over the world takes place and

    Its time that we consider safety of our homes. Indeed, home safety is a serious concern for every individual all round the world. Hence to overcome this challenge people as well as government authorities are spending huge amount of money just for the sake of personal and public security concerns. The need for Iot is more than ever before especially in security related matters. As day by day there are advancement in technologies we should look over to the security of our houses,banking,cabins of higher executive in companies. We should try to replace our traditional security by the new smart security technology which is based on Iot. This will not only help to remotely look over to ones security concern but alsoit will to make sure that whoever is entering there face photo is being clicked so that assurity is guaranteed. This device is not bigger than cctv but in-fact it is smaller than cctv.Inthis raspberry pi 4 model B is going get used in which camera pi module is going to clicked photos and also that photo is going get stored over database system. Our proposed system improves the current scenario, by bringing the required data over to the internet. It is an Iot based project and can be embedded efficiently. By using Raspberry pi 4 Model B, the system becomes scalable, flexible and cheaper.


    The Internet of Things has made it possible to set up a smart home security through which you can decide who can enter your home using your smartphone and web application. It has made it simple and reliable with less cost to monitor your home. The key problem in an old home security system is that is not up to the date and also easy to avoid it and break in. This leads to easy break in and robbery and loss of valuable assets. For avoiding this problem, the smart home security system is introduced, which is IoT with face recognizing features. In our system, the pi camera module is used which is integrated to the raspberry pi 4 with different sensors. Camera clicks an image of the person in front of the door then real-time face recognition is done using local binary pattern LBP. If persons image matches with one of the home members then the door will unlock, else it will remain lock and also the image will be sent to the owner giving him/her the option to accept or reject that person. So the security is essential in our daily life. People remain busy in todays time that even while working they are worried about their personal belongings. Many a times people

    forget to take their valuable things with them like credit cards, driving license in some cases even important documents. Our project introduces a method for smart security access system using face recognition method by using programming and OpenCV library, Haar cascade method.


    Using Internet of Things we can build a smart door lock system using which we can decide who can visit in and who cant by simply clicking accept and reject option in mobile application.

    Components used:

    • Camera pi

    • Raspberry Pi 4 model B

    • SD card and HDMI

      It is a security based system that allows you to see who is waiting outside the door. Here we have integrated wireless technology with physical devices. Here we are using a web camera that is integrated with Raspberry pi 4 to capture the image of the visitor.

    • When a person visits the door, our camera module will capture the image of that person.

    • In order to identify which portion of the image consist of face we will make use of haar cascade classifier.

    • Once the face is identified, we will make use of LBPH method to recognize the face.

    • If the captured image matches with any of the known person from our dataset then, the door will automatically get opened

    • If the captured image does not match with any of the known person from our dataset the, the door will remain closed and that captured image will be sent to the firebase.

    • The reference of that image along with time stamp willbe created in firestore.

    • The user of the application will receive a notification via fcm (Firebase Cloud Messaging ).

    • After that user can see the image of that visitor in mobile application.

    • The user can see the image and also provide access right to that visitor by clicking on ACCEPT REJECT button

    • If user wishes to see who all had visited in his territory then, he can view that in history tab.

      Following are the modules used: –

      1. Raspberry pi 4 model b

    • The Raspberry Pi is a cost effective, small sized computesystem that plugs into a input monitor or TV set, whichis used with keyboard and mouse.

    • It is a sort of device we may call it as a mini computeror a computer which fits in the palm of our hand.

    • It is capable to perform high level as well as low task which can be done on basic computer system with browsing on net to coding and also playing video games all this can be done on Raspberry pi 4.

      Fig. 1. FlowChart

    • Raspberry Pi 4 Model B came into market in mid of the year 2019

    • It has a 1.5 GHz 64-bit quad core, ARM Cortex-A72 processor, on-board 802.11ac,it has WiFi and Bluetooth in it with Ethernet cable also it consists of 2 USB 3.0 ports, and HDMI port with micro cable to connect it to the input monitor.

    • The Raspi 4 also has USB-C port for powering the machine using an adapter with minimum voltage.

    • The Raspberry Pi 4 model B is thrice more powerful thanits predecessor and efficient.

    • Raspi 4 can be used up-to its full extent to get the bestout of the machine for the purpose of the project.

    • Hence, raspberry pi 4 model B is used in our project.

      1. Firebase

    • Firebase is Backend as a service that is mostly used for mobile applications

    • We have used firebase over here is because firebase provides cloud storage and not local. Hence, Data in firebase can be accessed from anywhere and anytime.

    • In our project we are making use of firebase platform.

    • As soon as our python program finds that the image be- longs to unknown person by using haar cascade classifier and LBPH face recognizer then, python program willsend the image of that visitor in firebase storage.

    • User will get the notification of the visitor through fcm(Firebase Cloud Messaging).

    • Mobile App will fetch that image and display in home screen along with 2 options provided.

    • We are also generating the download URL along with the current time in firestore. This will be used by our mobile application to fetch the url and based on that url display the image along with time stamp so that user can see whenever who visited the door and when.

      1. Face Recognition

    • We will create a dataset with multiple faces.

    • Detect the face from dataset and use that dataset to train face recognizer.

    • There are three algorithms for face recognizer. Eigen- faces, Fisher face and LBHP face recognizer.

    • Eigenfaces and Fisher faces are mathematical models who work in the form of matrix where as in LBPH face recognizer we try and predict the faces comparing with the data set.

    • We have made use of LBPH method because it works better in different light conditions and can recognize bothside and front faces efficiently.

      1. Android Studio

    • Android Studio is Integrated Development Environ- ment(IDE) for developing android apps.

    • It is useful for building mobile applications

    • We are using Android studio to make application for ourproject.

    • We are using android application to view the image ofthe visitor.

    • User of that app will be provided with 2 options i.e

      -Accept and Reject

    • Based upon that we are going to give permission of entering in or not.

    • Thats the reason we are making use of this.

    • The Android application receives image of visitor fromfirebase.

    • We need to connect our application to internet in- orderto get the update and control the solenoid lock remotely.


    • Recognizing and filtering the faces is the biggest chal- lenge here. As we need proper accuracy or the main objective is to match the face

    • We need to make the hardware component compact and durable to handle.

    • The processing needs to be fast and less latency is required as a person is totally dependent on this device.

    • The process of embedding hardware component with software and network was one of the important thing for our project.


    • The main moto of this device is that it helps for the smart security which is better than our traditional security and also it is better than using cctv cameras.

    • As cctv is very costly and not everyone can afford onefor their houses.

    • Due to recent technological advancements, home automa-tion systems will be soon in widespread use.

    • Face recognition. Know your friends, family and col- leagues. This device will help in recognizing everyone.

    • Firebase was developed by Google. It provides Real TimeData Storage and also data synchronization.

    • To provide security to houses when there is no one in the house using our smart lock system

    • It can be also used in colleges such as there is a cabinfor HOD and also principal so whenever they are not in their cabins and if someone else want to enter the cabin for some work they can give access to that particular individual.

    • Some logic can be applied for companies having higher executives with their own cabin or work place and if some one wants to enter is they are not there at the time.


We designed the System in which it reduces human efforts as well as improve the security. Our proposed work is basicallyeasy to use and reliable also its price is less. It is also portable and easily up-gradable. System provides Security locks for door, comfort, connivance security and efficiency for user. Raspberry Pi-4 Model B operates and controls and Pi-camera for capturing the image of the person. The image of the personis going get captured and it is matched It comes out to be known the person can enter in and if the person image is unknown it is going to be send over to firebase and through firebase to our android application with notification so the user has the option to whether to accept or reject that particular person in.


  • To make it more compact device.

  • Increase accuracy

  • Properly identifying faces

  • Using raspberry pi efficiently

  • Storing and fecthing from firebase

  • Giving strong security system.


The authors would like to thank to our guide Prof. Maryam Jawadwala and all the Information Technology department forthe constant support and encouragement they gave. We are very thank-full for all the faith they had in us. And last but not the least our friends and family for their support. The dedication of our members and enthusiasm helped us to move forward.


    1. L.Bhavani Annapurna, K.Mounika,K, Chakradhara Chary, Roohi Afroz,Smart Security System using Arduino and Wireless Com- munication, International Journal of Engineering Innovation Re- search,Vol.4,Issue 2,September-2015

    2. Annie P. Oommen, Rahul A P, Pranav V, Ponni S,Renjith Nade- shan,Design and Implementation of a Digital Code Lock, Interna- tional Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering(An ISO 3297: 2007 Certified Organi- zation ),Vol.3,Issue 2,February 2014.

    3. Shaik Anwar,D. Kishore, IOT based Smart Home Security System with Alert and Door Access Control using Smart Phone,IJERT ISSN: 2278-0181 Vol. 5 Issue 12, December- 2016

    4. F. L. Zucatto, C.A. Biscassi, F. Monsignore, F. Fidelix, S. Coutinho, and M. L. Rocha, ZigBee for Building Control Wireless Sensor Networks, in proceeding of Microwave and Optoelectronics Con- ference, pp. 511-515, Oct. 2007.

    5. Il-Kyu Hwang and Jin-Wook Baek, Wireless Access Monitoring and Control System based on Digital Door Lock, IEEE Trans. On Consumer Electronics, Vol. 53, No. 4, Nov. 2007. pp 1724- 1730.

    6. A. Wheeler, Comercial Applications of Wireless Sensor Network Using ZigBee, IEEE Communications Magazine, V. 45, N. 4, pp.:70 77, April 2007

    7. H. Hassan, R. Bakar, and A. Mokhtar, Face Recognition Based on Auto-Switching Magnetic Door Lock System Using, in Proceedings of International Conference on System Engineering and Technology,1-6 (2012)

    8. R. Satti, S. Ejaz, and M. Arshad, A Smart Visitors Notification System with Automatic Secure Door Lock using Mobile Com- munication Technology International Journal of Computer and Communication System Engineering, 2:39-44 (2015

Leave a Reply

Your email address will not be published. Required fields are marked *