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.

1 Like

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.


I have incremental encoder (4096 CPR) and halls (96 CPR).

Is it possible to route the halls to the GPIO and then follow the “index search” procedure but interrupt on hall state change?

On a hall state change the electrical phase position is known and commutation can switch to use the incremental encoder. This technique is used in other sinusoidal motor amps such as Elmo and RoboteQ.

“do a small lock-in drive in a known direction”, that means the motor still need to spin a bit before actual use? I have the same problem as lalten, the motor is mounted on heavy load and calibration/search need to be avoided. Is it possible to use the GPIO to read the HALL at every startup instead?