I am trying to use matlab support package for raspberry pi to control a motor board

2 vues (au cours des 30 derniers jours)
Shima
Shima le 12 Fév 2018
Commenté : Shima le 15 Fév 2018
I am trying to control a motor card using Raspberry Pi support package. Has anyone done this before? I am using the mdd10a control board which requires a PWM signal as well as a left vs right boolean signal. Any help would be appreciated.

Réponses (1)

Shashank
Shashank le 15 Fév 2018
Hi Shima,
To do this, you can use 2 GPIO pins on the raspberry pi. Please refer to the following link for the overall workflow:
1. All the pins support PWM, configure a pin for PWM using configurePin
2. Write Duty cycle and frequency to that pin. Refer to the example here:
On the other pin, you can write the boolean flag you want using writeDigitalPin
Hope this helps
  1 commentaire
Shima
Shima le 15 Fév 2018
Hello! Thank you for your note. I am using Simulink and I was able to use pins 17 and 22 for PWM and DIR (direction) to control the motor. The issue I am encountering is that despite changing the available settings on the PWM generator block, the motor moves at a steady state. In another words, varying the duty cycle does change the speed of the motor but does not slow it down as much as needed. any ideas?

Connectez-vous pour commenter.

Communautés

Plus de réponses dans  Power Electronics Control

Catégories

En savoir plus sur MATLAB Support Package for Raspberry Pi Hardware dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by