Intro: Speed Monitering Using Boltiot
In everyday life, so many are injuring due to accidents due to crossing their speed limit on the road so, for this, i made a small project which is related to this and we can also get the average speed of the vehicles by plotting the graph of their speed using the data visualization in the bolt device.
Step 1: Components Used :
1) Bolt Unit
4) Jumper Wires.
Step 2: BOLT UNIT
Bolt is an electronic device which has an inbuilt nature of connecting to the internet using ESP8266 and It works on a 5v power supply.
The device will connect to the near wifi router or mobile hotspot to access the internet. We can make it connect to the specific wifi using "Boltiot app" it is available in both the play store and app store. By that, we can control and monitor the conditions of the particular object or thing remotely using the bolt cloud.
Step 3: Arduino UNO and Battery Cnnection
Here we connect 4v battery in Series and from the +ve wire we will connect to the switch and from the other end of the switch we will connect it to the "+ve" terminal of the Arduino UNO
And from -ve sign of the battery we will directly connect it to the Arduino -ve terminal. Then we can supply the power using a switch.
Step 4: Connecting Two UltraSonic Sensor With Arduino UNO
An Ultrasonic sensor is a device that can measure the distance to an object by using sound waves. It measures distance by sending out a sound wave at a specific frequency and listening for that sound wave to bounce back.
1st UltraSonic Sensor - Arduino Uno
1)VCC pin - 5v pin
2)GND pin -GND pin
3)Trig pin - 2 pin
4)ECHO pin - 3 pin
(use breadboard for connections )
2nd UltraSonic Sensor - Arduino Uno
1)VCC pin - 5v pin
2)GND pin -GND pin
3)Trig pin - 12 pin
4)ECHO pin - 11 pin
Programming Arduino UNO: This program will calculate the speed when the object is passed through the sensors and the distance between the sensors is 8 inch.So when we are calculating fps we will take (fps=666666/12) in the program. 12 is the inches of foot and 666666 is 8/12.
Step 5: Connecting Bolt and Arduino UNO
BOLT UNIT - Arduino UNO
1)5v pin - 5v
2)GND - GND pin
3) TX pin - 8 pin
4) RX pin - 9 pin Bolt Starting Serial communication with Arduino UNO using the link "http://cloud.boltiot.com/remote/YourapiKey/serialBegin?baud=9600&deviceName=BOLTxxxxxx"
YourapiKey ---- give your device API key, You can get it from "Developer Console"
deviceName = give your device name,
You can get it from "BOLTIOT app" in Google store or app store keep baud rate to 9600.
Step 6: Getting Message When the Object Crosses the Speed Limit
To get a message we will use VPS(Virtual private server) we will get it from digitalOcean
Use the above link to create your account this will give credit 10$ in your digital ocean account.
To know How to create Click here.
Then create Twilio account and getting the message, To know how to Click here.
Run below program in your server
from twilio.rest import TwilioRestClient
import account_sid, auth_token, my_cell, my_mobile import requests,json,time
client = TwilioRestClient(account_sid, auth_token)
my_msg = "speed is more then 3fps"
message = client.messages.create(to=my_cell, from_=my_mobile, body=my_msg)
while True: r = requests.get('http://cloud.boltiot.com/remote/api_key/analogRead?pin=A0&deviceName=BOLTXXXXXX')
data = json.loads(r.text)
sensor_value = int(data['value'])
if sensor_value == 0:
except Exception as e:
print "Error",e time.sleep(5)
Step 7: Data Visualization Using Bolt Device
Go to "cloud.boltiot.com" website
and go to the "Developer Console"
Click on the + button above to create a new product in Developer Console page.
Then give the product name
Select the icon
and choose the UI as 'default.htm'.
and press "yes" to Hardware configuration
Then select UART
and choose 1 field position
and give the variable name as the 'temp'.
and click next then click finish and the product will be created.
Upload the js file which is given below and if you give the different variable name then we also have to change the variable in the js file.
after upload, it will direct to the products and then change the 'default.htm' to your 'filename.js file'
Then you will get the graph.