Project tutorial

Blind's Companion

To help the visually impaired with Intruder Detector and alert messaging system with the help of Bolt-IoT, Arduino & Ultrasonic sensor

  • 439 views
  • 0 comments
  • 0 respects

Components and supplies

Apps and online services

About this project

Introduction:

In this advanced era, World is running in its maximum speed, we must change our pace to move with flow. To move with the flow, we must be working 24 hours, right? Nope not at all. “Smart working trounces hard working”. Thus, make your moves smarter and smarter such that you control the world’s speed.

If you think, this is in the case of capable person, what about the gifted ones? Why not! Even they can conquer the world, with the help of cutting edges of technology.

Thus, I here present you, the “BLIND’s COMPANION”. This is a Bolt-IoT project connected with Arduino and Ultra-sonic sensor.

I show my gratitude towards Bolt-IoT for providing such knowledge and platform to share my project.

NOTE: PLEASE DOWNLOAD THE PDF TO KNOW COMPLETE PROCEDURE OF THE PROJECT.

LINK: https://drive.google.com/file/d/11bzageBFU5r2GUH9udB-l_aZxelwOxQn/view?usp=sharing

Working:

Ø To Know the working of the project more practically, let us see two scenarios regarding to our project.

Ø Scenario 1:

· Mr. Martin, who is visually impaired, employs this project in his home. He has completed the setup by entering his neighbour’s phone number.

· Every day, he turns this on when he goes to sleep.

· One day, the same routine happens and his in fine sleep. That night some intruder tries to rob his house.

· And as the sensor detects people who cross the threshold line, it started sending message to the neighbour’s phone number & Telegram, mails were sent to his known circle, and his tweets were recognised by Cops and Mr. Martin was saved from this incident.

Ø Scenario 2:

· Mr. Jacob, who is a software engineer, implements the same setup in his home. Now he gives his own number and finishes the setup.

· When same incident takes place on his house, he is notified with all messages and mails.

· He is also saved from this kind of burglary.

Ø Thus, for both categories of people, this serves at the right time.

Ø As the Ultra-sonic Sensor detects the change in the value, when some one enters.

Ø It denotes Arduino as the threshold levels are crossed.

Ø And the link between Arduino and Boltiot helps in sending messages.

Ø Thus, Victims are saved from intruders. And safety is ensured.

Ø The alerts are sent to Social media thus it gets easier for cops to save the victims.

The complete procedure pdf is attached below.

Code

Configurations filePython
Save this file as conf.py
"""Configurations"""  
API_KEY = "This is your Bolt Cloud account API key" This is your Bolt Cloud API Key  
DEVICE_ID = "This is the ID of your Bolt device"# This is the device ID  
TELEGRAM_CHAT_ID = "@XXXX" #This is the channel ID of the created Telegram channel.  
TELEGRAM_BOT_ID = "botXXXXX"    # This is the bot ID of the created Telegram Bot.  
SID = "You can find SID in your Twilio Dashboard"
AUTH_TOKEN = "You can find on your Twilio Dashboard" 
FROM_NUMBER = "This is the no. generated by Twilio. You can find this on your Twilio Dashboard"
TO_NUMBER = "This is your number. Make sure you are adding +91 in beginning"
MAILGUN_API_KEY = "This is the private API key which you can find on your MailGun Dashboard" 
SANDBOX_URL = "You can find this on your MailGun Dashboard" 
SENDER_EMAIL = "This would be test@your SANDBOX_URL"
RECIPIENT_EMAIL = "Enter your Email ID Here"
Arduino CodeArduino
Arduino code for Sensor and Bolt-IoT configuration
#include <Ultrasonic.h>  
Ultrasonic ultrasonic(5, 6);  
int LED = 2;  
int threshold = 100;  
void setup() {  
 // put your setup code here, to run once:  
 Serial.begin(9600);  
 pinMode(LED, OUTPUT);  
}  
void loop() {  
 // put your main code here, to run repeatedly:  
 int distance = ultrasonic.distanceRead();  
 if(distance< threshold)  
 {  
 digitalWrite(LED, HIGH);  
 Serial.println("HIGH");  
 delay(10000);  
 }  
 else{  
 digitalWrite(LED,LOW);  
 }  
 delay(1000);  
}  
Sensor filePython
Save this as Sensor.py
import requests, json, time, conf
from boltiot import Bolt, Sms, Email  
 
mybolt = Bolt(conf.API_KEY, conf. DEVICE_ID) #Create object to fetch data  
sms = Sms(conf.SID, conf.AUTH_TOKEN, conf.TO_NUMBER, conf.FROM_NUMBER)
mailer = Email(conf.MAILGUN_API_KEY, conf.SANDBOX_URL, conf.SENDER_EMAIL, conf.RECIPIENT_EMAIL)
response = mybolt.serialRead('10')  
print (response)  

def send_telegram_message(message):  
   """Sends message via Telegram"""  
   url = "https://api.telegram.org/" + conf.TELEGRAM_BOT_ID + "/sendMessage"  
   data = {  
      	 "chat_id": conf.TELEGRAM_CHAT_ID,  
      	 "text": message  
          }  
def trigger_integromat_webhook():
       URL = "https://www.integromat.com/" # REPLACE WITH CORRECT URL
       response = requests.request("GET", URL)
       print(response.text)

   try:  
       response = requests.request("POST", url, params=data  )  
       print("This is the Telegram response")  
       print(response.text)  
       telegram_data = json.loads(response.text)  
       return telegram_data["ok"]  
    except Exception as e:  
       print("Error occured: Below are the details")
       print(e)  
       return False  
while True:  
   response = mybolt.serialRead('10')  #Fetching the value from Arduino  
   data = json.loads(response)  
   status_value = data['value'].rstrip()  
   if str(status_value) == 'HIGH':  
       trigger_integromat_webhook()
       print ("Status is", status_value)  
       message = "Some intruder has entered the room"  
       telegram_status = send_telegram_message(message)  
       print("Making request to Twilio to send a SMS")
       response = sms.send_sms("Some intruder has entered the room " +str(sensor_value))
       print("Response received from Twilio is: " + str(response))
       print("Status of SMS at Twilio is :" + str(response.status))
       print("Making request to MailGun to send an email")
       response = mailer.send_email("Alert", " Someone intruder has entered the room" +str(sensor_value))
       response_text = json.loads(response.text)
       print("Response received from Mailgun is: " + str(response_text['message']))

   else:  
        print ("Status is LOW!",status_value)  
   time.sleep(10)  

Custom parts and enclosures

Blind's Companion
The whole procedure of the project. Please check this for understanding and completion of project.

Schematics

Circuit Diagram
The circuit connections is given as per the schematic diagram
Annotation 2020 04 22 104316 sg7cfgd4wr

Comments

Similar projects you might like

Trash Talker

Project tutorial by VISHAL SIVARAMAN

  • 1,034 views
  • 0 comments
  • 3 respects

Send Tweets Using Arduino with Artik Cloud

Project tutorial by Jasper

  • 2,183 views
  • 0 comments
  • 10 respects

Earth_Analyzer

Project tutorial by gowthamkishoreindukuri

  • 6,766 views
  • 10 comments
  • 38 respects

Anomaly Detection & Temperature Monitoring Using Bolt IoT

Project tutorial by ashish anand

  • 4,604 views
  • 2 comments
  • 22 respects

Intrusion Alert System using Arduino and Bolt IoT

Project tutorial by Rohit Kumar

  • 3,442 views
  • 0 comments
  • 17 respects
Add projectSign up / Login