Error code real-time monitoring and self-calibration circuit based on double comparators

CN122835458APending Publication Date: 2026-09-29LANGFANG YIMEISHENG SHANG SENSING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610887628.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0005]有鉴于此,本公开实施例提供了一种基于双比较器的误码实时监测与自校准电路,以解决现有技术中反射式编码器易受干扰产生误码且无法实时自校准的技术问题

Benefits of technology

[0016]本公开实施例与现有技术相比存在的有益效果包括:本公开实施例的技术方案通过双比较器构成的窗口比较电路与数字判别模块,对“00”状态进行实时检测,能够快速识别由光源波动、环境光干扰、码盘脏污等因素引发的误码,具有响应速度快、识别准确率高的优点。同时,结合MEMS微位移执行器和基准电压补偿单元,根据误码产生的不同诱因,分别通过调整芯片位置或补偿基准电压实现闭环自校准,校准精度高,能有效消除误码对位置反馈的影响,提升编码器的位置反馈精度。此外,双比较器的窗口比较设计可抑制信号幅值偏移带来的干扰,光电二极管阵列的差分输出设计进一步抑制共模干扰,减少误码产生;基准电压可动态调整,适配不同工作环境,增强了电路的环境适应性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122835458A_ABST
    Figure CN122835458A_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of encoder signal processing, and provides a double-comparator-based error code real-time monitoring and self-calibration circuit, which comprises a photoelectric detection module, a double-comparator module, a digital discrimination module and a self-calibration module; wherein: the photoelectric detection module is used for receiving a reflected light signal of a reflective encoder code disc and converting it into an analog electric signal; the double-comparator module is used for receiving the analog electric signal output by the photoelectric detection module and comparing it with a reference voltage corresponding to each comparator, thereby outputting two digital logic signals; the digital discrimination module is used for receiving the two digital logic signals output by the double-comparator module and determining an error code and outputting an error code trigger signal when the two digital logic signals are both low; and the self-calibration module is used for adjusting the position of an encoder chip through a MEMS micro displacement actuator or dynamically adjusting the reference voltage of the double-comparator module through a reference voltage compensation unit after receiving the error code trigger signal, so as to realize closed-loop self-calibration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of encoder signal processing technology, and in particular to a real-time error monitoring and self-calibration circuit based on dual comparators. Background Technology

[0002] Reflective encoders, with their advantages of compact structure, controllable cost, and convenient installation, are widely used in scenarios such as robot joint position feedback and precision mechanical positioning. Among them, reflective encoders using absolute code tracks have unique coding characteristics and single-variability, and can directly output absolute position information without initialization, making them irreplaceable in high-reliability equipment.

[0003] However, traditional reflective encoders are susceptible to various interferences during startup and long-term operation, leading to bit errors, decreased position feedback accuracy, and in severe cases, even safety accidents. Specific contributing factors include: fluctuations in light source power causing insufficient stability of the light intensity emitted to the code disk, resulting in amplitude deviations in the output signal of the photoelectric detection module; ambient light interference causing stray light to superimpose on the reflected light signal, compromising signal integrity; and dust, oil, and other contaminants adhering to the code disk surface weakening the intensity of reflected light, leading to electrical signal distortion. Furthermore, if there are multiple bit variations between adjacent codewords, combined with manufacturing and installation deviations and device synchronization errors, the probability of bit errors will further increase.

[0004] Existing technologies primarily rely on passive protection, such as improving the stability of light source power, adding light-shielding structures, and periodically cleaning the encoder. These methods cannot achieve real-time monitoring of bit errors, and once errors occur, they cannot be compensated or calibrated in real time; they can only be resolved through downtime maintenance, severely reducing the continuous operating efficiency of equipment. They are particularly unsuitable for high-reliability equipment such as surgical robots and aerospace robotic arms, where downtime is difficult. Furthermore, traditional bit error detection methods often rely on a single comparator for threshold judgment, resulting in weak anti-interference capabilities and difficulty in accurately identifying bit errors caused by signal amplitude deviations, thus failing to meet the engineering requirements of high-precision position feedback. Summary of the Invention

