Connect Hall and incremental encoder


Hi, my BLDC servo motor has both internal hall sensors and an incremental encoder (see info below)

Can I connect both sensors to Odrive? I need to connect two of these motors.

Is the firmware ready to handle the input from both sources? Or if not: Can I configure the firmware to use the hall information for initial positioning and then go with the more precise incremental encoder?

I must avoid an index search on startup as that would move a big robot without control.



I don’t think you can implement both Hall sensors and encoders. I believe the encoder option is the better of the two.


The encoder does have higher resolution, but since it’s incremental the startup position is unknown. I can’t do an index search because this is the traction motor of a heavy robot. Wouldn’t that be a problem?


We actually made a feature to solve this exact situation for a client with the exact same situation. We haven’t had time to merge it back into the main codebase yet.

The idea is to use an arbitrary hall signal as the index pulse: the rising edge of the hall signal will be in a repeatable location, but you must find it with a known rotation direction (left/right will be rising/falling or swapped depending on rotation direction). So we do a small lock-in drive in a known direction, then look at the rising edge of this hall signal (plugged into the index input).

You can check out the feature branch here, and the script with the settings required.

Encoder seems to work, but ERROR_CPR_OUT_OF_RANGE on offset calibration