ODrive Matlab/Simulink

Does anyone have experience with programming the ODrive through Matlab/Simulink. My idea was to use Simulink to control a motor with Arduino Mega2560 and CAN bus shield MCP2515. Matlab/Simulink has a support package for Arduino.

Hi! I don’t think you’ll get very good performance with that unfortunately, Matlab’s Arduino package is really really slow. You could use serial or CAN from Simulink via a USB-serial or USB-can adapter to talk directly with the ODrive.

2 Likes

Thank you for the reply. Yeah I switched to using serial from Simulink to arduino and then CAN from arduino to ODrive and my first test program already worked. I just need to go over the code and make some changes so that it will run better.

Great to hear!

1 Like