Using Servo Block with Simulink IO
Mostrar comentarios más antiguos
Simulink IO currently supports the PWM output block in Normal mode, but I need to control a servo. The PWM output is at 1Khz, but a servo typically uses 50Hz. Is there any way to change the PWM frequency? My servos don't recogize 1Khz. I'm currently using a second Arduino to down convert 1Khz PWM to 50 Hz, but of course slows down the real time simulation.
Respuestas (1)
Arun Kumar
el 25 de Sept. de 2019
0 votos
Hi Jeff,
With Simulink IO, it is not possible to change the PWM frequency.
But for changing PWM frequency in external mode or deploy to hardware, there is a workaroud.
Use this Simulink library to change frequency on Arduino AVR boards. Note that this workaround will not work for Arduino ARM boards like Due/MKR1000.
Request for supporting variable PWM frequnecy on arduino is under consideration.
3 comentarios
Jeff Dillon
el 16 de En. de 2020
Arun Kumar
el 31 de Mzo. de 2020
Hi Jeff,
The feature is available in R2020a.
Jeff Dillon
el 1 de Abr. de 2020
Categorías
Más información sobre Arduino Hardware en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!