Vehicle-mounted CAN bus anti-interference communication system and method based on photocoupling
By using optocoupler isolation and signal processing modules, the problem of signal crosstalk in the vehicle CAN bus system is solved, and an independent transmission path for the TXD/RXD channels is established, improving system reliability and noise suppression capabilities, making it suitable for industrial-grade communication scenarios.
Patent Information
- Application Number
- CN202510949717.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2026-02-10
AI Technical Summary
In existing vehicle CAN bus communication systems, the TJA1044 transceiver design suffers from signal crosstalk, leading to communication failures and data frame loss in complex electromagnetic environments, and failing to effectively isolate the TXD/RXD bidirectional data streams.
By employing optocoupler isolation modules and signal processing modules, and through optoelectronic conversion, timing calibration, differential decision and logic reconstruction, a bidirectional independent transmission path is established for the CAN bus TXD/RXD channels. A half-duplex communication mechanism is used to ensure unidirectional data transmission and avoid signal crosstalk.
It significantly improves system reliability, reduces frame loss rate, enhances noise suppression capability, is suitable for high-speed CAN FD systems, and achieves highly reliable communication.
Smart Images

Figure CN121509137A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of anti-interference communication for vehicle CAN bus, and particularly to an anti-interference communication system and method for vehicle CAN bus based on optocoupler. Background Technology
[0002] The vehicle CAN bus is a key communication line used to transmit information between different electronic control units inside a car. It typically consists of two main cables, CAN_high and CAN_low, in a twisted pair structure. The vehicle CAN bus is usually used for communication operations.
[0003] In existing traditional vehicle CAN bus communication systems, transceivers based on TJA1044 and similar transceivers suffer from a fundamental flaw: physical layer signal crosstalk. The RXD output of TJA1044 strictly follows the TXD input, with a logic state transition delay of approximately 150ns. Consequently, under complex electromagnetic interference, the optocoupler isolation circuit cannot strictly isolate the bidirectional data streams of TXD / RXD, resulting in signal crosstalk. This leads to intermittent communication failures and data frame loss. Therefore, it is necessary to establish bidirectional independent transmission paths for the CAN bus TXD / RXD channel data streams and accurately separate the TXD mapped data in the RXD channel from the valid CAN bus data. Summary of the Invention
[0004] The purpose of this invention is to provide an anti-interference communication system and method for vehicle CAN bus based on optocoupler, so as to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: an anti-interference communication system for vehicle-mounted CAN bus based on optocoupler, comprising an anti-interference communication system framework, wherein the anti-interference communication system framework includes: A CAN bus transceiver module, which is responsible for transmitting and receiving CAN bus signals; An optocoupler isolation module is used to enable transparent conversion of data between optical and electrical signals, achieving physical layer electrical isolation while maintaining the integrity of the CAN protocol. The signal processing and separation module is used to construct a collaborative processing mechanism for timing calibration, differential decision, logic reconstruction and signal synthesis, and to separate the TXD mapping data and CAN bus data in the RXD channel based on the signal source tracing of logic level differences and timing characteristics. The signal output and transmission module is used to convert the separated data signal into a differential signal through TJA1044 and transmit it back to the CAN bus. The control and logic management module is responsible for managing the working state of the TXD and RXD pins, so that the TXD and RXD terminals form a unidirectional data path.
[0006] Preferably, the CAN bus transceiver module uses a TJA1044 CAN bus transceiver for signal transmission and reception, and the CAN bus transceiver module receives bus data through the CANH / CANL differential signal interface.
[0007] Preferably, the optocoupler isolation module includes a bidirectional optocoupler and a photosensitive device. The bidirectional optocoupler is used for photoelectric conversion, and the photosensitive device is used to convert the optical signal back into an electrical signal.
[0008] Preferably, the signal processing and separation module includes an RC differentiator circuit, a Schmitt comparator, a 74HC04 inverter, and a 74HC32 OR gate. The signal processing and separation module is based on the asymmetric delay mechanism of the RC differentiator circuit and the Schmitt comparator. It achieves edge differentiation processing by independently configuring the charging / discharging circuit parameters. The signal processing and separation module performs logic shaping on the signal through the 74HC04 inverter and works in conjunction with the RXD signal to drive the high-speed optocoupler.
[0009] The anti-interference communication method for vehicle CAN bus based on optocoupler includes the following specific steps: Step 1: Signal reception and conversion. The TJA1044 uses the CANH / CANL differential signal interface to receive data from the CAN bus. Step 2: Opto-isolated transmission. The optical signal is received by the photosensitive device on the isolation side and converted into an electrical signal, which is then transmitted to the subsequent signal processing circuit. Step 3: Signal processing and separation. The restored electrical signal is subjected to timing calibration, differential decision, logic reconstruction and signal synthesis processing to separate the TXD mapping data and CAN bus data in the RXD channel. Step 4: Signal output and transmission. The separated data signals are converted into differential signals by TJA1044 and transmitted back to the CAN bus. Step 5: Communication control and interference avoidance. Configure the physical layer time-division isolation circuit so that the RXD channel is activated to receive bus data only when the TXD channel is in a silent state, so that the TXD end and RXD end form a unidirectional data path and adopt a half-duplex communication mechanism.
[0010] Preferably, the signal reception and conversion in step one specifically includes the differential signal on the CAN bus being received by TJA1044, processed by the internal circuit, and outputting an electrical signal from the RXD output terminal. The electrical signal drives the optocoupler light-emitting device to convert the electrical signal into an optical signal for transmission.
[0011] Preferably, the timing calibration in step three specifically includes using the asymmetric delay mechanism of the RC differentiator circuit and the Schmitt comparator to achieve edge differentiation processing by independently configuring the charging / discharging circuit parameters. When the rising edge waveform of the upper TXD appears, the output is delayed by at least 300ns, and when the falling edge of the TXD appears, the output is delayed by at most 50ns, thus obtaining the waveform at point C.
[0012] Preferably, the logic reconstruction in step three specifically includes logic shaping of the C-point signal using a 74HC04 inverter, and the signal synthesis in step three specifically includes driving the high-speed optocoupler to work in conjunction with the logic-shaped signal and the RXD signal through a 74HC32 OR gate to obtain the E-point waveform, controlling the optocoupler output to make the TXD terminal and the RXD terminal form a unidirectional data path, and separating the TXD mapping data and CAN bus data in the RXD channel.
[0013] Preferably, the signal output and transmission in step four includes: The TXD pin serves as a signal input terminal, used to receive serial data signals transmitted from an external fiber optic box. It converts single-ended signals into differential signals conforming to the CAN bus specification through internal circuitry, driving the CANH and CANL buses to transmit data. During signal conversion, TXD has hardware-level transmission priority, and data will be forcibly coupled to the RXD channel for synchronous output. The transmission delay is 50-200ns, enabling mirror monitoring and real-time feedback of critical signals. The RXD pin serves as a signal output terminal, used to capture differential signals on the CANH and CANL buses in real time. After being decoded by the chip, the signals are restored to TTL level serial data, and photoelectric conversion and remote signal forwarding are achieved through the fiber optic box.
[0014] Preferably, the half-duplex communication mechanism in step five specifically includes a CAN bus system conforming to the ISO11898 standard, in which the transceiver's TXD / RXD pins are kept at a high level by default, and when transmitting data, TXD actively generates a falling edge to trigger a dominant state, and when receiving data, the bus differential voltage change triggers a falling edge of RXD, so that the logic signal and the physical layer level are synchronously converted.
[0015] The technical effects and advantages of this invention are as follows: This invention is based on a physical layer signal isolation mechanism using opto-isolation. By establishing bidirectional independent transmission paths for the TXD / RXD channel data streams of the CAN bus, it accurately separates the TXD mapping data in the RXD channel from the valid data of the CAN bus, thereby significantly improving system reliability in industrial communication scenarios. Furthermore, through a dynamic isolation architecture, it achieves real-time decoupling between the TXD mapping data in the RXD channel and the valid bus signal, achieving a breakthrough frame drop rate of <0.01% at a 5Mbps CAN FD communication rate. Compared to the 0.1% basic frame drop defect that occurs in traditional isolation schemes at a rate of 1Mbps, this design improves the bus noise suppression capability by 8 times through a signal path impedance matching algorithm, successfully breaking through the isolation bottleneck of high-speed CAN FD systems. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the connection of the vehicle-mounted CAN bus anti-interference communication system of the present invention; Figure 2 This is a schematic diagram of the data transmission timing of the TJA1044 chip in CAN bus communication according to the present invention; Figure 3 This is a schematic diagram of the signal processing and separation process of the present invention; Figure 4 This is a schematic diagram of the anti-interference communication method for vehicle-mounted CAN bus of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] This invention provides, for example Figure 1-4 The illustrated vehicle-mounted CAN bus anti-interference communication system based on optocoupler includes an anti-interference communication system framework, which comprises: The CAN bus transceiver module is responsible for transmitting and receiving CAN bus signals. It uses the TJA1044 CAN bus transceiver for signal transmission and reception and receives bus data through the CANH / CANL differential signal interface. The optocoupler isolation module is used to enable transparent conversion between optical and electrical signals. While maintaining the integrity of the CAN protocol, it achieves physical layer electrical isolation, which helps to ensure lossless signal transmission and system reliability. The optocoupler isolation module includes a bidirectional optocoupler and a photosensitive device. The bidirectional optocoupler is used for photoelectric conversion, and the photosensitive device is used to restore the optical signal to an electrical signal. The signal processing and separation module is used to construct a collaborative processing mechanism for timing calibration, differential decision, logic reconstruction, and signal synthesis. Based on the signal source tracing of logic level differences and timing characteristics, it separates the TXD mapping data and CAN bus data in the RXD channel. The signal processing and separation module includes an RC differentiator circuit, a Schmitt comparator, a 74HC04 inverter, and a 74HC32 OR gate. Based on the asymmetric delay mechanism of the RC differentiator circuit and the Schmitt comparator, the signal processing and separation module achieves edge differentiation processing by independently configuring the charging / discharging loop parameters. Furthermore, the signal processing and separation module performs logic shaping on the signal through the 74HC04 inverter and drives the high-speed optocoupler to work in conjunction with the RXD signal through the 74HC32 OR gate. The signal output and transmission module is used to convert the separated data signals into differential signals via TJA1044 and transmit them back to the CAN bus. The control and logic management module is responsible for managing the operating status of the TXD and RXD pins, ensuring a unidirectional data path between the TXD and RXD terminals. This helps to ensure interference-resistant unidirectional data isolation transmission in industrial control systems.
[0019] The anti-interference communication method for vehicle CAN bus based on optocoupler includes the following specific steps: Step 1: Signal reception and conversion. The TJA1044 uses the CANH / CANL differential signal interface to receive data from the CAN bus. The signal reception and conversion specifically includes the TJA1044 receiving the differential signal from the CAN bus, processing it through internal circuitry, and outputting an electrical signal from the RXD output terminal. The electrical signal drives the optocoupler light-emitting device to convert the electrical signal into an optical signal for transmission. Step 2: Opto-isolated transmission. The optical signal is received by the photosensitive device on the isolation side and converted into an electrical signal. This electrical signal is transmitted to the subsequent signal processing circuit, which helps to achieve electrical isolation at the physical layer and effectively prevents electromagnetic interference and other factors from affecting the signal. Step 3: Signal Processing and Separation. The restored electrical signal undergoes timing calibration, differential decision, logic reconstruction, and signal synthesis. The TXD mapping data and CAN bus data in the RXD channel are separated. Timing calibration specifically involves using an asymmetric delay mechanism with an RC differentiator and a Schmitt comparator. Edge differentiation is achieved by independently configuring the charging / discharging circuit parameters. When the rising edge of the TXD waveform appears, the output is delayed by at least 300ns, and when the falling edge of the TXD waveform appears, the output is delayed by at most 50ns, resulting in the waveform at point C. Logic reconstruction specifically involves using a 74HC04 inverter to logically shape the signal at point C. Signal synthesis specifically involves using a 74HC32 OR gate to drive a high-speed optocoupler with the RXD signal to obtain the waveform at point E. The optocoupler output is controlled to make the TXD and RXD terminals form a unidirectional data path, thus separating the TXD mapping data and CAN bus data in the RXD channel. Step 4: Signal output and transmission. The separated data signal is converted into a differential signal by TJA1044 and transmitted back to the CAN bus, or photoelectric conversion and remote signal forwarding are achieved through an optical fiber box. Step 5: Communication Control and Interference Avoidance. Configure a physical layer time-division isolation circuit. The RXD channel is activated to receive bus data only when the TXD channel is in a silent state, making the TXD and RXD ends a unidirectional data path and adopting a half-duplex communication mechanism. This helps avoid signal self-interference problems and is beneficial to the physical layer signal isolation mechanism based on opto-isolation. By establishing a bidirectional independent transmission path for the CAN bus TXD / RXD channel data stream, loop interference and signal crosstalk are completely blocked at the hardware architecture level, significantly improving the system reliability in industrial communication scenarios. The half-duplex communication mechanism specifically includes that in a CAN bus system conforming to the ISO11898 standard, the transceiver's TXD / RXD pins are kept at a high level by default. When sending data, TXD actively generates a falling edge to trigger the dominant state. When receiving data, the bus differential voltage change triggers a falling edge of RXD, so that the logic signal and physical layer level are synchronously converted.
[0020] Specifically, the signal output and transmission in step four include: The TXD pin serves as a signal input terminal, used to receive serial data signals transmitted from an external fiber optic box. It converts single-ended signals into differential signals conforming to the CAN bus specification through internal circuitry, driving the CANH and CANL buses to transmit data. During signal conversion, TXD has hardware-level transmission priority, and data will be forcibly coupled to the RXD channel for synchronous output. The transmission delay is 50-200ns, enabling mirror monitoring and real-time feedback of critical signals. The RXD pin, as a signal output terminal, is used to capture the differential signals on the CANH and CANL buses in real time. After being decoded by the chip, it is restored to TTL level serial data, and photoelectric conversion and remote signal forwarding are realized through the fiber optic box. According to the electrical characteristics of the TJA1044 chip, there is a logical following relationship between its receiver RXD and transmitter TXD. Specifically, the RXD signal mirrors the waveform characteristics of TXD and has a slight delay. In fiber optic communication systems without electrical isolation, due to the signal path coupling effect, the demodulated data at the fiber optic receiver will be directly fed into the transmitter driver module, forming reverse crosstalk of the TXD signal to the RXD channel. To ensure communication reliability, a physical layer time-division isolation circuit needs to be configured. The RXD channel is only activated to receive bus data when the TXD channel is in a silent state (no active data transmission). This half-duplex communication mechanism effectively avoids the occurrence of signal self-interference problems.
[0021] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An anti-interference communication system for vehicle-mounted CAN bus based on optocoupler, comprising an anti-interference communication system framework, characterized in that, The anti-jamming communication system framework includes: A CAN bus transceiver module, which is responsible for transmitting and receiving CAN bus signals; An optocoupler isolation module is used to enable transparent conversion of data between optical and electrical signals, achieving physical layer electrical isolation while maintaining the integrity of the CAN protocol. The signal processing and separation module is used to construct a collaborative processing mechanism for timing calibration, differential decision, logic reconstruction and signal synthesis, and to separate the TXD mapping data and CAN bus data in the RXD channel based on the signal source tracing of logic level differences and timing characteristics. The signal output and transmission module is used to convert the separated data signal into a differential signal through TJA1044 and transmit it back to the CAN bus. The control and logic management module is responsible for managing the working state of the TXD and RXD pins, so that the TXD and RXD terminals form a unidirectional data path.
2. The vehicle-mounted CAN bus anti-interference communication system based on optocoupler according to claim 1, characterized in that, The CAN bus transceiver module uses a TJA1044 CAN bus transceiver for signal transmission and reception, and receives bus data through the CANH / CANL differential signal interface.
3. The vehicle-mounted CAN bus anti-interference communication system based on optocoupler according to claim 1, characterized in that, The optocoupler isolation module includes a bidirectional optocoupler and a photosensitive device. The bidirectional optocoupler is used for photoelectric conversion, and the photosensitive device is used to convert the optical signal back into an electrical signal.
4. The vehicle-mounted CAN bus anti-interference communication system based on optocoupler according to claim 1, characterized in that, The signal processing and separation module includes an RC differentiator circuit, a Schmitt comparator, a 74HC04 inverter, and a 74HC32 OR gate. Based on the asymmetric delay mechanism of the RC differentiator circuit and the Schmitt comparator, the signal processing and separation module achieves edge differentiation processing by independently configuring the charging / discharging circuit parameters. Furthermore, the signal processing and separation module performs logic shaping on the signal through the 74HC04 inverter, and works in conjunction with the RXD signal to drive the high-speed optocoupler.
5. An anti-interference communication method for vehicle-mounted CAN bus based on optocoupler, characterized in that, The specific steps include the following: Step 1: Signal reception and conversion. The TJA1044 uses the CANH / CANL differential signal interface to receive data from the CAN bus. Step 2: Opto-isolated transmission. The optical signal is received by the photosensitive device on the isolation side and converted into an electrical signal, which is then transmitted to the subsequent signal processing circuit. Step 3: Signal processing and separation. The restored electrical signal is subjected to timing calibration, differential decision, logic reconstruction and signal synthesis processing to separate the TXD mapping data and CAN bus data in the RXD channel. Step 4: Signal output and transmission. The separated data signals are converted into differential signals by TJA1044 and transmitted back to the CAN bus. Step 5: Communication control and interference avoidance. Configure the physical layer time-division isolation circuit so that the RXD channel is activated to receive bus data only when the TXD channel is in a silent state, so that the TXD end and RXD end form a unidirectional data path and adopt a half-duplex communication mechanism.
6. The anti-interference communication method for vehicle-mounted CAN bus based on optocoupler according to claim 5, characterized in that, The signal reception and conversion in step one specifically includes the following steps: after the differential signal on the CAN bus is received by TJA1044, it is processed by the internal circuit and output as an electrical signal from the RXD output terminal. The electrical signal drives the optocoupler light-emitting device to convert the electrical signal into an optical signal for transmission.
7. The anti-interference communication method for vehicle-mounted CAN bus based on optocoupler according to claim 5, characterized in that, The timing calibration in step three specifically includes using the asymmetric delay mechanism of the RC differentiator circuit and Schmitt comparator to achieve edge differentiation processing by independently configuring the charging / discharging circuit parameters. When the rising edge waveform of the upper TXD appears, the output is delayed by at least 300ns, and when the falling edge of TXD appears, the output is delayed by at most 50ns, thus obtaining the waveform at point C.
8. The anti-interference communication method for vehicle-mounted CAN bus based on optocoupler according to claim 5, characterized in that, The logic reconstruction in step three specifically includes logically shaping the signal at point C using a 74HC04 inverter. The signal synthesis in step three specifically includes driving the high-speed optocoupler to work in conjunction with the logically shaped signal and the RXD signal through a 74HC32 OR gate to obtain the waveform at point E. The output of the optocoupler is controlled to make the TXD terminal and the RXD terminal form a unidirectional data path, separating the TXD mapped data and the CAN bus data in the RXD channel.
9. The anti-interference communication method for vehicle-mounted CAN bus based on optocoupler according to claim 5, characterized in that, The signal output and transmission in step four include: The TXD pin serves as a signal input terminal, used to receive serial data signals transmitted from an external fiber optic box. It converts single-ended signals into differential signals conforming to the CAN bus specification through internal circuitry, driving the CANH and CANL buses to transmit data. During signal conversion, TXD has hardware-level transmission priority, and data will be forcibly coupled to the RXD channel for synchronous output. The transmission delay is 50-200ns, enabling mirror monitoring and real-time feedback of critical signals. The RXD pin serves as a signal output terminal, used to capture differential signals on the CANH and CANL buses in real time. After being decoded by the chip, the signals are restored to TTL level serial data, and photoelectric conversion and remote signal forwarding are achieved through the fiber optic box.
10. The anti-interference communication method for vehicle-mounted CAN bus based on optocoupler according to claim 1, characterized in that, The half-duplex communication mechanism in step five specifically includes the transceiver's TXD / RXD pins maintaining a high level by default in a CAN bus system conforming to the ISO11898 standard. When transmitting data, TXD actively generates a falling edge to trigger a dominant state. When receiving data, the bus differential voltage change triggers a falling edge on RXD, enabling the logic signal to be synchronously converted with the physical layer level.
Citation Information
Cited By
CAN bus optical fiber transmission method, circuit, equipment and medium
CN121727635A
Can bus optical fiber transmission method, circuit, device and medium
CN121727635B