I'm building an inverted pendulum, a classic control systems problem, using a stepper motor / control board for moving the cart and an optical encoder / board for pendulum's angular position and its derivatives.
Here is my 3d model (iPhone for scale ) with engine and pulley mounts and driving belt absent for clarity's sake. In the video, the cart is just rocking pointlessly, in real life it will move to keep the pendulum upright and centered.
Still waiting for most of my hardware so I have not much to show yet, just having fun with the motor
I coded a glorified MIDI player for the stepper, here it is playing the zelda overworld theme. The cat doesn't seem overly impressed
And here is a simple control loop using computer vision. I jammed a wine cork in the stepper shaft for a pulley and hanged a Gain detergent cap with a bit of string. A bit of red felt on a coat hanger acts as a setpoint. The program turns the motor in order to minimize the error between the cap and the setpoint. Here it is in action.
I'll update this thread as the project evolves.