Table of Contents

DIY Smart Trash Bin

Smart-Trash-Bin
Project Description

Introduction

Do you think trash bins can be smart? Have you ever seen a trash bin that senses when you’re going to put trash in it and keeps track of how much trash does it hold? Is it even a ‘thing’, is it possible? Well, if it wasn’t before, it sure is going to now, with the help of two ultrasonic sensors, one servo motor, and of course your dear ol’ evive. That’s it; that is all that it will take to transform the trash bin in your home into a smart bin! Waste management made easy and smart with an amusing touch of DIY!

So, do you want to stick to your old bin, or transform it into a smart one?

Making

Take the Ultrasonic Sensor and the Trash Bin.
Glue the Ultrasonic Sensor onto the Trash Bin using the Hot Glue.Attach Ultrasonic to front

Then take the Metal Servo motor and Glue it at the back of the Trash Bin where the opening/closing mechanism of the bin was held.
Now attach the servo horn on top of the servo head. Glue the Servo
Take a small thread whose one end is tied with the servo head and other to the opening/closing mechanism of the bin.

Once done with this assembly, open the lid of the bin.Tie the thread

Onto this lid, glue the other Ultrasonic Sensor.Add Ultrasonic Sensir to lid
Connect the Sensors and the Servo to evive as given in the next step.

Connection with evive

Connect the two Ultrasonic Sensor and the Metal Servo to evive as shown below.Fritzing for the Smart Trashbin
Make sure that you keep the wires out of the bin.

Logic

The Ultrasonic at the front will sense your presence.
Thus, as you go forward to throw the trash into the bin, the sensor sends the data to evive.
In return, evive instructs the servo, causing the servo horn to turn downwards, pulling the thread along it. This returns in the opening of the lid of the dustbin.

The servo horn stays downwards for 3 seconds, before returning to its original position closing the lid.

The servo on the lid is used to sense the content quantity into the bin.

As soon as the lid closes, the servo senses the percentage of the bin filled and send the data to evive. Then evive prints this data on the screen.

Once the percentage reaches 90%, the inbuilt buzzer in evive triggers, indicating that it’s time to empty the bin.

If you ignore the message and try putting more trash in it, the sensor in front has been disabled. And thus, you no longer will be able to put trash in it.

Code

After completing the connections, upload the following code to evive.

Conclusion

With this, your DIY smart trash bin is ready! Manage waste smartly and keep your abode clean!

Project Downloads - Code and Files

Circuit Diagram

Circuit Diagram DescriptionCircuit Diagram Fritzing Diagram

Connect the two Ultrasonic Sensor and the Metal Servo to evive as shown.
Make sure that you keep the wires out of the bin.

Explore Related Projects by STEMpedia

This project will show you how to make an expressive and energetic humanoid bipedal robot.

Explore Community Projects