Actually, this distance (between hinge and threaded bolt) is not important at all if you intend to control the motor speed by means of computer (or micro controller).
For a computer version, have a look
here.
For microcontroller version you have to have some basic digital electronics skills..