Gear encoder with integrated automatic calibration function

By integrating automatic calibration into the gear encoder, the angle deviation of the CNC machine tool drive shaft is corrected in real time using magnetic encoder and electromagnetic traction device. This solves the problem of traditional encoders relying on manual calibration, improves machining accuracy and stability, and extends equipment life.

CN121521167BActive Publication Date: 2026-07-21ZHEJIANG HANHE SENSING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG HANHE SENSING TECH CO LTD
Filing Date
2025-11-28
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Traditional gear encoders are susceptible to changes in gear meshing clearance, shaft wear, and temperature drift during long-term use, which can lead to measurement signal deviations, affecting the machining accuracy and stability of CNC machine tools. Furthermore, they require regular manual calibration and have a delayed response.

Method used

Design a gear encoder with integrated automatic calibration function. Through a gear detection mechanism and a gear correction mechanism, use a magnetic encoder and a TMR sensor to monitor and correct the angular deviation of the machine tool transmission shaft in real time. Use an electromagnetic traction device and a spindle traction device for magnetic calibration to avoid direct contact and reduce wear.

Benefits of technology

It enables real-time angle calibration of CNC machine tool drive shafts, improving machining accuracy and stability, extending equipment lifespan, and enhancing heat dissipation performance through a semi-circular connecting ring, thus reducing equipment wear.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121521167B_ABST
    Figure CN121521167B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of CNC components, in particular to a gear encoder integrated with automatic calibration function, comprising a gear detection mechanism and a gear correction mechanism, which are both arranged on the side of a CNC machine tool transmission shaft; the gear detection mechanism is used to send a cosine ABZ signal to the gear on the machine tool transmission shaft and send a feedback signal to the gear correction mechanism. When in use, the gear detection mechanism sends a cosine ABZ signal to the gear on the machine tool transmission shaft, wherein the reference signal sensor of the magnetic sensing encoder facing the axis center of the machine tool transmission shaft emits and receives a Z calibration square wave signal, the first TMR sensor and the second TMR sensor on the upper and lower sides respectively emit and receive A and B residual wave signals, and the offset direction of the machine tool transmission shaft is determined according to the offset values of A and B, at this time the gear correction mechanism is used to magnetically attract the machine tool transmission shaft, so as to correct the angle of the machine tool transmission shaft.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CNC component technology, and in particular to a gear encoder with integrated automatic calibration function.

[0002] Background Technology: CNC machine tools are devices that achieve automated machining through pre-written programs. The core technology is to use digital information to control the movement of the machine tool and the machining process, so that precision machining tasks such as cutting, drilling, and milling of metal or non-metal materials can be completed without direct manual operation.

[0003] When a CNC machine tool is working, a servo motor drives a gear transmission system to move the tool or workpiece. The gear encoder, as a key component for position feedback, transmits information such as the gear's rotation angle and speed to the CNC system in real time to ensure machining accuracy. However, traditional gear encoders are susceptible to changes in gear meshing clearance, shaft wear, and temperature drift during long-term use, leading to deviations in the measurement signal. If not calibrated in time, this directly affects the machining accuracy and stability of the CNC machine tool, increasing the product scrap rate.

[0004] Therefore, this invention aims to design a gear encoder that can monitor and automatically correct deviations in real time. By integrating a high-precision sensing module and an intelligent calibration algorithm, it solves the problems of traditional encoders that rely on manual periodic calibration and have slow response, thereby improving the continuous working capability of CNC machine tools under complex working conditions. Summary of the Invention

[0005] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide a gear encoder with integrated automatic calibration function to solve the problem of easy deviation of CNC machine tool spindles mentioned in the prior art.

[0006] To achieve the above and other related objectives, the present invention provides a gear encoder with integrated automatic calibration function, including a gear detection mechanism and a gear correction mechanism, both of which are disposed on the side of the CNC machine tool drive shaft;

[0007] The gear detection mechanism is used to send sine and cosine ABZ signals to the gears on the machine tool drive shaft and to send feedback signals to the gear correction mechanism;

[0008] The gear correction mechanism is used to receive feedback signals from the gear detection mechanism and correct the machine tool transmission shaft according to the feedback signals.

[0009] The gear detection mechanism includes a magnetic encoder. A reference signal sensor is provided on the axis of the magnetic encoder facing the machine tool transmission shaft. A first TMR sensor and a second TMR sensor are respectively provided on the upper and lower sides of the reference signal sensor. The reference signal sensor is used to transmit and receive Z signals. The first TMR sensor and the second TMR sensor are used to transmit and receive A and B signals respectively.

[0010] The magnetic encoder has an electrical connector on the side away from the machine tool drive shaft. The electrical connector is equipped with a connecting cable, which is connected to the host computer and the gear correction mechanism respectively.

