For this week’s assignment, I’m designing a Touchless Mini Waste Bin specifically for office desks. It’s a compact, smart bin that automatically opens its lid when your hand approaches — and includes a built-in sensor to detect when the bin is full. This ensures the bin doesn’t overflow and helps users manage waste more efficiently.
Software
Materials
Electronics
Design the circuit using Tinker Cad
Programming Arduino (pseudocode):
I used the pseudocode below to think about the code logic
I developed the code on the Arduino IDE and tested the components
Code Explanation
This circuit and program together form a smart trash bin that opens automatically when approached and alerts when it needs to be emptied, while satisfying all the specified programming criteria.
The circuit's logic is:
Ultrasonic sensor constantly measures how far a hand/object is from the bin.
IR sensor monitors the trash level inside.
The Arduino reads these two sensors into the dynamic variables distance and isFull.
Using an if statement with logical AND, the Arduino decides whether to:
Open the lid (servo sweeps open then closed), or Keep it shut.
When the bin is full (isFull == LOW), another if turns on the status LED and pulses the buzzer to alert the user.
Preparing the cardboard, and choosing the right size to fit the desk.
Defining the components
The final product!
The final product! [VIDEO]
Ultrasonic sensor constantly measures how far a hand/object is from the bin.
Ultrasonic sensor constantly measures how far a hand/object is from the bin.
IR sensor monitors the trash level inside. When the trash can if full, the LED will turn on, and the buzzer alerts the user.
At first, I was unsure whether to use an ultrasonic sensor or an IR sensor. Some online resources suggested ultrasonic sensors because they are accurate for measuring distance, but others noted that IR sensors have a faster response time and are simpler to integrate. Since my project only needed to detect the presence of a car rather than measure its distance, I chose the IR sensor. The quick response made it more suitable for opening and closing the gate without delay.
The servo sweep—the gradual open/close of the lid—was a new concept for me when I started this project. At first, I simply wrote:
After experimenting and researching, I learned to move the servo in small angle steps with a short delay between them:
The work with the smart bin gave me practice in more than just wiring sensors—it trained me to think about the overall logic and function of a device from start to finish. Working on the smart bin taught me how sensor signal noise can affect a project’s accuracy.
Title of Media