[0005] In view of this, the present disclosure provides a real-time error monitoring and self-calibration circuit based on dual comparators to solve the technical problem that reflective encoders in the prior art are susceptible to interference and generate errors and cannot perform real-time self-calibration.

[0006] To achieve the above objectives, the technical solution adopted in this disclosure is as follows: This disclosure provides a real-time error monitoring and self-calibration circuit based on dual comparators, including a photoelectric detection module, a dual comparator module, a digital discrimination module, and a self-calibration module. The photoelectric detection module employs an absolute code track photodiode array to receive the reflected light signal from the code disk of a reflective encoder and convert it into an analog electrical signal. The dual comparator module includes a window comparison circuit composed of a first comparator and a second comparator with adjustable reference voltages. The dual comparator module receives the analog electrical signal output from the photoelectric detection module and compares it with the reference voltage corresponding to each comparator. When the analog electrical signal is greater than or equal to the corresponding reference voltage, it outputs a high level. Otherwise, it outputs a low level, thereby outputting two digital logic signals. The reference voltage of the first comparator is the upper threshold, and the reference voltage of the second comparator is the lower threshold, with the upper threshold being greater than the lower threshold. The digital discrimination module receives the two digital logic signals output by the dual comparator module and determines an error when both digital logic signals are low, outputting an error trigger signal. The self-calibration module includes a MEMS micro-displacement actuator and a reference voltage compensation unit. After receiving the error trigger signal, it adjusts the encoder chip position through the MEMS micro-displacement actuator or dynamically adjusts the reference voltage of the dual comparator module through the reference voltage compensation unit to achieve closed-loop self-calibration.

[0007] In some embodiments, the photodiode array corresponds one-to-one with the absolute code track of the reflective encoder, and a differential output design is adopted.

[0008] In some embodiments, the upper and lower threshold values ​​of the dual comparator module are generated by a single power supply via a resistor divider and can be adjusted in real time via a digital potentiometer.

[0009] In some embodiments, the digital discrimination module consists of logic gate circuits and a microcontroller. The logic gate circuits are used to quickly detect the "00" error state, and the microcontroller is used to record the frequency, duration and location information of the error occurrence, and adaptively adjust the trigger threshold and calibration amplitude of self-calibration according to the error information.

[0010] In some embodiments, the MEMS micro-displacement actuator adopts a closed-loop control method, combined with a sigma-delta modulator to achieve high-precision displacement adjustment.

[0011] In some embodiments, the self-calibration module adaptively selects the calibration method based on the bit error frequency: when the bit error frequency is lower than a set threshold, the reference voltage compensation unit is used for voltage compensation first; when the bit error frequency is higher than the set threshold, the MEMS micro-displacement actuator is activated to adjust the encoder chip position.

[0012] In some embodiments, the real-time error monitoring and self-calibration circuit further includes a power supply module, which provides constant current power to the photoelectric detection module, logic power to the dual comparator module and the digital discrimination module, and drive power to the MEMS micro-displacement actuator.

[0013] In some embodiments, the absolute code channel uses Gray code encoding.

[0014] In some embodiments, the first comparator and the second comparator are high-speed open-drain comparators with a response time ≤100ns.

[0015] In some embodiments, the displacement adjustment accuracy of the MEMS micro-displacement actuator is ≤1μm, and the adjustment range is ±50μm.

[0016] The beneficial effects of this disclosure compared to the prior art include: the technical solution of this disclosure uses a window comparison circuit composed of dual comparators and a digital discrimination module to detect the "00" state in real time, which can quickly identify bit errors caused by factors such as light source fluctuations, ambient light interference, and code disk contamination, and has the advantages of fast response speed and high recognition accuracy. Simultaneously, by combining a MEMS micro-displacement actuator and a reference voltage compensation unit, closed-loop self-calibration is achieved by adjusting the chip position or compensating the reference voltage according to different causes of bit errors. The calibration accuracy is high, effectively eliminating the impact of bit errors on position feedback and improving the position feedback accuracy of the encoder. Furthermore, the window comparison design of the dual comparators can suppress interference caused by signal amplitude shift, and the differential output design of the photodiode array further suppresses common-mode interference, reducing bit error generation; the reference voltage can be dynamically adjusted to adapt to different working environments, enhancing the environmental adaptability of the circuit. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic block diagram of the real-time bit error monitoring and self-calibration circuit based on dual comparators in an embodiment of this disclosure; Figure 2 This is a flowchart of a real-time bit error monitoring and self-calibration circuit based on dual comparators according to an embodiment of this disclosure; Figure 3 This is a flowchart of another real-time error monitoring and self-calibration circuit based on dual comparators in an embodiment of this disclosure. Detailed Implementation