[0011] The magnetic encoder has mounting bases on both sides.

[0012] Preferably, the Z signal emitted by the reference signal sensor is a calibration square wave signal;

[0013] The A and B signals emitted by the first TMR sensor and the second TMR sensor are both residual signals.

[0014] Preferably, signals A and B, as well as signal Z, are differential voltage signals. The differential signal levels of A and B are 1Vpp, and signal Z appears once per revolution.

[0015] All signals have a DC bias voltage of 2.5V.

[0016] Preferably, the end of the connecting cable is provided with an aviation plug and / or a pin connector.

[0017] Preferably, the gear straightening mechanism includes an electromagnetic traction device and a spindle traction device. The electromagnetic traction device has a wiring terminal on the side away from the machine tool drive shaft, and the wiring terminal is connected to an external host computer.

[0018] The electromagnetic traction device is provided with guide lines on both the upper and lower sides, and the ends of the guide lines are provided with connecting rings that can generate magnetic force. The connecting rings are wrapped around the outer surface of the machine tool transmission shaft.

[0019] The spindle traction device is located on the outer surface of the machine tool drive shaft and is adapted to the position of the connecting ring. The connecting ring drives the spindle traction device by electromagnetic force.

[0020] Preferably, the guide wire is a rigid insulated conduit, and connecting wires are arranged inside the conduit.

[0021] Preferably, the connecting ring is a semi-circular insulating ring, and electromagnets are provided at equal intervals on the inner wall of the connecting ring, with a gap between the outer surface of the electromagnets and the outer surface of the main shaft traction device.

[0022] Preferably, the spindle traction device includes two covering rings, which are installed on both sides of the machine tool transmission shaft gear with an interference fit.

[0023] The outer surface of the covering ring is provided with a number of permanent magnets at equal intervals, and a stall detector is provided between two adjacent permanent magnets.

[0024] Preferably, the electromagnetic traction device can transmit currents of different intensities and electrodes to the two connecting rings respectively.

[0025] Preferably, the electromagnetic traction device has mounting wings on both sides.

[0026] As described above, the gear encoder with integrated automatic calibration function of the present invention has the following beneficial effects:

[0027] 1. This invention sends sine and cosine ABZ signals to the gears on the machine tool drive shaft through a gear detection mechanism. The reference signal sensor on the side of the magnetic encoder facing the machine tool drive shaft transmits and receives Z calibration square wave signals. The first TMR sensor and the second TMR sensor on the upper and lower sides transmit and receive A and B cosine signals respectively. The differential signal level of A and B is 1Vpp. The Z signal appears once every one revolution, thereby realizing the real-time detection of the rotational speed and skew angle of the machine tool drive shaft. The offset direction of the machine tool drive shaft is determined according to the offset values ​​of A and B. At this time, the gear correction mechanism magnetically pulls the machine tool drive shaft to correct the angle of the machine tool drive shaft.

[0028] 2. This invention connects to the host computer via the terminals on the electromagnetic traction device, and guide wires are led out from the electromagnetic traction device. At the same time, a connecting ring is set at the end of the guide wire to cover the outer surface of the machine tool transmission shaft. By changing the magnetic strength and magnetic pole direction of the electromagnet in the connecting ring, the force intensity and direction of the electromagnet on the spindle traction device are changed, thereby calibrating the angle of the machine tool transmission shaft through magnetic force.

[0029] 3. This invention uses an electromagnet and a spindle traction device to correct the angle of the machine tool drive shaft, thereby avoiding direct contact between the electromagnet and the spindle traction device. This reduces wear and extends the service life of the equipment when the machine tool drive shaft rotates at high speed.

[0030] By setting the connecting ring to a semi-circular shape and covering the outer surface of the machine tool drive shaft, the contact area between the machine tool drive shaft and the air can be effectively increased, thereby increasing the heat dissipation rate of the outer surface of the machine tool drive shaft.

[0031] Therefore, this invention effectively overcomes the various shortcomings of the prior art and has high industrial application value. Attached Figure Description

[0032] Figure 1 The diagram shown is a schematic representation of the structure of the present invention.

[0033] Figure 2 The diagram shown is a structural schematic of the gear detection mechanism of the present invention.

[0034] Figure 3 The diagram shows the structural orientation of the wiring terminals of the gear correction mechanism of the present invention.

[0035] Figure 4 The diagram shows the structure of the gear correction mechanism of the present invention with the direction of the electromagnet.

[0036] Figure 5 The diagram shown is an installation schematic of the spindle traction device of the present invention.

[0037] Figure 6 The diagram shown is a structural schematic of the spindle traction device of the present invention.

