This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRV8821: Motor Control Algorithms

Part Number: DRV8821
Other Parts Discussed in Thread: DRV8832, DRV8830

Hi ,

We are working on the stepper motor control and Brushed DC Motor system .

Stepper Motor Control System :

Currently we are evaluating the MCU / controller & stepper motor driver ICs . Below is our development step 

* Stepper Motor with DRV8821 Driver IC controlled by 32-bit ARM controller 

  We need below motor control algorithms support for controlling the stepper motor driver IC for any 32-bit ARM controller 

* Motion Profile Algorithms Source - Trapezoid and S-Curve 

Stepper Motor Control System :

Currently we are evaluating the MCU / controller & Power MOSFETICs for controlling DC Motor based on PWM interface . Below is our design  

* DC Motor through Motor with MOSFET  ( currently not selected ) controlled by 32-bit ARM controller 

  We need below motor control algorithms support for controlling the dc motor for any 32-bit ARM controller 

* Speed Control using RPM Sensing ,  PID Controller and tuning 

* Ramp - generation algorithms 

* Max Speed Limiting based on current limiting 

Thanks 

  • Hello Anil,

    Regarding motion profiles, we only have an example for trapezoidal acceleration profiles for the MSP430 (see this app note).

    Can you please clarify the second set of requirements? Is this for a stepper motor or a DC motor? For a stepper, your speed will be directly controlled by your step rate, so you won't need a sensor. I can check if we have any PID examples, but please let me know which motor you are using.

    For both steppers and DC motors, your maximum speed will typically be limited by the voltage across the windings rather than current. The only time current limiting regulates speed is when the load torque requires the motor to reach an operating point on the torque/speed curve that requires the torque produced at your current limit.

  • Thanks James for your response.

    Sorry the second set of requirements are for DC motor .

    * Speed Control using RPM Sensing , PID Controller and tuning

    * Ramp - generation algorithms for speed ramp up

    * Max speed limiting based on current limiting - Yes , max speed will be limited by the voltage , but as we are using PWM we need to control the PWM duty cycle using speed feedback and also current threshold .
    a. The current limiting shall be considered in speed calculations / PWM duty cycle only when the current reaches above threshold limit
    sensed by some ADC peripheral . Need to understand the algorithms to control the DC Motor PWM duty cycle based on RPM and current feedback if current is above threshold / limit .

    Scenario 1: Current is below the threshold
    a. PWM duty cycle is controlled based on only RPM feedback

    Scenario 2: Current is above the threshold ( Need to understand the algorithm for this scenario )
    a. PWM duty cycle is controlled based on RPM feedback and current feedback
  • Also its Brushed DC Motor
  • Anil,

    For speed control, if you can provide a PWM signal from your MCU, most of our brushed DC motor drivers will work for you. Check out our Brushed DC Drivers with FETs portfolio to see which parts might work for you. For devices that automatically limit the current through the motor coil using PWM, go to the "Features" section, and select the checkbox that says "Current Regulation." If you are interested in sensing the current with your MCU, select "Current Sense Amplifier" and "Current Sense Output" in the features section to review those options.

    If you want to control speed some other way without PWM, you may also consider the DRV8830 and DRV8832. These devices let you select the speed with a pin voltage or I2C.

    I don't think we have any examples for ramping motor speed. The best way to do this is to increase the PWM duty cycle over time to get the performance you need. Alternatively, you could tune your PID controller to achieve the ramping performance you need.

    As for information on PID controllers for brushed DC motors, I found two app notes (here and here). They seem to be a little old, so I would encourage you to post on the C2000 forum for more updated information. I believe the C2000 group has libraries for their MCU products to implement PID controllers for DC motors.

  • Hi Anil,

    Did Mr. James' suggestion resolve your question?

    If so, please close this post by accepting the post is resolved in James' highlighted in yellow answer above me.

    Thanks!