Multi-interface compatible optical-magnetic fusion absolute value encoder

By designing an optical-magnetic fusion absolute encoder, the problems of single encoder interface, poor adaptability, and insufficient accuracy are solved. It achieves multi-interface compatibility, high accuracy, strong reliability, and wide adaptability, making it suitable for complex industrial scenarios and space-constrained environments.

CN122149544BActive Publication Date: 2026-07-14TITANIUM TIGER ROBOT TECH (SHANGHAI) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TITANIUM TIGER ROBOT TECH (SHANGHAI) CO LTD
Filing Date
2026-05-11
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing encoders have a single interface type, cannot be compatible with multiple industrial communication protocols, have poor adaptability, insufficient accuracy and anti-interference ability, are large in size, and lack reliability due to their single sensing method, making it difficult to meet the needs of high-end equipment manufacturing and precision control.

Method used

Design a multi-interface compatible optical-magnetic fusion absolute encoder, which combines a magnetic Hall effect sensing unit and an optical encoder sensing unit. It is composed of a modular power supply unit, a multi-interface communication unit, and a signal processing unit, etc., to achieve compatibility with multiple industrial communication protocols, dual-sensor redundancy verification, modular power supply design, strong anti-interference ability, and adaptability to space-constrained scenarios.

Benefits of technology

It achieves multi-interface compatibility, reduces system integration costs, improves position detection accuracy and reliability, adapts to complex industrial scenarios and space-constrained environments, reduces equipment downtime risks, and lowers maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122149544B_ABST
    Figure CN122149544B_ABST
Patent Text Reader

Abstract

The application provides a multi-interface compatible optical-magnetic fusion absolute value encoder, and belongs to the technical field of position detection. The encoder comprises a magnetic Hall induction unit, an optical code induction unit, an MCU, a multi-interface communication unit, a modular power supply unit and the like. The modular power supply supplies power to each unit. The dual induction units cooperatively collect position signals and perform redundancy verification. The multi-interface communication unit automatically adapts to various industrial protocols. The reference voltage unit guarantees signal sampling accuracy. The application realizes high-precision position detection, improves equipment adaptability and operation reliability, reduces the size, is suitable for industrial robots, numerical control machine tools, servo motors and the like, and reduces system integration and maintenance costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of position detection technology, and more specifically to a multi-interface compatible optical-magnetic fusion absolute encoder. Background Technology

[0002] In key areas such as industrial robots, CNC machine tools, servo motors, and automated production lines, encoders are indispensable core position sensors. Currently, encoders are mainly divided into two categories: magnetic encoders and optical encoders. Magnetic encoders detect position by relying on changes in magnetic fields. While they have advantages such as simple structure and low cost, their accuracy and anti-interference capabilities are significantly limited, making them difficult to meet the needs of high-end equipment manufacturing and precision control. Optical encoders acquire position data through photoelectric conversion, exhibiting excellent performance in high precision, high resolution, and anti-interference capabilities, making them the mainstream choice for high-end applications. However, they face two major problems: First, their interface type is limited, unable to simultaneously support multiple industrial communication protocols such as CAN, RS-485, and EtherCAT. This results in poor compatibility when working with multiple brands and models of equipment, requiring additional conversion equipment and significantly increasing system integration costs. Second, traditional absolute value encoding circuits are complex and bulky, limiting their application in space-constrained industrial scenarios (such as small servo motors and compact automated equipment). Furthermore, encoders with a single sensing method (magnetic encoding only or optical encoding only) also suffer from insufficient reliability. A failure in the sensing unit will directly lead to interruption of position detection, affecting the operation of the entire device.

[0003] To address this, a multi-interface compatible optical-magnetic fusion absolute encoder is proposed. Summary of the Invention

[0004] The present invention aims to solve the problems mentioned in the background art by providing a multi-interface compatible optical-magnetic fusion absolute encoder.

[0005] The specific technical solution is as follows:

[0006] A multi-interface compatible optical-magnetic fusion absolute encoder includes a magnetic Hall effect sensing unit, an optical encoder sensing unit, a microcontroller unit (MCU), a multi-interface communication unit, a modular power supply unit, a reference voltage unit, a signal processing unit, a passive crystal oscillator unit, and a reset unit, wherein:

[0007] The modular power supply unit has three sub-modules: an MCU power supply module, a Hall power supply module, and an optical encoder power supply module. The MCU power supply module also includes diodes D1 and D2. One end of D1 is connected to the battery positive terminal (BATTERY), and the other end is connected to input pin 4 of U3. One end of D2 is connected to the 5V power supply pin, and the other end is connected to input pin 4 of U3, enabling emergency battery power supply in the event of a controller power failure. The MCU power supply module is electrically connected to the MCU's power supply pin to provide a 3.3V MCU operating voltage. The Hall power supply module is electrically connected to the power supply terminal of the magnetic Hall sensor unit to provide the Hall operating voltage. The optical encoder power supply module is electrically connected to the power supply terminals of the optical encoder sensor unit and the signal processing unit to provide a 3.3V CZ operating voltage. The input terminal of the reference voltage unit is electrically connected to the 5V output terminal of the modular power supply unit, and the output terminal is electrically connected to the MCU's VDDA 3.3V, used to provide a stable reference voltage for the MCU's ADC sampling.

[0008] The signal output terminal of the magnetic Hall effect sensor is electrically connected to the ADC signal input terminal of the MCU. The signal output terminal of the optical encoder sensor is electrically connected to the input terminal of the signal processing unit. The output terminal of the signal processing unit is electrically connected to the analog signal input terminal of the MCU. The two work together to transmit position detection signals to the MCU. The U2 of the multi-interface communication unit is connected to the USART1_RS485_RX, USART1_RS485_DE, and USART1_RS485_TX pins of the MCU, and is equipped with inductor L2 and matching resistors R1 and R3 to stabilize the bus idle logic. The multi-interface communication unit is bidirectionally electrically connected to the USART1 serial communication interface of the MCU for automatic identification and adaptation to various industrial communication protocols to achieve data interaction. The passive crystal oscillator unit is electrically connected to the crystal oscillator input / output pin of the MCU to provide clock signals to the MCU. The reset unit is electrically connected to the NRST reset pin of the MCU for power-on reset and abnormal reset of the MCU.

[0009] As a preferred embodiment of the present invention, the multi-interface communication unit includes a 485 communication chip U2, a filter capacitor C3, a common-mode rejection capacitor C8, terminating resistors R1 and R3, and an inductor L2; the VCC power supply pin of the 485 communication chip U2 is electrically connected to the 3.3V_MCU output terminal of the modular power supply unit; one end of the filter capacitor C3 is connected to the VCC pin of U2, and the other end is grounded, used to filter out power supply noise; pin 1 of U2 is connected to pin 32 of U5, defined as USART1_RS485_RX; pins 2 and 3 of U2 are connected to pin 34 of U5, defined as... The definition is USART1_RS485_DE; pin 4 of U2 is connected to pin 31 of U5, defined as USART1_RS485_TX; pin 6 of U2 is connected to A2 (485A external output pin) via L2, and pin 7 of U2 is connected to B2 (485B external output pin) via L2; one end of R3 is connected to -3.3V and the other end is connected to A2, and one end of R1 is connected to GND and the other end is connected to B2 to ensure that the bus is in a defined logic state when idle; one end of the common mode rejection capacitor C8 is connected to pin 6 of U2 and the other end is connected to pin 7 to suppress common mode interference in industrial environments.

[0010] As a preferred embodiment of the present invention, in the modular power supply unit:

[0011] The MCU power supply module consists of a voltage regulator chip U3, filter capacitors C16, C17, C18, and C19, and diodes D1 and D2. One end of D1 is connected to the positive terminal of the battery (BATTERY), and the other end is connected to input pin 4 of U3. One end of D2 is connected to the 5V power supply pin, and the other end is connected to input pin 4 of U3, enabling battery power supply when the controller is powered off. Pin 4 of U3 is the 5V power input terminal, and pin 3 is the enable terminal. One end of filter capacitors C18 and C19 is connected to pins 3 and 4 of U3 respectively, and the other end is grounded, used for filtering and storing energy from the input 5V power supply. Pin 1 of U3 is the 3.3V_MCU output terminal, electrically connected to the VCC pin of the MCU. One end of filter capacitors C16 and C17 is connected to pin 1 of U3, and the other end is grounded, used for filtering the output 3.3V voltage.

[0012] The Hall power supply module consists of a voltage regulator chip U1, filter capacitors C6, C7, C10, C11, and C12, and energy storage capacitors C9 and C13. Pins 3 and 4 of U1 are connected in parallel to a 5V power supply. One end of the filter capacitors C10, C11, and C12 is connected to pins 3 and 4 of U1, and the other end is grounded. The energy storage capacitors C9 and C13 are connected in parallel, with one end connected to pins 3 and 4 of U1 and the other end grounded, together achieving input power filtering and energy storage. Pin 1 of U1 is the Hall power supply output terminal, which is electrically connected to the power supply pin of the Hall device in the magnetic Hall sensing unit. Filter capacitors C6 and C7 are arranged close to the power supply pin of the Hall device, with one end connected to pin 1 of U1 and the other end grounded, to reduce power supply line noise.

[0013] The optical encoder power supply module outputs a 3.3V_CZ voltage, which is electrically connected to the power supply pin of the optical encoder chip U17 in the optical encoder sensing unit and the power supply pin of the operational amplifier in the signal processing unit.

[0014] In a preferred embodiment of the present invention, the reference voltage unit consists of a current-limiting resistor R91, voltage-dividing resistors R92 and R93, a voltage regulator chip U4, and a filter capacitor C5. One end of the current-limiting resistor R91 is connected to the 5V output terminal of the modular power supply unit, and the other end is electrically connected to one end of the voltage-dividing resistor R92 and pin 1 (VIN) of the voltage regulator chip U4, respectively, to limit the input current. The other end of R92 is electrically connected to one end of R93, and the other end of R93 is grounded, forming a voltage divider circuit. Pin 2 (FB) of U4 is connected to the connection node of R92 and R93, used to sample the voltage divider voltage, and pin 3 (GND) of U4 is grounded, forming a voltage regulation closed loop. One end of the filter capacitor C5 is connected to pin 1 of U4, and the other end is grounded, used to filter out reference voltage noise. Pin 1 of U4 outputs the ADC reference voltage, which is electrically connected to the VDDA3.3V pin of the MCU.

[0015] As a preferred embodiment of the present invention, the magnetic Hall sensing unit includes 12 sets of Hall sensing circuits with identical structures. The 12 sets of circuits are evenly distributed around the center of the encoder to achieve full-circuit position detection. Each set of Hall sensing circuits consists of a Hall device U11 (or U10, U12, U15, etc.), a filter capacitor C14, and an RC filter circuit. The filter capacitor C14 is arranged close to the VCC power supply pin of the Hall device U11, with one end connected to the VCC pin of U11 and the other end grounded, for filtering out power supply noise. The RC filter circuit consists of a resistor R37 (or R39, R41, etc.) and a capacitor C37 (or a corresponding adapter capacitor). One end of R37 is connected to the signal output terminal of U11, and the other end is electrically connected to one end of C37 and the ADC signal input terminal of the MCU (such as ADCI_IN11, ADC2_IN15, etc.). The other end of C37 is grounded, for filtering and purifying the analog signal output by the Hall device.

[0016] As a preferred embodiment of the present invention, the optical encoder sensing unit includes an optical encoder chip U17 and a signal amplification subunit; the VCC pin of the optical encoder chip U17 is electrically connected to the 3.3V_CZ output terminal of the modular power supply unit, and the AGND (analog ground) pin of U17 is grounded; U17 outputs SIN differential signals (CZ_SIN+, CZ_SIN-) and COS differential signals (CZ_COS+, CZ_COS-) through sensing an external grating, and the output terminals of the two sets of differential signals are electrically connected to the input terminals of the operational amplifier of the signal processing unit; the signal amplification subunit is an operational amplifier used to amplify the SIN / COS differential signals to a voltage range that the MCU can acquire, and the amplified signals are filtered and then input to the analog signal input terminals of the MCU (such as the corresponding CH_A and CH_B interfaces).

[0017] In a preferred embodiment of the present invention, the signal processing unit includes an operational amplifier, filter capacitors C21 and C32, and current-limiting resistors R8 and R1. The VCC pin of the operational amplifier is electrically connected to the 3.3V_CZ output terminal of the modular power supply unit, and the AGND pin is grounded. One end of the filter capacitor C21 is connected to the VCC pin of the operational amplifier, and the other end is grounded, for filtering out power supply noise of the operational amplifier. The SIN / COS differential signal output by the optical encoder chip U17 is connected to the non-inverting / inverting input terminal of the operational amplifier through the current-limiting resistors R8 and R1. One end of the filter capacitor C32 is connected to the signal input terminal of the operational amplifier, and the other end is grounded, for filtering out high-frequency noise in the differential signal. The output terminal of the operational amplifier is electrically connected to the analog signal input terminal of the MCU to realize the transmission of the amplified signal.

[0018] As a preferred embodiment of the present invention, the Hall analog signal output by the magnetic Hall sensing unit and the SIN / COS amplified signal output by the optical encoder sensing unit after signal processing together form a redundant position detection signal; the MCU samples the two signals in real time and judges the consistency of the two signals through a verification algorithm. If they are consistent, the absolute value position signal is output based on the complementary operation of the two signals; if they are inconsistent, a fault prompt is triggered to improve the reliability of position detection.

[0019] As a preferred embodiment of the present invention, it further includes an indicator light unit, which consists of a green LED (LEDG), a red LED (LEDR), a blue LED (LEDB), and current-limiting resistors R28, R32, and R35. One end of the current-limiting resistor R28 is connected to the 3.3V_MCU output terminal of the modular power supply unit, and the other end is connected to the anode of LEDG. The cathode of LEDG is connected to the first indicator pin of the MCU (e.g., PGx), used to indicate the normal operating status of the encoder. One end of R32 is connected to the 3.3V_MCU output terminal, and the other end is connected to the anode of LEDR. The cathode of LEDR is connected to the second indicator pin of the MCU (e.g., PGy), used to indicate the encoder fault status. One end of R35 is connected to the 3.3V_MCU output terminal, and the other end is connected to the anode of LEDB. The cathode of LEDB is connected to the third indicator pin of the MCU (e.g., PGz), used to indicate the communication status of the multi-interface communication unit.

[0020] As a preferred embodiment of the present invention, the passive crystal oscillator unit consists of a passive crystal oscillator and filter capacitors C24, C30, and C31. The two ends of the passive crystal oscillator are electrically connected to the crystal oscillator input pin (OSC_IN) and the crystal oscillator output pin (OSC_OUT) of the MCU, respectively. One end of C24 is connected to the connection node between the passive crystal oscillator and OSC_IN, and the other end is grounded. C30 and C31 are connected in parallel, with one end connected to the connection node between the passive crystal oscillator and OSC_OUT and the other end grounded, for filtering the crystal oscillator signal to ensure clock stability.

[0021] The reset unit consists of a pull-up resistor R21 and a filter capacitor C56. One end of R21 is connected to the 3.3V MCU output of the modular power supply unit, and the other end is electrically connected to one end of C56 and the MCU's NRST reset pin. The other end of C56 is grounded. Upon power-up, C56 charges, keeping the NRST pin low to reset the MCU. After charging is complete, the NRST pin goes high, and the MCU starts normally.

