A CNC machine tool grating ruler contamination monitoring and cleaning device

By combining an STM32F103 microcontroller and an ESP32 camera WiFi module with a high-precision guide rail and lead screw, a CNC machine tool grating ruler contamination monitoring and cleaning device was developed. This solved the machine tool alarm problem caused by grating ruler contamination, enabling real-time monitoring and efficient cleaning, thus improving processing efficiency and quality.

CN224436784UActive Publication Date: 2026-06-30HI TECH HEAVY INDUSTRY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
HI TECH HEAVY INDUSTRY CO LTD
Filing Date
2025-06-24
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

In existing technologies, grating rulers are easily affected by contaminants, resulting in inaccurate readings, difficulty in real-time monitoring and thorough cleaning, and impacting the quality and efficiency of machine tool processing.

Method used

Using an STM32F103 microcontroller main control board, an ESP32 camera WiFi module, and a high-pressure cleaning liquid-gas mixing control device, combined with high-precision guide rails and lead screws, the system achieves real-time monitoring and automatic cleaning of the grating ruler. Images captured by the camera are transmitted to a display terminal, allowing for remote control of the cleaning mechanism.

Benefits of technology

It enables real-time monitoring and efficient cleaning of grating ruler contamination, avoiding machine tool alarms and shutdowns, and improving processing efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224436784U_ABST
    Figure CN224436784U_ABST
Patent Text Reader

Abstract

This utility model relates to the field of CNC machine tool grating ruler contamination monitoring and cleaning maintenance technology. A CNC machine tool grating ruler contamination monitoring and cleaning device includes an STM32F103 microcontroller main control board, a viewing mechanism, and a cleaning mechanism. The viewing mechanism uses an ESP32 camera WiFi module, which is connected to the STM32F103 microcontroller via a communication port. The cleaning mechanism includes a high-pressure cleaning liquid-gas mixing control device and a cleaning nozzle. The STM32F103 microcontroller has a cleaning function I / O control interface connected to the high-pressure cleaning liquid output control valve and the high-pressure cleaning gas output control valve of the high-pressure cleaning liquid-gas mixing control device. The output pipes of the high-pressure cleaning liquid output control valve and the high-pressure cleaning gas output control valve are connected to a high-pressure gas and cleaning liquid mixing chamber, and the output end of the mixing chamber is connected to the cleaning nozzle. This utility model can monitor the grating ruler contamination status in real time and clean the grating ruler when contamination occurs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This utility model relates to the monitoring and cleaning of contamination on CNC machine tool grating rulers, and in particular to a device for monitoring and cleaning contamination on grating rulers, which can monitor the contamination status of CNC machine tool grating rulers and perform cleaning and maintenance. Background Technology

[0002] An optical grating ruler is a sensor that uses the optical principle of an optical grating to accurately measure machine tool displacement by reading the moiré fringes of the grating, providing accurate position feedback signals to the CNC system. Optical grating rulers are commonly used in closed-loop servo systems of CNC machine tools for linear displacement detection, thereby ensuring the machining accuracy of the machine tool. As a crucial position detection element, its accuracy and stability directly affect machining quality and play a key role in the machining precision of the machine tool. However, in actual production processes, optical grating rulers are highly susceptible to the effects of harsh environmental contaminants such as cutting fluid, chips, and dust. These contaminants adhere to the surface of the optical grating ruler, causing inaccurate readings, machine tool alarms and shutdowns, and even machine tool malfunctions, severely impacting machining quality and production efficiency.

[0003] Currently, most cleaning of grating rulers is done manually. This method is not only inefficient but also difficult to monitor in real time. Furthermore, the cleaning effect is hard to guarantee, especially for hard-to-reach areas, where cleaning is often incomplete. Additionally, operators cannot observe the cleaning process in real time, making it difficult to determine whether cleaning is complete or if any residual contaminants remain. Therefore, designing a programmable monitoring device that can monitor the contamination status of grating rulers in real time and efficiently clean them to prevent CNC machine tool alarms and shutdowns caused by grating ruler contamination is of significant practical importance.

