A method for CAN signal transmission in an electromagnetic interference environment
By using a photoelectric converter and fiber optic cable to achieve bidirectional transmission of CAN signals in a strong electromagnetic interference environment, the problem of insufficient reliability of CAN communication is solved, ensuring stable signal transmission and bidirectional communication, and improving the system's anti-interference capability and versatility.
Patent Information
- Application Number
- CN202610801726.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-04
- Publication Date
- 2026-11-17
AI Technical Summary
In environments with strong electromagnetic interference, CAN communication is not reliable enough and bidirectional communication is not ideal. Existing technologies such as fiber optic transmission schemes fail to effectively support bidirectional multi-master communication, and improper terminal resistor matching and unreasonable selection of fiber optic cables can lead to signal reflection or ground loop problems.
The system employs a photoelectric converter, adjustable power supply, fiber optic cable, and twisted pair to achieve bidirectional transmission of CAN signals via optical fiber. Combined with a signal isolation transformer and a reasonable grounding strategy, it ensures electrical isolation and correct transmission of differential signals. A terminating resistor is configured to suppress signal reflection.
Stable bidirectional CAN signal transmission under electromagnetic interference environment was achieved, ground loop interference was eliminated, bidirectional multi-master communication requirements were met, communication reliability and anti-interference ability were improved, wiring was simplified and costs were reduced.
Smart Images

