Inspiration

Accurately inserting balls into cups from a distance.

What it does

Our final project idea was to make a robot that can launch ping pong balls into a red solo cup from variable distances. We planned for this robot to be set up in front of a solo cup, at which point it would calculate the distance between itself and the cup. The robot would then use this measurement to adjust the angles/speeds of our actuators according to a simple 2-D projectile motion equation.

How I built it

We initially planned to use an ultrasonic sensor to measure distance and a solenoid for launching the ball; however, we ended up utilizing a more precise light-based distance sensor and DC motors to actuate the ball. In our actual solution, we ran into some challenges with accurately measuring the distance, controlling the actuators, and utilizing the projectile motion equation due to inconsistent ball launching. As such, our final result was not particularly successful, as it ended up simply being a device that could launch a ping pong ball at unknown, inconsistent distances.

Challenges I ran into

Unfortunately, interfacing our parts and code together successfully proved to be more challenging than anticipated, leaving us with a poor-performing final product. Our final design involved utilizing the TFMIni Lidar S distance sensor to more accurately measure the distance to cups from our launcher than we could with an ultrasonic sensor. This sensor required us to use UART for communication to receive distance data. Successfully utilizing UART was more difficult than expected, and we had some trouble with consistently extracting the distance measurements that were being sent in data packets from the sensor to the MCU. Additionally, we faced challenges in implementing control of our servo for aiming the launcher. Having utilized the waveform generators in Detkin to verify the functionality of our servo, we suspect that our servo was faulty and/or broken. As such, we are unaware of whether or not our code would have properly controlled a functioning servo, and were unable to control the angle of ball launching for our device (although an oscilloscope did verify the frequency/duty cycle of our generated wave). The only mostly-functioning part of our project was the component for launching balls. The electrical design of this was simple and only used the 5V DC signal provided by the MCU to power two DC motors. Our team lacked some skills in mechanical design/prototyping, so building a device that functioned consistently was challenging. Currently, our design is somewhat flimsy, and the distance a ball launches will vary greatly at the same angle.

Accomplishments that I'm proud of

We are proud that we were able to make a device to somewhat successfully launch a ball. Additionally, we are proud that we learned about how to use new devices and sensors, as well as our attempt to improve upon our initial design by using a Lidar instead of an ultrasonic sensor.

What I learned

During this project we became much more familiar with serial communication. Even though we were unable to get it to work one hundred percent, we learned a lot about receiving serial data. Previously most serial communication we worked on relied on only sending information to the serial monitor to be read. But we were able to successfully receive information from the lidar and display the hexcode on the monitor. The main issue was that despite being able to display the information we were unable to get our code to find and do calculations with the relevant data.

What's next for LarryBot

If we were to continue this project our first steps would be to replace and gain a deeper understanding of how to properly use a servo. We would also need to complete the connection between reading the serial data and actually using it in the code. Another step may be to 3D print a launching mechanism for greater accuracy, and possibly laser cut a more aesthetically pleasing base (not that the brick wasn’t pleasing). Another future upgrade would be the ability to sense multiple cups at once and shoot in different directions other than a straight line. This would likely require another servo to change direction, and a more advanced system to determine distance. Possibly a camera with machine learning to find cups.

Built With

  • atmega328p
  • c
Share this project:

Updates