Backlash Compensation

Is it possible to put the rotary encoder on the axis that is being moved instead of on the motor itself? For example if you drove a shaft from the motor through a 10:1 gear reduction, could the rotary encoder be attached to the shaft instead of the motor? How would the gearing ratio be accounted for in the software?

It would compensate for backlash but might also introduce oscillation in the control loop.

1 Like

I’m guessing that in order for the control circuit to drive the motor it needs to know precisely what the motor position is, so the motor needs to have it’s own rotary encoder. In order to compensate for backlash at the load, could you use a second rotary encoder and factor the backlash error (motor position minus load position) into the control loop?

The encoder can certainly be placed on any rotating shaft that’s connected to the motor. It needs to be connected without any backlash though. This is crucial.
On my setup the encoder is mounted on a separate shaft, the shaft is linked to the motor using a timing pulley. That’s fine as there’s no relevant backlash.

How do CNCs compensate for backlash and frame flex? I think they use two encoders one on the motor and a digital readout (DRO) to measure where the tool actually is. Could something like this be implemented in Odrive?

There’s usually no relevant backlash in CNCs, but yes, the servos have their own encoder and the axis have linear scales. The encoder is only used to drive the motors while the actual position control is done via the linear scales by the main controller.
Not sure if this kind of closed loop control can be done with an ODrive. I doubt it, you’ll need an external controller to do so.
Using a timing pulley it’s usually no problem to put the encoder on a different shaft than the motor - given that the belts are not too long.
What setup are you thinking of?

Thanks babyjail.

I was thinking of using this setup on a MPCNC. https://www.v1engineering.com/specifications/

It a very low cost CNC that can be built with electrical conduit and 3d printed parts. Needless to say it’s much less rigid than a 2 tonne CNC machine. I was thinking that you could sense the frame flexing or belts stretching by placing a second sensor on the tool head with its own belt and pulley. In that way any error could be corrected out and in theory at least it could be as accurate as a much more expensive machine. I’m sure there would still be a limit to how hard you could drive the CNC.