MSP430StepperMotor

From Texas Instruments Wiki
Jump to: navigation, search
Msp430 stepper driver.jpg
This is a simple setup to demonstrate how a MSP430 value line controller can be used to drive a bipolar stepper motor using TIs DRV8836 integrated stepper motor driver ([1]).

The DRV8836 is basically a tiny chip with 4 integrated half bridge drivers, that can drive up to 1.5A.


Feature

The demo project includes a stepper software-module (stepper.c/h)which uses a DDS principle to be able to adjust the motor speed very precise.
For that purpose a Timer is setup to generate an interrupt every 100us. Within the Timer interrupt the "speed value" is added to the phase accumulator. Each time a change in the highest bit is detected, the stepper motor is moved CW or CCW, depending on the direction.

To keep the Software load small, the rotation function is asynchronous, i.e. the motor rotation can be started (parameters: Count of steps/Direction and Speed), and the function returns to program execution, before the rotation is finished.
The rotation can be monitored using a function of the stepper.h module.

Hardware setup

The Hardware setup consisted in my case of a MSP430 Launchpad and DRV8836 EVM.

The connections between both boards was as following:

MSP430 launchpad DRV8836 EVM
GND GND
P2.0 AEN
P2.1 APH
P2.3 BEN
P2.4 BPH


The supply voltage of the motor was supplied into the VM connector of the DRV8836 EVM.

The DRV8836 jumper setting was as shown in this picture:

MSP430 stepper jumpersettings.png

Usage Instructions

The project was implemented using Code Composer Studio.

  • Unzip and import the project using CCS.
  • Adjust the MSP430 type in the Project settings if needed (The project was done for MSP430G2553, but will work with any MSP430 value line controller)
  • rebuild and start debugging



The software does default wise rotate the motor a few times left and right with different speeds.

A short demo video can be found on youtube: [2]


Source Code

File:Msp430 DRV8836 Project.zip

Authors

  • Kai Gossner (k-gossner@ti.com)