Figure CN123123059A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of CAN bus communication technology, and more specifically, to a method for achieving reliable bidirectional transmission of CAN signals in a strong electromagnetic interference environment. Background Technology
[0002] In environments such as motor and electrical control laboratories and industrial automation sites, high-voltage frequency converters, high-power loads, and electromagnetic brakes are often present simultaneously, generating strong electromagnetic radiation and conducted interference during operation. As the object being measured or controlled, the motor controller's CAN bus communication is highly susceptible to these interferences, leading to data errors, frame loss, or even complete communication interruptions.
[0003] Traditional anti-interference methods mainly rely on shielded twisted-pair cables with proper grounding. However, under extremely high interference conditions, the shielding layer itself can become a coupling path, and ground potential differences can also cause ground loop interference, leading to the failure of shielding measures. Currently, some solutions use optical fibers instead of copper cables for signal transmission, utilizing the inherent electromagnetic immunity of optical fibers to isolate interference. However, there are many shortcomings in implementation: most solutions only focus on unidirectional signal acquisition from the device under test to the host computer, ignoring the requirement that the CAN bus, as a bidirectional, multi-master communication protocol, must support the host computer or CAN tool to send response and control commands to the motor controller; some solutions do not adequately consider terminal resistor matching and grounding strategies, easily introducing signal reflection or ground loops; and some solutions fail to reasonably select optical fiber cables and transceiver methods, resulting in system complexity or excessive cost. Summary of the Invention
[0004] The technical problem to be solved by this invention is to provide a method for achieving stable bidirectional transmission of CAN signals under electromagnetic interference environments, addressing the issues of insufficient reliability and unsatisfactory bidirectional communication in existing technologies under strong electromagnetic interference environments.
[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: A method for transmitting CAN signals in an electromagnetic interference environment includes the following steps: S1. Provides a first photoelectric converter and a second photoelectric converter, a first adjustable power supply and a second adjustable power supply, optical fiber cables and several twisted pairs; S2. Place the first photoelectric converter in an electromagnetic interference environment, close to the motor controller under test, and connect the CAN interface of the motor controller to the first CAN interface of the first photoelectric converter through a twisted pair cable. At the same time, connect the housing of the motor controller to the grounding interface of the first photoelectric converter. S3. Place the second photoelectric converter outside the electromagnetic interference environment, close to the host computer or CAN tool, and connect the CAN interface of the CAN tool to the second CAN interface of the second photoelectric converter through a twisted pair cable. S4. Connect the fiber optic interface of the first photoelectric converter to the fiber optic interface of the second photoelectric converter through the fiber optic cable to realize bidirectional transmission of optical signals. S5. Power the first photoelectric converter with a first adjustable power supply and power the second photoelectric converter with a second adjustable power supply. S6. After power-on, the first photoelectric converter converts the CAN electrical signal sent by the motor controller into an optical signal and transmits it to the second photoelectric converter via an optical fiber cable. The second photoelectric converter restores the optical signal into a CAN electrical signal and sends it to the CAN tool. At the same time, the second photoelectric converter converts the CAN electrical signal sent by the CAN tool into an optical signal and transmits it to the first photoelectric converter via an optical fiber cable. The first photoelectric converter restores the optical signal into a CAN electrical signal and sends it to the motor controller, thereby realizing bidirectional communication of the CAN bus.
[0006] Optionally, both the first and second adjustable power supplies are adjustable DC power supplies, and their output voltages are adjusted according to the respective operating voltage requirements of the first and second photoelectric converters. The adjustable power supplies allow for flexible adaptation to different models of photoelectric converters, improving the versatility of the method.
[0007] Optionally, the CAN interface of the motor controller and the first CAN interface of the first optoelectronic converter, as well as the CAN tool and the second CAN interface of the second optoelectronic converter, are connected via twisted-pair cables, following the polarity correspondence of CAN_H to CAN_H and CAN_L to CAN_L. Strictly maintaining the polarity correspondence ensures the correct transmission of differential signals and avoids communication failures caused by reverse connection.
[0008] Optionally, the optical fiber cable is a single-mode optical fiber or a multi-mode optical fiber, and its exterior is covered with a metal braided shielding layer. Both the first and second optoelectronic converters integrate a single-fiber bidirectional transceiver module for full-duplex communication over optical fiber cables. Using a single-fiber bidirectional transceiver module (such as a wavelength division multiplexing-based optical transceiver) allows for bidirectional optical signal transmission using only a single optical fiber, reducing the number of fibers and simplifying cabling. The metal braided shielding layer can further protect the optical fiber from physical damage and additional radiation interference.
[0009] Optionally, both the first and second photoelectric converters are internally equipped with a CAN controller interface circuit, an optical transmitting module, an optical receiving module, and a signal isolation transformer to achieve electrical isolation between the internal and external electromagnetic interference environment. The signal isolation transformer can isolate the ground on the CAN interface side from the internal circuit ground and power ground of the photoelectric converter, achieving dual electrical isolation between the internal and external interference environment in conjunction with fiber optic transmission.
[0010] Optionally, before connecting the motor controller housing to the grounding interface of the first photoelectric converter, ensure that the motor controller is reliably connected to the laboratory ground through the protective grounding terminal of its power supply line. The grounding interface of the first photoelectric converter is connected through the housing to provide a path for electrostatic discharge and maintain a reference ground potential. This approach provides a safe path for electrostatic discharge to the motor controller housing, keeps the photoelectric converter housing and the motor controller housing at the same potential, avoids new interference caused by potential differences between them, and prevents the introduction of ground loops because the internal circuitry of the photoelectric converter is isolated from the housing.
[0011] Optionally, the electromagnetic interference environment is a motor and electrical control laboratory, which contains one or more high-voltage, high-current devices, such as high-voltage frequency converters, high-power loads, or electromagnetic brakes. This method is particularly suitable for such extremely harsh electromagnetic environments.
[0012] Optionally, the method further includes: detecting the termination matching status of the CAN bus segment formed by the first CAN interface of the first photoelectric converter and the CAN interface of the motor controller, and only connecting a terminating resistor in parallel at the physical farthest end of the CAN bus segment when it is determined that the CAN bus segment is not configured with the required terminating resistor. This ensures that the CAN bus segment always has exactly two terminating resistors located at both ends of the bus, maintaining differential impedance matching, effectively suppressing signal reflection, and ensuring signal integrity.
[0013] Optionally, both the first and second photoelectric converters are equipped with LED status indicators to indicate power status, CAN bus activity status, and fiber optic link status, respectively. This provides an intuitive visual means for installation, commissioning, and troubleshooting.
[0014] Compared with existing technologies, the beneficial effects of this invention are: signal transmission via optical fiber achieves complete electrical isolation between the inside and outside of the electromagnetic interference environment, eliminating the intrusion path of conducted interference; it also clarifies the complete process of bidirectional communication, meeting the bidirectional multi-master communication requirements of the CAN bus; through a reasonable grounding strategy and a built-in isolation transformer, potential ground loop interference is eliminated; and by accurately configuring the terminating resistor based on actual measurements, signal reflection is avoided, ensuring communication stability. The overall method has strong anti-interference capabilities, is easy to implement, and has good versatility. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic diagram of the overall system connection of this application.
[0017] Figure 2 This is a flowchart of the method in this application.
[0018] Figure 3 This is a block diagram of the internal structure of the photoelectric converter of this application.
[0019] Figure 4 This is a schematic diagram of the laboratory bench application scenario in Embodiment 1 of this application.
[0020] Figure 5 This is a schematic diagram of the vehicle-mounted road test application scenario in Embodiment 2 of this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0022] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. Moreover, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.
[0023] It should be noted that in the above embodiments, there is no necessarily a certain order between the steps. Those skilled in the art can understand from the description of the embodiments of this application that the above steps may have different execution orders in different embodiments, that is, they may be executed in parallel or in turn, etc.
[0024] Example 1 The application scenario of this embodiment is bench testing in a motor and electrical control laboratory. This laboratory is a typical electromagnetic interference environment, containing a high-voltage frequency converter (rated power 250kW, PWM modulation, switching frequency 8kHz), a high-power load (electric dynamometer), and various high-voltage, high-current equipment such as electromagnetic brakes. During operation, the spatial electromagnetic field strength can reach tens of volts per meter, which causes strong common-mode noise, spatial radiation, and ground potential fluctuation interference to the CAN communication of the motor controller under test. Conventional copper twisted-pair communication frequently experiences erroneous frames or even bus shutdown.
[0025] The implementation steps are as follows: Step S1: Prepare one first optoelectronic converter and one second optoelectronic converter, both equipped with standard CAN interfaces and fiber optic interfaces. Each optoelectronic converter internally includes a CAN controller interface circuit, an optical transmitter module, an optical receiver module, and a signal isolation transformer. The signal isolation transformer is located between the CAN transceiver and the interface terminals, with an isolation withstand voltage of 2500Vrms, used to achieve electrical isolation between the internal and external electromagnetic interference environments, blocking the common-mode interference current conduction path. To support full-duplex communication over a single fiber, both optoelectronic converters integrate a wavelength division multiplexing (WDM) single-fiber bidirectional transceiver module, with typical operating wavelengths of 1310nm for transmission and 1550nm for reception. Transmission and reception separation is achieved through internal optical filters to avoid self-interference. Both optoelectronic converters are equipped with LED status indicators, including a red power indicator, a green CAN bus activity indicator, and a yellow fiber optic link indicator, used to indicate the power status, CAN bus activity status, and fiber optic link status, respectively.
[0026] One first adjustable power supply and one second adjustable power supply are also provided, both 30V / 3A adjustable DC regulated power supplies with overvoltage protection and low ripple characteristics. Their output voltage can be adjusted according to the operating voltage requirements of the first and second photoelectric converters, respectively. One multimode fiber is selected as the optical fiber cable, with a core specification of 50 / 125μm, and its outer layer is covered with a metal braided shielding layer to increase mechanical strength and provide additional shielding protection. In addition, several twisted-pair cables with standard CAN connectors are prepared, with a characteristic impedance of approximately 120Ω, and their length is kept as short as possible to reduce the differential-mode radiation receiving area.
[0027] Step S2: Place the first photoelectric converter inside an electromagnetic interference environment, i.e., inside the motor control laboratory, close to the controller of the motor under test, so that the length of the twisted pair cable for CAN electrical signal transmission is controlled within about 1.5 meters, minimizing the length of the copper cable that is susceptible to interference.
[0028] Before connecting the motor controller housing to the grounding interface of the first photoelectric converter, ensure that the motor controller is reliably connected to the laboratory ground through the protective grounding terminal of its power supply line. The implementer confirmed that the motor controller's three-phase power plug was correctly inserted into the laboratory power socket with a protective grounding contact, and used a multimeter to measure the resistance between the motor controller housing and the laboratory grounding busbar. The measured resistance was less than 0.1Ω, confirming a good protective grounding connection.
[0029] Subsequently, the CAN interface of the motor controller and the first CAN interface of the first optoelectronic converter were connected using twisted-pair cables according to the polarity correspondence of CAN_H to CAN_H and CAN_L to CAN_L. The personnel used yellow and green wires respectively for CAN_H and CAN_L, and checked the polarity markings at both ends to ensure strict correspondence of differential signal polarities. Simultaneously, a short, multi-strand copper core grounding wire was used to reliably connect the metal housing of the motor controller to the grounding interface on the housing of the first optoelectronic converter. Thus, the grounding interface of the first optoelectronic converter, through the grounding wire, the protective grounding terminal of the motor controller housing and its power supply line, was finally connected to the laboratory ground, establishing a complete low-impedance grounding path. This provides an electrostatic discharge path and maintains a stable reference ground potential in environments with strong electromagnetic interference, preventing interface damage or bit errors caused by floating potentials.
[0030] Step S3: Place the second photoelectric converter outside the electromagnetic interference environment, i.e., on the control panel in the external operating room of the laboratory, close to the CAN tool connected to the host computer. Connect the CAN interface of the CAN tool to the second CAN interface of the second photoelectric converter using a twisted pair cable, following the polarity correspondence of CAN_H to CAN_H and CAN_L to CAN_L. This bus segment is in an electrically clean environment, but is still connected according to the standard differential wiring rules to ensure signal integrity. The host computer connects to the CAN tool via USB, ready for data monitoring and command issuance.
[0031] Step S4: Connect the fiber optic interfaces of the first and second optoelectronic converters using a multimode fiber optic cable. Connect one end of the fiber optic cable to the fiber optic interface of the first optoelectronic converter and the other end to the fiber optic interface of the second optoelectronic converter, establishing a physical channel for bidirectional optical signal transmission through this single fiber. Because both converters integrate wavelength division multiplexing (WDM) single-fiber bidirectional transceiver modules, the 1310nm optical signal transmitted from the first optoelectronic converter to the second optoelectronic converter and the reverse-transmitted 1550nm optical signal are transmitted simultaneously in the same fiber without interference, achieving true full-duplex communication without the need for laying two separate fibers. The metal braided shielding layer outside the fiber is intentionally left ungrounded at both ends to avoid low-frequency grounding loops caused by potential ground potential differences between the laboratory and the operating room.
[0032] Step S5: Based on the rated operating voltage (both 5VDC) indicated on the nameplates of the two photoelectric converters, the operator adjusts the output voltage of the first and second adjustable power supplies to 5V respectively. The first adjustable power supply powers the first photoelectric converter, and the second adjustable power supply powers the second photoelectric converter. Both adjustable power supplies have overvoltage protection and low ripple output characteristics, providing a stable and clean DC power supply to the photoelectric converters and avoiding additional interference introduced by power supply ripple coupling. Using independent adjustable power supplies further cuts off the conducted interference path coupled from the internal electromagnetic interference environment to the external system through the power line, forming a double protection with fiber optic isolation. When replacing photoelectric converters with different rated voltage specifications, only the power supply output voltage needs to be readjusted for adaptation, improving system versatility. After power-on, the power indicator lights on both photoelectric converters are constantly red, confirming normal power supply.
[0033] Step S6: The system starts working. After the motor controller is powered on, it automatically sends CAN messages containing status information such as speed, temperature, bus voltage, and fault codes in a periodic message format. The CAN transceiver of the first opto-converter decodes the received differential electrical signal into digital logic level, drives the optical transmitting module after passing through the signal isolation transformer, and converts it into a light pulse signal with a wavelength of 1310nm. This signal is then transmitted through optical fiber to the second opto-converter. The optical receiving module of the second opto-converter detects the light signal, demodulates it back to digital level, and then converts it into a standard CAN differential electrical signal by the CAN transceiver and sends it to the CAN tool. The host computer software parses and displays the data in real time.
[0034] When the host computer needs to issue torque commands or parameter configuration commands, the CAN tool sends out CAN electrical signals. The optical transmitting module of the second photoelectric converter converts it into an optical signal with a wavelength of 1550nm, which is transmitted in reverse along the same optical fiber to the first photoelectric converter. The optical receiving module of the first photoelectric converter restores it into an electrical signal, which is finally sent to the motor controller to achieve delay-free bidirectional closed-loop control.
[0035] During communication, the signal isolation transformer electrically isolates the CAN electrical signal on the motor controller side from the internal processing circuit of the photoelectric converter, blocking the ground loop between the laboratory's high-voltage system and the host computer. Combined with the inherent electrical isolation characteristics of optical fiber, dual electrical isolation is achieved both inside and outside the electromagnetic interference environment, ensuring communication reliability and protecting the safety of valuable equipment such as the host computer.
[0036] Before formal communication was established, the implementers performed a terminating resistor configuration test, which involved checking the terminating match of the CAN bus segment formed by the first CAN interface of the first photoelectric converter and the CAN interface of the motor controller. With the system completely powered off, a high-precision multimeter was used in resistance mode to measure the DC resistance between CAN_H and CAN_L of this bus segment. In this embodiment, the measured resistance was approximately 60Ω. According to the CAN bus physical layer specification, a CAN bus with a characteristic impedance of 120Ω should have a 120Ω terminating resistor connected in parallel at each of its two physical farthest points. Therefore, the equivalent DC resistance between CAN_H and CAN_L should be 60Ω. The measurement result of 60Ω indicates that both the motor controller and the first photoelectric converter have integrated a 120Ω terminating resistor, and the impedance matching requirement is met. Therefore, it is determined that the required terminating resistor has been configured for this bus segment, and no additional parallel terminating resistor is needed.
[0037] Following power-on testing, the LED status indicators on the first and second photoelectric converters showed the following: the power indicator was solid red; the CAN bus activity indicator flashed green at a high frequency synchronized with the message rate during communication; and the fiber optic link indicator changed from off to solid yellow after detecting the optical signal from the other end and establishing a link. This verified that the power supply, CAN bus activity, and fiber optic link were all normal. In subsequent full-load bench tests, even under conditions of strong electromagnetic interference such as full-speed switching of the high-voltage frequency converter and rapid acceleration / deceleration of high-power loads, CAN communication consistently maintained zero error frames and zero frame loss, effectively overcoming the problem of frequent CAN bus errors and crashes in the original solution.
[0038] Example 2 This embodiment is applied to on-board road testing of electric vehicle motor controllers. The vehicle's powertrain includes various high-voltage, high-current devices such as a high-voltage inverter (rated power 180kW), a DC-DC converter (power 3kW, switching frequency 200kHz), and a high-voltage distribution box. High-frequency electromagnetic interference generated during driving severely threatens CAN communication quality through conduction and radiation. Simultaneously, the test equipment needs to move with the vehicle, requiring a simple, vibration-resistant, and highly reliable connection scheme. This embodiment uses the method described in any one of claims 1 to 9 for CAN signal transmission.
[0039] The implementation steps are as follows: Step S1: Prepare one first optoelectronic converter and one second optoelectronic converter, both equipped with standard CAN interfaces and fiber optic interfaces. Each optoelectronic converter internally includes a CAN controller interface circuit, an optical transmitter module, an optical receiver module, and a signal isolation transformer. The signal isolation transformer has an isolation withstand voltage rating of 2500Vrms, capable of withstanding common-mode transient voltages that may be generated by the vehicle's high-voltage electrical system, used to achieve electrical isolation between the internal and external electromagnetic interference environments. Both optoelectronic converters integrate a wavelength division multiplexing (WDM) type single-fiber bidirectional transceiver module, enabling full-duplex communication using only a single fiber optic cable within the limited space of the vehicle compartment, reducing wiring weight and complexity. Both optoelectronic converters are equipped with LED status indicators, including a red power indicator, a green CAN bus activity indicator, and a yellow fiber optic link indicator, used to indicate the power status, CAN bus activity status, and fiber optic link status, respectively.
[0040] One first adjustable power supply and one second adjustable power supply are also provided. Both are portable adjustable DC power supplies with an input voltage range of 9V to 36V, compatible with 12V or 24V vehicle batteries. They have integrated voltage regulation circuits, and their output voltage can be adjusted according to the operating voltage requirements of the photoelectric converter. One single-mode fiber optic cable is used, with a core specification of 9 / 125μm. It is bend-insensitive and suitable for narrow and winding cabling within the vehicle. It is externally covered with a metal braided shielding layer to provide reliable mechanical protection and prevent fiber breakage due to contact and abrasion with the metal edges of the vehicle body. In addition, several twisted-pair cables with standard CAN connectors are provided. The connectors use automotive-grade connectors with locking clips to prevent vibration-induced loosening.
[0041] Step S2: Secure the first photoelectric converter to the vehicle interior near the motor controller using a bracket. Before connecting the motor controller housing to the grounding interface of the first photoelectric converter, ensure that the motor controller is reliably connected to the vehicle chassis ground via its power supply line's protective grounding terminal. The vehicle motor controller's metal housing is connected to the vehicle chassis via a grounding copper strip, and the vehicle chassis is connected to the vehicle's grounding system via the battery's negative terminal, forming a protective grounding loop. The implementer uses a multimeter to measure the continuity between the motor controller housing and the exposed metal points on the vehicle chassis, confirming that the resistance is less than 0.5Ω.
[0042] After confirmation, using a twisted-pair cable approximately 1 meter long, connect the CAN interface of the motor controller to the first CAN interface of the first opto-converter according to the polarity correspondence of CAN_H to CAN_H and CAN_L to CAN_L. Use automotive-grade connectors with locking clips. After wiring, confirm that each clip is properly engaged and secure with cable ties to release stress and prevent poor contact or reverse polarity due to vehicle vibration. Simultaneously, reliably connect the metal housing of the motor controller to the grounding interface on the first opto-converter housing using a low-impedance grounding wire. Thus, the grounding interface of the first opto-converter is connected to the vehicle chassis ground via the motor controller housing, vehicle grounding system, and protective grounding terminal, establishing a reliable reference ground potential and electrostatic discharge path. This allows for timely discharge of static electricity generated by tire-road friction during vehicle operation, while maintaining equipotential between the opto-converter and the motor controller, preventing common-mode voltage damage to the CAN interface chip.
[0043] Step S3: Place the second photoelectric converter outside the electromagnetic interference environment, i.e., on the test seat inside the vehicle, close to the CAN tool connected to the laptop. Connect the CAN interface of the CAN tool to the second CAN interface of the second photoelectric converter using a twisted pair cable, following the polarity correspondence of CAN_H to CAN_H and CAN_L to CAN_L. The laptop is powered by its own battery, and the CAN tool is powered via USB. This eliminates the direct conduction loop between this system and the vehicle's electrical system, further ensuring measurement accuracy and safety.
[0044] Step S4: Connect the fiber optic interfaces of the first and second optoelectronic converters using single-mode fiber optic cables. Run the fiber optic cable along the interior trim panel seams and under the carpet from near the motor compartment to the passenger compartment test position, connecting the connectors at both ends to the fiber optic interfaces of the first and second optoelectronic converters, respectively. Because both converters integrate wavelength division multiplexing (WDM) single-fiber bidirectional transceiver modules, bidirectional motor status data and host computer control commands are transmitted simultaneously in the same fiber without crosstalk. The thinness and electromagnetic interference resistance of a single fiber are significant advantages in the dense high-voltage cable environment inside the vehicle, completely avoiding capacitive coupling interference caused by parallel routing. The metal braided shielding layer outside the fiber optic cable is not grounded at either end.
[0045] Step S5: Based on the rated operating voltage of the two photoelectric converters (both 3.3VDC), the operator adjusts the output voltage of the first and second adjustable power supplies to 3.3V respectively to power their respective photoelectric converters. The portable adjustable power supply maintains a stable output through its internal voltage regulation circuit even when the vehicle battery voltage fluctuates due to starting, acceleration, or other operating conditions, ensuring the photoelectric converters always operate at their rated voltage. When replacing photoelectric converters with different operating voltage specifications, only the power supply output voltage needs to be readjusted for adaptation, improving the system's flexibility and adaptability in mobile testing scenarios. After power-on, the power indicator lights on both photoelectric converters remain constantly red, confirming normal power supply.
[0046] Step S6: The system powers on, and the vehicle enters the Ready state. The motor controller continuously reports CAN messages such as motor torque, speed, controller temperature, and high-voltage interlock status. The first opto-converter converts the CAN electrical signal from the motor controller into an optical signal and transmits it to the second opto-converter via fiber optic cable. The second opto-converter converts the optical signal back into a CAN electrical signal and sends it to the CAN tool. The host computer software records the data in real time. Simultaneously, the tester sends torque commands and mode switching commands to the simulated vehicle controller via the host computer software. The second opto-converter converts the CAN electrical signal from the CAN tool back into an optical signal and transmits it to the first opto-converter via fiber optic cable. The first opto-converter converts the optical signal back into a CAN electrical signal and sends it to the motor controller, realizing bidirectional communication on the CAN bus.
[0047] During communication, the signal isolation transformer electrically isolates the CAN signal from the motor controller side from the internal circuitry of the photoelectric converter, breaking the ground loop between the vehicle's high-voltage system and the test equipment, and preventing common-mode interference current from being conducted to the test equipment side through the CAN cable. Combined with the inherent electrical isolation characteristics of optical fiber, dual electrical isolation is achieved both internally and externally in the electromagnetic interference environment, ensuring communication reliability and protecting the safety of valuable test equipment such as the host computer.
[0048] Before formal communication was established, the implementers performed a terminating resistor configuration test, specifically checking the terminating match of the CAN bus segment formed by the first CAN interface of the first opto-converter and the CAN interface of the motor controller. With the system completely powered off, a high-precision multimeter was used to measure the DC resistance between CAN_H and CAN_L of this bus segment. In this embodiment, the measured resistance was approximately 15kΩ, indicating a high-resistance open circuit, meaning that neither the motor controller nor the first opto-converter integrated a terminating resistor. Therefore, it was determined that the required terminating resistor was not configured for this bus segment. Only after determining that the required terminating resistor was not configured did the implementers connect a terminating resistor in parallel at the physical furthest end of this bus segment: a 120Ω, 1% accuracy metal film resistor was soldered in parallel at the CAN interface output terminal of the motor controller and the first CAN interface input terminal of the first opto-converter. After soldering, the DC resistance between CAN_H and CAN_L was measured again, and the reading was 60Ω, consistent with the theoretical value of two 120Ω resistors in parallel, confirming correct terminating match.
[0049] Following power-on testing, the LED status indicators on the first and second photoelectric converters showed the following: the power indicator was solid red; the CAN bus activity indicator flashed green regularly at a 10ms cycle during communication; and the fiber optic link indicator changed from off to solid yellow after detecting normal optical signal power at both ends. This verified that the power supply, CAN bus activity, and fiber optic link statuses were all normal. During full-condition road testing, including extreme conditions such as full-throttle start-up, maximum energy recovery, and bumpy roads, even with a sudden increase in electromagnetic interference and accompanying mechanical vibration, CAN communication remained stable, and the host computer recorded no data loss or error frames. Compared to the comparative test without this solution, the error frame rate dropped from a peak of 15% to 0, fully verifying the effectiveness and reliability of this method in mobile environments with strong electromagnetic interference.
[0050] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A method for transmitting CAN signals in an electromagnetic interference environment, characterized in that, Includes the following steps: S1. Provides a first photoelectric converter and a second photoelectric converter, a first adjustable power supply and a second adjustable power supply, optical fiber cables and several twisted pairs; S2. Place the first photoelectric converter in an electromagnetic interference environment, close to the motor controller under test, and connect the CAN interface of the motor controller to the first CAN interface of the first photoelectric converter through a twisted pair cable. At the same time, connect the housing of the motor controller to the grounding interface of the first photoelectric converter. S3. Place the second photoelectric converter outside the electromagnetic interference environment, close to the host computer or CAN tool, and connect the CAN interface of the CAN tool to the second CAN interface of the second photoelectric converter through a twisted pair cable. S4. Connect the fiber optic interface of the first photoelectric converter to the fiber optic interface of the second photoelectric converter through the fiber optic cable to realize bidirectional transmission of optical signals. S5. Power the first photoelectric converter with a first adjustable power supply and power the second photoelectric converter with a second adjustable power supply. S6. After power-on, the first photoelectric converter converts the CAN electrical signal sent by the motor controller into an optical signal and transmits it to the second photoelectric converter via an optical fiber cable. The second photoelectric converter restores the optical signal into a CAN electrical signal and sends it to the CAN tool. At the same time, the second photoelectric converter converts the CAN electrical signal sent by the CAN tool into an optical signal and transmits it to the first photoelectric converter via an optical fiber cable. The first photoelectric converter restores the optical signal into a CAN electrical signal and sends it to the motor controller, thereby realizing bidirectional communication of the CAN bus.
2. The method according to claim 1, characterized in that, Both the first and second adjustable power supplies are adjustable DC power supplies, and their output voltages are adjusted according to the respective operating voltage requirements of the first and second photoelectric converters.
3. The method according to claim 1, characterized in that, The CAN interface of the motor controller and the first CAN interface of the first optoelectronic converter, as well as the CAN tool and the second CAN interface of the second optoelectronic converter, are connected via twisted-pair cables according to the polarity correspondence of CAN_H to CAN_H and CAN_L to CAN_L.
4. The method according to claim 1, characterized in that, The optical fiber cable is a single-mode optical fiber or a multi-mode optical fiber, and its exterior is covered with a metal braided shielding layer. Both the first and second photoelectric converters integrate a single-fiber bidirectional transceiver module for full-duplex communication over optical fiber cables.
5. The method according to claim 1, characterized in that, Both the first and second photoelectric converters are equipped with a CAN controller interface circuit, an optical transmitting module, an optical receiving module, and a signal isolation transformer to achieve electrical isolation between the inside and outside of the electromagnetic interference environment.
6. The method according to claim 1, characterized in that, Before connecting the motor controller housing to the grounding interface of the first photoelectric converter, ensure that the motor controller is reliably connected to the laboratory ground through the protective grounding terminal of its power supply line. The grounding interface of the first photoelectric converter is connected through the housing to provide an electrostatic discharge path and maintain a reference ground potential.
7. The method according to claim 1, characterized in that, The electromagnetic interference environment is a motor and electrical control laboratory, which contains one or more high-voltage, high-current devices, such as high-voltage frequency converters, high-power loads, or electromagnetic brakes.
8. The method according to claim 1, characterized in that, The method further includes: detecting the terminal matching status of the CAN bus segment formed by the first CAN interface of the first photoelectric converter and the CAN interface of the motor controller, and only connecting a terminal resistor in parallel at the physical farthest end of the CAN bus segment when it is determined that the CAN bus segment is not configured with the required terminal resistor.
9. The method according to claim 1, characterized in that, Both the first and second photoelectric converters are equipped with LED status indicators to indicate the power status, CAN bus activity status, and fiber optic link status, respectively.
