| The rapid development of the industrial control system requires increasingly higher precision of the intelligent motor control system,and the various motion status information of the motor needs to be detected in real time to achieve accurate feedback control.Traditional detection systems are implemented through discrete components with low control accuracy and poor portability of the realized solution.This paper aims at the motor speed control system,embeds the motor speed control function into the 8051 microprocessor structure,and implements a 8051-based motor speed control chip under CMOS integrated circuit technology.The main tasks of this paper include:(1)The motor signal detection method based on the photoelectric encoder sensor adopts three methods of speed measurement: M method,T method and M / T method.The motor speed measurement control is combined with the 8051 processor to design a motor speed control chip with motor decoding and three speed measurement methods.By judging the motion state of the motor,the processor performs data processing and analysis,feeds back the results to the motor control,and implements a closed-loop motor control system.At the same time,a variety of speed measurement methods can expand the system functions and enhance the flexibility of use.(2)System design for the chip,the design mainly includes 8051 microprocessor,memory part,memory management unit,QEP(quadrature encoding pulse)module,SPI communication module and PWM output module.QEP(quadrature encoding pulse)module has motor decoding circuit,3 modes of test the speed and watchdog circuit to achieve the goal of decoding and testing the speed of the motor movement come out from the photoelectric encoder;SPI transmission protocol for chip communication;PWM output module with dead zone to help with various PWM waveform output.(3)To analyze the digital circuit part of the chip and implement the circuit of each module.The function of motor decoding and speed-testing is being paid attention to analyze the scheme and put the motor decoding and motor speed-testing in the same module.The decoded data information was sent to the motor speed-testing module,which was configured in advance by the CPU to test and count the decoded date.For the SPI communication interface,the four-wire SPI communication protocol is being used to make the SPI communication protocol more adaptable.With the software and hardware collaborative design,the CS signal is completely controlled by software.The CS signal and the transmission signal are being separated independently.According to the timing requirements,the adaptability of SPI can be flexibly configured through software and be greatly enhanced.The PWM module outputs a PWM waveform with a dead zone,in which the period,duty cycle,and width of the dead zone can be configured by software.Having finished the design,RTL simulation is being performed on every digital modules of the chip and the simulation results are being analyzed.When the simulation results meet the requirements of design,the FPGA verification stage is being carried out.The FPGA verification platform is to be made and the design is being imported into the FPGA chip for verification,and the design is being analyzed by external serial port display and oscilloscope to capture the key signals,demonstrated the feasibility of the design.The research content of the paper provides a certain reference value for the realization of motor speed measurement control system based on optical encoder sensor. |