Tuesday, November 10, 2015

DC Motor Control using PWM for Speed Control

In this exercise, we use DC Motor control using PWM for speed control. The electronic driver is called an H-Bridge that will allow the motor to turn either way if hooked up properly. That will be shown in a follow-on Blog entry.

We us a 31162MP H-Driver as hooked up to the Raspberry Pi 2B as shown:
https://www.dropbox.com/s/c0xvxc32x4q75tn/hDrivePi.pptx?dl=0

The specification for the 31162MP H-Driver board is:
https://www.dropbox.com/s/m2cym0tm2e7c2f4/31162mp-Hdriver.pdf?dl=0

Test code using a single speed is shown below. The speed can be set depending on the PWM pulse width of 0-1023. Below a value of about 150, the motor may not turn.
https://www.dropbox.com/s/p5e6wjhjwrra2s2/pwmtest1.c?dl=0


No comments:

Post a Comment