Inspiration
The inspiration behind this project was to reduce the amount of public garbage cans that are overflown. When biking through the Waterloo Region, we both saw overflowing and messy garbage cans that appeared to not have been cleaned for an extended period of time. We thought that this issue could be resolved with a sensor that detects if the bin was full. After searching around for a while, we found that we had an ESP8266 and wanted to learn more about how we could combine it with sensors and turn it into a project.
What it does
WasteOverflow is an IoT device using an HC-SR04 to measure whether or not the garbage bin is full, which includes a website to display the data. With this information it then displays on a map the percentage to see if they need to be cleaned, if not they can be ignored until it is filled.
How we built it
We used an ultrasonic sensor for this project, specifically an HC-SR04 connected to an Arduino. The sensor sends out ultrasonic waves, which travel back when hitting an object which can find the percentage of how much the garbage can is full. We also have an ESP8266 setup, which can connect to servers wirelessly. We connected two microcontrollers using I2C, which establishes connections between two devices, with one being the master and one the slave. The Arduino is an I2C slave device, and the ESP8266 is the master. The ESP8266 (master) can request data from the slave device, which reads the sensor values, specifically our ultrasonic sensor. This data is then sent into our time series database. We chose to use InfluxDB to store the percentage of how full a garbage can is full, longitude and latitude of the ESP8266. Using pandas, we imported the database into our front end. We used Streamlit to build the ‘skeleton’ of our website, while we used Mapbox and Plotly to display the ‘percentage’ data to indicate if the garbage bin is full or not.
Challenges we ran into
- Our ESP8266 was unable to use 5V, which is needed to use our ultrasonic sensor we tried different solutions such as stripping our USB cable, which resulted in many sensors burning and dying , thus we had to set up I2C using an Arduino, which was a major inconvenience
- Config.toml wasn’t working properly, as in we weren’t able to import the Mapbox token through that file. We instead decided to use Plotly to directly input the access token using the ‘access token’ parameter.
- The InfluxDB contained excess redundant information which needed to be filtered out (e.g. sensor-id number). This was done by using if statements to isolate the field values that we wanted to keep.
Accomplishments that we're proud of
- We learned how to handle and setup a database which none of use have done
- We setup I2C with the Arduino and ESP8266
- We learned and explored how to use a variety of libraries and APIs
What we learned
- How to use an ESP8266
- How to use Streamlit to import a map from Mapbox that includes scatter points using Plotly
- Use pandas to read a databank
- How to setup InfluxDB
What's next for WasteOverflow
- Pathfinder algorithm that enables users to find the shortest distance from one garbage bin to another * and creates the most optimal driving path for garbage truck drivers
- Cleaner hardware design
- Having React or HTML/CSS front-end for more freedom and creativity


Log in or sign up for Devpost to join the conversation.