[0019] To make the technical problems, technical solutions, and beneficial effects to be solved by this disclosure clearer, the disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining this disclosure and are not intended to limit this disclosure.

[0020] It should be noted that when a component is referred to as "fixed to" or "set on" another component, it may be directly or indirectly located on that other component. When a component is referred to as "connected to" another component, it may be directly or indirectly connected to that other component. The terms "upper," "lower," "left," "right," "front," "rear," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate orientations or positions based on the accompanying drawings, and are for ease of description only, and should not be construed as limiting the technical solution. The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features. "A plurality" means two or more, unless otherwise explicitly defined.

[0021] To address the technical bottlenecks of existing reflective encoders, which are susceptible to interference and prone to bit errors, and lack real-time error monitoring and self-calibration, leading to inaccurate robot joint position feedback, this invention provides a real-time error monitoring and self-calibration circuit based on dual comparators. This circuit enables rapid error identification and real-time monitoring. Specifically, this circuit can eliminate the impact of bit errors through a closed-loop self-calibration mechanism, improving the accuracy and reliability of encoder position feedback and ensuring continuous and stable equipment operation. It is suitable for reflective encoders in equipment such as industrial robots, surgical robots, and aerospace robotic arms that have stringent requirements for position feedback accuracy and reliability.

[0022] The following will describe in detail, with reference to the accompanying drawings, the real-time error monitoring and self-calibration circuit based on dual comparators according to an embodiment of the present disclosure.

[0023] Figure 1 This is a schematic block diagram of the real-time bit error monitoring and self-calibration circuit based on dual comparators in an embodiment of this disclosure; Figure 2 This is a flowchart of a real-time bit error monitoring and self-calibration circuit based on dual comparators according to an embodiment of this disclosure; Figure 3 This is a flowchart of another real-time bit error monitoring and self-calibration circuit based on dual comparators according to an embodiment of this disclosure. The following is a summary of the process. Figures 1 to 3 Let's describe the real-time bit error monitoring and self-calibration circuit based on dual comparators provided in the embodiments of this disclosure.

[0024] like Figure 1As shown, the real-time error monitoring and self-calibration circuit based on dual comparators provided in this embodiment includes a photoelectric detection module 101, a dual comparator module 102, a digital discrimination module 103, and a self-calibration module 104; wherein: the photoelectric detection module 101 adopts an absolute code track photodiode array to receive the reflected light signal from the code disk of the reflective encoder and convert it into an analog electrical signal; the dual comparator module 102 includes a window comparison circuit composed of a first comparator and a second comparator with adjustable reference voltages. The dual comparator module is used to receive the analog electrical signal output by the photoelectric detection module and compare it with the reference voltage corresponding to each comparator. When the analog electrical signal is greater than or equal to the corresponding reference voltage, The output is high level otherwise, and low level otherwise, thus outputting two digital logic signals. The reference voltage of the first comparator is the upper threshold, and the reference voltage of the second comparator is the lower threshold, with the upper threshold being greater than the lower threshold. The digital discrimination module 103 is used to receive the two digital logic signals output by the dual comparator module, and determines that there is a bit error when both digital logic signals are low level and outputs a bit error trigger signal. The self-calibration module 104 includes a MEMS micro-displacement actuator and a reference voltage compensation unit. After receiving the bit error trigger signal, it is used to adjust the encoder chip position through the MEMS micro-displacement actuator or dynamically adjust the reference voltage of the dual comparator module through the reference voltage compensation unit to achieve closed-loop self-calibration.

