desktop hardware to demo PID ?

I’d like to build a simple, preferrably desktop demo hardware platform that can be used to demonstrate the usage of the wiplib pid related classes and to clearly show students the effect of adjusting tuning constants etc

  • one implementation could be a linear demo that could be mounted horizontally and vertically (vertically to demo the effect of gravity)
    (car on a rail, motor, geared chain drive, encoder, emergency end limit switches, possibly a geared 10 turn pot as an alternative to encoder)

  • not quite sure how to demo rotational PID

Anyone have any suggestions, seen anything applicable anywhere ?

I’ve found it pretty easy to use a rotational mechanism to demonstrate PID tuning.

Just add a weighted moment arm and have them stop on a dime-a marked target. You can exchange lighter/heavier weights or slide a weight out further along an arm you’re rotating in a circle. You can also shift it from horizontal to vertical to add the experience of the deceleration of gravity on the up swing and the acceleration on the down swing. I just use a 10-turn pot and a slip coupler so overshoots (and you should allow overshoots) don’t damage it. Rotational is nice when the pot does slip, because there isn’t a chance of mechanical damage. You can substitute an absolute encoder for the pot or use a continuous pot too.

The method applies to moving an arm joint both with and without holding the extra weight of a game piece, or the motion of a turret.

Switching the pot out for a relative encoder lets you practice PID position control and speed control.

Thanks for the great ideas.

For rotational, my favorite demo is the inverted pendulum. Nothing cooler than getting a stick to automatically balance.