B-G431B-ESC1 with AS5047P (SPI) and CAN Bus via SimpleFOC

I am designing actuator inspired by the project (berkeley-humanoid actuator docs). While their design uses I2C for the encoder and custom firmware for the FOC loop, I want to utilize the AS5047P (datasheet) over SPI for higher bandwidth and accuracy, and the simpleFOC library for control.

I want to run SimpleFOC on the B-G431B-ESC1 with the following requirements:

  • Encoder: AS5047P via SPI.

  • Telemetry: Real-time (position, velocity or torque) setpoints and telemetry over CAN

  • Control: High bandwidth current/torque control loops using simpleFOC

Is this even possible and if so what is the most effective pinout to use both SPI and CAN bus functionality? If this is not possible what is the next best option to achieve my requirements?

Thanks in advance! :slight_smile:

Hello,

I am also experimenting the Berkeley humanoid robot. I have also had difficulty getting the AS5600 encoder to work over I2C when running at high speeds. I found I could get the motor to run in one direction but not backwards. The problem seems to be related to driving over 360 to 0 at high speeds. I also plan to try the AS5047P with the B-G431B-ESC. Did you get it working?