[0025] Specifically, the dual comparator module can include two reference voltage adjustable first comparators and second comparators. The reference voltage of the first comparator is set to an upper threshold VH, and the reference voltage of the second comparator is set to a lower threshold VL, satisfying that the upper threshold VH > the lower threshold VL, forming a window comparison circuit. After receiving the analog electrical signal output from the photoelectric detection module, the dual comparator module compares it with the two reference voltages respectively, outputting the corresponding digital logic signal, i.e., a high level "1" or a low level "0", and transmits it to the digital discrimination module. The digital discrimination module receives the two sets of digital logic signals output by the dual comparator module, and detects whether these two sets of digital logic signals are in a "00" state through logical operations, i.e., both the first and second comparators output a low level. If this state is detected, it is determined to be a bit error, and a bit error trigger signal is output to the self-calibration module. At the same time, the digital discrimination module can record the frequency and duration of bit errors, providing data support for the optimization and adjustment of the self-calibration strategy.

[0026] After receiving the error trigger signal from the digital discrimination module, the self-calibration module initiates the self-calibration process: when the error is caused by chip position offset, the MEMS micro-displacement actuator adjusts the encoder chip's installation position in real time according to the error trigger signal, so that the photodiode array is precisely aligned with the code track, restoring the normal reception of the reflected light signal; when the error is caused by signal amplitude offset, the reference voltage compensation unit dynamically adjusts the upper threshold VH and lower threshold VL of the dual comparator module, so that the digital logic signal output by the comparator returns to normal, realizing closed-loop self-calibration of the error.

[0027] The technical solution of this disclosure uses a dual comparator window comparison circuit to monitor the analog electrical signal in real time, and only determines it as a bit error when the signal is below the lower threshold, thus avoiding false triggering caused by excessively high signals. At the same time, it adopts two self-calibration mechanisms, namely a MEMS micro-displacement actuator and a reference voltage compensation unit, to achieve closed-loop rapid self-calibration of bit errors without downtime maintenance, which significantly improves the position feedback accuracy and continuous operation reliability of the encoder.

[0028] like Figure 2 As shown, the real-time error monitoring and self-calibration circuit based on dual comparators can perform the following steps during operation: Step S201, optical signal reception and conversion.

[0029] Step S202: Signal comparison and threshold determination.

[0030] Step S203, Error identification and statistics.

[0031] Step S204: Parameter adjustment and error correction.

[0032] like Figure 3 As shown, the real-time error monitoring and self-calibration circuit based on dual comparators can also perform the following steps during operation: Step S301: Receive the reflected light signal from the code disk of the reflective encoder and convert it into an analog electrical signal.

[0033] In step S302, the voltage is compared using two comparators with adjustable reference voltages to obtain a digital logic signal.

[0034] In step S303, the digital discrimination module is used to determine whether there are any bit errors. If yes, proceed to step S304; otherwise, end the process.

[0035] Step S304: Adjust the chip position using a MEMS micro-displacement actuator or adjust the reference voltage using a reference voltage compensation unit.

[0036] Step S305: Determine if the error has been eliminated. If not, proceed to step S303; if yes, end the process.

[0037] In the embodiments disclosed herein, the photodiode array corresponds one-to-one with the absolute code track of the reflective encoder, and a differential output design is adopted.

[0038] The differential output design of this scheme effectively suppresses common-mode interference such as power supply noise and ground noise, improves the accuracy of signal detection and anti-interference ability, and further reduces the probability of bit error generation.

[0039] In this embodiment of the disclosure, the upper and lower threshold values ​​of the dual comparator module are generated by a single power supply through a resistor divider and can be adjusted in real time by a digital potentiometer, with an adjustment range of 0.5V to 5V, to meet the signal comparison requirements under different light intensity conditions.

[0040] This solution uses a single power supply and a resistor divider to generate a reference voltage. The circuit structure is simple and low-cost. The resistor parameters can be adjusted according to the actual engineering scenario to meet different accuracy requirements. The threshold can be adjusted in real time by a digital potentiometer, which can flexibly adapt to engineering scenarios with different light intensities and different code disk reflectivities, thus enhancing the environmental adaptability of the circuit.

