Haptic interface and Avoiding encoder with no index calibration

Hi Guys,

I am currently trying to build a haptic interface using ODrive (Board v3.3, motor N5065 and J733 encoder). You can see my (not final) set up on the pictures below. As you can see, the interface will have the form of a pantograph, which means that it is a closed loop set up.
I am sending commands to the ODrive via UART and a Raspberry Pi 3B+ (I have adapted the Arduino code for that).
The problem is that I want to skip the encoder calibration because it will go against the pantograph structure and possibly break it.
So here is what I am trying to do:
I command the motors with the current mode and I wish to use the encoders mostly for the anticogging feature. I will have a reference position known that I will use as my zero position for the encoder (this is why I don’t actually need an encoder with index). As for the anticogging calibration I am planning to do it once, to save the map on my raspberry, and to fix the pantograph on the motor afterward. So the problem comes from the encoder offset calibration. I tried to skip it in the code by setting the startup_encoder_calibration to false in the AxisConfig (axis.hpp) and by setting use_index to false and pre_calibrated to true in the Encoder config (Encoder.hpp). Then I also force the variable is_ready to true in order to be able to be in the AXIS_STATE_CLOSED_LOOP_CONTROL mode.
When I check the errors (axis, motor and encoder error) I have none, but then the motors do not spin when I send a current command, but you can feel some resistance when you try to turn them manually.

So is there any way to avoid the encoder calibration at every start-up (it would break my pantograph) and still use the encoder ? Or if it is really necessary is there a way to make the calibration manually?

On the other hand, I tried to use the motors with the default setting with the encoder calibration, then I can make the motors spin once and after that I have an Axis error 49 (in decimal) which corresponds to nothing in the error list in hex.
I get this error when I send "r axis0.error\n" to Odrive via UART.


The encoder calibration is mandatory, it is required to drive the current in the motor correctly.

You can get an encoder with an index pulse and line up the index with a reachable location?

Thanks for your answer ! I might eventually do that.

As for the error 49 that I mentionned, it corresponds to the error 0x31 that is also mentionned here. But I have it with the encoder mode, not the sensorless one. I guess that it also is a tuning issue ?
It was working all right with the default gains with the last firmware version though.

Thanks again!

1 Like

@madcowswe can we use a seperate proximity sensor as an index pulse?
I am trying to do this but getting index pulse found as false.