AS5047p ABS_SPI_COM_FAIL

I have connected the as5047p to the ODrive for both the motors as per the info available mosi to 3.3 miso shared connected to miso of odrive and clk shared to sck of odrive and cs pins to gpio 4and 5 the encoder is connected to 3.3v and ground to GND of odrive the axis 0 is working properly and but for axis 1 while performing the encoder calibration it is returning the spi com fail I have checked the pos estimate and I am getting the values but as soon as I start the encoder calibration starts it is showing error
strange thing is that for axis0 it is working and for axis1 it is not
board v3.6 56v

dump_errors(odrv0)

system: no error

axis0

axis: no error

motor: no error

DRV fault: none

sensorless_estimator: no error

encoder: no error

controller: no error

axis1

axis: no error

motor: no error

DRV fault: none

sensorless_estimator: no error

encoder: no error

controller: no error

In [145]: print(odrv0.axis1.encoder.pos_estimate)

0.4637737274169922

In [146]: print(odrv0.axis1.encoder.pos_estimate)

0.3616199493408203

In [147]: print(odrv0.axis1.encoder.pos_estimate)

0.31476879119873047

In [148]: odrv0.axis1.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION

In [149]: dump_errors(odrv0)

system: no error

axis0

axis: no error

motor: no error

DRV fault: none

sensorless_estimator: no error

encoder: no error

controller: no error

axis1

axis: Error(s):

AxisError.ENCODER_FAILED

motor: no error

DRV fault: none

sensorless_estimator: no error

encoder: Error(s):

EncoderError.ABS_SPI_COM_FAIL

controller: no error

please help me fix this

Can you post a picture of your wiring?

On v3.6, axis 1 is more susceptable to EMI, so you have to be very careful with your wiring, ideally using a shielded cable for the encoder and using ferrite rings on the motor to reduce the EMI output

1 Like