Microchip Technology DM164130-2 Data Sheet

Page of 60
The Bipolar Stepper Add-on Board
 2012 Microchip Technology Inc.
DS41629A-page 39
4.6.2
Optimizing DUTY_SCALE and SPEED_SCALING_CONST
The DUTY_SCALE and SPEED_SCALING_CONST are the slope constants of the two 
equations that determine the drive voltage and commutation rate for any given speed 
request input. Optimization involves controlling the speed and drive voltage indepen-
dently to determine the line endpoints. The slope constants can then be calculated from 
the endpoints.
The purpose of this exercise is to determine the parameters that will limit the drive cur-
rent over the operating speed range. Therefore, it is necessary to monitor the supply 
current during optimization. Use the following steps to experiment with your motor opti-
mization:
1. Establish the link between the F1LVDemo application and the F1 LV Evaluation 
2. In the Parameters tab verify that the Deg Per Step value matches that of the 
motor and change it, if necessary. The supplied Leadshine motor has 1.8 
degrees per step.
3. In the Parameters tab, select the desired Step mode: Wave, Full, or Half. Micro-
step is not a valid step mode during optimization.
4. In the Operate tab, select Open-Loop mode.
5. Set the Speed slider control to 25.
6. Slowly increase the % Drive slider control until the motor starts rotating smoothly. 
Observe that the supply current is well below the maximum rating for the motor.
7. Increase the Speed slider until the motor slows or runs erratically.
8. Increase the % Drive until the motor again starts running smoothly.
9. Repeat steps 5 and 6 until no further increase in speed and drive level can be 
achieved. For example: Upon reaching 100% in the drive level or when increas-
ing the speed causes erratic operation possibly accompanied by increased cur-
rent draw.
10. When the maximum speed and current is achieved, click on the RPM label and 
note the RPM indicated. This is the value to be entered in the maximum RPM 
parameter of the Parameters tab.
11. Note the maximum Drive % obtained. This is the value to enter in the Max Duty 
% parameter of the Parameters tab.
12. Press the STOP button.
13. Enter the parameters noted in steps 10 and 11. Enter 0 as the Min Duty %.
14. Enter 3 and 2 as the respective initial Run/Stop Percent values. The motor will 
run when the Drive % value is above the Run value and stop operating when the 
Drive % value is below the Stop value.
15. Select Closed-Loop mode and try operating the motor with the Speed slider con-
trol.
16.  If the motor operation changes smoothly over the entire operating range and cur-
rent stays reasonably constant then optimization is complete.
17.  If the motor runs erratically at slow speed then note the drive level at which the 
motor runs smoothly and enter that value as the Run start value. Enter a value 
slightly lower than the Run value in the Stop value and repeat steps 15 and 16. 
The low speed drive can be increased by increasing the Min Duty parameter to 
equal the Run percent start value.