[0038] Figure 7 The diagram shows the sine and cosine signals of the gear detection mechanism of the present invention.

[0039] Figure 8 The image shown is a top view of the installation position of the gear detection mechanism of the present invention.

[0040] Figure 9 This invention is shown as Figure 1 A magnified schematic diagram of the structure at point A in the middle.

[0041] Figure 10 This invention is shown as Figure 4 Enlarged schematic diagram of the structure at point B.

[0042] Component designation explanation:

[0043] 1. Gear detection mechanism; 11. Magnetic encoder; 12. First TMR sensor; 13. Second TMR sensor; 14. Reference signal sensor; 15. Electrical connector; 16. Connecting cable; 17. Mounting base;

[0044] 2. Gear alignment mechanism; 21. Electromagnetic traction device; 22. Mounting wing; 23. Terminal block; 24. Guide wire; 25. Connecting ring; 26. Electromagnet; 27. Spindle traction device; 271. Covering ring; 272. Permanent magnet; 28. Stall detector;

[0045] 3. Machine tool drive shaft. Detailed Implementation

[0046] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification.

[0047] Please see Figures 1 to 7 It should be understood that the structures, proportions, sizes, etc., illustrated in the accompanying drawings are merely for illustrative purposes to aid those skilled in the art and to facilitate understanding and reading. They are not intended to limit the scope of the invention and therefore have no substantial technical significance. Any modifications to the structure, changes in proportions, or adjustments to size, without affecting the effectiveness and purpose of the invention, should still fall within the scope of the technical content disclosed in this invention. Furthermore, the terms such as "upper," "lower," "left," "right," "middle," and "one" used in this specification are merely for clarity and not intended to limit the scope of the invention. Changes or adjustments to their relative relationships, without substantially altering the technical content, should also be considered within the scope of the invention's implementation.

[0048] like Figure 1 , Figure 2 and Figure 7 As shown, the present invention provides a gear encoder with integrated automatic calibration function, including a gear detection mechanism 1 and a gear correction mechanism 2, both of which are disposed on the side of the CNC machine tool transmission shaft 3;

[0049] The gear detection mechanism 1 is used to send sine and cosine ABZ signals to the gears on the machine tool transmission shaft 3 to determine the rotational speed and tilt angle of the machine tool transmission shaft 3, and to send feedback signals to the gear correction mechanism 2.

[0050] The gear correction mechanism 2 is used to receive the feedback signal sent by the gear detection mechanism 1, and adjust the magnetic intensity and magnetic pole direction according to the feedback signal, so as to correct the machine tool transmission shaft 3 by generating magnetic forces of different intensities and directions.

[0051] Specifically, the gear detection mechanism 1 includes a magnetic encoder 11. A reference signal sensor 14 is provided on the axis of the magnetic encoder 11 facing the machine tool transmission shaft 3. A first TMR sensor 12 and a second TMR sensor 13 are respectively provided on the upper and lower sides of the reference signal sensor 14. The TMR sensor uses the quantum tunneling mechanism to realize magnetic induction. Compared with the existing Hall sensor and giant magnetoresistive principle, it has better sensitivity, lower power consumption and higher precision, and is a key device to realize the above functions. The reference signal sensor 14 is used to transmit and receive Z signals, and the first TMR sensor 12 and the second TMR sensor 13 are used to transmit and receive A and B signals respectively. During operation, the first TMR sensor 12 and the second TMR sensor 13 will send A and B signals in real time according to the rotation state of the machine tool transmission shaft 3. The phase difference between these two signals can accurately reflect the rotation direction of the machine tool transmission shaft 3, and the number of signal pulses corresponds to the rotation angle of the machine tool transmission shaft 3, and generates corresponding peak and valley signals according to the peak and valley of the gear on the machine tool transmission shaft 3. The magnetic encoder 11 also integrates a signal processing module, which can filter, amplify and shape the raw signals collected by the first TMR sensor 12, the second TMR sensor 13 and the reference signal sensor 14 to ensure that the feedback signal output to the gear correction mechanism 2 has high stability and accuracy, and provides reliable data support for subsequent calibration work.

[0052] An electrical connector 15 is located on the side of the magnetic encoder 11 away from the machine tool drive shaft 3. A connecting cable 16 is mounted on the electrical connector 15, connecting to both the host computer and the gear calibration mechanism 2. The connecting cable 16 allows the host computer to remotely configure the encoder's operating parameters, such as adjusting the signal sampling frequency and setting calibration trigger thresholds. Simultaneously, the feedback data processed by the magnetic encoder 11 can be uploaded to the host computer in real time, facilitating real-time monitoring and data analysis of the gear rotation status by the operator. Furthermore, the electrical connector 15, serving as the physical interface between the magnetic encoder 11 and external devices, employs an anti-electromagnetic interference design. This effectively reduces interference from electromagnetic signals in the external environment, further ensuring the stability and reliability of signal transmission and guaranteeing that the gear calibration mechanism 2 can receive feedback signals promptly and accurately and execute corresponding calibration control commands.

