Abstract:In the process of motor controlling robot, it is found that, under the load condition, it will cause the motor to stop running provided that the motor starts too fast, based on this, it is necessary to develop a method being able to precise control the uniform acceleration. The paper, with the help of STM32F103, achieved the control against stepper motor driver or servo driver by means of its I/O port outputting rectangular wave pulse sequence, so as to control the position and speed of the stepper motor. By modifying the timer value, the trapezoidal acceleration and deceleration trajectory was realized, in this way, the stepping motor could achieve better acceleration and deceleration performance. In addition, since STM32F103 chip was equipped with multichannel timer, which can be configured to output multiplex pulses in different frequencies, so as to achieve the robot control with multiaxis (multiple motors). Such method has a good reference value for the development of embedded stepper motor controller.