Stepper motor is a common electromagnetic device, the corresponding circuit of control and driver, effective algorithm of acceleration and deceleration play a very important role in improving overall performance. Many advantages were achieved using the control system based on ATMEGA128, such as higher simplicity, low cost, high reliability, high torque at low speeds, and high motion accuracy. At the same time, by using algorithm of acceleration and deceleration, the efficiency of stepper motor is further enhanced, and the actual effect of control of stepper motor is smooth and has good results.