[0041] The dual comparator module can use the TLV1701 high-speed comparator to construct the first and second comparators. This model of comparator adopts an open-drain design, supports a maximum pull-up voltage of 36V, and has a response time of 365ns, which can meet the requirements of real-time bit error monitoring. The power supply module based on the dual comparator real-time bit error monitoring and self-calibration circuit provides a 5V operating voltage. Through a voltage divider composed of three 10kΩ resistors, it can generate an upper threshold VH=3.33V and a lower threshold VL=1.66V. The ratio of the upper threshold VH to the lower threshold VL is 2, ensuring the stability of the window comparison. After receiving the analog electrical signal output by the photoelectric detection module, the dual comparator module compares the analog electrical signal with the upper threshold VH. If the analog electrical signal is greater than or equal to VH, it outputs a high level "1"; otherwise, it outputs a low level "0". The second comparator compares the analog electrical signal with the lower threshold VL. If the analog electrical signal is greater than or equal to VL, it outputs a high level "1"; otherwise, it outputs a low level "0". After that, the two sets of digital logic signals are transmitted to the digital discrimination module.

[0042] In this embodiment, the digital discrimination module is composed of logic gate circuits and a microcontroller. The logic gate circuits are used to quickly detect the "00" error state, and the microcontroller is used to record the frequency, duration and location information of the error occurrence, and adaptively adjust the trigger threshold and calibration amplitude of self-calibration according to the error information.

[0043] Specifically, the digital discrimination module can be composed of a 74HC08 AND gate circuit and an STM32 microcontroller. The AND gate circuit is used to quickly detect the "00" state. When the state is detected, it immediately outputs an error trigger signal to the self-calibration module with a response time of ≤50ns. The STM32 microcontroller collects the output signal of the dual comparator module in real time, records the frequency, duration and location information of the error occurrence, and adaptively adjusts the trigger threshold and calibration amplitude of self-calibration according to the error information.

[0044] This solution uses logic gate circuits to achieve nanosecond-level bit error detection with a fast response speed; the microcontroller records bit error statistics and adaptively adjusts the calibration strategy, making the self-calibration process more accurate and efficient, and avoiding over-calibration or under-calibration.

[0045] In this embodiment, the MEMS micro-displacement actuator adopts a closed-loop control method and combines a sigma-delta modulator to achieve high-precision displacement adjustment.

[0046] This solution uses closed-loop control combined with a ΣΔ modulator to achieve submicron-level displacement adjustment accuracy, ensuring precise alignment between the photodiode array and the code disk. This eliminates bit errors caused by positional offset at the physical level, meeting the stringent requirements of high-reliability equipment.

[0047] In this embodiment, the self-calibration module adaptively selects the calibration method based on the bit error frequency: when the bit error frequency is lower than a set threshold, the reference voltage compensation unit is used for voltage compensation first; when the bit error frequency is higher than the set threshold, the MEMS micro-displacement actuator is activated to adjust the encoder chip position.

[0048] Capacitive MEMS actuators can be selected as micro-displacement actuators. For example, one selected capacitive MEMS actuator has a displacement adjustment accuracy of 0.5μm and an adjustment range of ±50μm, and uses a ΣΔ modulator to achieve closed-loop control. After receiving the error trigger signal, the MEMS micro-displacement actuator fine-tunes the encoder chip's mounting position based on the error location information transmitted by the microcontroller, aligning the photodiode array with the code track. The reference voltage compensation unit can use a digital potentiometer AD5242, which receives control signals from the microcontroller and dynamically adjusts the upper threshold VH and lower threshold VL of the dual comparator module to compensate for signal amplitude offset. When the error frequency is lower than the set threshold, the reference voltage compensation method is used first; when the error frequency is higher than the set threshold, the MEMS micro-displacement actuator is activated to adjust the chip position, thereby achieving closed-loop self-calibration of the error.

