This project is about making Smart System using Bolt IOT kit which will send the notification via SMS itself to the Municipal Corporation when the intensity of light of Streets decreases, So they will easily and fastly turn ON/OFF the lights of the Streets with the help of Smartphone.
Video of the project:
Building the ProjectFor Setting the Bolt WiFi Module click on link https://docs.boltiot.com/docs.
Step 1: Connecting the LDR Circuit to the Bolt- Insert one lead of the LDR into the Bolt Module's 3v3 Pin. Insert one lead of the LDR into the Bolt Module's 3v3 Pin.
- Insert other lead of the LDR into the A0 pin
- Insert one leg of the 10k Ohm resistor into the GND pin
- Insert the other leg of the resistor also into the A0 pin
Here we are using the LED instead of LED Bulb as the demo
- Take one leg of the resistor and wrap it around the longer leg of the LED i.e positive leg. This resistor helps limit the current flowing through the LED and protects the LED and the Bolt from short circuits.
- Insert the negative leg of the LED into the ground pin of the Bolt.
- Insert the other leg of the resistor in digital pin 0 of the Bolt.
Finally the combination of both
To create a Product for this project, firstly login into BOLT CLOUD
- Click on the Products tab and then create a product
- select the Output Devices option
- Click on Configure this product to configure the product
- Click on Code Section and write the code in HTML We are writing the HTML code for Switching The Street Lights ON and OFF with the Smartphone (via Bolt IoT Android or IOS app)
- HTML code is attached below and save it.
- To see the Switch on Phone, Open Bolt app on the Smartphone>> Click on your Bolt device name or Id
- Screenshot of the switch on the phone
I have done this project in Oracle VM Virtual Box. You can also use Digital Ocean and Ubuntu servers.
Now make conf.py which has the information of Twilio (Login and you use API) and Bolt Cloud account By creating configuration
sudo nano conf.py
and write the following code
SSID = 'You can find SSID 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'
API_KEY = 'This is your Bolt Cloud account API key'
DEVICE_ID = 'This is the ID of your Bolt device'
by pressing the Ctrl + X to save the file
Now make one more file name sms.py in which we will write the python code for sending the notification
sudo nano sms.py
python code is attached below.
After creating and saving both files then run the code by using the following command
python3 sms.py
Working principleA Smart System which consists of LDR, LED lights and Bolt IOT WiFi Module is placed in the pubic street poles.
- LDR Sensor measures the light intensity and this data send it to the cloud through Bolt IOT module.
- If the light intensity becomes less than the limit then related data send to cloud.
- The server which is running with python code detect the data and if Light intensity is less than the limit then it calls Twilio SMS service to send the notification.
- Twilio SMS service sends the notification to the phone number of the Municipal Corporation and so they will turn the Street light ON with the help of their Smartphone
- Screenshots of SMS:
This is the Smart System to provide lights in public areas and send notification itself to the Municipal Corporation when the intensity of light decrease. So the Municipal Corporation will easily turn ON lights with the help of their Smartphone. And it also sends SMS for turn OFF lights.
Comments
Please log in or sign up to comment.