[0053] The magnetic encoder 11 has mounting bases 17 on both sides. The mounting bases 17 have straight slots, which are used to facilitate the installation of the gear detection mechanism 1 on a CNC machine tool.

[0054] It should be noted that, in some embodiments, the Z signal emitted by the reference signal sensor 14 of the present invention is a calibration square wave signal;

[0055] The A and B signals emitted by the first TMR sensor 12 and the second TMR sensor 13 are both residual signals. Among them, the frequency of the calibration square wave signal is adapted to the number of teeth and rotation speed of the gear, and the precise pulse interval enables rapid positioning of the gear rotation phase, providing a reference timing for automatic calibration. The residual signal has phase difference characteristics. The phase offset between the A and B signals can determine the rotation direction of the gear by the lead or lag relationship of the signals. At the same time, the precise measurement of rotation angle and displacement is achieved by counting the number of pulses. The two work together to form the core signal source for the gear encoder to realize position detection and automatic calibration.

[0056] It is worth mentioning that in some embodiments, signals A and B, as well as signal Z, are differential voltage signals. The differential signal level of A and B is 1Vpp, and signal Z appears once per revolution. The DC bias voltage of all signals is 2.5V. This differential signal design can effectively suppress common-mode interference, improve the stability and anti-interference capability of the signal during transmission, and ensure that the signal can maintain high transmission quality even in complex machine tool working environments. The 1Vpp differential signal level ensures that the signal strength is sufficient to drive the subsequent receiving circuit without damaging the circuit components due to excessively high levels. The 2.5V DC bias voltage provides a stable reference for the signal, allowing the differential signal to fluctuate within a reasonable voltage range, facilitating accurate acquisition and processing of the signal at the receiving end. The Z signal, which appears once per revolution, serves as a key marker for position calibration. In the working relationship between the gear encoder and the CNC machine tool, it provides an important guarantee for the positioning accuracy of the machine tool's drive shaft. When the gear rotates once, the appearance of the Z signal allows the system to quickly confirm the initial position or complete a position zeroing operation, further improving the accuracy and reliability of the entire encoder system during machine tool processing. The rotational speed of the machine tool drive shaft 3 can also be detected by the frequency of the Z signal.

[0057] It should be noted that in some embodiments, the end of the connecting cable 16 of the present invention is provided with an aviation plug and / or a pin connector; the aviation plug has the characteristics of quick plug-and-play and waterproof and dustproof, and is suitable for industrial scenarios that require frequent disassembly or have complex external environments, and can maintain a stable electrical connection under conditions such as vibration and shock; the pin connector achieves a fixed connection with the internal circuit through soldering or pin insertion, and has the advantages of strong connection and low contact resistance, which can meet the requirements of high-precision signal transmission. The setting of two types of connectors allows the gear encoder to flexibly adapt to different machine tool control system interface standards, improves the versatility and compatibility of the equipment, and facilitates installation, deployment and subsequent maintenance on various CNC machine tools.

[0058] The wiring sequence for the aviation connector is as follows:

[0059] 1 pink 5V 2 white 0V 3 blue A+(SIN+) 4 yellow A-(SIN-) 5 purple B+(COS+) 6 Ash B-(COS-) 7 Green-gray Z+ 8 Brownish-green Z- 9 Shielded wire Shielded wire

[0060] The wiring sequence for the pin connector is as follows:

[0061] 1 pink 5V 2 white 0V 3 blue A+(SIN+) 4 yellow A-(SIN-) 5 6 purple B+(COS+) 7 Ash B-(COS-) 8 9 10 Green and Black Z+ 11 12 Brownish-green Z- 13 Yellow and black WP 14 blue and black SDA 15 Red and black SCL shell Shielded wire Shielded wire

[0062] Note: Pins 13 / 14 / 15 are for use only when supporting in-circuit debugging.

[0063] like Figure 3 and Figure 4 As shown, in some embodiments, the gear straightening mechanism 2 of the present invention includes an electromagnetic traction device 21 and a spindle traction device 27. The electromagnetic traction device 21 is provided with a wiring terminal 23 on the side away from the machine tool transmission shaft 3. The wiring terminal 23 is connected to an external host computer.

[0064] The electromagnetic traction device 21 has guide lines 24 on both the upper and lower sides, and the ends of the guide lines 24 are provided with connecting rings 25 that can generate magnetic force. The connecting rings 25 cover the outer surface of the machine tool transmission shaft 3.