[0022] The present invention has the following beneficial effects:

[0023] 1. Solving the problems of single interface and poor adaptability: The multi-interface communication unit, through anti-interference design (common mode suppression capacitor, terminating matching resistor) and automatic protocol identification function, can be compatible with multiple industrial communication protocols without additional conversion equipment, adapt to control equipment of different brands, greatly reduce system integration costs, and significantly improve practicality in complex industrial scenarios with multiple devices working together (such as automated production lines).

[0024] 2. Solving the problems of insufficient accuracy and anti-interference: In dual-sensor mode, the optical encoder unit retains the advantages of high accuracy and high resolution. After amplification and filtering by the signal processing unit, the signal distortion rate is reduced. The magnetic Hall unit eliminates the detection blind zone through the layout of 12 arrays, and the RC filter purifies the signal. The reference voltage unit provides a stable sampling reference. The combination of the three makes the position detection accuracy of the encoder unaffected by power fluctuations and industrial interference, meeting the precision control requirements of high-end equipment.

[0025] 3. Solving the problems of large size and difficult space adaptation: The integrated design of modular power supply (integrating three power supply sub-modules) and the optimization of absolute value encoding circuit (such as simplifying the reference voltage and communication circuit structure) significantly reduce the size compared with traditional encoders, making it suitable for space-constrained scenarios such as small servo motors and compact robot joints, thus expanding the application range of optical encoder fusion encoders.

[0026] 4. Enhanced reliability and ease of maintenance: The redundant verification design of the dual sensing units ensures that even if one unit (such as a group of Hall circuits) fails, the other unit can still work temporarily, preventing sudden equipment shutdown; the indicator light unit intuitively indicates the operating status, allowing for preliminary troubleshooting without disassembly, reducing maintenance time and costs; the independent design of the power supply, communication, and sensing units means that only the corresponding module needs to be repaired in case of failure, without the need for overall replacement, further reducing operating costs.

[0027] 5. Ensure long-term stable operation: The independent filtering and anti-interference design of the modular power supply eliminates power interference between different units; the anti-common-mode interference design of the communication unit and the closed-loop voltage regulation design of the reference voltage enable the encoder to output position data stably for a long time in industrial scenarios with strong electromagnetic interference and unstable power supply (such as machine tool workshops and robot workstations), reducing the number of equipment downtimes caused by encoder failures. Attached Figure Description

[0028] Figure 1 Internal power supply circuit diagram of a multi-interface compatible optical-magnetic fusion absolute encoder provided in this embodiment of the invention;

[0029] Figure 2 A reference voltage circuit diagram for a multi-interface compatible optical-magnetic fusion absolute encoder provided in an embodiment of the present invention;

[0030] Figure 3 Hall sensing circuit diagram of a multi-interface compatible optical-magnetic fusion absolute encoder provided in this embodiment of the invention;

[0031] Figure 4 Circuit diagram of RS485 serial port of multi-interface compatible optical-magnetic fusion absolute encoder provided for embodiments of the present invention;

[0032] Figure 5A communication power interface circuit diagram of a multi-interface compatible optical-magnetic fusion absolute encoder provided for embodiments of the present invention;

[0033] Figure 6 MCU circuit diagram of a multi-interface compatible optical-magnetic fusion absolute encoder provided in embodiments of the present invention;

[0034] Figure 7 Circuit diagram of a passive crystal oscillator for a multi-interface compatible optical-magnetic fusion absolute encoder provided in an embodiment of the present invention;

[0035] Figure 8 A reset circuit diagram of a multi-interface compatible optical-magnetic fusion absolute encoder provided for embodiments of the present invention;

[0036] Figure 9 A circuit diagram of the optical encoder chip for a multi-interface compatible optical-magnetic fusion absolute encoder provided in an embodiment of the present invention;

[0037] Figure 10 A circuit diagram of the power supply for the optical encoder chip of a multi-interface compatible optical-magnetic fusion absolute encoder provided in an embodiment of the present invention;

[0038] Figure 11 Operational amplifier circuit diagram of a multi-interface compatible optical-magnetic fusion absolute encoder provided in an embodiment of the present invention;

[0039] Figure 12 The circuit diagram of the indicator light of the multi-interface compatible optical-magnetic fusion absolute encoder provided in the embodiments of the present invention. Detailed Implementation

[0040] The technical solution of the present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0041] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual images. They should not be construed as limiting the scope of this application. To better illustrate the embodiments of the present invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual dimensions of the product. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0042] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "inner," and "outer" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present application. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.

[0043] In the description of this invention, unless otherwise explicitly specified and limited, the term "connection" or similar designation indicating a connection between components should be interpreted broadly. For example, it can refer to a fixed connection, a detachable connection, or an integral part; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can refer to the internal communication between two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0044] Example: The multi-interface compatible optical-magnetic fusion absolute encoder provided in this example, such as... Figures 1-12 As shown, it includes a magnetic Hall effect sensor unit, an optical encoder sensor unit, a microcontroller unit (MCU), a multi-interface communication unit, a modular power supply unit, a reference voltage unit, a signal processing unit, a passive crystal oscillator unit, and a reset unit, wherein:

[0045] The modular power supply unit has three sub-modules: an MCU power supply module, a Hall power supply module, and an optical encoder power supply module. The MCU power supply module also includes diodes D1 and D2. One end of D1 is connected to the battery positive terminal (BATTERY), and the other end is connected to input pin 4 of U3. One end of D2 is connected to the 5V power supply pin, and the other end is connected to input pin 4 of U3, enabling emergency battery power supply in the event of a controller power failure. The MCU power supply module is electrically connected to the MCU's power supply pin to provide a 3.3V MCU operating voltage. The Hall power supply module is electrically connected to the power supply terminal of the magnetic Hall sensor unit to provide the Hall operating voltage. The optical encoder power supply module is electrically connected to the power supply terminals of the optical encoder sensor unit and the signal processing unit to provide a 3.3V CZ operating voltage. The input terminal of the reference voltage unit is electrically connected to the 5V output terminal of the modular power supply unit, and the output terminal is electrically connected to the MCU's VDDA 3.3V, used to provide a stable reference voltage for the MCU's ADC sampling.

[0046] The signal output terminal of the magnetic Hall effect sensor is electrically connected to the ADC signal input terminal of the MCU. The signal output terminal of the optical encoder sensor is electrically connected to the input terminal of the signal processing unit. The output terminal of the signal processing unit is electrically connected to the analog signal input terminal of the MCU. The two work together to transmit position detection signals to the MCU. The U2 of the multi-interface communication unit is connected to the USART1_RS485_RX, USART1_RS485_DE, and USART1_RS485_TX pins of the MCU, and is equipped with inductor L2 and matching resistors R1 and R3 to stabilize the bus idle logic. The multi-interface communication unit is bidirectionally electrically connected to the USART1 serial communication interface of the MCU for automatic identification and adaptation to various industrial communication protocols to achieve data interaction. The passive crystal oscillator unit is electrically connected to the crystal oscillator input / output pin of the MCU to provide clock signals to the MCU. The reset unit is electrically connected to the NRST reset pin of the MCU for power-on reset and abnormal reset of the MCU.

[0047] This solution addresses multiple pain points of traditional encoders by constructing a core architecture of dual sensing units, multiple interfaces, and a modular power supply. Firstly, the modular power supply provides adaptive power to the MCU, magnetic Hall effect sensing unit, and optical encoder sensing unit, avoiding power interference between different functional units and ensuring independent and stable operation of each module, thus resolving signal fluctuation issues caused by the chaotic design of traditional power supplies. Secondly, the magnetic Hall effect sensing unit and the optical encoder sensing unit work together to transmit position signals, retaining the high precision and anti-interference advantages of optical encoders while forming basic position detection redundancy through Hall effect sensing, improving the reliability of position detection. Thirdly, the multi-interface communication unit connects bidirectionally to the MCU's serial port and automatically adapts to various industrial protocols, eliminating the need for additional conversion equipment and solving the problems of single interface, poor device compatibility, and high system integration costs associated with traditional encoders. Simultaneously, a passive crystal oscillator provides a stable clock for the MCU, and a reset unit ensures normal MCU startup. Overall, this ensures reliable operation of the encoder in complex industrial scenarios and space-constrained environments, expanding the application scope of optical encoder fusion encoders.

