DC motor needs to meet the special requirements of production process automation system. The traditional speed control system has certain defects. This paper uses PWM control technology, which can realize digital signal control analog signal, and can greatly reduce the cost and power consumption. In this paper, the hardware and software of the system are designed. STC80C51 chip and L298 full bridge driver chip are used to process pulse and output control signal to control motor speed. The digital tube displays the speed level, and controls the positive and negative rotation of the motor and the speed increase and decrease of the motor by pressing the key. The design not only improves the use efficiency of the single chip microcomputer, but also has certain anti flying ability.