[0065] The spindle traction device 27 is set on the outer surface of the machine tool transmission shaft 3 and is adapted to the position of the connecting ring 25. The connecting ring 25 drives the spindle traction device 27 by electromagnetic force.

[0066] During use, the data monitored by the gear detection mechanism 1 is transmitted to the electromagnetic traction device 21 through the host computer. After receiving the data, the electromagnetic traction device 21 uses the difference between the A signal and the B signal to form correction data, and adjusts the magnetic force generated by the upper and lower connecting rings 25 according to the correction data. The difference in magnetic force between the upper and lower connecting rings 25 drives the machine tool transmission shaft 3 to maintain a horizontal or vertical shape, and positions the radial position of the machine tool transmission shaft 3 according to the Z signal, so as to adjust the magnetic force of the connecting rings 25 in real time according to the number of rotations of the machine tool transmission shaft 3.

[0067] like Figure 3 As shown, in some embodiments, the guide wire 24 of the present invention is a rigid insulated conduit with connecting wires inside. One end of these connecting wires is connected to the control module of the electromagnetic traction device 21, and the other end extends to the electromagnetic coil in the connecting ring 25, which can stably transmit the current control signal emitted by the electromagnetic traction device 21 and ensure the precise adjustment of the magnetic force of the connecting ring 25. The conduit is made of materials such as polyimide, which has the characteristics of high temperature resistance and corrosion resistance, and can adapt to the oil, dust and temperature changes that may occur in the machine tool working environment. It effectively protects the internal connecting wires from external environmental interference. At the same time, its rigid structure can provide a stable support for the connecting ring 25, avoiding deformation or displacement of the guide wire 24 due to vibration during the rotation of the machine tool drive shaft 3, ensuring that the connecting ring 25 and the spindle traction device 27 are always in the preset matching position, thereby maintaining the stability and reliability of the electromagnetic traction drive.

[0068] like Figure 1 , Figure 3 , Figure 4 and Figure 5 As shown, in some embodiments, the connecting ring 25 of the present invention is a semi-circular insulating ring. Electromagnets 26 are equidistantly arranged on the inner wall of the connecting ring 25, and a gap is left between the outer surface of the electromagnets 26 and the outer surface of the spindle traction device 27. This gap prevents direct contact and friction between the electromagnets 26 and the spindle traction device 27 during relative movement, reducing component wear and extending service life. Simultaneously, the size of the gap is precisely calculated to ensure that the electromagnetic force can effectively pass through the gap and act on the spindle traction device 27, achieving stable drive of the spindle traction device 27, while preventing magnetic field interference due to an excessively small gap or magnetic force attenuation due to an excessively large gap, ensuring efficient operation of the electromagnetic drive system. The insulating ring is made of high-strength ceramic material, which not only has good insulation performance to prevent electromagnetic signal leakage, but also has high structural strength and wear resistance, and can maintain shape stability during long-term use, providing a reliable mounting base for the electromagnet 26, and further ensuring the working accuracy and stability of the entire gear encoder in the high-speed rotation environment of the machine tool drive shaft 3; at the same time, the semi-circular connecting ring 25 can effectively improve the heat dissipation performance of the outer surface of the machine tool drive shaft 3 without losing the magnetic support force on the machine tool drive shaft 3.

[0069] like Figure 5 and Figure 6 As shown, in some embodiments, the spindle traction device 27 of the present invention includes a covering ring 271. There are two covering rings 271, which are installed on both sides of the gear of the machine tool transmission shaft 3 with an interference fit. The interference fit between the covering ring 271 and the shaft of the machine tool transmission shaft 3 ensures that there is no relative sliding between them. A plurality of permanent magnets 272 are equidistantly arranged on the outer surface of the covering ring 271. These permanent magnets 272 are evenly distributed along the circumference of the covering ring 271 to form a tooth-like structure, so that the electromagnet 26 can stably apply magnetic attraction or repulsion to the permanent magnets 272. By magnetic force, one end of the machine tool transmission shaft 3 is attracted and the other end of the machine tool transmission shaft 3 is pushed, thereby correcting the angle of the machine tool transmission shaft 3. After the machine tool transmission shaft 3 rotates half a turn, the magnetic poles are reversed to change the direction of attraction and push.

