cancel
Showing results for 
Search instead for 
Did you mean: 

SPI encoder implementation.

JStrz.1
Associate

Hi

I am looking for hints - how to implement the encoder from which I read the position via SPI?

Should I set the encoder with index in Motor Control Workbench? If so, where to write the position read after SPI to "pretend" an ordinary encoder? I also see that the encoder index (Z) raises an exception - this is where the motor speed is taken? Generally I want to use the motor in position mode with torque control.

Have any of you already run the SPI encoder with MCW?

3 REPLIES 3
TDK
Guru

Does the encoder have an SP interface? They typically do not.

If you feel a post has answered your question, please click "Accept as Solution".
JStrz.1
Associate

Of course the encoder has an SPI. It's AS5147. I wrote a library for it and works beautifully in SPI interrupts with F446.

My question is where to overwrite current angle values in MCW generated libraries? And since it needs position control, I assume that the original encoder setting with index a is correct. However, for the proper operation of the application, I must replace the counting of pulses from the encoder by systematically substituting the angle value readed via SPI. Initially looking at the code, but I'm starting to wonder if I need the Motor Control Workbench in FULL version?

And if so - what are the conditions for receiving it? I applied once and was rejected.

Hi JStrz 1, I am also using same sensor but with stm32g474 MCU. Can you please send basic working Library AS5147 to tahirgavli@gmail.com