Load encoder advice

Hi guys,

I’m thinking about adding a Load encoder to monitor motion of a linear shaft and rotate the motor axis at a certain corresponding ratio. If anyone could answer these questions that would be great!

Can both the commutation encoder position and load encoder position be read independently?

Is it possible to position Axis 0 using the commutation encoder, then switch to using the load encoder as the motion reference?

Does ODrive support electronic gearing, where Axis 0 follows load encoder movement with a configurable ratio rather than a direct 1:1 relationship?

Can an axis operate normally from STEP/DIR for positioning, then be switched into an electronic gearing / load-encoder-following mode during a process, before returning to normal position control afterwards? Without requiring reboot

Thanks!
Mball

Can both the commutation encoder position and load encoder position be read independently?

Yep – both are readable independently. axis0.pos_estimate / axis0.pos_vel_mapper track whatever’s set as the load encoder, the commutation side is readable via axis0.commutation_mapper (note this will be in motor electrical turns, e.g. 7 electrical turns == 1 mechanical turns), and you can also read any connected encoder’s raw output directly without assigning it to either role.

Is it possible to position Axis 0 using the commutation encoder, then switch to using the load encoder as the motion reference?

No, changes to commutation and load encoders require a reboot. But you could run with the commutation encoder for both commutation+load, and use external PID loop over e.g. CAN, as detailed more below.

Does ODrive support electronic gearing, where Axis 0 follows load encoder movement with a configurable ratio rather than a direct 1:1 relationship?

Hmm, not at the moment. The standard approach is to close the gearing loop from your host: read the linear encoder (either directly on the host, or wire it to the S1 and read it out over CAN/USB) and stream input_pos = ratio * shaft position. A couple hundred Hz over CAN with input_mode POS_FILTER is quite smooth. Additionally, we’ll have user code support soon, which will allow you to flash custom code to the ODrive to run on top of the main motor control stack, so you could write a routine to enable that functionality without requiring the external CAN bus.

Can an axis operate normally from STEP/DIR for positioning, then be switched into an electronic gearing / load-encoder-following mode during a process, before returning to normal position control afterwards? Without requiring reboot

You can do that over CAN or with the upcoming user code support.