[0070] A stall detector 28 is installed between two adjacent permanent magnets 272. The stall detector 28 is connected to the electromagnetic traction device 21 through the guide line 24 and transmits data to the host computer through the electromagnetic traction device 21. The stall detector 28 continuously sends pulse signals to the permanent magnets 272. The motion state of the permanent magnets 272 is judged by the changes in the intensity and frequency of the feedback pulse signals. When the machine tool transmission shaft 3 experiences abnormal speed fluctuations or sudden stop, the stall detector 28 can detect the abnormal signal within milliseconds and immediately feed back the warning information to the electromagnetic traction device 21 through the guide line 24. The electromagnetic traction device 21 quickly cuts off or adjusts the output magnetic force and triggers the alarm mechanism of the host computer at the same time to avoid problems such as abnormal gear meshing, machining accuracy deviation, or even equipment damage caused by transmission shaft stall. The permanent magnet 272 is made of neodymium iron boron strong magnetic material, which has high magnetic energy product and coercivity. It can maintain stable magnetic force output during long-term use, ensuring that the electromagnetic force between it and the electromagnet 26 in the connecting ring 25 is always within the design threshold range, providing a lasting magnetic foundation for the precise control of the gear correction mechanism 2. The inner surface of the covering ring 271 is also provided with anti-slip texture, which further enhances the friction between it and the machine tool drive shaft 3, preventing relative displacement under high speed or strong magnetic traction conditions, and ensuring that the correction force of the spindle traction device 27 on the machine tool drive shaft 3 can be accurately and timely transmitted to the corrective position. At the same time, when the speed of the machine tool drive shaft 3 monitored by the reference signal sensor 14 is not synchronized with the speed of the permanent magnet 272 detected by the stall detector 28, the host computer will immediately start the abnormal diagnosis program. By comparing the pulse interval change rate of the A and B signals with the periodic stability of the Z signal, the root cause of the speed asynchrony will be located. If the signal transmission delay is determined to be between the gear detection mechanism 1 and the spindle traction device 27, the system will automatically adjust the filtering parameters of the signal processing module to shorten the data processing cycle. If the traction lag is caused by the magnetic attenuation of the permanent magnet 272, the electromagnetic traction device 21 will dynamically compensate the excitation current of the electromagnet 26 in the connecting ring 25 according to the pulse intensity attenuation coefficient fed back by the stall detector 28, ensuring that the magnetic coupling strength between the permanent magnet 272 and the electromagnet 26 is maintained within the optimal range. During this process, the host computer records the speed synchronization error value, the compensation current change curve, and the corresponding gear machining accuracy deviation data in real time, forming a closed-loop feedback database, which provides a test basis for subsequent optimization of the gear encoder calibration algorithm.

[0071] It should be noted that in some embodiments, the electromagnetic traction device 21 of the present invention can transmit currents of different intensities and electrodes to the two connecting rings 25 respectively. By adjusting the current parameters, the difference in magnetic field strength generated by the two connecting rings 25 can be precisely controlled, thereby achieving dynamic fine-tuning of the rotation angle of the machine tool drive shaft 3 gear. When the machine tool drive shaft 3 gear has a slight angular deviation due to load changes or mechanical wear, the differentiated current transmitted by the electromagnetic traction device 21 will change the magnetic field interaction of the connecting rings 25. One connecting ring 25 will increase the attractive force on the machine tool drive shaft 3, while the other connecting ring 25 will increase the thrust, forming a torque difference to correct the angular deviation. This ensures that the synchronous rotation accuracy of the permanent magnet 272 and the machine tool drive shaft 3 gear is always maintained within the set threshold, effectively compensating for the cumulative errors that may occur during mechanical transmission. This current regulation mechanism has the characteristics of fast response speed and wide adjustment range. It can adaptively adjust according to the pulse signal fed back by the gear encoder in real time, so that the calibration process is synchronized with the rotation of the machine tool drive shaft 3 gear. It will not interfere with the normal workflow and can significantly improve the measurement stability of the encoder during long-term operation.

[0072] like Figure 3 and Figure 4 As shown, in some embodiments, the electromagnetic traction device 21 of the present invention is provided with mounting wings 22 on both sides. The gear correction mechanism 2 can be easily fixed in a predetermined position by the straight slot on the mounting wing 22 and the bolt, so as to facilitate disassembly and maintenance.

[0073] This device achieves its detection and calibration functions through the following steps:

[0074] Step 1: Signal Acquisition and Preprocessing. The signal generator module in the gear detection mechanism 1 converts the rotational motion of the machine tool transmission shaft 3 into A, B differential signals and Z signals. After the high-frequency noise and electromagnetic interference are removed by the filtering circuit, the differential amplifier adjusts the amplitude of the signal to ensure that the 1Vpp differential signal level and the 2.5V DC bias voltage form a stable signal output. The processed signal is then transmitted to the microprocessor unit.

[0075] Step 2: Data Analysis and Positioning. The microprocessor unit performs orthogonal decoding on the A and B signals, calculates the pulse count and phase difference to obtain the real-time rotation angle and displacement of the drive shaft, and monitors the occurrence time of the Z signal. Using the Z signal as a reference point, it completes the initial position calibration or zeroing operation, and calculates the drive shaft speed in combination with the Z signal period. The angle, speed and other data are packaged and sent to the host computer through the connection cable 16.

