Mechanical Engineer needing help!!!

liudr:
Welcome!

I think a light sensor on the tee may just do the trick. When the ball is on top, there is little light. When the ball is hit, the sensor is revealed and receives light. You can certainly use an optical distance sensor but I bet the light dependent resistor may do the trick.

I'm kind of worried about the current/voltage from the motor through the microcontroller. How do I control this? A transistor/voltage regulator??