Trying to figure out how to make a motor balancer.

As an afterthought: somehow it would be necessary to find the "0" position of the axle --> need also some kind of sensor to detect the current axle position.