ODrive 3.6 56V no beep or motor movement at calibration with AS5048A encoder

Hi,
I bought recently 3 ODrive v3.6 56V that I flashed with firmware version rc-v0.5.1 for AS5048A support.

Configured the AS5048A encoders as specified here: https://github.com/madcowswe/ODrive/blob/rc-v0.5.1/docs/encoders.md

The encoders are connected for SPI/AMS protocol like this.

When I run requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE nothing happen. No beep, no motor movement. dump_errors(odrv0) gives no error.

If I do not configure the encoders and I run requested_state = AXIS_STATE_MOTOR_CALIBRATION the beep happens and the motors are calibrated. After that I save the configuration and reboot the ODrive. I connect the encoder, configure it, save the configuration and reboot. At set requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION nothing happens again. No errors shown with dump_errors(odrv0).

Can somebody help me to understand what happens.

Thank you!

The sensors are in good order. Verified with Arduino Uno and https://github.com/eborghi10/AS5048A/

Apparently there is a problem in the rc-v0.5.1 firmware: https://github.com/madcowswe/ODrive/issues/478

@Wetmelon found the bug! Here’s a link: https://github.com/madcowswe/ODrive/issues/478#issuecomment-686168864.

We will release a binary for rc-v0.5.1 with the hotfix soon. In the meantime, you can compile the firmware from source to see if this fixes your issues. The encoder documentation page will also be updated.

In brief - the SPI peripheral is shared between the motor driver IC’s and external devices. During motor driver initialization, the GPIO for the encoder CS line is in an unknown state. If it goes low, the AS504X may try to transmit data and cause a bus collision. This fix initializes the GPIO for your CS line before the motor driver IC’s are initialized.

Thank you! I’ll try that today.

I flashed the ODrive with the latest version of devel firmware that includes the hotfix. I had almost the same behavior. No shadow_count value change but had ERROR_ENCODER_FAILED. The encoder is in 3.3V operation mode.
After that I added a 22uF/63V electrolytic capacitor from VDD3V terminal to ground. All good now!
shadow_count value changes when moving the motor and no more errors.

This is the encoder that I use. From Aliexpress. Maybe not the best quality?
image

It’s hard to say if the IC itself is the issue, but if it works, it works! Good thinking with additional bus capacitance.

1 Like

I finally bought some AS5048A from Mouser.