[0004] Utility model patent application number 202110582475.6 discloses a cleaning device for linear grating rulers. Guide blocks are provided at the left and right ends of the base, and a connecting plate is provided at the lower end of the base. Fixing seats are provided at the left and right ends of the connecting plate, and the fixing seats are connected to an adjusting plate. A limiting block is provided at the front end of the adjusting plate, and the limiting block is connected to a cleaning tool via a fixing screw. A first observation hole is provided on the base, and a second observation hole is provided on the adjusting plate. The first and second observation holes are coaxially arranged. This utility model allows for the inspection of the grating ruler's operating status during routine maintenance using auxiliary optical imaging tools and other equipment through the observation holes provided in the grating ruler cleaning device. When the grating ruler is contaminated, it can be quickly cleaned using the grating ruler cleaning device without requiring complete disassembly, reducing working time and avoiding secondary damage and accuracy loss caused by disassembly. However, the use of this utility model still requires manual observation, and although an automatic cleaning tool is used, the cleaning effect is difficult to guarantee.

[0005] Utility model patent application No. 202410160034.0 discloses a predictive maintenance system and method for CNC machine tools based on edge-cloud collaboration. The system includes an application terminal, an edge computing layer, and a cloud platform. The application terminal collects data on machine tool operation, tool wear / breakage, and the machining environment, and transmits this data to the edge computing layer. The edge computing layer cleans and stores the data, monitors the real-time status of the machine tool, tools, and environment based on the cleaned and stored data, and identifies faults. The cloud platform performs in-depth processing and sharing of the cleaned and stored data, establishes and trains a predictive model, and generates machine tool analysis results based on the predictive model. Through edge-cloud collaboration, the system monitors the operating status of CNC machine tools in real time, detects anomalies or potential problems, and responds quickly, reducing production downtime caused by faults, lowering equipment maintenance costs, and improving equipment availability. However, this patent focuses on fault identification and cannot address the issue of CNC machine tool alarm shutdown caused by grating ruler contamination when a contamination alarm occurs.

[0006] Utility model patent application No. 202411011934.5 proposes a remote monitoring method and device for CNC machine tools. The method includes collecting front-end data based on multiple sensors installed on the CNC machine tool, processing the front-end data using an edge computing gateway, and uploading the processed valid data to a cloud platform via a network. Based on the cloud platform, the front-end data is analyzed and visualized, providing strong support for remote monitoring and intelligent management of CNC machine tools. However, this utility model, when applied to grating sensors, still suffers from the aforementioned problems and cannot solve the fundamental issue. Summary of the Invention

[0007] This invention addresses the shortcomings of existing technologies by proposing a CNC machine tool grating ruler contamination monitoring and cleaning device, which can monitor the contamination status of the grating ruler in real time and clean the grating ruler when contamination occurs on the equipment.

[0008] The technical solution adopted in this utility model is as follows:

[0009] A CNC machine tool grating ruler contamination monitoring and cleaning device, comprising an STM32F103 microcontroller main control board, a viewing mechanism, and a cleaning mechanism, characterized in that:

[0010] The viewing mechanism uses an ESP32 camera WiFi module, which is connected to an STM32F103 microcontroller via a communication port.

[0011] The cleaning mechanism includes a high-pressure cleaning liquid-gas mixing control device and a cleaning nozzle. The STM32F103 microcontroller is equipped with a cleaning function I / O control interface, which is connected to the high-pressure cleaning liquid output control valve and the high-pressure cleaning gas output control valve of the high-pressure cleaning liquid-gas mixing control device respectively. The output pipes of the high-pressure cleaning liquid output control valve and the high-pressure cleaning gas output control valve are connected to the high-pressure gas and cleaning liquid mixing chamber, and the output end of the mixing chamber is connected to the cleaning nozzle.

[0012] The aforementioned CNC machine tool grating ruler contamination monitoring and cleaning device includes a cleaning inspection device lifting structure. This lifting structure utilizes a lead screw and slider mounted within a high-precision guide rail, which is parallel to the grating ruler. The drive mechanism employs a closed-loop integrated stepper motor. An STM32F103 microcontroller with corresponding functional I / O interfaces connects to the stepper motor. The stepper motor's output shaft is connected to the lead screw. A camera and cleaning nozzle mounting bracket are fixed to the slider. A limit switch mounting plate is provided corresponding to the camera and cleaning nozzle mounting bracket to install limit switches, which are electrically connected to the STM32F103 microcontroller. The moving parts of the cleaning mechanism utilize high-precision guide rails and lead screws, enabling precise control of the cleaning head's movement on the grating ruler surface, ensuring uniform cleaning results without causing physical damage to the grating ruler.