[0049] This solution intelligently selects the calibration method based on the error frequency. For low-frequency errors, electrical compensation is used first, which is fast and has no mechanical action. For high-frequency errors, physical position adjustment is initiated to fundamentally solve the problem. This approach balances calibration efficiency and power consumption, and extends the lifespan of the MEMS actuator.

[0050] In this embodiment, the real-time error monitoring and self-calibration circuit further includes a power supply module. The power supply module provides a constant current power supply to the photoelectric detection module, a logic power supply to the dual comparator module and the digital discrimination module, and a drive power supply to the MEMS micro-displacement actuator. The power supply module can use an LM7805 voltage regulator to provide a stable 5V voltage to the entire circuit, providing a 10mA constant current power supply to the photoelectric detection module, a logic power supply to the dual comparator module and the digital discrimination module, and a 3.3V drive power supply to the MEMS micro-displacement actuator, thereby ensuring the stable operation of each module in the circuit.

[0051] The power module in this solution provides a stable operating voltage for the entire circuit and further provides independent power supply to different zones. Specifically, a constant current source is used to power the photoelectric detection, the logic power supply is used to power the digital circuit, and the drive power supply is used to power the MEMS. This avoids power crosstalk between different modules and ensures the stable operation of each module. In particular, the constant current source improves the stability of the light intensity of the light source and reduces the causes of bit errors from the source.

[0052] In this embodiment, the absolute code channel uses Gray code encoding. The absolute code channel of the photodiode array in this embodiment uses 8-bit Gray code encoding to ensure that only one bit changes between adjacent codewords, reducing errors caused by multiple bit flips. The photodiode array contains eight photodiodes, each corresponding to one of the eight code channels. Each photodiode receives the reflected light signal from its corresponding code channel and converts the light signal into a 0-5V analog electrical signal. Differential output is used to suppress common-mode interference before transmitting the signal to the dual comparator module.

[0053] Gray code ensures that only one bit changes between adjacent codewords, so even if a single bit error occurs, there will be no significant position jump, reducing the risk of bit errors caused by multiple bit flips and improving the fault tolerance and reliability of the encoder.

[0054] In this embodiment, the first and second comparators are high-speed open-drain comparators with a response time ≤100ns. The MEMS micro-displacement actuator adopts a closed-loop control method, combined with a ΣΔ modulator to achieve high-precision displacement adjustment, ensuring that the calibration accuracy meets the requirements of high-reliability equipment. The photodiode array corresponds one-to-one with the absolute code track of the reflective encoder, with each photodiode corresponding to the reflected light detection of one code track, ensuring accurate matching between the analog electrical signal output and the code track position, and improving the accuracy of signal detection. At the same time, the photodiode array adopts a differential output design, which can effectively suppress common-mode interference and further reduce the probability of bit error generation.

[0055] The high-speed comparator ensures rapid conversion from analog signals to digital logic, meeting real-time monitoring requirements and enabling fast comparison of analog electrical signals for real-time error detection. The open-drain design facilitates output signal wiring, simplifies the interface circuit of the digital discrimination module, and ensures stable superposition of output signals.

[0056] In this embodiment, the MEMS micro-displacement actuator has a displacement adjustment accuracy of ≤1μm and an adjustment range of ±50μm, employing a closed-loop control method. The MEMS micro-displacement actuator enables precise micro-adjustment of the encoder chip position, ensuring the alignment accuracy between the photoelectric detection module and the code disk. Sub-micron-level adjustment accuracy guarantees negligible alignment errors between the chip and the code disk. The ±50μm adjustment range covers typical installation deviations and thermal drift ranges, meeting high-precision calibration requirements while providing sufficient adjustment margin. Simultaneously, the MEMS micro-displacement actuator adopts a low-power design, adapting to the power supply requirements of mobile equipment such as robots.

