Linear motor control without the math
To run a stepper motor smoothly, it's necessary to apply linear acceleration. However, conventional algorithms to generate linear acceleration require complicated mathematics, which makes it difficult to implement the algorithms in a field-programmable gate array (FPGA). My colleagues and I, instead,
have used a new algorithm that requires only addition and subtraction, yet produces smooth linear acceleration. This algorithm was first implemented as a C program and tested. Then it was implemented in an FPGA for use in a real application.
The algorithm had its genesis in a project we were doing that required a dedicated controller for a six-axis machine. Each axis was driven by a stepper motor, with speeds up to 100,000 steps per second (with microstepping). For smooth and noiseless movements, stepper motors need to be accelerated (and decelerated) linearly. In other words, the motor speed should increase or decrease linearly, until the desired speed is reached.
Apart from the six axes, the machine also needed many more I/O. So in any case, we needed a good microcontroller. We then tried to look for reference designs for generating linear speed profiles for stepper motors.
We came across a very good article-- "Generate stepper-motor speed profiles in real time" by David Austin (Embedded Systems Programming, January 2005, www.embedded.com/56800129). It suggested a new algorithm that can run on a simple (even 8 bit) microcontroller to generate linear speed profile for stepper motors. However, it probably could not be used to run six motors at once.
To access the rest of this article, click here. Currently the article is only available via the free digital edition of Embedded Systems Design magazine but will be posted in full online at the end of the month.
Note: If you haven't registered for the free digital edition, we've improved the interface for doing so: click the link above, fill out a short form, and view the digital edition (where you can download a PDF if you wish). You only have to sign up once for unlimited access to the digital edition. Questions or comments? Send them to Susan Rambo at firstname.lastname@example.org.