[0013] The aforementioned CNC machine tool grating ruler contamination monitoring and cleaning device includes a supplementary light, which is an adjustable brightness light-emitting diode. The supplementary light uses an illumination light-emitting diode to enhance the lighting effect inside the grating ruler. The supplementary light and the camera are installed side by side on the camera and cleaning nozzle mounting bracket of the lifting mechanism of the cleaning viewing device. The supplementary light control switch is controlled and connected to the WiFi module of the ESP32 camera.

[0014] The cleaning mechanism includes a cleaning fluid storage tank, and the cleaning fluid is connected to the cleaning nozzle through a control valve and a pipeline; a pressure pump and a flow control valve are installed on the cleaning fluid delivery pipeline.

[0015] The aforementioned CNC machine tool grating ruler contamination monitoring and cleaning device includes a display terminal, with a camera installed near the grating ruler. The images are transmitted to an external monitor or mobile phone display screen via the ESP32 camera WiFi module transmission line.

[0016] The aforementioned CNC machine tool grating ruler contamination monitoring and cleaning device is equipped with a grating signal sensor to monitor the signal strength and stability of the grating ruler output in real time; the signal sensor output is connected to an STM32F103 microcontroller. By using the grating signal sensor, when the output signal strength of the grating sensor abnormally weakens or fluctuates, it can be combined with image recognition results to determine whether signal transmission is obstructed due to contamination.

[0017] This utility model relates to a CNC machine tool grating ruler contamination monitoring and cleaning device. It can form an Internet of Things (IoT) network through a wireless communication module and a remote client to build a remote programmable monitoring system for CNC machine tool grating ruler contamination. The system can monitor the grating ruler contamination status in real time through the remote client and clean the grating ruler in time when the equipment triggers a contamination alarm to eliminate the CNC machine tool alarm caused by the grating ruler contamination.

[0018] Beneficial effects of the utility model:

[0019] 1. This utility model of CNC machine tool grating ruler contamination monitoring and cleaning device solves the problem mentioned in the background technology that the current reliance on manual periodic inspection and cleaning of grating rulers makes it impossible to monitor in real time and view the operation and status of CNC machine tool grating rulers in real time. It has the advantages of improving the convenient and efficient monitoring, cleaning and operation of CNC machine tool grating rulers, and can improve machine tool efficiency and easily obtain safe and stable CNC machine tool processing functions.

[0020] 2. This utility model relates to a CNC machine tool grating ruler contamination monitoring and cleaning device. It facilitates remote monitoring of the grating ruler's working status and enables real-time remote operation for efficient cleaning and maintenance. This is of significant practical importance in resolving machine tool shutdowns caused by grating ruler contamination alarms and ensuring the high-precision and stable operation of CNC machine tools. Based on an integrated STM32F103 microcontroller main control board, ESP32 CAM camera WiFi module, and its supplementary lighting device, it can remotely clean the contaminated grating ruler when machine tool alarms are triggered by grating ruler contamination, thus resolving the machine tool alarm shutdown caused by grating ruler contamination. Attached Figure Description

[0021] Figure 1 The diagram shows the components of a remote control system for deactivating a grating ruler contamination alarm.

[0022] Figure 2 The diagram shows a schematic of a CNC machine tool grating ruler contamination monitoring and cleaning device.

[0023] Figure 3 The diagram shown is a schematic of the cleaning mechanism of the cleaning peephole device.

[0024] Figure 4 The diagram shown is a schematic of the lifting mechanism of the cleaning peephole device.

[0025] Figure 5 The diagram shown is a schematic of the ESP32 CAM camera WiFi module circuit (including the power supply unit).

[0026] Figure 6 The diagram shows the connection between the integrated closed-loop drive stepper motor and the STM32F103 main control board. Detailed Implementation

[0027] To make the technical concept and advantages of the invention clearer, the technical solution of this utility model will be further described in detail below with reference to the accompanying drawings. It should be understood that the following embodiments are merely preferred embodiments for explaining and illustrating this utility model, and should not be considered as, nor constitute a limitation on, the scope of patent protection claimed for this utility model.

[0028] Example 1