[0057] When the industrial robot starts and runs, the reflective encoder code disk rotates. The photodiode array of the photoelectric detection module receives the reflected light signal from the code disk and converts it into an analog electrical signal, which is then transmitted to the dual comparator module. The dual comparator module compares the analog electrical signal with the upper threshold VH and the lower threshold VL respectively, and outputs two sets of digital logic signals to the digital discrimination module. The digital discrimination module detects the "00" state through an AND gate circuit. If this state is not detected, it indicates that the circuit is operating normally and the position signal is output normally. If a "00" state is detected, it is determined to be a bit error, and a bit error trigger signal is output to the self-calibration module. At the same time, the microcontroller records the bit error-related information. After receiving the bit error trigger signal, the self-calibration module performs self-calibration based on the bit error information transmitted by the microcontroller. Specifically, if the bit error is caused by signal amplitude deviation, the reference voltage compensation unit dynamically adjusts the upper limit threshold VH and the lower limit threshold VL to restore the dual comparator output signal to normal; if the bit error is caused by chip position deviation, the MEMS micro-displacement actuator fine-tunes the chip position until the bit error is eliminated, completing the self-calibration; after the self-calibration is completed, the digital discrimination module continuously monitors the bit error to ensure that no subsequent bit errors are generated, thereby ensuring the accuracy of the robot joint position feedback.

[0058] The error identification accuracy of the real-time error monitoring and self-calibration circuit based on dual comparators in the embodiments of this disclosure is ≥99.5%, the self-calibration response time is ≤1ms, and the position feedback error after self-calibration is ≤0.1°. It can effectively solve the error problem of traditional reflective encoders and improve the accuracy and reliability of joint position feedback of industrial robots. At the same time, the circuit can be directly integrated into existing reflective encoders, with strong compatibility, and can also be adapted to other equipment with high reliability requirements such as surgical robots and aerospace robotic arms.

[0059] The technical solutions of the embodiments disclosed herein have the following advantages: By using a window comparison circuit composed of dual comparators, combined with the detection of the "00" state by the digital discrimination module, errors caused by factors such as light source fluctuations, ambient light interference, and code disk contamination can be quickly identified. The monitoring response speed is fast and the error identification accuracy is high, effectively solving the technical pain point that traditional technologies cannot achieve real-time error monitoring. At the same time, relying on the single-variability characteristic of Gray code, the probability of false error judgment is further reduced, and the monitoring reliability is improved.

[0060] By combining a MEMS micro-displacement actuator with a reference voltage compensation unit, real-time self-calibration of bit errors is achieved by adjusting the chip position and compensating the reference voltage to address different causes of bit errors. This eliminates the need for downtime maintenance and ensures continuous and stable operation of the equipment. The self-calibration process employs closed-loop control, resulting in high calibration accuracy. This effectively eliminates the impact of bit errors on position feedback, improves the position feedback accuracy of the encoder, and meets the requirements of high-reliability equipment.

[0061] The dual comparator window comparison design effectively suppresses interference caused by signal amplitude shift compared to the threshold judgment method of the traditional single comparator. At the same time, the differential output design of the photodiode array further suppresses common-mode interference and reduces bit errors. The reference voltage can be dynamically adjusted to adapt to different working environments and improve the environmental adaptability of the circuit.

[0062] The circuit modules are designed to be simple and easy to integrate into the encoder chip. They do not require major modifications to the existing reflective encoder structure and have strong compatibility.

[0063] According to the embodiment of this disclosure, the real-time error monitoring and self-calibration circuit based on dual comparators uses a window comparison circuit composed of dual comparators and a digital discrimination module to detect the "00" state in real time. This allows for rapid identification of errors caused by factors such as light source fluctuations, ambient light interference, and code disk contamination, offering advantages such as fast response speed and high recognition accuracy. Simultaneously, by combining a MEMS micro-displacement actuator and a reference voltage compensation unit, closed-loop self-calibration is achieved by adjusting the chip position or compensating the reference voltage according to different causes of error generation. This results in high calibration accuracy and effectively eliminates the impact of errors on position feedback, improving the encoder's position feedback accuracy. Furthermore, the window comparison design of the dual comparators suppresses interference caused by signal amplitude shifts, and the differential output design of the photodiode array further suppresses common-mode interference, reducing error generation. The reference voltage can be dynamically adjusted to adapt to different working environments, enhancing the circuit's environmental adaptability.