[0076] Step 3: Anomaly Diagnosis and Parameter Adjustment. After receiving the data, the host computer compares it with the preset threshold. If abnormal fluctuations in rotational speed or angle deviations exceeding the allowable range are detected, the anomaly diagnosis program is immediately initiated. By analyzing the change rate of the pulse intervals of signals A and B and the periodic stability of the Z signal, the cause of the anomaly is determined: if it is a signal transmission delay, the filtering parameters are automatically adjusted; if it is magnetic attenuation of the permanent magnet 272, a current compensation command is sent to the electromagnetic traction device 21.

[0077] Step 4: Electromagnetic calibration is performed. According to instructions from the host computer, the electromagnetic traction device 21 transmits differentiated currents to the two connecting rings 25, controlling the electromagnets 26 to generate differences in magnetic field strength. The upper connecting ring 25 enhances the magnetic attraction to the permanent magnet 272 of the spindle traction device 27, while the lower connecting ring 25 generates magnetic repulsion, creating a torque difference that pushes the machine tool transmission shaft 3 to adjust to a horizontal or vertical position. Simultaneously, the stall detector 28 monitors the movement status of the permanent magnet 272 in real time to ensure no jamming or stalling occurs during the calibration process.

[0078] Step 5: Closed-loop feedback and database update. After calibration, gear detection mechanism 1 re-acquires signals and feeds them back to the host computer to verify whether the angle deviation has been corrected to within the threshold. If it does not meet the standard, repeat steps 3 and 4 until the accuracy requirements are met; if it does meet the standard, the host computer records the current parameters, speed error values, and machining accuracy data of this calibration, and updates the closed-loop feedback database to provide a basis for subsequent calibration algorithm optimization.

[0079] Step Six: Status Monitoring and Maintenance Prompts. The system continuously monitors the contact resistance of the aviation plug and pin connector, the signal attenuation of the connecting cable 16, and the operating temperature of the electromagnetic traction device 21. When poor contact, cable aging, or excessive temperature is detected, a maintenance prompt is issued through the host computer to remind the operator to replace the component in a timely manner to ensure the long-term stable operation of the gear encoder.

[0080] In summary, the gear encoder of the present invention, which integrates automatic calibration function, sends sine and cosine ABZ signals to the gears on the machine tool transmission shaft 3 through the gear detection mechanism 1. The reference signal sensor 14 on the side of the magnetic encoder 11 facing the machine tool transmission shaft 3 transmits and receives the Z calibration square wave signal. The first TMR sensor 12 and the second TMR sensor 13 on the upper and lower sides transmit and receive the A and B cosine signals respectively. The differential signal level of A and B is 1Vpp. The Z signal appears once every one revolution, thereby realizing the real-time detection of the rotational speed and skew angle of the machine tool transmission shaft 3. The offset direction of the machine tool transmission shaft 3 is determined according to the offset values ​​of A and B. At this time, the gear correction mechanism 2 performs magnetic traction on the machine tool transmission shaft 3, thereby correcting the angle of the machine tool transmission shaft 3.

[0081] The present invention connects to the host computer through the terminal 23 on the electromagnetic traction device 21, and guides 24 are led out from the electromagnetic traction device 21. At the same time, a connecting ring 25 is set at the end of the guide line 24 to cover the outer surface of the machine tool transmission shaft 3. By changing the magnetic intensity and magnetic pole direction of the electromagnet 26 in the connecting ring 25, the force intensity and force direction of the electromagnet 26 on the spindle traction device 27 are changed, thereby calibrating the angle of the machine tool transmission shaft 3 through magnetic force.

[0082] The present invention uses electromagnet 26 and spindle traction device 27 to correct the angle of machine tool transmission shaft 3, so as to avoid direct contact between electromagnet 26 and spindle traction device 27, thereby reducing equipment wear and extending equipment service life when machine tool transmission shaft 3 rotates at high speed.

[0083] By setting the connecting ring 25 as a semi-circle to cover the outer surface of the machine tool drive shaft 3, the contact area between the machine tool drive shaft 3 and the air can be effectively increased, thereby increasing the heat dissipation rate of the outer surface of the machine tool drive shaft 3.

[0084] Therefore, this invention effectively overcomes the various shortcomings of the prior art and has high industrial application value.