[0029] See Figure 2 , Figure 3 This utility model proposes a CNC machine tool grating ruler contamination monitoring and cleaning device, including an STM32F103 microcontroller main control board, a viewing mechanism, and a cleaning mechanism, wherein:

[0030] The viewing mechanism uses an ESP32 camera WiFi module, which is connected to an STM32F103 microcontroller via a communication port.

[0031] The cleaning mechanism includes a high-pressure cleaning liquid-gas mixing control device and a cleaning nozzle. The STM32F103 microcontroller is equipped with a cleaning function I / O control interface, which is connected to the high-pressure cleaning liquid output control valve and the high-pressure cleaning gas output control valve of the high-pressure cleaning liquid-gas mixing control device respectively. The output pipes of the high-pressure cleaning liquid output control valve and the high-pressure cleaning gas output control valve are connected to the high-pressure gas and cleaning liquid mixing chamber, and the output end of the mixing chamber is connected to the cleaning nozzle.

[0032] The cleaning mechanism also includes a cleaning fluid storage tank, and the cleaning fluid is connected to the cleaning nozzle through a control valve and a pipeline; a pressure pump and a flow control valve are installed on the cleaning fluid delivery pipeline.

[0033] Figure 3 The numbers in the diagram represent the following: 1. Nozzle; 2. Manual fine-tuning device for spray flow rate; 3. High-pressure gas and cleaning fluid mixing chamber; 4. High-pressure gas inlet channel; 5. High-pressure cleaning fluid inlet channel; 6. Air filter; 7. High-pressure air inlet path; 8. One-way throttle valve; 9. Overflow valve; 10. Cleaning fluid storage tank; 11. Cleaning fluid filter; 12. Cleaning fluid high-pressure pump; 13. Camera and supplementary light; 14. Lifting rod; 15. Lifting detection upper limit switch; 16. Lifting mechanism origin switch; 17. Lifting mechanism lower limit switch; 18. Integrated closed-loop drive stepper motor; 19. Lifting and cleaning mechanism mounting plate; 20. Pressure gauge; 21. Air pressure reducing valve; 22. Cleaning fluid pressure reducing valve.

[0034] The cleaning device works as follows:

[0035] The cleaning fluid is drawn from the storage tank 10 by the high-pressure pump 12. The cleaning fluid passes through the filter 11, one-way valve 8, pressure display 20, pressure reducing valve 22, and channel 5 into the high-pressure gas and cleaning fluid mixing chamber 3. The high-pressure gas passes through the air inlet pipe 7, air filter 6, pressure reducing valve 21, and channel 4 into the high-pressure gas and cleaning fluid mixing chamber 3. Through the nozzle flow rate adjustment mechanism 2, the required high-pressure gas and cleaning fluid are sprayed out through the high-pressure nozzle 1 to achieve the purpose of cleaning the grating ruler.

[0036] Example 2

[0037] See Figures 4-6 The difference between the CNC machine tool grating ruler contamination monitoring and cleaning device described in this embodiment and Embodiment 1 is that it includes a cleaning inspection device lifting structure; the cleaning inspection device lifting structure is installed in a high-precision guide rail using a lead screw and slider, the high-precision guide rail being parallel to the grating ruler; the drive mechanism uses an integrated closed-loop drive stepper motor; the STM32F103 microcontroller is equipped with corresponding functional I / O interfaces connected to the integrated closed-loop drive stepper motor; the output shaft of the stepper motor is connected to the lead screw; the camera and cleaning nozzle mounting bracket is fixed in conjunction with the slider; a limit switch mounting plate is installed corresponding to the camera and cleaning nozzle mounting bracket to install limit switches, and the limit switches are electrically connected to the STM32F103 microcontroller.

[0038] Figure 5 The diagram shown is a schematic of the ESP32 CAM camera WiFi module circuit (including the power supply unit). Figure 6 The diagram shows the connection between the integrated closed-loop drive stepper motor of the viewing and cleaning mechanism, the STM32F103 main control board, and the ESP32 CAM camera WiFi module.

[0039] The moving parts of the cleaning mechanism use high-precision guide rails and lead screws, which can accurately control the movement of the cleaning head on the surface of the grating ruler, ensuring uniform cleaning effect and preventing physical damage to the grating ruler.

