A simple demonstration of motor control with a Raspberry Pi Pico – EGR-101 final project

Posted by

I’m obviously taking engineering classes in college – starting off with the very basics, EGR-101. In this class, we learned about engineering ethics, basic design with Fusion, and were tasked with a final project with the following prompt:

“Design and build a device that will launch a ball to hit a target (a small circle) located 10 feet away from the launch point. The target will be positioned 3 feet above the floor. Once the ball is released, you cannot touch it again, and it must be airborne before hitting the target.

Most people designed simple catapult or slingshot designs. However, I wanted to take things one step further. I decided that I was going to use two motors with friction surfaces to grab the ball and spin it up to speed before launching it. This would require some sort of motor control beyond simply plugging the motors into a power source, as adjusting the motor speed would be crucial for fine-tuning the ball’s trajectory.

I came up with a simple yet versatile design:

The Mechanical Design:

The CAD model that I was using as a reference while building

Now, this looks a little chaotic at first, but it’s quite simple: The ball gets dropped down the ramp on the right side, rolls past the motors which spin it up to a determined speed, then is launched at a set angle via the ramp on the left. This design has many advantages, including but not limited to:

  • The electronics can all be stored beneath the motors and “acceleration zone”, allowing a clean-looking design and easy possible waterproofing in the future
  • The launch angle is adjustable via the support for the left side ramp, as shown below:
  • The design was originally going to incorporate a touchscreen LCD screen (a mount for such screen can be seen in the CAD drawing), but due to time constraints had to be ditched for a more simple potentiometer control.

The Electronics

The electronics for this project were quite simple, compared to what I’m used to. A 12V switching power supply was used to power the launcher. This 12V was fed directly into an L298N motor control board to power the motors. However, the Pi Pico and logic run on 3.3V. I brought the voltage down to 5V with a linear voltage regulator, then dropped it to 3.3V using the Pico’s onboard regulator. Now, the Pico would be able to communicate with the motor controller and give it a PWM signal to spin the motors at a desired speed. A potentiometer was connected to the Pico’s ADC to provide user input. The electronics can be seen below:

The electronics are very messy because of the limited time we had to complete this project and limited resources available at the school lab.

The Final Product! (Kind of)

Despite the rushed look of the electronics, they did work fine! We ended up getting the motors spinning just fine. Due to most people falling behind in the class because of time constraints, the professor gave us some lenience with the design of the launcher, and the following design was submitted for my final project:

Technical Drawings (for anyone interested, these were also submitted with the video and a written description of the project):