Twitter icon
Facebook icon
LinkedIn icon
Google icon
Reddit icon
StumbleUpon icon
Del.icio.us icon

Wireless Anti Theft Door Lock

Added to IoTplaybook or last updated on: 02/17/2021
Wireless Anti Theft Door Lock

Story

As whole world is suffering from corona virus, everyone has their own problems. Healthcare personals who work in hospital are afraid that no one gets infected due to them. Some people might enter their personal Rooms or House. To have touchless and safe door control, I had got a problem to solve in this pandemic.

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
 
× 1

Bolt IoT

SG90 Micro-servo motor
SG90 Micro-servo motor
 
× 1

Adafruit

IR Proximity Sensor
Digilent IR Proximity Sensor
 
× 1

Digilent

Jumper wires (generic)
Jumper wires (generic)
 
× 1

Newark

SparkFun

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud
 
  Bolt IoT
 
bubble.io
 
  Bubble.io
MIT App Inventor
MIT App Inventor
 
  MIT App Inventor
Assistant SDK
Google Assistant SDK
 
 

Google Assistant
SDK

Hand tools and fabrication machines

Drill / Driver, Cordless
Drill / Driver, Cordless
 
 

Newark

Multitool, Screwdriver
Multitool, Screwdriver
 
 

Newark

Stage One: Accepting Challenge

I was biased for safety of House. Looking at various options, why not I implement my knowledge to solve this simple problem.Here comes idea in my mind that what if I do something and we can open and close lock wirelessly. I decided to make this.

Stage Two: Mountain of Hardware

Next step is to collect hardware required to make my car cool. I already had a good deal of hardware. I took servo to solve this purpose. I finally assembled hardware. Here is the list......

1. Bolt Wifi Module

2. SG 90 servo motor

3. IR Sensor

4. Door Lock

5. Jumper Wires

Stage Three: Connection of all Components

After safely bringing hardware to home, now it's time to assemble them to make my door lock.

Let's have a look at hardware connections. Schematic is available to help in hardware connections. For sticking servo to lock. I had taken a needle and servo is stick into it.

 

Stage Four: Now Its all about wireless connectivity

I had made Login page due to security reasons. Here are snaps of it...


Caption

Snaps of Webapp

 

  • We can also make app to control it easily from our Mobiles. We will take use of MIT App Inventor to easily make this. (http://ai2.appinventor.mit.edu/)


Snaps of Webapp

We can easily make this using web viewer component and attack link of our bubble app. SO as soon as we open app, bubble app will automatically load.

Here are snaps of App that we created.

Screenshot of app

Screenshot of app

  • We can set alert when device is offline

  • As soon as intruder enters IR sensor gets value 1. SO we can set alert for someone enters House.

Now its time to connect it to google assistant so as to control it with voice commands.

  • Now its time to connect it to google assistant so as to control it with voice commands.

Go to IFTTT to create a new applet by clicking here

  • Go to IFTTT to create a new applet by clicking here

Login using your Gmail account. Make sure you use same account which you'll be using on your mobile to interact with Google Assistant.

Click on '+This' to create the trigger.

  • Click on '+This' to create the trigger.

Choose Google Assistant -> Say Specific Phrase

  • Choose Google Assistant -> Say Specific Phrase

Type the phrase you want to trigger the action. Make sure to specify the trigger command in different ways.

  • Type the phrase you want to trigger the action. Make sure to specify the trigger command in different ways.

Click on 'Create Trigger'

  • Click on 'Create Trigger'

Click on '+That'

  • Click on '+That'

Select Webhooks and then Make a web request.

  • Select Webhooks and then Make a web request.

Enter the API URL you got in the txt file. Make sure that you change the API Key and device name as your device name.

  • Enter the API URL you got in the txt file. Make sure that you change the API Key and device name as your device name.

Method will be GET

  • Method will be GET

Content type will be Application/json

Click on 'Create Action' and then Click on 'Finish'

Repeat same process for both commands for closing and opening and create applets.

That's it.

Now wake your Android phone by saying "OK Google" and say the phrase you had set while creating the trigger to see the magic happen.

  • (Optional) We can also make Voiceapp to talk to your security systems using Bolt Apis. Official documentation is easily available for voiceflow. Below is the illustration of voice app for google assistant.

Special Instructions

  • You need Bolt Pro to control Servo motor
  • You can use araldite adhesive for sticking Servo and needle to lock
  • Make Sure to attach IR sensor at a proper place near gates

FINALLY PROJECT IS COMPLETED

Schematics

DOOR lock schematics

 

Code

Intruder Alert

JavaScript

 

setChartLibrary('google-chart');
setChartTitle('Your Graph Title');
setChartType('barGraph');
setAxisName('time_stamp','trig');
plotChart('time_stamp','trig');

Credits

Shobhit Kumawat

Shobhit Kumawat

 

 

 

 

 

Hackster.io

This content is provided by our content partner Hackster.io, an Avnet developer community for learning, programming, and building hardware. Visit them online for more great content like this.

This article was originally published at Hackster.io. It was added to IoTplaybook or last modified on 02/17/2021.