[0040] The cleaning agency's high-pressure gas spray gun first blows away the dust on the surface of the grating ruler, then the micro-spray device sprays out special cleaning liquid to dissolve stains such as oil, and finally the high-pressure gas spray gun blows the cleaning liquid dry again.

[0041] Figure 4The numbers in the diagram represent the following: 23. Rise limit detection switch; 24. Limit switch mounting plate; 25. Origin detection limit switch; 26. Fall limit detection limit switch; 27. Limit switch wiring; 28. Precision lead screw support end cap; 29. ​​Lifting lead screw nut; 30. Limit switch collision block; 31. Lead screw drive spur gear; 32. Precision lead screw; 33. Camera and fill light mounting location; 34. Integrated closed-loop drive stepper motor; 35. Camera and fill light device lifting rod; 36. Camera and fill light signal line and integrated closed-loop drive stepper motor control line; 37. Integrated closed-loop drive stepper motor control wiring; 38. Mounting base plate.

[0042] Implementation of the lifting mechanism control function of the camera spying lifting structure:

[0043] In the diagram, the upward limit detection switch 23, the origin detection limit switch 25, and the downward limit detection limit switch 26 serve as input signals for the travel position detection of the lifting mechanism. These signals are electrically connected to the main control board interface for camera travel protection. When performing camera monitoring, the origin detection limit switch 25 uses the return-to-reference-point command from the customer interface to locate the mechanical origin of the lifting mechanism. The ESP32 microcontroller sends pulse and direction commands to the integrated closed-loop drive stepper motor 37, which drives the mechanically connected spur gear 31 to rotate. The spur gear 31 is mechanically connected to the precision lead screw 32, causing them to rotate in the same direction. The rotation of the lead screw drives the lead screw nut 29 to rotate upwards. The device moves up and down repeatedly. The nut 30 has an integrated collision block. During the up and down reciprocating movement, the collision block will collide with the upward limit detection switch 23, the downward limit detection limit switch 26, and the origin detection limit switch 25, which are installed on the limit switch mounting plate. The above components are installed on the guide rail floor 38. The detection position switch signal is transmitted to the microcontroller main control board. When the origin detection limit switch 25 is first encountered, the whole mechanism performs a reference point determination operation on the customer program device according to the main control board, which is regarded as the origin of the viewing mechanism. According to the action requirements, the automatic program is executed to lift and lower the camera and its supplementary lighting device to check the status of the grating ruler.

[0044] The aforementioned CNC machine tool grating ruler contamination monitoring and cleaning device includes a viewing mechanism with a supplementary light. The supplementary light uses an adjustable brightness light-emitting diode to enhance the lighting effect inside the grating ruler. The supplementary light and camera are mounted side by side on the camera and cleaning nozzle mounting bracket of the lifting mechanism of the cleaning viewing device. The supplementary light switch is controlled and connected to the WiFi module of the ESP32 camera.

[0045] The STM32F103 microcontroller main control board features multiple functional I / O interfaces. Through data, clock, and address buses, the STM32F103 acts as the main control MCU chip, processing information to control the opening and closing of high-pressure clean gas and clean liquid control valves, the limit switches and origin switches of the camera lifting mechanism, and integrating closed-loop drive of the integrated stepper motor to control its speed and programmed actions. The main control board also includes a high-speed pulse 74HC04 interface chip. High-speed PWM pulses, direction interfaces, and function signals from the ESP32 camera WiFi module are electrically connected to the main control board's I / O interfaces and the integrated closed-loop drive of the integrated stepper motor to control the camera's lifting, lowering, and origin limit detection information processing, as well as remote client monitoring commands.

[0046] The ESP32 camera WiFi high-resolution image acquisition module is installed close to the grating ruler, with an unobstructed shooting angle, enabling clear image capture of the grating ruler's surface. Multiple parallel adjustable-brightness LED lighting devices enhance the internal lighting of the grating ruler, facilitating clear observation of the cleaning process from outside the machine tool. The output electrical components of the camera lifting mechanism—including the upper limit, lower limit, origin limit, high-pressure cleaning gas control valve, and cleaning fluid control valve—are electrically connected to the main control board's onboard I / O interface. The high-precision guide rail of the cleaning mechanism is parallel to the grating ruler, and the cleaning head covers the entire working area of ​​the grating ruler.

[0047] Example 3

