Now-a-days, the developed cities are facing many problems. One of the major problems is collection of garbage. Due to the increase in the population, garbage is increasing rapidly throughout the cities. Mainly the increase of the apartments in the cities lead to increase in the garbage. The increase in the garbage will lead to several viral diseases and infections. The municipal people does not know when these local bins fill.
So, what if we could create a smart bin which alerts us when the trash is full.
We are going use the Ultrasonic Sensor, Bolt Wi-Fi module and Arduino Uno to measure the trash level and send us an SMS alert.
Here, we are gonna use some online services like Twilio to send us an SMS alert to the phone. We also use Telegram to send message to the channel
HardwareUltrasonicSensor:
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. By recording the elapsed time between the sound wave being generated and the sound wave bouncing back, it is possible to calculate the distance between the sonar sensor and the object.
To know further about the Ultrasonic sensor and how to interface it with the Arduino check the below link:
https://howtomechatronics.com/tutorials/arduino/ultrasonic-sensor-hc-sr04/
BoltIoTPlatform:
Bolt is an IoT platform which let you control your devices and sensors through the internet with ease. With firmware built into it, you can connect the bolt device to any wi-fi near you with the bolt app. With bolt you can control your device and monitor from any part of the world.
TwilioMessagingAPI:
Twilio is a cloud communications platform as a service company based in San Francisco, California. Twilio allows software developers programmatically to make and receive phone calls, send and receive text messages, and perform other communication functions using its web service APIs. It that enables powerful communication between mobile devices, applications, services, and systems throughout the business in order to bridge the gap between conventional communication.Twilio seeks to rid businesses of the messy telecom hardware by providing a telephony infrastructure web service via a globally available cloud API, allowing web developers to use standard web languages to integrate phone calls, text messages and IP voice communications into their web, mobile and traditional phone applications.
Telegram:
In Telegram, there is a third party applications called Bots. These run inside telegram lets users can interact with bots by sending them messages, commands and requests.
- First create a channel and make it to public channel.
- Then search for Botfather and type /start.
- After typing that /newbot lets you create your own bot.
- Make sure to create a bot with unique username and Bot name.
- Note down the BOT Token.
- Then add the bot to the channel you have created.
For more information check the below link:
https://pypi.org/project/telegram-send/
Hardware SetupThe Ultrasonic sensor is kept on the top of the dustbin to constantly check the level of the trash. The Arduino sends this trash level constantly to the Bolt device and the python code written for the Bolt device checks whether the level is less than the given limit in the code. If it is less than the given limit, it send an SMS alert and telegram message to the mobile phone.
Software:
Interfacing the ultrasonic sensor as mentioned in the above link in the blog would be quite mathematical. So, we could the ultrasonic sensor library by Erick Simoes which abstracts all the mathematical formulas of the sensor.
Here is the link for the library:
https://github.com/ErickSimoes/Ultrasonic
The Arduino is programmed to check the distance of the garbage and send the distance constantly to the bolt device constantly. The python code written for the bolt device will check whether the distance less than the required. If it is less than the required then it sends an alert through Twilio and Telegram.
Comments
Please log in or sign up to comment.