Project

# Introduction to Stepper Motors with Trinamic’s TMC2130 Eval Kit

May 15, 2017 by Ryan Jones

## MIT-i takes on stepper motors 101!

MIT-i takes on stepper motors 101!

### Why?

Lately I've been working on designing more of my own hardware. Most recently, I realized I'd like to do some work with stepper motors. When I got to thinking, I realized I've never taught you folks at home what a stepper motor is! Thanks to Trinamic's evaluation platform, we can easily control the one I have and read live data from the driver chip in real time!

Having no time to prepare a DIY vending machine, 3D printer, or camera slider to help you visualize the stepper's movements, I knew I had to put my artistic skills to the test. That's when I came up with my newest addition to the MIT-i family, Frank! Debra really likes him—she makes his head spin!

### How?

So how does a stepper motor work? Think of a stepper motor as a digital version of a DC motor. Stepper motors, instead, divide a full rotation into discrete, individual steps. This number can be 48, 200, or 400 steps, or even more! This makes stepper motors highly precise and reliable.

Another benefit is their holding torque. When steppers are stopped but still powered, their holding torque is strong and reliable, meaning they can maintain their shaft position even under a large load. Because of these characteristics, steppers are the chosen motor for precise applications like robotics, 3D printing, hard disk drives, and much more! If we asked a DC motor to perform the same tasks, the results would be highly scattered and unpredictable.

##### A typical stepper motor. Image courtesy of Digi-Key

The motor I used is 200 step bipolar stepper motor. A bipolar motor has two wires per phase (or winding), so we have a total of four wires. Bipolar steppers need to be driven by full-bridge circuits in order to properly reverse the direction of current within the motor's windings, thus reversing the motor.

unipolar stepper motor, on the other hand, has three wires per phase: two from each end of the winding and another from the center. The addition of the center tap wire allows you to control the direction of the motor with just two transistors. The center-tap wire is connected to the motor drive voltage so that the current can then flow through the winding in either direction, depending on which transistor is in use.

### Testing Out Our Motor Controller

Now that you know the basics, we can use our evaluation kit to control our motors and make our heads spin! All we need to do is plug the Startrampe MCU into the TMC2130 eval board, and we can pop open the IDE and get steppin'! The TMC2130 chip has different operating modes like coolStep, stealthChop, and stallGuard2 which can all be explored within the TMCL IDE.

This platform is designed to control motors easily and view data from various Trinamic motor drivers and motor driver settings to see which works best for your application. Test out the TMC2130, and when you're satisfied, swap it out for the TMC2100 and give that a whirl, too!

##### The Trinamic TMC2130 Eval Kit!

Next, scroll down to "Velocity Mode" and adjust the settings to your desire. Hit the "Play" button and you should be steppin'! To read the live data of your motor driver, head on down to the "Info Graph" section and select "Velocity Graph" to view velocity data in real time. While your graph is open, try playing with the knobs and watch what happens to your graph. Of course, the motor driver boards can all be controlled separately by any MCU that supports SPI.

##### Within the TMCL IDE

As always, thanks for tuning in and remember to share your projects in the comments!

#### Other MIT-i Innovations:

Give this project a try for yourself! Get the BOM.

• Share
1 Comment
• M
malcolmthemole May 26, 2017

nice article BUT WHY does it require hundreds of dollars just to experiment with/

many of us do not have that amount of spare cash

Like.