[0048] The difference between the CNC machine tool grating ruler contamination monitoring and cleaning device in this embodiment and embodiments 1 and 2 is that it includes a display terminal, a camera installed near the grating ruler, and the image is transmitted to an external monitor or mobile phone display screen through the ESP32 camera WiFi module transmission line.

[0049] The CNC machine tool grating ruler contamination monitoring and cleaning device of this utility model can be equipped with a grating signal sensor to monitor the signal strength and stability of the grating ruler output in real time; the output of the signal sensor is connected to an STM32F103 microcontroller.

[0050] By setting up a grating signal sensor, when the output signal strength of the grating sensor weakens abnormally or fluctuates, it can be combined with image recognition results to determine whether the signal transmission is blocked due to pollution.

[0051] This utility model relates to a CNC machine tool grating ruler contamination monitoring and cleaning device. It can monitor the contamination status of the grating ruler in real time and clean it when contamination occurs. During use, the grating ruler cleaning agent viewing device must be installed in a suitable position to ensure effective monitoring and cleaning of the grating ruler.

[0052] like Figure 1 The diagram shows a remote control system for deactivating a contamination alarm on a CNC machine tool grating ruler, constructed via the Internet of Things using the CNC machine tool grating ruler contamination monitoring and cleaning device of this invention. The system includes a cloud server and a remote control client. It employs the CNC machine tool grating ruler contamination monitoring and cleaning device described in the foregoing embodiments. The CNC machine tool grating ruler contamination monitoring and cleaning device communicates with the cloud server via an ESP32 camera WiFi module. The remote control client communicates with the CNC machine tool grating ruler contamination monitoring and cleaning device through the cloud server.

[0053] The remote control client communicates with the CNC machine tool's linear encoder contamination monitoring and cleaning device via the cloud, facilitating remote monitoring of the linear encoder's operating status and enabling real-time remote operation for efficient cleaning and maintenance, thus resolving machine downtime caused by linear encoder contamination alarms. The system includes the necessary functional components connected to the main control board. These components, via I / O input / output interfaces, are controlled by programmable commands from the remote client to perform the required cleaning functions.

[0054] The remote control client is a smartphone or computer, communicating with the ESP32 camera's WiFi module via the MQTT transmission protocol and the cloud. The client has software installed to control the necessary functions of the cleaning system. The remote programmable monitoring and cleaning device system, used to assist in resolving CNC machine tool grating ruler contamination alarms, employs the MQTT network communication protocol. The mobile app and computer software interfaces include buttons for controlling and adjusting the camera and its supplementary lighting monitoring device (lifting / lowering), supplementary lighting switch, stepper motor speed control, cleaning fluid valve and cleaning air valve opening / closing, and related function parameter settings. This utility model's remote programmable system for resolving CNC machine tool grating ruler contamination alarms requires periodic cleaning of the high-resolution image acquisition module lens, checking and calibrating the electrical connections of the signal sensors, cleaning the high-pressure gas spray gun and micro-spray device of the cleaning mechanism, lubricating the high-precision guide rails and lead screws, updating the programmable system software, and backing up important data. If the CNC equipment grating ruler monitoring system detects contamination that has not been removed, the programmable system restarts the cleaning program. If the contamination cannot be removed after multiple cleanings, manual intervention is required.

[0055] The remote control system for deactivating the contamination alarm of the CNC machine tool grating ruler is used to solve the remote monitoring and deactivation of the contamination alarm of the CNC machine tool grating ruler. The system consists of:

[0056] 1. Cleaning System

[0057] The main body of the device is made of corrosion-resistant materials and contains a cleaning fluid storage tank equipped with a pressure pump. High-pressure spray heads are connected via pipes and control valves. The high-pressure nozzles allow for adjustable spray force of the cleaning fluid, providing sufficient impact to remove stubborn contaminants and ensuring even coverage of the grating ruler surface with the cleaning fluid. When the CNC equipment monitoring system detects that the grating ruler's contamination level reaches the alarm threshold, the high-pressure cleaning device is remotely operated to blow away most of the dust from the grating ruler's surface. Then, a micro-spray device sprays a specialized cleaning fluid to dissolve and clean any remaining oil and stubborn stains. Finally, a high-pressure gas spray gun dries the cleaning fluid, ensuring the grating ruler surface is clean and dry. The moving parts of the cleaning mechanism utilize high-precision guide rails and lead screws, enabling precise control of the cleaning head's movement on the grating ruler surface, ensuring uniform cleaning without causing physical damage to the grating ruler.

