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

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?

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.

I bought the same AS5048A from aliexpress and the had same issue. Can you share a picture or an schematic of your solution? I’m not sure where to add the capacitor.


"The magnet’s center axis should be aligned within a displacement radius Rd of 0.25 mm (larger magnets allow more displacement e.g. 0.5 mm) from the defined center of the IC. The magnet may be placed below or above the device. The distance should be chosen such that the magnetic field on the die surface is within the specified limits The typical distance “z” between the magnet and the package surface is 0.5mm to 2.5mm, provided the use of the recommended magnet material and dimensions (6mm x 3mm). Larger distances are possible, as long as the required magnetic field strength stays within the defined limits. "

These strict requirements made me abandon this encoder and use AMT encoders.

My setup was as follows: