For an electronics project in undergrad I build a simple electromagnetic levitator. An infrared LED/photodiode pair provides the control signal, controlling current to an electromagnet which holds the conducting ball in place.

If the current was constant, this would be an unstable equilibrium. Active feedback can stabilize the system.