Raspberry Pi Ball Launcher

Jan - Feb 2021

Shooting the ball launcher at its lowest power setting

My living group at MIT hosts a recruitment event at the beginning of every fall and spring. However, in the spring of 2021, school was still partly virtual for us due to the pandemic. Given these constraints, we decided to organize an event where people would send keyboard inputs through a Twitch livestream to remotely aim and shoot a ball launcher at a dunk tank. I was tasked with creating the hardware, wiring up the electronics, and setting up the Raspberry Pi while another person was tasked with connecting the Raspberry Pi to Twitch and setting up an intuitive GUI.

ball launcher on desk

The ball launcher is a baseball pitcher mounted onto a gimbal I designed to provide motorized yaw and pitch control. I used NEMA 17 stepper motors I salvaged from an old 3D printer to control the yaw and pitch angles, but the weight of the baseball pitcher would overwhelm the pitch motor at low pitch angles. For this reason, I added an elastic band to the back of the gimbal to counter the weight of the baseball pitcher. In hindsight, I should have placed the pitch joint axis closer to the center of mass of the baseball pitcher and axis of firing. I did nearly all the construction out of aluminum bars and screws because all I had at home for metalworking was my drill and hacksaw. For more complex geometry like gears, I used my 3D printer.

I used a Raspberry Pi Zero W to control the A4988 stepper drivers. In order to make power supply simple, I designed the circuit to only require a single 9 V input. This 9 V would power the stepper motors directly and would also be stepped down by an L7805 voltage regulator to provide 5 V for the stepper drivers and Raspberry Pi.

ball launcher outside

After the ball launcher was complete, I shipped it to the people hosting the event. Unfortunately, we found out that the Raspberry Pi no longer worked. We thought it might have been fried by an electrostatic shock at the shipping facility. We replaced the Raspberry Pi, but then we found out that the stepper drivers also no longer worked and it was too late to order or make a replacement. However, since the baseball pitcher still worked, we ended up firing balls at the dunk tank using human-controlled steering instead of electronically-controlled steering.