DC Motor Speed Control via RTDX™

This example shows how to control the speed of a DC motor in a closed-loop fashion using C28x peripherals and DMC library blocks.

Required Hardware:

Note: Match the characteristics of the power supply and the amplifier with the input characteristics of the selected motor.

Available versions of this example:

Contents

Model

The following figure shows the DC Motor Speed Control example model.

Description

The target speed of the motor is set by the user in the MATLAB® GUI. The speed setting is sent to the controller code running on the processor via RTDX™. The controller constantly adjusts the duty cycle of the PWM waveform driving the motor to maintain the desired speed. A variable loading of the motor results in variable PWM waveform duty cycle. The speed and PWM duty cycles values are sent via RTDX™ to the host for display in MATLAB®. Note: The GUI allows setting the speed between 0 and 4000. The PID parameters have to be tuned to a specific motor.

Hardware Connections

How to Run the Example