[0058] 2. Peeping system

[0059] This device features a high-definition camera connected to an internal image transmission line. Images are transmitted via the ESP32 camera's WiFi module to an external monitor or mobile phone screen. The device is equipped with a high-resolution image acquisition module capable of capturing real-time images of the grating ruler's surface. The CNC equipment employs advanced image recognition algorithms to analyze and process the acquired images, identifying the presence of contaminants such as dust, oil, and cutting fluid on the grating ruler's surface, and assessing the degree of contamination based on the coverage area and density of the contaminants. Simultaneously, signal sensors monitor the signal strength and stability of the grating ruler's output signal in real time. When the signal strength abnormally weakens or fluctuates, the image recognition results are used to determine if contamination is obstructing signal transmission. The camera also features a high-resolution, waterproof, and dustproof design. Multiple adjustable-brightness LEDs enhance the lighting effect inside the grating ruler, allowing operators to clearly observe the cleaning process from outside the machine. Furthermore, the camera is equipped with a movable mechanism controlled by an integrated closed-loop stepper motor for lifting and speed adjustment, allowing operators to control the device's movement speed and direction according to actual cleaning needs. Even in dimly lit machine tool environments, the cleaning inspection device ensures accurate positioning of the grating ruler, guaranteeing clear image capture so operators can accurately assess the amount of contaminants remaining on its surface. The device is equipped with a guide rail slider mechanism at its base, allowing it to move along specific tracks on the CNC machine tool and capture real-time images of the grating ruler's surface.

[0060] 3. Programmable control system

[0061] The programmable control system (CNC) is the core of the entire system, responsible for coordinating the work of the monitoring system and the cleaning mechanism. Operators can set parameters such as contamination alarm thresholds and cleaning cycles through the human-machine interface. When the CNC monitoring system issues a contamination alarm signal, the CNC machine tool's control system sends a pause command to prevent continued processing in a contaminated state, which could lead to product quality issues. After cleaning is completed, the CNC equipment control and monitoring system confirms whether the contamination has been removed.

[0062] like Figure 5 As shown, the CNC machine tool grating ruler contamination monitoring and cleaning device of this utility model includes a power supply module. The power supply module converts AC power into DC power to supply the main control board and the integrated closed-loop drive stepper motor. The main control board has two signal output terminals, which are electrically connected to the integrated closed-loop drive stepper motor and the ESP32 camera WiFi module and its supplementary lighting device, respectively. The control input terminal of the integrated closed-loop drive stepper motor is electrically connected to the input control terminal of the integrated closed-loop drive stepper motor (e.g., ...). Figure 6 As shown in the figure, the integrated closed-loop drive stepper motor control output terminal is mechanically connected to the camera and its supplementary lighting device.

[0063] As a preferred option, the camera is the OVL3660 wide-angle camera, featuring 3 megapixels and a resolution of 2048x1564, along with night vision and waterproofing capabilities. The module's DC 5V power supply is converted to DC 3.3V by the AMS1117 voltage regulator chip to provide the regulated power required by the ESP32 chip. (See attached diagram.) Figure 5 In this circuit, the 3.3V regulated power supply is filtered by a C4100UF capacitor and a 10UF capacitor, and then regulated by an XC6206-2.8V or XC6206-1.2V ultra-low power, low dropout linear regulator. This provides the camera interface circuit with the ultra-low power consumption, excellent power supply rejection ratio, high precision, and low noise characteristics required, effectively extending the device's standby time and battery life. This chip can operate with a small voltage drop, thus reducing power loss and improving power efficiency. The excellent power supply rejection ratio effectively suppresses the impact of power supply noise on the output voltage, ensuring output voltage stability and thus guaranteeing the device's performance and stability. As the power management chip for these devices, the XC6206 is responsible for providing a stable voltage output, ensuring the normal operation and lifespan of the device, meeting the requirements of electronic devices with extremely low power consumption, excellent power supply rejection ratio, high precision, low noise, and high stability. The camera WiFi module, based on the ESP32 microcontroller, has the following functional pin I / O interfaces: GPIO2 (fill light control signal), GPIO4 (manual return to reference point for cleaning mechanism), GPIO12 (high-pressure cleaning fluid on / off signal), GPIO13 (high-pressure cleaning gas on / off function signal), GPIO4 (camera and fill light device rise signal), GPIO14 (camera and fill light device fall signal), GPIO15 (direction signal for integrated closed-loop drive stepper motor), and GPIO16 (pulse signal for integrated closed-loop drive stepper motor). These interfaces control the camera and fill light device's rise and fall, fill light on / off, stepper motor speed adjustment, high-pressure cleaning gas valve, and high-pressure cleaning fluid valve. They are electrically connected to the STM32F103 motherboard to enable the device's viewing and cleaning functions. The STM32F103 microcontroller, as the system's central processing unit, is the core of the control system. It features a high-speed pulse output drive interface circuit to control the stepper motor's movement. This interface controls the motor's start / stop and rotation direction, enabling stepless speed regulation and precise positioning of lifting and lowering movements, thus facilitating the monitoring of the linear encoder. Combined with a mobile app or networked computer and a remote control module (ESP32 camera WiFi module), it transmits necessary commands to the mobile or computer client via cloud data transmission, allowing for convenient and timely real-time monitoring of the CNC machine tool's linear encoder operation and status. This enhances the ease and efficiency of controlling the CNC machine tool's linear encoder, improving machine tool efficiency and facilitating safe and stable CNC machining.

