due to this covid-19 situation it is important to clean everything after everytime someone touches anything on top of it sanitizing electrical switches require more precaution as they can cause shock.
in this lockdown people started ordering daily essentials through online to decrease coming in contact with people, though touching someones doorbell in this situation is also not safe.
as sanitizing an electrical switch requires lots of precaution and as we are familiar with the Bolt IoT and have knowledge about Machine learning I decided to build something which not only solves a protective measure in alternative to the doorbell but also keeps the doorbell untouched.
HARDWARE SETUP
Note:Make sure the Bolt module is not powered on while making connections and Double-check all connections before turning it on.
Firstly we will connect breadboard with Bolt IoT WiFi Module pins with the help of Jumper Wires. Here we are going to use only four pins:
- 3v3 Pin
- A0 Pin
- GND Pin
- 0 Pin
As in the case of LDR and resistor, there is no positive or negative end for them. So we will Insert one leg of the LDR into the Bolt Module's 3v3 Pin-connected row of the breadboard and other lead into the A0 pin connected row.
Now, we will Insert one leg of the 10k Ohm resistor into the GND pin-connected row and another leg of the resistor into the A0 pin-connected row.
WARNING:Make sure that at no point do the 3.3V and GND pins or wires coming out of them touch each other. If you short power to Ground without a resistor even accidentally, the current drawn might be high enough to destroy the Bolt module
now we will connect buzzer for our doorbell with the help of male/female wire
CONNECTING THEBUZZERTOBOLT
we will connect the buzzer with the help of male/female wire
Now, we will connect the negative leg of the buzzer (smaller leg) into the GND Pin-connected row of the breadboard. and connect the other leg of the buzzer (positive leg) in digital pin 0 connected row of the breadboard.
This is how the final project should look like.
SOFTWARESETUP
as the aim of the project is touch less doorbell when someone comes on the front of the gate and brings his/her hand or flashes a light on the LDR, we will have to set it up using bolt cloud.
Buzzercontrolsetup
click on products in cloud.boltiot.com and create a new product
click on output device and interface type as GPIO.
After creating the product, select the created product and then click on the configure icon.
select A0 in the hardware tab
save the hardware setup, and move to code tab,
write the following code for Buzzer setup
<!DOCTYPE html>
<html>
<head>
<title>Bolt IoT Platform</title>
<script type="text/javascript" src="https://cloud.boltiot.com/static/js/boltCo mmands.js"></script>
<script>
setKey('{{ApiKey}}','{{Name}}');
</script>
</head>
<body>
<center>
<button onclick="analoglWrite(0, '150');">ON</button>
<button onclick="analoglWrite(0, '0');">OFF</button>
</center>
</body>
</html>
Now save and exit the configuration and link this product with the Bolt Module.
And then choose the device.
As we have created our Buzzer product, configured it and linked it to our Bolt module, we will open Bolt mobile app and can see the below option by selecting our device.
when click "ON" button the buzzer will start, and "OFF" button will help in turning it off.
Sometimes we need to get out of house and during that time its important to know if any guest visited the house through a sms
By using Twilio can help us with that.
.Twilio Account Setup :
NOTE:(Twilio is a third-party SMS functionality provider. It is a cloud communications platform as a service (PaaS) company. Twilio allows software developers to programmatically make and receive phone calls and also send and receive text messages using its web service APIs.)
Step 1: Open https://www.twilio.com/ In a browser.
Step 2: Click on Get a Free API
Key button to sign up.
Step 3: Fill all the necessary details in the SIGN UP form. Below is the screenshot of the filled sign up form.
Step 4: To verify they will ask for your phone number. Choose India as an option in the dropdown and then enter your phone number.
Step 5: Click on "Products" as shown on the screen below,
Step 6: Now enable the SMS services by clicking on two checkboxes for Programmable SMS and Phone Numbers as shown below.
Once you have done this, scroll to the bottom of the screen and click on "Continue".
Step 7: Now, you will need to give a name for your project. I have given the name as My Project. Click on "Continue" once you have entered the project name.
Step 8: Click on "Skip this step" when it asks you to Invite a Teammate.
Step 9: Your project should be created at this point. Click on "Project Info" to view the account credentials which is required for your projects.
Step 10: You can view the Account SID and Auth token on this page. The Auth token is not visible by default, you can click on "view" button to make the Auth token visible as shown below. Copy both and save them somewhere securely.
Step 11: From the drop-down menu, choose "Programmable SMS". Now click on Get Started
button to generate phone number.
Step 12: Click on Get a number
button.
Step 13: Then a popup will appear. Click on Choose this number
button.
Step 14: Then a popup will appear which will have the final number. Copy this number and save to notepad for future references.
That's it. Now we have successfully created the account on Twilio.
Below I have Demonstrated and explained the above stated project.
So, how does this system help us to keep everyone safe and to know if someone is standing at the door?well because of its contactless system there's no fear of using the doorbell, and if due to any reason the owner expects a guest while they have gone out of the house they will be notified through the text message about the unexpected visitor.
Here are some day-to-day problems which can be solved due to this doorbell.
- As the code function has
time.sleep()
function using which we can set the duration of the alert, as normally people used to press the doorbell for quite a long time until someone arrives to open the door, here in this case by using thetime.sleep()
function we can adjust in what duration or the interval of time we will be ok to receive doorbell alert. - And as the people coming to our house are asked to put their hand close to the LDR sensor or flashlight on it, the doorbell will be untouched. And we can rest assure about the spread of Corona Virus.
Comments