Motion Control - Embedded Programing On-line Course
Controlling stepper motors can be as simple as generating proper phase signals for the driver.
However, this will typically only work for general testing and once the motor is used to put in motion
some kind of the machine the physical and mechanical constraints have to be taken into the account.
Physical and Mechanical effects
Good overview of the physical constraints can be found in the classical "Jones on Stepping Motors" chapter
2. Stepping Motor Physics
Which introduces the reader to the static properties of the stepper motor like: half-stepping and microstepping,
friction and the dead zone as well as motor dynamics including: resonance, torque versus speed curve
and even some electromagnetic issues.
Knowing the physics behind any device will help to understand why it is controlled in a certain way.
However, stepper motors can be used with just the intuitive knowledge of the real world.
Mechanical constraints on the movement typically come from the actual machine and include
rotary (Extruder) or linear motion ( X,Y and Z axis), range of motion either unlimited like the
Extruder or limited by the dimensions of the machine gantry.
Dynamics or Kinematics of the stepper motor and the assembly dictate how the movement should be controlled
in time from the point of view of software.
All the aspects of the stepper motor control have to be taken into the account
in the part of the software which is responsible for machine motion and
which is called Motion Control.
What exactly does Motion Control do? As it turns out machine movement can be broken down
into a number of linear movements which approximate the ideal path of the machine.
This approximation is the key to the quality of the parts being made by the 3D printer.
Straight lines or walls are easy the approximate but the more complicated parts
require large number of small linear segments like for example a circle.
Motion control is responsible for planning the machine path then approximating it
by breaking it into linear segments and finally coordinating machine movement according
to the motion plan. Typically detailed motion plan is generated for a single Motion
Path describing coordinated movement from point A to point B
Breaking the movement into linear segments is the first step in motion path planning.
Each segment corresponds to a single motion that the machine has to make but it does
does not yet describe how this motion has to be made. At this point it would possible
to run the machine but the movement would have to very slow because it would be done
with the same speed! It is becoming clear that in addition to the geometric information
in the linear segments the motion path planning has to provide information on the "
speed profile" along each of the linear segments.
The simplest speed profile would use linear ramp to accelerate movement to a maximum speed,
then continue the movement at a constant speed and finally decelerate down to 0.
Here is the graphical representation of the linear ramp.