[0064] The technical solution of this disclosure can realize real-time monitoring and rapid self-calibration of bit errors, has strong anti-interference ability, high position feedback accuracy, simple structure and strong compatibility, and is suitable for equipment with high reliability requirements such as industrial robots, surgical robots, and aerospace robotic arms.

[0065] The above are merely preferred embodiments of this disclosure and are not intended to limit this disclosure. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A real-time bit error monitoring and self-calibration circuit based on dual comparators, characterized in that, It includes a photoelectric detection module, a dual comparator module, a digital discrimination module, and a self-calibration module; among which: The photoelectric detection module uses an absolute code track photodiode array to receive the reflected light signal from the code disk of the reflective encoder and convert it into an analog electrical signal. The dual comparator module includes a window comparison circuit composed of a first comparator and a second comparator with adjustable reference voltages. The dual comparator module is used to receive the analog electrical signal output by the photoelectric detection module and compare it with the reference voltage corresponding to each comparator. When the analog electrical signal is greater than or equal to the corresponding reference voltage, a high level is output; otherwise, a low level is output, thereby outputting two digital logic signals. The reference voltage of the first comparator is an upper limit threshold, and the reference voltage of the second comparator is a lower limit threshold, and the upper limit threshold is greater than the lower limit threshold. The digital discrimination module is used to receive the two digital logic signals output by the dual comparator module, and to determine that the two digital logic signals are both low level and output an error trigger signal. The self-calibration module includes a MEMS micro-displacement actuator and a reference voltage compensation unit. After receiving the error trigger signal, it adjusts the encoder chip position through the MEMS micro-displacement actuator or dynamically adjusts the reference voltage of the dual comparator module through the reference voltage compensation unit to achieve closed-loop self-calibration.

2. The real-time error monitoring and self-calibration circuit based on dual comparators according to claim 1, characterized in that, The photodiode array corresponds one-to-one with the absolute code track of the reflective encoder and adopts a differential output design.

3. The real-time error monitoring and self-calibration circuit based on dual comparators according to claim 1, characterized in that, The upper and lower threshold values ​​of the dual comparator module are generated by a single power supply via a resistor divider and can be adjusted in real time via a digital potentiometer.

4. The real-time error monitoring and self-calibration circuit based on dual comparators according to claim 1, characterized in that, The digital discrimination module consists of logic gate circuits and a microcontroller. The logic gate circuits are used to quickly detect "00" error states, and the microcontroller is used to record the frequency, duration and location information of error occurrences, and adaptively adjust the trigger threshold and calibration amplitude of self-calibration based on the error information.

5. The real-time error monitoring and self-calibration circuit based on dual comparators according to claim 1, characterized in that, The MEMS micro-displacement actuator adopts a closed-loop control method and combines a sigma-delta modulator to achieve high-precision displacement adjustment.

6. The real-time error monitoring and self-calibration circuit based on dual comparators according to claim 1, characterized in that, The self-calibration module adaptively selects the calibration method based on the bit error frequency: when the bit error frequency is lower than the set threshold, the reference voltage compensation unit is used for voltage compensation first; when the bit error frequency is higher than the set threshold, the MEMS micro-displacement actuator is activated to adjust the encoder chip position.

7. The real-time error monitoring and self-calibration circuit based on dual comparators according to claim 1, characterized in that, The real-time error monitoring and self-calibration circuit also includes a power supply module, which provides constant current power to the photoelectric detection module, logic power to the dual comparator module and the digital discrimination module, and drive power to the MEMS micro-displacement actuator.

8. The real-time bit error monitoring and self-calibration circuit based on dual comparators according to claim 1, characterized in that, The absolute code channel uses Gray code encoding.

9. The real-time error monitoring and self-calibration circuit based on dual comparators according to claim 1, characterized in that, The first comparator and the second comparator are high-speed open-drain comparators with a response time of ≤100ns.

10. The real-time bit error monitoring and self-calibration circuit based on dual comparators according to claim 1, characterized in that, The displacement adjustment accuracy of the MEMS micro-displacement actuator is ≤1μm, and the adjustment range is ±50μm.