[0048] Specifically, in this embodiment, the multi-interface communication unit includes a 485 communication chip U2, a filter capacitor C3, a common-mode rejection capacitor C8, and termination matching resistors R1 and R3; the VCC power supply pin of the 485 communication chip U2 is electrically connected to the 3.3V_MCU output terminal of the modular power supply unit; one end of the filter capacitor C3 is connected to the VCC pin of U2, and the other end is grounded to filter out power supply noise; pin 1 of U2 is connected to pin 32 of U5, and the communication pin is defined as USART1_RS485_RX; pins 2 and 3 of U2 are connected to pin 34 of U5, and the communication pin is defined as USART1_RS485_DE; pin 4 of U2 is connected to pin 31 of U5, and the communication pin is defined as USART1_RS485_TX; one end of L2 is connected to pin 6 of U2, and the other end is connected to A2 (4 One end of L2 is connected to pin 7 of U2, and the other end is connected to B2 (485B external output signal pin); one end of R3 is connected to -3.3V and the other end is connected to A2; one end of R1 is connected to GND and the other end is connected to B2 to ensure that the bus is in a definite logic state when idle, so as to avoid misjudgment by the receiving end; pins 6 (B) and 7 (A) of U2 are the 485 communication signal output terminals, corresponding to the 485_N and 485_P interfaces respectively; one end of the terminating matching resistor R1 is connected to pin 6 (B) of U2 and the other end is grounded; one end of R3 is connected to pin 7 (A) of U2 and the other end is connected to the 3.3V_MCU output terminal to ensure impedance matching of the communication line; one end of the common mode suppression capacitor C8 is connected to pin 6 (B) of U2 and the other end is connected to pin 7 (A) to suppress common mode interference in the industrial field.

[0049] This solution addresses the hardware design details of the multi-interface communication unit, specifically resolving the issue of poor communication reliability in industrial scenarios: Filter capacitor C3 filters out power supply noise from the 485 communication chip U2, preventing power fluctuations from affecting communication signal output; terminal matching resistors R1 and R3 achieve impedance matching of the communication lines, reducing reflection loss during signal transmission and ensuring signal quality during long-distance communication; common-mode rejection capacitor C8 directly suppresses common-mode interference commonly found in industrial environments—one of the main causes of packet loss and bit errors in industrial communication; simultaneously, U2 precisely interfaces with the MCU's USART1 interface, ensuring smooth signal interaction between the MCU and external devices. Ultimately, this enables the multi-interface communication unit to achieve reliable data interaction even in industrial scenarios with strong electromagnetic interference and unstable power supply, further solidifying the practicality of multi-interface compatibility.

[0050] Specifically, in this embodiment, the modular power supply unit includes:

[0051] The MCU power supply module consists of a voltage regulator chip U3, filter capacitors C16, C17, C18, and C19, and diodes D1 and D2. One end of D1 is connected to the positive terminal of the battery (BATTERY), and the other end is connected to input pin 4 of U3. One end of D2 is connected to the 5V power supply pin, and the other end is connected to input pin 4 of U3, enabling battery power supply when the controller is powered off. Pin 4 of U3 is the 5V power input terminal, and pin 3 is the enable terminal. One end of filter capacitors C18 and C19 is connected to pins 3 and 4 of U3 respectively, and the other end is grounded, used for filtering and storing energy from the input 5V power supply. Pin 1 of U3 is the 3.3V_MCU output terminal, electrically connected to the VCC pin of the MCU. One end of filter capacitors C16 and C17 is connected to pin 1 of U3, and the other end is grounded, used for filtering the output 3.3V voltage.

[0052] The Hall power supply module consists of a voltage regulator chip U1, filter capacitors C6, C7, C10, C11, and C12, and energy storage capacitors C9 and C13. Pins 3 and 4 of U1 are connected in parallel to a 5V power supply. One end of the filter capacitors C10, C11, and C12 is connected to pins 3 and 4 of U1, and the other end is grounded. The energy storage capacitors C9 and C13 are connected in parallel, with one end connected to pins 3 and 4 of U1 and the other end grounded, together achieving input power filtering and energy storage. Pin 1 of U1 is the Hall power supply output terminal, which is electrically connected to the power supply pin of the Hall device in the magnetic Hall sensing unit. Filter capacitors C6 and C7 are arranged close to the power supply pin of the Hall device, with one end connected to pin 1 of U1 and the other end grounded, to reduce power supply line noise.

[0053] The optical encoder power supply module outputs a 3.3V_CZ voltage, which is electrically connected to the power supply pin of the optical encoder chip U17 in the optical encoder sensing unit and the power supply pin of the operational amplifier in the signal processing unit.

[0054] This solution addresses the issues of low integration and high noise interference inherent in traditional power supplies by designing them as modular power supplies: The MCU power supply module features filter capacitors at both its input and output terminals, stabilizing the 5V input voltage and preventing digital noise from the MCU from negatively impacting the power supply, ensuring a clean MCU power supply. The Hall effect power supply module, through a combination of filter and energy storage capacitors, can handle load fluctuations in the Hall effect units (such as current changes when multiple Hall effect units operate simultaneously) and reduces transmission noise by placing capacitors close to the Hall effect devices, ensuring the accuracy of the analog signal sensed by the Hall effect. The optical encoder power supply module is dedicated to powering the optical encoder chip and operational amplifier, preventing power supply noise from other units from affecting the output and amplification of the optical encoder differential signal. These three sub-modules operate independently and are specifically optimized, eliminating power supply interference between different functional units, reducing the size of the power supply section through integrated design, adapting to space-constrained scenarios, and improving the reliability of the entire encoder power supply system.

[0055] Specifically, in this embodiment, the reference voltage unit consists of a current-limiting resistor R91, voltage-dividing resistors R92 and R93, a voltage regulator chip U4, and a filter capacitor C5. One end of the current-limiting resistor R91 is connected to the 5V output terminal of the modular power supply unit, and the other end is electrically connected to one end of the voltage-dividing resistor R92 and pin 1 (VIN) of the voltage regulator chip U4, respectively, to limit the input current. The other end of R92 is electrically connected to one end of R93, and the other end of R93 is grounded, forming a voltage divider circuit. Pin 2 (FB) of U4 is connected to the connection node of R92 and R93, used to sample the voltage divider voltage, and pin 3 (GND) of U4 is grounded, forming a voltage regulation closed loop. One end of the filter capacitor C5 is connected to pin 1 of U4, and the other end is grounded, used to filter out reference voltage noise. Pin 1 of U4 outputs the ADC reference voltage, which is electrically connected to the VDDA3.3V pin of the MCU.

[0056] This solution addresses the issue of insufficient ADC sampling accuracy caused by unstable reference voltage in traditional encoders by designing a reference voltage unit. Current-limiting resistor R91 prevents excessive input current from damaging the voltage regulator chip U4, protecting the core components of the reference circuit. Voltage divider resistors R92 and R93, together with the voltage regulator chip U4, form a closed-loop voltage regulation structure, ensuring the output reference voltage remains stable regardless of fluctuations in the input 5V power supply. Filter capacitor C5 filters out high-frequency noise in the reference voltage, further reducing voltage fluctuations. Since the MCU's ADC sampling (used to acquire Hall effect and optical encoder signals) relies on a stable reference voltage, a stable reference voltage directly improves the ADC sampling accuracy, thereby reducing acquisition errors in Hall effect analog signals and optical encoder amplified signals. This ensures more accurate position data output by the encoder, solving the problem of decreased position detection accuracy caused by reference voltage fluctuations in traditional encoders.

[0057] Specifically, in this embodiment, the magnetic Hall sensing unit includes 12 sets of Hall sensing circuits with identical structures. The 12 sets of circuits are evenly distributed around the center of the encoder to achieve full-circuit position detection. Each set of Hall sensing circuits consists of a Hall device U11 (or U10, U12, U15, etc.), a filter capacitor C14, and an RC filter circuit. The filter capacitor C14 is arranged close to the VCC power supply pin of the Hall device U11, with one end connected to the VCC pin of U11 and the other end grounded, used to filter out power supply noise. The RC filter circuit consists of a resistor R37 (or R39, R41, etc.) and a capacitor C37 (or a corresponding adapter capacitor). One end of R37 is connected to the signal output terminal of U11, and the other end is electrically connected to one end of C37 and the ADC signal input terminal of the MCU (such as ADCI_IN11, ADC2_IN15, etc.). The other end of C37 is grounded, used to filter and purify the analog signal output by the Hall device.

[0058] This solution addresses the issues of blind spots and excessive signal noise in traditional Hall effect sensors through meticulous design of the magnetic Hall sensing unit. Twelve Hall sensing circuits are evenly distributed around the center, achieving full-circumference position coverage of the encoder and avoiding blind spots associated with single-point or limited Hall effect detection, ensuring position signal acquisition across the entire measurement range. The filter capacitor C14 in each circuit is positioned close to the Hall device, directly filtering out power supply noise and reducing the impact of power supply fluctuations on the Hall signal output. An RC filter circuit further purifies the analog signal output from the Hall device, filtering out electromagnetic interference noise from the industrial environment, resulting in a purer Hall signal input to the MCU. Simultaneously, the twelve circuits provide inherent redundancy—even if one circuit fails, the remaining circuits can still operate normally, improving the fault tolerance of the Hall sensing unit and laying the foundation for subsequent dual-sensor redundancy verification.

[0059] Specifically, in this embodiment, the optical encoder sensing unit includes an optical encoder chip U17 and a signal amplification subunit; the VCC pin of the optical encoder chip U17 is electrically connected to the 3.3V_CZ output terminal of the modular power supply unit, and the AGND (analog ground) pin of U17 is grounded; U17 outputs SIN differential signals (CZ_SIN+, CZ_SIN-) and COS differential signals (CZ_COS+, CZ_COS-) through sensing an external grating, and the output terminals of these two sets of differential signals are electrically connected to the input terminals of the operational amplifier of the signal processing unit; the signal amplification subunit is an operational amplifier used to amplify the SIN / COS differential signals to a voltage range that the MCU can acquire, and the amplified signals are filtered and then input to the analog signal input terminals of the MCU (such as the corresponding CH_A and CH_B interfaces).

[0060] This solution, designed for optical encoder sensing units, fully leverages the high precision advantages of optical encoders while addressing the issue of weak original signals. The SIN / COS differential signal output by the U17 optical encoder chip itself possesses strong anti-interference capabilities, reducing the impact of external interference during signal transmission and making it more suitable for complex industrial environments compared to single-ended signals. The signal amplification subunit (operational amplifier) ​​amplifies the original differential signal from the optical encoder to a voltage range that the MCU can accurately acquire. Traditional optical encoders have relatively small original signal amplitudes, making them prone to acquisition errors by the MCU due to weak signals. Amplification significantly improves the MCU's recognition accuracy of the optical encoder signal. Ultimately, the optical encoder sensing unit retains its core advantages of high precision and high resolution while solving the problem of difficult utilization of the original signal through signal amplification. This ensures that the optical encoder signal can be effectively converted into accurate position data, meeting the stringent requirements of high-end equipment for position detection accuracy.

[0061] Specifically, in this embodiment, the signal processing unit includes an operational amplifier, filter capacitors C21 and C32, and current-limiting resistors R8 and R1. The VCC pin of the operational amplifier is electrically connected to the 3.3V_CZ output terminal of the modular power supply unit, and the AGND pin is grounded. One end of the filter capacitor C21 is connected to the VCC pin of the operational amplifier, and the other end is grounded, used to filter out power supply noise of the operational amplifier. The SIN / COS differential signal output by the optical encoder chip U17 is connected to the non-inverting / inverting input terminal of the operational amplifier through the current-limiting resistors R8 and R1. One end of the filter capacitor C32 is connected to the signal input terminal of the operational amplifier, and the other end is grounded, used to filter out high-frequency noise in the differential signal. The output terminal of the operational amplifier is electrically connected to the analog signal input terminal of the MCU to realize the transmission of the amplified signal.

[0062] This solution addresses the signal distortion problem caused by the simplicity of traditional signal processing by optimizing the signal processing unit: Filter capacitor C21 filters out power supply noise from the operational amplifier, preventing amplification factor drift due to power instability and ensuring signal amplification accuracy; current-limiting resistors R8 and R1 prevent excessive amplitude of the original differential signal from damaging the operational amplifier input, protecting the core signal processing components; filter capacitor C32 specifically filters out high-frequency noise in the differential signal—this type of noise often originates from motors, frequency converters, and other equipment in industrial settings, causing signal waveform distortion; filtering out this noise results in a smoother signal. The combination of the operational amplifier's amplification function and multi-stage filtering ensures that the optical encoder signal input to the MCU is both amplified accurately and cleanly, free of noise, avoiding position calculation errors caused by signal distortion and further improving the encoder's position detection accuracy.

[0063] Specifically, in this embodiment, the Hall analog signal output by the magnetic Hall sensing unit and the SIN / COS amplified signal output by the optical encoder sensing unit after signal processing together form a redundant position detection signal. The MCU samples the two signals in real time and judges the consistency of the two signals through a verification algorithm. If they are consistent, the MCU outputs an absolute position signal based on the complementary operation of the two signals. If they are inconsistent, the MCU triggers a fault prompt to improve the reliability of position detection.

[0064] This solution addresses the issues of lack of redundancy and difficulty in fault detection in traditional single-sensor units by employing redundant verification and complementary computation of dual sensing units. The MCU performs real-time verification of the Hall effect signal and the optical encoder signal, promptly identifying anomalies in a single signal (such as signal errors caused by dust obstruction of the optical encoder or signal interruption due to poor contact of the Hall effect device), preventing incorrect encoder position data output due to single-signal failures. The complementary computation when the two signals are consistent combines the rapid response of Hall effect sensing with the high precision of optical encoder sensing, resulting in an output absolute position signal that is both accurate and responsive. The fault indication function for inconsistencies allows users to quickly detect encoder abnormalities without disassembling the equipment, preventing damage to industrial equipment (such as CNC machine tools and servo motors) caused by faulty operation. This redundancy design significantly improves the reliability of encoders in critical industrial equipment, meeting the safety requirements of high-end equipment manufacturing.

[0065] Specifically, in this embodiment, an indicator light unit is also included. The indicator light unit consists of a green LED (LEDG), a red LED (LEDR), a blue LED (LEDB), and current-limiting resistors R28, R32, and R35. One end of the current-limiting resistor R28 is connected to the 3.3V MCU output terminal of the modular power supply unit, and the other end is connected to the anode of LEDG. The cathode of LEDG is connected to the first indicator pin of the MCU (e.g., PGx), used to indicate the normal operating status of the encoder. One end of R32 is connected to the 3.3V MCU output terminal, and the other end is connected to the anode of LEDR. The cathode of LEDR is connected to the second indicator pin of the MCU (e.g., PGy), used to indicate the encoder fault status. One end of R35 is connected to the 3.3V MCU output terminal, and the other end is connected to the anode of LEDB. The cathode of LEDB is connected to the third indicator pin of the MCU (e.g., PGz), used to indicate the communication status of the multi-interface communication unit.

[0066] This solution addresses the issues of unintuitive encoder status and difficult troubleshooting through the design of indicator light units: green LEDs clearly indicate the encoder's normal operating status, allowing users to confirm its basic operation without the need for instruments; red LEDs specifically indicate fault conditions, quickly distinguishing between "equipment malfunction" and "encoder malfunction," reducing troubleshooting time—traditional troubleshooting requires disassembly and testing, while red LEDs directly pinpoint encoder problems; blue LEDs indicate communication status, quickly determining whether communication interruptions are due to "encoder communication module failure" or "external communication link failure" (such as a loose communication cable), further simplifying the maintenance process. Overall, this solution makes encoder status monitoring more convenient, reduces downtime caused by encoder problems in industrial equipment, and improves maintenance efficiency.

[0067] Specifically, in this embodiment, the passive crystal oscillator unit consists of a passive crystal oscillator and filter capacitors C24, C30, and C31. The two ends of the passive crystal oscillator are electrically connected to the crystal oscillator input pin (OSC_IN) and the crystal oscillator output pin (OSC_OUT) of the MCU, respectively. One end of C24 is connected to the connection node between the passive crystal oscillator and OSC_IN, and the other end is grounded. C30 and C31 are connected in parallel, with one end connected to the connection node between the passive crystal oscillator and OSC_OUT and the other end grounded, which is used to filter the crystal oscillator signal and ensure clock stability.

[0068] The reset unit consists of a pull-up resistor R21 and a filter capacitor C56. One end of R21 is connected to the 3.3V MCU output of the modular power supply unit, and the other end is electrically connected to one end of C56 and the NRST reset pin of the MCU. The other end of C56 is grounded. During power-up, C56 charges, keeping the NRST pin low to reset the MCU. After charging is complete, the NRST pin goes high, and the MCU starts up normally.

[0069] This solution addresses the instability issue in traditional MCU core control units by designing a passive crystal oscillator unit and a reset unit. The passive crystal oscillator's filter capacitors C24, C30, and C31 reduce clock signal noise interference, ensuring stable MCU clock frequency. MCU signal processing (such as the timing of Hall effect and optical encoder signal acquisition, and data computation) relies on a stable clock; clock instability can lead to signal processing delays or calculation errors. Filtering ensures accurate MCU timing. The reset unit's pull-up resistor R21 and capacitor C56 form a power-on reset circuit, ensuring the MCU starts from its initial state each time it powers on, preventing program corruption caused by power-on anomalies. Simultaneously, capacitor discharge in abnormal situations can trigger an MCU reset, quickly restoring normal operation. The combination of these two components ensures stable operation of the encoder's core control unit (MCU), preventing encoder failure due to MCU malfunction and further improving the overall reliability of the encoder.

[0070] In summary, the working principle of this encoder is as follows:

[0071] 1. Power Supply: The modular power supply unit is the core power source, divided into three independent sub-modules: the MCU power supply module converts the input 5V voltage to 3.3V_MCU voltage through the voltage regulator chip U3, and provides emergency battery power through D1 and D2. After being purified by the input / output filter capacitors, it supplies power to the MCU to avoid digital noise interference; the Hall power supply module outputs an adaptive voltage through the voltage regulator chip U1, and provides stable power to 12 sets of Hall sensor circuits through the filter capacitors and energy storage capacitors, while reducing line transmission noise; the optical encoder power supply module outputs 3.3V_CZ voltage, which is dedicated to powering the operational amplifiers of the optical encoder chip and the signal processing unit, preventing power noise from other units from affecting the optical encoder signal. The three sub-modules operate independently, completely eliminating power interference between different functional units.

[0072] 2. Reference Voltage Guarantee: The reference voltage unit draws power from the 5V output of the modular power supply. After being protected by the current-limiting resistor R91, it forms a closed-loop voltage regulation structure with the voltage divider resistors R92 and R93 and the voltage regulator chip U4 to output a stable reference voltage. After the noise is filtered out by the filter capacitor C5, it is connected to the VDDA3.3V interface of the MCU to provide a stable reference for the MCU's ADC sampling (acquiring Hall and optical encoder signals) and avoid sampling errors caused by reference voltage fluctuations.

[0073] 3. Position signal acquisition stage: The "magnetic Hall + optical encoder" dual sensing mode is adopted. The 12 sets of Hall circuits of the magnetic Hall sensing unit are evenly distributed around the center of the encoder. Each set of Hall devices collects the analog signal of the corresponding position. After being purified by the RC filter circuit, it is directly input into the ADC interface of the MCU. The optical encoder chip U17 of the optical encoder sensing unit outputs two sets of differential signals, SIN and COS, by sensing the external grating. This signal is first sent to the operational amplifier of the signal processing unit. After amplification (solving the problem of weak original signal) and filtering high-frequency noise by the filter capacitor C32, it is then input into the analog signal interface of the MCU.

[0074] 4. Signal Processing and Calculation: The MCU operates normally using a stable clock signal provided by a passive crystal oscillator (the crystal oscillator works in conjunction with filter capacitors C24, C30, and C31 to reduce clock noise). It first performs real-time verification on the acquired Hall effect analog signal and optical encoder / amplifier signal. If the two signals are consistent, a precise absolute position signal is output through complementary calculation; if they are inconsistent, a fault indication is triggered. Simultaneously, the reset unit (pull-up resistor R21 and capacitor C56) resets the MCU upon power-up, preventing program corruption due to power-up anomalies and ensuring stable signal processing by the MCU.

[0075] 5. Data Interaction and Status Indication: The 485 communication chip U2 of the multi-interface communication unit is connected to the MCU according to the pin definitions of USART1_RS485_RX, USART1_RS485_DE, and USART1_RS485_TX. The bus idle logic state is ensured by L2, R1, and R3, the terminal matching resistors R1 and R3 ensure the signal transmission quality, and the common-mode rejection capacitor C8 suppresses industrial common-mode interference. It automatically identifies and adapts to the communication protocol of external devices (such as RS-485) to realize the interaction of position data and control commands. The green, red, and blue LEDs of the indicator unit are controlled by the MCU to indicate normal operation, fault, and communication status respectively, so as to facilitate the staff to monitor the encoder operation status in real time.

[0076] How to use:

[0077] Encoders are mainly used in scenarios requiring high-precision position detection, such as industrial robot joints, CNC machine tool spindles, and servo motors. The specific usage process is as follows:

[0078] 1. Installation and Deployment: Mechanically install the encoder on the rotating shaft of the equipment (such as the motor shaft or main shaft), ensuring that the grating of the optical encoder chip U17 is aligned with the rotating parts and that the 12 sets of Hall circuits are unobstructed around the center of the shaft; when wiring, connect the external 5V power supply to the input terminal of the modular power supply unit, and connect the communication interface (such as the RS-485 interface) of the external control device (such as the PLC or controller) to the 485_N or 485_P interface of the multi-interface communication unit, ensuring that the wiring is secure and free from short circuits.

[0079] 2. Power-on initialization: After the external power supply is connected, the three sub-modules of the modular power supply start up respectively to supply power to the MCU, Hall unit and optical encoder unit; in case of power failure, emergency power can be supplied by battery, the reset unit works automatically, capacitor C56 is charged to keep the MCU at a low level for reset, after charging is completed, the MCU starts up, the passive crystal oscillator unit starts to provide a stable clock, the encoder enters the initialization state, at this time the green LED lights up (indicating normal start).

[0080] 3. Protocol Adaptation and Parameter Confirmation: The multi-interface communication unit automatically detects the communication protocol of the external control device (such as RS-485 protocol), and establishes a communication connection with the external device directly without the need for manual configuration of the conversion device; the operator can send commands through the external device to confirm whether the encoder is transmitting position data normally. If the blue LED is constantly lit, it indicates that the communication is normal.

[0081] 4. Normal operation monitoring: After the equipment is started, the magnetic Hall unit and optical encoder unit of the encoder synchronously collect the position signal of the rotating shaft. The MCU processes and outputs the absolute position data in real time, which is transmitted to the external control equipment through the communication unit to realize the precise positioning and control of the equipment. During operation, if the red LED lights up, it indicates that the two sensing signals are inconsistent or there is a fault. The machine needs to be stopped for inspection (such as checking whether the Hall circuit is blocked or whether the optical encoder grating is offset).

[0082] 5. Routine Maintenance: Regularly observe the indicator light status. The green LED confirms the working status, and the blue LED confirms the communication status. The operating status can be initially judged without disassembling the encoder. If communication interruption occurs, first check whether the communication interface wiring and the resistors and capacitors of the multi-interface unit are damaged. If the position detection accuracy decreases, check whether the voltage regulator chip U4 and filter capacitor C5 of the reference voltage unit are normal, or whether the RC filter component of the Hall circuit is faulty. During maintenance, there is no need to replace the entire encoder. Only the faulty unit needs to be repaired, which reduces maintenance costs.

[0083] Technical effects:

[0084] 1. Solving the problems of single interface and poor adaptability: The multi-interface communication unit, through anti-interference design (common mode suppression capacitor, terminating matching resistor) and automatic protocol identification function, can be compatible with multiple industrial communication protocols without additional conversion equipment, adapt to control equipment of different brands, greatly reduce system integration costs, and significantly improve practicality in complex industrial scenarios with multiple devices working together (such as automated production lines).

[0085] 2. Solving the problems of insufficient accuracy and anti-interference: In dual-sensor mode, the optical encoder unit retains the advantages of high accuracy and high resolution. After amplification and filtering by the signal processing unit, the signal distortion rate is reduced. The magnetic Hall unit eliminates the detection blind zone through the layout of 12 arrays, and the RC filter purifies the signal. The reference voltage unit provides a stable sampling reference. The combination of the three makes the position detection accuracy of the encoder unaffected by power fluctuations and industrial interference, meeting the precision control requirements of high-end equipment.

[0086] 3. Solving the problems of large size and difficult space adaptation: The integrated design of modular power supply (integrating three power supply sub-modules) and the optimization of absolute value encoding circuit (such as simplifying the reference voltage and communication circuit structure) significantly reduce the size compared with traditional encoders, making it suitable for space-constrained scenarios such as small servo motors and compact robot joints, thus expanding the application range of optical encoder fusion encoders.

[0087] 4. Enhanced reliability and ease of maintenance: The redundant verification design of the dual sensing units ensures that even if one unit (such as a group of Hall circuits) fails, the other unit can still work temporarily, preventing sudden equipment shutdown; the indicator light unit intuitively indicates the operating status, allowing for preliminary troubleshooting without disassembly, reducing maintenance time and costs; the independent design of the power supply, communication, and sensing units means that only the corresponding module needs to be repaired in case of failure, without the need for overall replacement, further reducing operating costs.

[0088] 5. Ensure long-term stable operation: The independent filtering and anti-interference design of the modular power supply eliminates power interference between different units; the anti-common-mode interference design of the communication unit and the closed-loop voltage regulation design of the reference voltage enable the encoder to output position data stably for a long time in industrial scenarios with strong electromagnetic interference and unstable power supply (such as machine tool workshops and robot workstations), reducing the number of equipment downtimes caused by encoder failures.

[0089] In summary, this encoder retains the high-precision advantages of optical encoders while solving the adaptability, size, and reliability problems of traditional encoders through magnetic Hall fusion, multi-interface compatibility, and modular design. It can be widely used in high-end equipment manufacturing and complex industrial scenarios, combining practicality and economy.

[0090] The above are merely preferred embodiments of the present invention and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should recognize that any equivalent substitutions and obvious changes made based on the description and illustrations of the present invention should be included within the protection scope of the present invention.

Claims

1. A multi-interface compatible optical-magnetic fusion absolute encoder, characterized in that, It includes a magnetic Hall effect sensor unit, an optical encoder sensor unit, an MCU, a multi-interface communication unit, a modular power supply unit, a reference voltage unit, a signal processing unit, a passive crystal oscillator unit, and a reset unit, wherein: The modular power supply unit has three sub-modules: an MCU power supply module, a Hall power supply module, and an optical encoder power supply module. The MCU power supply module also includes diodes D1 and D2. One end of D1 is connected to the battery positive terminal (BATTERY), and the other end is connected to input pin 4 of U3. One end of D2 is connected to the 5V power supply pin, and the other end is connected to input pin 4 of U3, enabling emergency battery power supply in the event of a controller power failure. The MCU power supply module is electrically connected to the MCU's power supply pin to provide a 3.3V MCU operating voltage. The Hall power supply module is electrically connected to the power supply terminal of the magnetic Hall sensor unit to provide the Hall operating voltage. The optical encoder power supply module is electrically connected to the power supply terminals of the optical encoder sensor unit and the signal processing unit to provide a 3.3V CZ operating voltage. The input terminal of the reference voltage unit is electrically connected to the 5V output terminal of the modular power supply unit, and the output terminal is electrically connected to the MCU's VDDA 3.3V, used to provide a stable reference voltage for the MCU's ADC sampling. The signal output terminal of the magnetic Hall effect sensor is electrically connected to the ADC signal input terminal of the MCU. The signal output terminal of the optical encoder sensor is electrically connected to the input terminal of the signal processing unit. The output terminal of the signal processing unit is electrically connected to the analog signal input terminal of the MCU. The two work together to transmit position detection signals to the MCU. The U2 of the multi-interface communication unit is connected to the USART1_RS485_RX, USART1_RS485_DE, and USART1_RS485_TX pins of the MCU, and is equipped with inductor L2 and matching resistors R1 and R3 to stabilize the bus idle logic. The multi-interface communication unit is bidirectionally electrically connected to the USART1 serial communication interface of the MCU for automatic identification and adaptation to various industrial communication protocols to achieve data interaction. The passive crystal oscillator unit is electrically connected to the crystal oscillator input / output pin of the MCU to provide clock signals to the MCU. The reset unit is electrically connected to the NRST reset pin of the MCU for power-on reset and abnormal reset of the MCU.

2. The multi-interface compatible optical-magnetic fusion absolute encoder according to claim 1, characterized in that, The multi-interface communication unit includes a 485 communication chip U2, a filter capacitor C3, a common-mode rejection capacitor C8, terminating resistors R1 and R3, and an inductor L2. The VCC power supply pin of the 485 communication chip U2 is electrically connected to the 3.3V MCU output of the modular power supply unit. One end of the filter capacitor C3 is connected to the VCC pin of U2, and the other end is grounded to filter out power supply noise. Pin 1 of U2 is connected to pin 32 of U5, defined as USART1_RS485_RX; pins 2 and 3 of U2 are connected to pin 34 of U5, defined as USAR... T1_RS485_DE; Pin 4 of U2 is connected to pin 31 of U5, defined as USART1_RS485_TX; Pin 6 of U2 is connected to A2 (485A external output pin) via L2, and pin 7 of U2 is connected to B2 (485B external output pin) via L2; R3 is connected to -3.3V at one end and to A2 at the other end, and R1 is connected to GND at one end and to B2 at the other end to ensure that the bus is in a defined logic state when idle; Common mode rejection capacitor C8 is connected to pin 6 of U2 at one end and to pin 7 at the other end to suppress common mode interference in industrial environments.

3. The multi-interface compatible optical-magnetic fusion absolute encoder according to claim 1, characterized in that, In the modular power supply unit: The MCU power supply module consists of a voltage regulator chip U3, filter capacitors C16, C17, C18, and C19, and diodes D1 and D2. One end of D1 is connected to the positive terminal of the battery (BATTERY), and the other end is connected to input pin 4 of U3. One end of D2 is connected to the 5V power supply pin, and the other end is connected to input pin 4 of U3, enabling battery power supply when the controller is powered off. Pin 4 of U3 is the 5V power input terminal, and pin 3 is the enable terminal. One end of filter capacitors C18 and C19 is connected to pins 3 and 4 of U3 respectively, and the other end is grounded, used for filtering and storing energy from the input 5V power supply. Pin 1 of U3 is the 3.3V_MCU output terminal, electrically connected to the VCC pin of the MCU. One end of filter capacitors C16 and C17 is connected to pin 1 of U3, and the other end is grounded, used for filtering the output 3.3V voltage. The Hall power supply module consists of a voltage regulator chip U1, filter capacitors C6, C7, C10, C11, and C12, and energy storage capacitors C9 and C13. Pins 3 and 4 of U1 are connected in parallel to a 5V power supply. One end of the filter capacitors C10, C11, and C12 is connected to pins 3 and 4 of U1, and the other end is grounded. The energy storage capacitors C9 and C13 are connected in parallel, with one end connected to pins 3 and 4 of U1 and the other end grounded, together achieving input power filtering and energy storage. Pin 1 of U1 is the Hall power supply output terminal, which is electrically connected to the power supply pin of the Hall device in the magnetic Hall sensing unit. Filter capacitors C6 and C7 are arranged close to the power supply pin of the Hall device, with one end connected to pin 1 of U1 and the other end grounded, to reduce power supply line noise. The optical encoder power supply module outputs a 3.3V_CZ voltage, which is electrically connected to the power supply pin of the optical encoder chip U17 in the optical encoder sensing unit and the power supply pin of the operational amplifier in the signal processing unit.

4. The multi-interface compatible optical-magnetic fusion absolute encoder according to claim 1, characterized in that, The reference voltage unit consists of a current-limiting resistor R91, voltage divider resistors R92 and R93, a voltage regulator chip U4, and a filter capacitor C5. One end of the current-limiting resistor R91 is connected to the 5V output terminal of the modular power supply unit, and the other end is electrically connected to one end of the voltage divider resistor R92 and pin 1 of the voltage regulator chip U4 to limit the input current. The other end of R92 is electrically connected to one end of R93, and the other end of R93 is grounded, forming a voltage divider circuit. Pin 2 of U4 is connected to the connection node of R92 and R93 to sample the voltage divider voltage, and pin 3 of U4 is grounded to form a voltage regulation closed loop. One end of the filter capacitor C5 is connected to pin 1 of U4, and the other end is grounded to filter out reference voltage noise. Pin 1 of U4 outputs the ADC reference voltage, which is electrically connected to the VDDA3.3V pin of the MCU.

5. The multi-interface compatible optical-magnetic fusion absolute encoder according to claim 1, characterized in that, The magnetic Hall effect sensing unit includes 12 identical Hall effect sensing circuits, which are evenly distributed around the center of the encoder to achieve full-circuit position detection. Each Hall effect sensing circuit consists of a Hall effect device U11, a filter capacitor C14, and an RC filter circuit. The filter capacitor C14 is located near the VCC power supply pin of the Hall effect device U11, with one end connected to the VCC pin of U11 and the other end grounded, used to filter out power supply noise. The RC filter circuit consists of a resistor R37 and a capacitor C37. One end of R37 is connected to the signal output terminal of U11, and the other end is electrically connected to one end of C37 and the ADC signal input terminal of the MCU. The other end of C37 is grounded, used to filter and purify the analog signal output by the Hall effect device.

6. The multi-interface compatible optical-magnetic fusion absolute encoder according to claim 1, characterized in that, The optical encoder sensing unit includes an optical encoder chip U17 and a signal amplification subunit. The VCC pin of the optical encoder chip U17 is electrically connected to the 3.3V_CZ output terminal of the modular power supply unit, and the AGND pin of U17 is grounded. U17 outputs SIN differential signal and COS differential signal through sensing an external grating. The output terminals of these two sets of differential signals are electrically connected to the input terminals of the operational amplifier of the signal processing unit. The signal amplification subunit is an operational amplifier used to amplify the SIN / COS differential signal to a voltage range that the MCU can acquire. The amplified signal is filtered and then input to the analog signal input terminal of the MCU.

7. The multi-interface compatible optical-magnetic fusion absolute encoder according to claim 1, characterized in that, The signal processing unit includes an operational amplifier, filter capacitors C21 and C32, and current-limiting resistors R8 and R1. The VCC pin of the operational amplifier is electrically connected to the 3.3V_CZ output of the modular power supply unit, and the AGND pin is grounded. One end of the filter capacitor C21 is connected to the VCC pin of the operational amplifier, and the other end is grounded to filter out power supply noise of the operational amplifier. The SIN / COS differential signal output by the optical encoder chip U17 is connected to the non-inverting / inverting input of the operational amplifier through the current-limiting resistors R8 and R1. One end of the filter capacitor C32 is connected to the signal input of the operational amplifier, and the other end is grounded to filter out high-frequency noise in the differential signal. The output of the operational amplifier is electrically connected to the analog signal input of the MCU to realize the transmission of the amplified signal.

8. The multi-interface compatible optical-magnetic fusion absolute encoder according to claim 1, characterized in that, The Hall analog signal output by the magnetic Hall sensing unit and the SIN / COS amplified signal output by the optical encoder sensing unit after signal processing together form a redundant position detection signal. The MCU samples the two signals in real time and judges the consistency of the two signals through a verification algorithm. If they are consistent, the MCU outputs the absolute position signal based on the complementary operation of the two signals. If they are inconsistent, the MCU triggers a fault prompt to improve the reliability of position detection.

9. The multi-interface compatible optical-magnetic fusion absolute encoder according to claim 1, characterized in that, It also includes an indicator light unit, which consists of a green LED, a red LED, a blue LED, and current-limiting resistors R28, R32, and R35. One end of the current-limiting resistor R28 is connected to the 3.3V MCU output terminal of the modular power supply unit, and the other end is connected to the anode of LEDG. The cathode of LEDG is connected to the first indicator pin of the MCU to indicate the normal operating status of the encoder. One end of R32 is connected to the 3.3V MCU output terminal, and the other end is connected to the anode of LEDR. The cathode of LEDR is connected to the second indicator pin of the MCU to indicate the encoder fault status. One end of R35 is connected to the 3.3V MCU output terminal, and the other end is connected to the anode of LEDB. The cathode of LEDB is connected to the third indicator pin of the MCU to indicate the communication status of the multi-interface communication unit.

10. The multi-interface compatible optical-magnetic fusion absolute encoder according to any one of claims 1-9, characterized in that: The passive crystal oscillator unit consists of a passive crystal oscillator and filter capacitors C24, C30, and C31. The two ends of the passive crystal oscillator are electrically connected to the crystal input pin and the crystal output pin of the MCU, respectively. One end of C24 is connected to the connection node between the passive crystal oscillator and OSC_IN, and the other end is grounded. C30 and C31 are connected in parallel, with one end connected to the connection node between the passive crystal oscillator and OSC_OUT, and the other end grounded. This is used to filter the crystal oscillator signal and ensure clock stability. The reset unit consists of a pull-up resistor R21 and a filter capacitor C56. One end of R21 is connected to the 3.3V_MCU output terminal of the modular power supply unit, and the other end is electrically connected to one end of C56 and the NRST reset pin of the MCU. The other end of C56 is grounded. When powered on, C56 is charged, which keeps the NRST pin at a low level to reset the MCU. After charging is complete, the NRST pin goes high and the MCU starts normally.