The hardest part here seems to be getting the launch speed under control. The first motor flung candy 42 feet when the goal was 14, and the measured exit velocity came out at 40 mph, which the maker judged unsafe to catch. The fix was swapping in a lower-RPM motor, bringing the exit speed down to 23 mph. That willingness to measure, admit the mistake, and re-engineer sets the tone for the whole build.
Mechanically it works like a single-wheel pitching machine: a red compliant wheel spins a few millimeters above a curved blue feeder chute that holds up to ten candies, and a servo pushes them in one at a time. The electronics stack includes two Arduino Nanos, a Raspberry Pi 3, three servos, two motor drivers, a brushed DC motor, a Hall effect limit switch, two voltage converters, a USB camera, and a DeWalt 20V drill battery as the main power source. Brackets and enclosures were modeled in SolidWorks and printed on a delta printer.
Several details stand out. Two disc magnets mounted opposite each other on the shaft trigger the adjacent Hall switch, and the timing between pulses gives instantaneous RPM. A closed-loop controller then adjusts motor voltage to hold the 1500 RPM setpoint, though the control plot shows some overshoot before it settles. A sled filled with one-cent coins shifts the center of gravity toward the servo axis, easing torque strain on elevation changes. On the software side, a Python script finds a face, draws a red bounding box, estimates distance from facial landmark proportions, and computes the parabolic arc before firing. The Pi runs the Sinric library to pose as an emulated smart TV named Chocolate, and Alexa volume commands set how many candies get launched. There is even a Secure Operation Mode that keeps the turret idle for unrecognized faces.
What is left open: a planned pet-feeder style auto-loader was dropped when the project ran long, and nobody knows yet whether Skittles or Reese's Pieces feed cleanly through the chute. Still, for a little over two months of work by a 17-year-old, this is a remarkably complete machine, and the code is already on GitHub.
Project by Harrison McIntyre. Watch it on their YouTube channel: