Motor Configuration Issue

Hi

I am using an odrive pro to control the motor below:

I get pole pair mismatch error for the following configuration:

Error Output:

I am using an AS5047p SPI encoder, while calibrating the motor rotates before giving the error.

Could you please help in setting up the right configuration for position control?

Thanks…

Hi - let’s please keep this in one thread so that things can stay organized.

Can you show how your SPI encoder is mounted over the motor’s shaft magnet? I’m guessing you have some error or misalignment there that’s causing this issue.

Also note that your motor is rated for 8A max, but you set the motor’s current limit to 30A. I’d recommend reducing that to 8A, as well as the calibration current and calibration lock-in current.

Some pictures would be greatly appreciated.

Hi

Was able to get it to work via web GUI, works like I wanted. Thanks again :blush:

Great to hear! What was the fix?

I am guessing the odrive uses 3.3v logic for AS5047p Spi encoders. Am I right or was I lucky to get it working?

The Spi encoders were connected to 5v initially, it worked on an Arduino setup. So I assumed it would work on the odrive, but I would get NO RESPONSE or Pole Pair Error.

So tried with powering the encoders with 3.3v and it worked :blush:!

Next step is to read the position estimates in real time via CAN any suggestions for the best way to go about it?

Below is the current setup:

“Disclosure: Patent Pending (PCT Application Filed)”

Thanks again…!

I am guessing the odrive uses 3.3v logic for AS5047p Spi encoders. Am I right or was I lucky to get it working?

Exactly!

So tried with powering the encoders with 3.3v and it worked :blush:!

Wonderful!

Next step is to read the position estimates in real time via CAN any suggestions for the best way to go about it?

Do you need to do this on a microcontroller or on a PC?

I need to do it on a PC running Ubuntu 20.04( it’s a Nvidia’s jetson AGX Xavier, an ARM based processor)

In that case, you can use a USB-CAN adapter or directly connect a CAN transciever to the Jetson’s CAN pins, just note you will need to install SocketCAN drivers: CAN Bus Guide — ODrive Documentation 0.6.11 documentation

From there, you just have to listen to the Get_Encoder_Estimates message, which you can configure as an automatically-sent cyclic message.

https://docs.odriverobotics.com/v/latest/guides/can-guide.html

https://docs.odriverobotics.com/v/latest/manual/can-protocol.html

Hi ,

Thanks for the reply.

Also could you please provide a clarification concerning built-in Hall Encoder of motor, does it actually require reconfiguration each time after a power rest?

No, halls don’t need recalibration on startup (only incremental encoders do), however note they’re pretty low resolution, so you’ll want to use a higher resolution if possible, for good position control.