[0085] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A gear encoder with integrated automatic calibration function, characterized in that, It includes a gear detection mechanism (1) and a gear correction mechanism (2), both of which are located on the side of the CNC machine tool transmission shaft (3); The gear detection mechanism (1) is used to send A, B, and Z signals to the gears on the machine tool transmission shaft (3) and to send feedback signals to the gear correction mechanism (2); The gear correction mechanism (2) is used to receive the feedback signal issued by the gear detection mechanism (1) and correct the machine tool transmission shaft (3) according to the feedback signal. The gear detection mechanism (1) includes a magnetic encoder (11). A reference signal sensor (14) is provided on the axis of the magnetic encoder (11) facing the machine tool transmission shaft (3). A first TMR sensor (12) and a second TMR sensor (13) are provided on the upper and lower sides of the reference signal sensor (14). The reference signal sensor (14) is used to transmit and receive Z signals. The first TMR sensor (12) and the second TMR sensor (13) are used to transmit and receive A and B signals, respectively. The Z signal emitted by the reference signal sensor (14) is a calibration square wave signal; The A and B signals emitted by the first TMR sensor (12) and the second TMR sensor (13) are both residual signals; The magnetic encoder (11) has an electrical connector (15) on the side away from the machine tool drive shaft (3). The electrical connector (15) has a connecting cable (16) which is connected to the host computer and the gear correction mechanism (2) respectively. The magnetic encoder (11) is provided with mounting bases (17) on both sides. The gear correction mechanism (2) includes an electromagnetic traction device (21) and a spindle traction device (27). The electromagnetic traction device (21) has a terminal block (23) on the side away from the machine tool transmission shaft (3). The terminal block (23) is connected to an external host computer. The electromagnetic traction device (21) is provided with guide lines (24) on both the upper and lower sides. The ends of the guide lines (24) are provided with connecting rings (25) that can generate magnetic force. The connecting rings (25) cover the outer surface of the machine tool transmission shaft (3). The spindle traction device (27) is provided on the outer surface of the machine tool transmission shaft (3) and is adapted to the position of the connecting ring (25). The connecting ring (25) drives the spindle traction device (27) by electromagnetic force. The connecting ring (25) is a semi-circular insulating ring. Electromagnets (26) are provided at equal intervals on the inner wall of the connecting ring (25). There is a gap between the outer surface of the electromagnet (26) and the outer surface of the main shaft traction device (27). The spindle traction device (27) includes two covering rings (271), which are installed on both sides of the gear of the machine tool transmission shaft (3) with an interference fit. The outer surface of the covering ring (271) is provided with a plurality of permanent magnets (272) at equal intervals, and a stall detector (28) is provided between two adjacent permanent magnets (272). The stall detector (28) is connected to the electromagnetic traction device (21) via the guide wire (24) and transmits data to the host computer via the electromagnetic traction device (21); the stall detector (28) continuously sends pulse signals to the permanent magnet (272) and judges the motion state of the permanent magnet (272) by the changes in the intensity and frequency of the feedback pulse signals. The magnetic force attenuation of the permanent magnet (272) causes traction lag. The electromagnetic traction device (21) will dynamically compensate the excitation current of the electromagnet (26) of the connecting ring (25) according to the pulse intensity attenuation coefficient fed back by the stall detector (28), so as to ensure that the magnetic coupling strength between the permanent magnet (272) and the electromagnet (26) is maintained in the optimal range. The data monitored by the gear detection mechanism (1) is transmitted to the electromagnetic traction device (21) through the host computer. After receiving the data, the electromagnetic traction device (21) uses the difference between the residual signals A and B to form correction data, and adjusts the magnetic force generated by the upper and lower connecting rings (25) according to the correction data. The difference in magnetic force between the upper and lower connecting rings (25) is used to drive the machine tool transmission shaft (3) to maintain a horizontal or vertical shape, and the radial position of the machine tool transmission shaft (3) is positioned according to the calibration square wave signal Z, so as to adjust the magnetic force of the connecting rings (25) in real time according to the number of rotations of the machine tool transmission shaft (3).

2. The gear encoder with integrated automatic calibration function according to claim 1, characterized in that: Signals A and B, as well as signal Z, are differential voltage signals. The differential signal levels of A and B are 1Vpp, and signal Z appears once per revolution. All signals have a DC bias voltage of 2.5V.

3. The gear encoder with integrated automatic calibration function according to claim 1, characterized in that: The end of the connecting cable (16) is provided with an aviation plug and / or pin connector.

4. The gear encoder with integrated automatic calibration function according to claim 1, characterized in that: The guide wire (24) is a rigid insulated conduit with connecting wires inside.

5. The gear encoder with integrated automatic calibration function according to claim 1, characterized in that: The electromagnetic traction device (21) can transmit currents of different intensities and electrodes to the two connecting rings (25) respectively.

6. The gear encoder with integrated automatic calibration function according to any one of claims 1-5, characterized in that: The electromagnetic traction device (21) is provided with mounting wings (22) on both sides.