Speed measurement is an important technology in modern industrial production, and the complex and changing external environment has put forward higher requirements for the design of motor speed monitoring. Based on the non-contact monitoring and measuring environment, it is proposed to use microcontroller to measure the real-time rotational speed of DC motor by photoelectric sensor, use microcontroller as the measuring control chip, use photoelectric encoder to measure the real-time rotational speed of motor, set the adjustable speed alarm value by key, the real-time rotational speed of motor can be displayed on LCD1602 screen simultaneously, and finally use buzzer and LED light to alarm. The design includes system hardware device selection, hardware circuit design, system software debugging, and finally realizes the function of motor speed monitoring and overspeed alarm. This design has certain significance for high-speed motor speed monitoring in non-contact environment.