Trash
This project is Trash.
Okay, so why did you make it?
Think about that time you were sitting in your bed, watching YouTube, eating snacks. You finish your bag of chips, or that candy bar, and you're left with some garbage. In the spirit of being clean and tidy, you want to throw that trash in the trash can.
But wait! It's across the room! Now, what do you do? Your eyes squint, you turn around, and chuck that piece of trash towards the trash can...and yet despite your efforts, the trash bounces off the wall and on the floor.
You sigh. You get up from your bed, walk over, and place the trash in the trash can. You get back in bed, and keep watching YouTube. All this time, you think back to that moment that you missed.
There had to be a better way.
The better way.
We were you at some point in time. We realized the five seconds it took for you to get up, put the trash in the can, and get back in bed is time you will never get back. So, to all of you who have shared this emotional experience, we have built Trash.
It consists of a setup of two cameras positioned towards the center of your room, where your trash can is. These cameras send the data stream over to the garbage tracking algorithm, which detects the garbage in each camera using a custom trained YOLOV8 model with over 14,000 hand-labeled images. Our algorithm then takes the combined positions of the trash in both camera streams, does some trigonometry, and calculates the expected position of the trash in real life. It then can determine the final position of the trash when it hits the floor, and sends the position to our Trash robot via Serial. We also wrote a plotting script to visualize the data in real time.
Model: https://universe.roboflow.com/flatypus/trash-7kbr4
Our trash robot consists of a PETG 3D printed frame and four mecanum wheels powered by Nema 17 stepper motors. We selected mecanum wheels for their ability to move omnidirectionally which enables the robot to move in the most efficient, straight line path to the trash regardless of its location. The steppers are driven by TB6560 drivers which can handle 3A of current at 35V. The robot is powered by a 3S, 2200mAh LiPo battery which can output 77A of current. The robot is controlled by a Teensy 4.0 microcontroller which was chosen over Arduino boards for its high clock speed (600 mHz vs. 16 mHz). This allows the steppers to run at the extremely high speeds required for the robot to move fast enough to catch the trash.
We used the AccelStepper Arduino library to control the stepper motors. Our code takes the desired location coordinates, subtracts the current location coordinates, and does some vector math to determine the precise number of steps required for each wheel to spin to reach the desired location. As the robot continuously receives new, more accurate coordinates from the tracking system through serial communication, it uses the current number of steps each motor has taken to determine the current coordinates of the robot. These are saved as the current coordinates and the above process repeats, recalculating the number of steps for each motor to reach the new desired location.
Challenges
Oh boy! Nearly everything that could've gone wrong did go wrong. For one, we bought four stepper motor drivers, but while three of them were okay, one decided to break on us. Because of how the mecanum wheels work, we can't just have three working wheels; all four need to be operational to be properly omnidirectional. We then wasted a day trying to amputate it and fix the robot with only three drivers, only to realize that we should've just bought a new driver.
More things! Our battery decided to die! The Arduino nano's clock speed wasn't high enough to move the robot to catch the trash fast enough, so we had to buy the Teensy! Speaking of the Teensy, it has problems reading from Serial while controlling the steppers! Our boost converter also died! On the code side of things, we spent almost a day trying to figure out how to detect the trash using just opencv, before realizing that it was hopeless and switched to hand labelling images for five hours.
What's next?
Well, obviously the project is incomplete. We couldn't get the part that interfaces between the tracking system and the robot to work, and the robot controls are still in progress. We'll still work on it in the future, and we'll be uploading a YouTube video documenting our struggles and the final robot on https://youtube.com/flatypus! (Please subscribe)

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