Problem description
Nobody likes a messy work station. According to many studies, a messy space can cause anxiety and reduce one's ability to focus. As members of the Formula SAE team here on campus, we often would be on the workbench, soldering, only to be stressed out because of miscellaneous components scattered across our space. Additionally, electronic component sorting is a process that often goes unnoticed, but is crucial to manufacturing. Manual sorting is slow, tedious, and prone to human-error.
Solution explanation
Our CapBot is an automated sorting robot using a Raspberry Pi 4, computer vision algorithms, and motorized mechanisms for electronic component classification. We trained our claw robot to identify capacitors and resistors via a YOLOv8 machine learning model that utilized the OpenCV library.
CapBot will begin by going towards all components that are the same type as the first identified one (ie. capacitor or resistor first). From there, the magnet attached to the claw. With this magnet and the help of the claws, a resistor or capacitor can be picked up and moved to a set place.
How we built it
Vehicle Chassis
- 2 gear wheels
- 2 smooth wheels
- 2 tracks/treads
- 3D printed chassis
- 4-Bar Linkage
- 2 Interlocking arms for claw
Raspberry Pi
- Raspberry Pi 4 Model B 4GB RAM
- 64 GB Micro SDXC Card
- Ethernet Cable
- USB-C to Ethernet Adapter
Power
- (4) 9,900mAh 18650 Li-Ion (2 on robo)
- Ethernet cable
- Ethernet adapter (Ethernet to USB-C)
- 4-slot battery charger
- USB-C to USB-C cable
Electronics
- Printed Circuit Board (V2)
- 2 Button Switches - to be read by Raspberry Pi
- H-Bridge
- Camera ov5647
- 1 Ultrasonic Distance Sensors
- 2 Electric Motors
- 2 Servos
Miscellaneous
- Magnet
- E-tape
- Enamel Winding
Challenges we ran into
Our first night building the robot, we ran into a fair share of issues. The servo wasn’t starting, so we started by checking the GPIO PWM outputs on our oscilloscope to validate we were actually getting a signal. We were, and everything seemed normal, but our servo still wasn’t moving. So, after a lot of painstaking rereading of instructions and testing, we realized we forgot to plug our batteries in… Assembly in general was a pain, and very tedious, but we’re glad we had it up and running by Saturday morning.
Saturday was the largest hump to get over. We had to learn how to train and write a model, write the custom motor controls, and then integrate the both. The integration was definitely the hardest, such as getting the model to work on the Pi and writing the sorting function with it.
We did still run into issues with our hardware loop. The servos kept resetting, but after debugging we found the class definition that caused this and removed it. By noon, we had all our basic functionality working.
Our model is also not the most accurate with detection, and it works better on some surfaces than others. This is unfortunately pretty hard to change due to our small dataset, and is a limitation of our current prototype.
We also wanted to have an electromagnet that we could trigger, but it was far too challenging to get done in time. We also didn’t have time to CAD a part to scoop up
Accomplishments that we're proud of
Considering all 3 of us are far more used to coding in embedded C, coding in python was definitely an accomplishment for us. Having the robot working, even if it wasn’t perfect, was also super awesome since we had such ambitious goals.
What we learned
Every single thing on this project was something we learned, from training a model to writing controls for the servo in python.
What's next?
There’s so much potential for our CapBot to grow. If we were able to train it on a more accurate database, it could detect a wider array of components with higher accuracy. Our sorting also isn’t the most efficient, and our robot has trouble picking up components. This could be fixed if we had more time to polish and change the code. We also would like to have more of a GUI to work the robot as opposed to running the command line. We’d also like to change the design of the claw a bit—maybe an electromagnet, or maybe a scoop attachment.
Sources
YouTube channel that helped us get started with training our model
Log in or sign up for Devpost to join the conversation.