The launcher was the most fun part of the robot to test, so it was the first mechanism that was prototyped.
We wanted to be able to launch quickly with very little recovery time between each ball, so we used a powerful 775 motor that was available and a 1.3lb steel cylindrical flywheel which looked about the right size and could be made from a piece of available scrap at the PRL (thanks for the help Zach!). Like with our drivetrain design, this wasn’t really optimized by calculations, but more based on available parts confirmed to be overpowered by calculations and then software limited.
The robot would have to launch a projectile about 8ft, so neglecting air resistance, height difference between launch and landing, and Magnus effect, and assuming a 45 degree launch, the initial velocity would need to be 16 ft/sec.
This means our 1.75” flywheel needs to spin at about 4200rpm.
Launching 6 ~5g balls at 16ft/sec in 1 second takes about 1/3W of mechanical power. This is really low and probably not a reasonable estimate of required launcher power but it shows that the energy required to launch each ball is low.
Kinetic energy of rotating wheel [I didn’t actually calculate this before building the launcher but it is about 18 Joules]
We chose a one-flywheel launcher for mechanical simplicity. The launcher doesn’t compress the balls that much because they are lightweight and we don’t want the flywheel to be slowed down too much.
At first we had a rubber tube stretched around the flywheel to add grip but the tube broke and flew off the wheel at one point and it turned out the steel flywheel had enough grip so we never replaced the rubber.
Tested in dorm (front spin, back spin, side spin, different angles and trajectories), found that side spin worked best, and approximately 45 degree launch angle is best
Later tested on field (CW vs CCW side spin, full vs empty pot)
Goal was to keep balls from bouncing out, and for them to bounce out of the field, not into the field if they didn’t stay in the pot. Launching into the far corner of the pot worked well. Angles measured in this test were used in the final design.
Second iteration was the same flywheel, motor, and pulley system as the first prototype, but with a 3d printed funnel, base, and new aluminum side plates.
We found our launcher prototype to be consistent when supplied with a constant voltage. The heavy flywheel doesn’t slow down that much with each ball. We found that 19/255 PWM duty cycle worked well for getting ingredients into the pot, but the motor took a lot of time to get up to speed. We really didn’t want any balls to land short of the pot, so making sure the flywheel wouldn’t ever slow down too much when launching at a fast rate was important. We added a magnet and hall sensor and found that the wheel spun at 4700rpm when it was launching balls at the correct trajectory.
We added a proportional control loop with a feedforward term to make the flywheel spin up quickly and stay at the correct speed. After adding closed loop control, the launcher spun up in under 2 seconds compared to the previously required 10 seconds.
This document was useful for learning about tuning flywheel control loops, and the importance of a feedforward term: https://docs.wpilib.org/en/stable/docs/software/advanced-controls/introduction/tuning-flywheel.html
The launcher code control loop doesn’t actually start until an interrupt is triggered when the magnet first passes the hall sensor, so as the state is changed to launching the motor is started spinning with just the feedforward term. This works out well as the control loop would initially output 100% power and that would draw a lot of current if the motor started from a stall.