RecyclePI

RecyclePI is one of my very first projects working in a team of 6 people. It was made within 24 hours in Unihack 2019. The idea was building an IoT smart recycle device that is attachable to any bin.

RecyclePI has two main functions:

  • It distinguishes between different types of trash and tells whether one is recyclable
  • It collects the item information and learns to improve its accuracy.
TechStackGithubDemo
ReactJSRepositoryVideo
Python
Django
AWS Polly
Auto ML
Motion sensoring
MySQL
Elasticsearch

RecyclePi

Purpose of the project

In many countries, recycling is still being done mostly by the government. The reason for this is that most individuals find the process to be inconvenient and confusing as most items don't acknowledge themselves as recyclable1.

Normally, trash sorter machines are enormous in size and only used in factories. The concept of a family trash sorter machine is still a bit strange and unfamiliar to most. There are other inventions such as Oscar2 designed for households however, they are overpriced and users don't have the option of reusing their own bins.

RecyclePI was invented to tackle such problems. Our team targeted small organisation, businesses or even family who care about the environment and want a simple solution to keep track of their recycling process. Individuals who use RecyclePI are also benefited by knowing whether each item is recyclable or not.

The Process

The first two hours were spent on forming the idea and assigning tasks. We chose Scrum as our working methodology. The team was divided into one Front End, one Back End, one Machine Learning Engineer, 2 IoT Engineers, and one presenter. Roles were frequently switched in order to offer support to each other.

At hard-ware level, we had 1 Raspberry PI 3 connected with a speaker. It had an attachable touch screen on top to display information and a camera for the motion sensor.

For software, we chose Django for our REST API Back End. ReactJS for the front end and python for our AI and motion sensing.

The Raspberry Pi captured objects using a motion sensor, then sent the data to our AutoML API to detect the material as well as predict if it was recyclable. It used AWS Polly API as a text to voice service to read the result. The Pi then returned data to our back end server.

Once back end had the data, the information of the scanned object was stored on MySQL database. It then was able to tell the front end to update the view to display data as charts.

Problems

Since it was my first time working with an IoT device, I faced many issues with setting up the device to connect with the screen and camera.

Initially, the intention was to display the camera view on the screen. However, in order to do that the motion sensor script had to be written for multi-threading, which was a difficult task for me and my team at that point. We ended up using AWS Polly instead of displaying the result on the screen.

Front end authentication with back end and the communication between the back end and our IoT devices was also affected by the CORS problem. We only had a limited data set that was not rich enough to pass a real-life test, therefore one of our team members spent the whole night taking pictures of trash in order for our machine learning services to work.

By using Scrum and using Trello to track and change priorities between tasks, we managed to get everything working by 11 PM, the day before the presentation. Everything was great until it reached 3 AM we got bored:

Let's stimulate 1000 devices on Cloud using Elasticsearch with Kibana to display a real world situation.

Team member at 3 AM

Lesson learned

Never do anything at 3 AM.

We managed to use Elasticsearch however, it conflicted with our local demo and created an issue where the dashboard failed to update. With a limited time period before the presentations the next day, we decided to instead focus on finishing everything up by working on the user interface and the delivery of our performance.

Frequently meeting within a short period was not necessary and we ended up wasting too much time engaging in stand ups every two hours.

Sometimes less tech is better. The simpler the better. This is the hackathon where I and my teammates failed, but we ultimately learned a lot, which later led to the success of Boxby.