Claims

1. A CNC machine tool grating ruler contamination monitoring and cleaning device, comprising an STM32F103 microcontroller main control board, a viewing mechanism, and a cleaning mechanism, characterized in that: The viewing mechanism uses an ESP32 camera WiFi module, which is connected to an STM32F103 microcontroller via a communication port. The cleaning mechanism includes a high-pressure cleaning liquid-gas mixing control device and a cleaning nozzle. The STM32F103 microcontroller is equipped with a cleaning function I / O control interface, which is connected to the high-pressure cleaning liquid output control valve and the high-pressure cleaning gas output control valve of the high-pressure cleaning liquid-gas mixing control device respectively. The output pipes of the high-pressure cleaning liquid output control valve and the high-pressure cleaning gas output control valve are connected to the high-pressure gas and cleaning liquid mixing chamber, and the output end of the mixing chamber is connected to the cleaning nozzle.

2. The CNC machine tool grating ruler contamination monitoring and cleaning device according to claim 1, characterized in that: The device includes a lifting structure for a cleaning viewing device. This lifting structure uses a lead screw and slider mounted within a high-precision guide rail, which is parallel to a grating ruler. The drive mechanism employs an integrated closed-loop drive stepper motor. An STM32F103 microcontroller with corresponding functional I / O interfaces connects to the integrated closed-loop drive stepper motor. The stepper motor's output shaft is connected to the lead screw. A camera and cleaning nozzle mounting bracket are fixed in place with the slider. A limit switch mounting plate is provided corresponding to the camera and cleaning nozzle mounting bracket to install the limit switch, which is electrically connected to the STM32F103 microcontroller.

3. The CNC machine tool grating ruler contamination monitoring and cleaning device according to claim 2, characterized in that: The device includes a supplementary light, which uses an adjustable brightness light-emitting diode to enhance the lighting effect inside the grating ruler. The supplementary light and the camera are mounted side by side on the camera and cleaning nozzle mounting bracket of the lifting mechanism of the cleaning viewing device. The supplementary light control switch is controlled and connected to the WiFi module of the ESP32 camera.

4. The CNC machine tool grating ruler contamination monitoring and cleaning device according to claim 1, 2 or 3, characterized in that: The cleaning mechanism includes a cleaning fluid storage tank, and the cleaning fluid is connected to the cleaning nozzle through a control valve and a pipeline; a pressure pump and a flow control valve are installed on the cleaning fluid delivery pipeline.

5. The CNC machine tool grating ruler contamination monitoring and cleaning device according to claim 4, characterized in that: The system includes a display terminal, with the camera installed near the grating ruler. The images captured during cleaning are transmitted to an external monitor or mobile phone display via the ESP32 camera WiFi module transmission line.

6. The CNC machine tool grating ruler contamination monitoring and cleaning device according to claim 4, characterized in that: A grating signal sensor is provided to monitor the signal strength and stability of the grating ruler output in real time; the output of the signal sensor is connected to an STM32F103 microcontroller.