Controlling Stepper Motors with Trinamic’s TMC2130 Eval Kit
2017-05-16 | By All About Circuits
License: See Original Project
Courtesy of All About Circuits
Trinamic's evaluation platforms make it easy to control stepper motors and test out the motor driver IC you need for your next project!
Bill of Materials
- Trinamic's TMC2130 Evaluation Kit
- Startrampe MCU Board
- TMC2130 Eval Board
- Interconnecting PCB
- 12V Stepper Motor
- Stepper Bracket
- 12V Power Supply
- TMCL IDE and PC Computer
Why?
I've been working on designing more of my own hardware lately. I realized that wanted to do some work with stepper motors. When I got to thinking, I realized that I've never taught you folks at home what a stepper motor is! Thanks to Trinamic's evaluation platform, we can easily control the stepper motor I had laying around 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 visualize the stepper's movements, I knew I’d have to put my artistic skills to the test. That's when I came up with Frank, my newest addition to the MIT-i family! Debra really likes him, she makes his head spin!
Frank and Me
How?
So how does a stepper motor work? Think of a stepper motor as the digital version of a DC motor. Stepper motors divide a full rotation into discrete, individual steps. This number can be 48, 200, 400 steps, or even more! This makes stepper motors highly precise and reliable. Another benefit of stepper motors is their holding torque.
When steppers are stopped, but still powered, their holding torque is strong and reliable. They can maintain their shaft position even under large loads. Because of these characteristics, steppers are the motor of choice for precise applications like robotics, automated factories, 3D printing, hard disk drives, and much more! If we tried to use DC motors to perform the same tasks, the results would be scattered and unpredictable.
A typical stepper motor
I used a 200 step bipolar stepper motor. Bipolar motors have two wires per phase (or winding), so they have a total of four wires. Bipolar steppers need to be driven by full-bridge circuits so they can reverse the direction of current within the motor's windings, in order to reverse the motor.
A unipolar stepper motor has three wires per phase instead: one from the center and two from each end of the winding. The addition of the center tap wire allows you to control the motor’s direction with just two transistors. The center-tap wire is connected to the motor drive voltage. This allows the current to flow through the winding in either direction, depending on which transistor is in use.
Bipolar vs Unipolar
Now that you know the basics, let’s use Trinamic's evaluation kits to control our motors and make our plates/heads spin! With the TMC2130 Eval Kit, all we need to do is plug the Startrampe MCU into the TMC2130 Eval board. Next, we pop open the IDE and get to steppin'! The TMC2130 chip’s operating modes have cool names like stealthChop, coolStep, and stallGuard2 which can be explored within the TMCL IDE.
The platform was 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 with your results, swap it out for the TMC2100 and give it a whirl as well!
The Trinamic TMC2130 Eval Kit!
After that, scroll down to "Velocity Mode" and adjust the settings to your desire. Hit the "Play" button and your motor should be steppin'! To read the live data from your Trinamic motor driver, go 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 see what happens to your graph. Of course, the motor driver boards can all be controlled separately by any MCU that supports SPI.
Thanks for tuning in, and remember to always share your projects!