Lab #2 Stepper Rotation Experiments
Introduction:
After this lab, the user will have gathered basic knowledge on how to control the stepper as a rotation device. Features to learn are rotation direction and speed.
Objectives:
Making it rotate:
Steppers are known for their speed control capability. Because the user supplies the signals which magnetizes the coil windings, which in turn move the rotor shaft, it is easy to specify how fast these signal transitions are administered.
In this case, the user has to worry not of how to administer the phase signals as the SS-ST68 controller makes the tedious and complicated task totally transparent. Hence, the SS-ST68 is nothing more than a command interpreter. Commands coming from the PC computer (or any other serial command based master controller) are interpreted by the microcontroller on the SS-ST68 and the phase signals are generated.
There is no better way of getting to see this than by actually doing it so, lets get going! In the previous experiment, you already configured the communication port, set all voltages properly and started the Super Stepper Test Application. Follow the next steps to get acquainted with speed control.
Now to change the speed:
![]() |
How does this work? What has happened? The microcontroller has an internal timer utilized to generate the steps. The number we feed the controller is how much time will pass from one step to the next. So, if this number is larger it means that the steps take longer to happen. That is why you were able to observe the motor rotate at a slower rate.
![]() |
It may become clearer by analyzing the picture above. It shows how steps are formed. Every time a transition occurs, whereas it is on Phase A or on Phase B, the stepper moves one step. Internally, each step is made from timer ticks, as can be seen on the right side. The Speed parameter specifies how many of these timer ticks are accomodated on each step. Then, as we said before, the more timer ticks forming a step, the longer in time it takes for a transition to happen. Less transitions per unit of time then relates to slower speed. Got it now?
How can we benefit from this speed parameter? This is the parameter you need to change to alter rotation speed. It is the same parameter used for all stepper rotation operation regardless of direction (clockwise or counterclockwise). Advanced users may want to know that this parameter is actually a word (16 bit data packet) send to the board along with the command. Beginners should not worry about such detail at this stage.
There is an equation which will prove most useful at the time of specifying the desired speed. Since most steppers are commanded to rotate at a rate better known as revolutions per minute, the equation yields the Speed Parameter that needs to be passed on the instruction in order to obtain a particular RPM output. The equation is:
SpeedParameter (16bit) = (240,000,000) / (RPM * Steps Per Revolution * SpeedRate)
where:
Having an equation complicates things and definitely is by no means a topic for this easy to follow tutorial. That is why the Super Stepper Test Application contains a tool to help you here.
![]() |
If you had a tachometer (which unfortunately can not be supplied with the starter kit due to the extra cost), you would be measuring the shaft to be moving at a 100 revolutions per minute. So lets try and move the motor way slower so that it can be corroborated with our crude lab equipment, such as any conventional stop watch you may have handy.
![]() |
You are an expert now! Controlling speed could not be easier! You may be wondering how about direction? Everything we have discussed applies to the opposite direction rotation as well. Play around with the “Turn CCW Speed” frame and prove it all works the same but with opposite direction.
Congratulations!!! You have successfully completed the second lab on the Super Stepper Architecture. You are now capable of controlling the speed of rotation of stepper motor!
Hungry for more? Next topic is controlling the stepper position.
Last Updated on Jan 10, 2008
Other Avayanic Web Sites