How to control PWM servo driver for arduino from Simulink?

9 views (last 30 days)
I'm looking for libraries/support to control a PWM driver module (PCA9685) connected to arduino from Simulink. I'm not very skilled with the Arduino add on, so I don't really know how to send I2C commands to the module fromSimulink.

Answers (1)

Shreshth
Shreshth on 20 Aug 2024
Hello Yash,
I understand that you want to control the motor driver by sending the I2C commands to the module from MATLAB.
For this you can install the "Simulink support package for Arduino" where the availible (PCA9685) motor blocks will be able to send I2C commands to Simulink.
Here is the link for the Mathworks example and the simulink support package for Arduino:
Thanks.
  1 Comment
Devni
Devni on 11 Sep 2024
but it only allows to control 4 motor channels with the pca9685 dc motor block. Is there a way to control 16 motors with it? I have tried to run a custom matlab function to do the job, but seems like the communication with pca9685 via i2c write block is not effecient. As I understood there should be some initial configuration needs to be done with pca9685 before controling the servos. is there any other way to do this?

Sign in to comment.

Categories

Find more on Arduino Hardware in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!