Bus state detection circuit and device
The bus status detection circuit, which uses differential signal acquisition and opto-isolation conversion, solves the problems of power interruption and insufficient security in 485 bus monitoring and diagnosis. It enables status monitoring and fault diagnosis without affecting bus operation, thus improving the safety and adaptability of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU ZHOULIGONG SCM DEV
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-01
AI Technical Summary
Existing 485 bus monitoring and diagnostic technologies suffer from problems such as the need for power outages for direct connection, insufficient security, and high dependence on communication parameters, making them difficult to implement without power interruption and highly complex.
A bus status detection circuit that uses differential signal acquisition, opto-isolation conversion and status output to work together acquires differential signals through a bus acquisition module, achieves electrical isolation through an opto-conversion module, and outputs bus status information through a status output module.
It improves the security, stability, and adaptability of bus status detection without disrupting the original bus structure, reduces the intrusiveness and complexity of the system, and is suitable for online status monitoring and fault early warning in industrial fields.
Smart Images

Figure CN121967262A_ABST
Abstract
Description
Bus status detection circuit and device Technical Field
[0001] This application relates to the field of communication technology, and in particular to a bus status detection circuit and device. Background Technology
[0002] With the continuous development of industrial automation systems and distributed control systems, the bus, as a standard communication interface with advantages such as strong anti-interference capability, long transmission distance, and flexible networking, is widely used in industrial equipment, instrument control, and field communication scenarios. During system operation and maintenance, to ensure communication stability and equipment reliability, it is usually necessary to monitor or diagnose the bus's operating status to promptly locate the cause of faults when bus anomalies occur.
[0003] In existing technologies, bus monitoring and diagnosis are typically achieved using external monitoring devices. This involves using an additional computer or debugging terminal directly connected to the bus via a serial interface to monitor and record data in real time. When bus communication is abnormal, the type of fault is determined by analyzing the collected data stream. However, this type of monitoring generally uses a direct-connection structure, with a direct electrical connection between the monitoring device and the bus under test, which introduces a series of problems. Firstly, during testing or diagnostic operations, the monitoring device usually needs to be manually connected to the existing bus network. For system and personnel safety reasons, this connection process often requires powering off the bus system. However, in some industrial sites or continuous operation scenarios, equipment cannot be shut down and powered off, thus limiting the practical application of this monitoring method. Secondly, because the monitoring device is directly electrically connected to the bus, when the bus experiences abnormalities, voltage surges, or short circuits, the abnormal electrical state may have a reverse effect on the monitoring device, posing a risk of damage and reducing the overall system safety. In addition, existing direct-connection monitoring methods usually rely on the correct configuration of bus communication parameters by the monitoring device, and cannot achieve automatic identification and adaptive adjustment of the bus baud rate. They still require repeated manual configuration and debugging, making them highly complex to use. Summary of the Invention
[0004] This application provides a bus status detection circuit and device, solving the problems of existing technologies where direct connection is required for bus monitoring and diagnosis, resulting in electrical safety risks, difficulty in implementation without power interruption, and high dependence on communication parameters. This application eliminates the need for direct connection of the monitoring device to the bus communication link, requires no power-off operation, and does not rely on manual configuration of communication parameters such as the bus baud rate, thus achieving safe detection and diagnosis of the bus operating status. The solution has a simple structure, occupies little board space, and effectively improves the safety, applicability, and engineering deployment flexibility of bus status detection, making it suitable for online status monitoring, operation diagnosis, and fault early warning applications in industrial fieldbuses.
[0005] In a first aspect, this application provides a bus status detection circuit, comprising: a bus acquisition module, a photoelectric conversion module, and a status output module; the bus acquisition module is configured to acquire differential signals used for differential transmission in the bus; the photoelectric conversion module is configured to generate a status level signal electrically isolated from the bus based on the differential signal; and the status output module is configured to output the status level signal.
[0006] Secondly, this application provides a bus status detection device, including the bus status detection circuit.
[0007] In this application, a bus status detection circuit based on the coordinated operation of differential signal acquisition, opto-isolation conversion, and status output is constructed to achieve reliable sensing of bus operating status, electrical isolation processing, and stable output of status results. Upon receiving a signal from the target bus, the circuit first uses a bus acquisition module to acquire the differential signals used for differential transmission on the bus, thereby obtaining basic signal information characterizing the current communication status of the bus. After completing the differential signal acquisition, the opto-conversion module performs opto-conversion processing based on the acquired differential signals, converting the differential signals into status level signals electrically isolated from the bus side. This effectively suppresses common-mode interference and avoids the influence of bus-side electrical characteristics on subsequent circuits. Subsequently, the status output module outputs the status level signal, enabling external detection devices or control units to directly acquire the level information reflecting the bus status, thus completing the entire detection process from differential signal acquisition to isolated status output. This solution, through the coordinated design of differential acquisition, opto-isolation, and status output, improves the security, stability, and adaptability of bus status detection, making it suitable for industrial communication buses, vehicle networks, and bus status monitoring applications with high electrical isolation requirements. Attached Figure Description
[0008] Figure 1 is a structural block diagram of a bus status detection circuit provided in an embodiment of this application; Figure 2 is a circuit diagram of a bus acquisition module provided in an embodiment of this application; Figure 3 is a structural block diagram of a photoelectric conversion module provided in an embodiment of this application; Figure 4 is a schematic diagram of a photoelectric conversion module provided in an embodiment of this application; Figure 5 is a circuit diagram of a photoelectric conversion module provided in an embodiment of this application; Figure 6 is a schematic diagram of a first resistor provided in an embodiment of this application; Figure 7 is a schematic diagram of a second resistor provided in an embodiment of this application; Figure 8 is a structural block diagram of a bus status detection circuit including a baud rate calculation module provided in an embodiment of this application; Figure 9 is a connection circuit diagram of a bus status detection circuit provided in an embodiment of this application; Figure 10 is a structural block diagram of a bus status detection device provided in an embodiment of this application. Detailed Implementation
[0009] To make the technical problems solved, the technical solutions adopted, and the technical effects achieved by this application clearer, the technical solutions of the embodiments of this application are further described in detail below. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0010] In the description of this application, unless otherwise expressly specified and limited, the terms "connected," "linked," and "fixed" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0011] In this application, unless otherwise expressly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.
[0012] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0013] Currently, with the continuous development of industrial automation systems, building control systems, and various fieldbus communication networks, the RS-485 bus, as a communication interface with long-distance transmission capability, strong anti-interference performance, and low cost, is widely used in industrial control, instrumentation, and equipment networking applications. In actual operation and maintenance, the communication stability of the RS-485 bus directly affects the reliable operation of the system. Therefore, real-time monitoring and fault diagnosis of the bus communication status has become a key requirement in operation, maintenance, and testing.
[0014] In current technological practices, monitoring and diagnostics of the 485 bus typically rely on external monitoring devices. This involves configuring an additional computer or diagnostic terminal to directly connect to the 485 bus network via a serial interface. Data frames on the bus are collected, recorded, and analyzed. When abnormal data or communication interruptions are detected, the cause of the fault is determined manually or semi-automatically based on data flow characteristics. While this approach allows for direct observation of bus communication behavior, it generally employs a direct-connection structure, meaning there is a direct electrical connection between the monitoring device and the 485 bus. Due to this direct-connection structure, existing monitoring and diagnostic solutions exhibit several limitations in practical applications. First, during testing or diagnostics, the monitoring device usually requires manual connection to the existing 485 bus network. For personnel safety and equipment protection, this connection process often needs to be performed with the system powered off. However, in some continuous operation or critical business scenarios, power interruption is not permitted, thus limiting the applicability of this solution. Secondly, because there is a direct electrical connection between the monitoring device and the 485 bus, when an abnormality occurs on the bus side, such as a short circuit, abnormal voltage, or surge interference, the abnormal electrical condition may be transmitted to the monitoring device through the direct connection path, thereby increasing the risk of damage to the monitoring device and reducing the overall safety and reliability of the diagnostic system. Thirdly, existing monitoring methods typically lack the ability to adapt to bus communication parameters. When the monitoring device is connected, it cannot automatically identify or match the currently used baud rate configuration of the bus, still requiring manual pre-setting or repeated debugging, increasing the complexity of the diagnostic operation and the probability of errors.
[0015] In summary, while existing 485 bus monitoring and diagnostic technologies meet the needs of communication data analysis to a certain extent, they still have significant shortcomings in terms of access methods, security, and parameter adaptability. These problems are particularly pronounced in application scenarios with high requirements for continuous system operation, complex field environments, or strict security requirements. Therefore, it is necessary to propose a technical solution that avoids direct electrical access to the bus, reduces the need for manual intervention, and improves monitoring security and adaptability, in order to better meet the practical application needs of 485 bus status monitoring and diagnostics.
[0016] To address the shortcomings of existing bus status detection schemes, such as insufficient security, significant interference with the operating system, and limited adaptability of direct-connection monitoring methods, this embodiment provides a bus status detection circuit. By introducing a detection mechanism that integrates differential signal acquisition, opto-isolation conversion, and status output, a bus status detection system is constructed that combines secure isolation, stable signal conversion, and clear status indication capabilities. This enables reliable acquisition and output of the bus's operating status while reducing intrusion into the existing bus system. The bus status detection circuit uses the signals used for differential transmission on the bus as the detection object. When the bus is in normal communication mode, the bus acquisition module first acquires the differential signals on the bus to obtain basic signal information characterizing the bus's electrical characteristics and communication activities, providing input for subsequent isolation and judgment processing. After completing the differential signal acquisition, the opto-conversion module performs opto-conversion processing based on the acquired differential signals, converting them into state level signals that are electrically isolated from the bus side. This achieves effective isolation at the signal level, preventing abnormal voltages, surges, or short circuits on the bus side from affecting the detection circuit and external devices, while improving the overall safety and stability of the detection process. Subsequently, the status output module outputs the status level signal, enabling external monitoring units, control systems, or diagnostic equipment to acquire the current bus status information in a simple and intuitive level manner. This completes the full detection loop from differential signal acquisition and electrical isolation conversion to status result output. Through the coordinated design of differential acquisition, opto-isolation, and status output, this solution achieves effective monitoring of the bus status without disrupting the original bus structure. It reduces reliance on complex analysis circuits and additional testing equipment, significantly improving the safety, reliability, and engineering applicability of the detection solution. This bus status detection circuit has a simple structure, low implementation cost, minimal modification to existing systems, and good versatility and scalability. It can be widely applied in industrial automation control systems, field communication networks, and vehicle buses—applications with high requirements for electrical isolation and operational safety. This provides an effective technical path for achieving low-cost, low-intrusion, and high-reliability bus status detection.
[0017] Figure 1 shows a structural block diagram of a bus status detection circuit provided in an embodiment of this application. Referring to Figure 1, the bus status detection circuit specifically includes: a bus acquisition module 1, a photoelectric conversion module 2, and a status output module 3; the bus acquisition module 1 is configured to acquire differential signals used for differential transmission in the bus.
[0018] In some embodiments, the bus acquisition module 1 is electrically connected to the target bus to acquire differential signals used for differential transmission in the bus, wherein the differential signals include a first-level signal on a first differential signal line and a second-level signal on a second differential signal line. The bus acquisition module 1 obtains a differential signal pair reflecting the current communication state of the bus by synchronously sampling the two signals, thereby providing raw input data for subsequent signal isolation, state determination, or logic processing.
[0019] In one embodiment, the bus acquisition module 1 may include a differential input interface, a level limiting unit, or an anti-interference sampling unit, for acquiring differential signals with high impedance without affecting normal bus communication, so as to reduce the impact on bus load and signal integrity.
[0020] In one embodiment, the differential signal acquired by the bus acquisition module 1 can be RS485, CAN, or other bus signals based on differential transmission mechanisms, and the acquisition results are used to characterize whether the bus is in an idle state, a driving state, or an abnormal state.
[0021] Optionally, Figure 2 shows a circuit diagram of a bus acquisition module provided in an embodiment of this application. Referring to Figure 2, the bus acquisition module 1 specifically includes: a first signal acquisition line 11 and a second signal acquisition line 12, wherein the differential signal corresponds to the relative state of the first level signal and the second level signal.
[0022] The first signal acquisition line is configured to acquire a first-level signal; the second signal acquisition line is configured to acquire a second-level signal.
[0023] In one embodiment, the bus acquisition module 1 specifically includes a first signal acquisition line 11 and a second signal acquisition line 12, which are respectively connected to two differential signal lines in the bus. The differential signal consists of a first-level signal and a second-level signal, and the logic state of the differential signal is determined by the relative level relationship between the first-level signal and the second-level signal. Specifically, the first signal acquisition line 11 is configured to acquire the first-level signal on the first differential signal line in the bus; the second signal acquisition line 12 is configured to acquire the second-level signal on the second differential signal line in the bus.
[0024] In one embodiment, by synchronously acquiring the first level signal and the second level signal, the bus acquisition module 1 can obtain a differential signal reflecting the current transmission state of the bus, providing a basic input for subsequent opto-isolation conversion and state level generation.
[0025] In one embodiment, both the first signal acquisition line 11 and the second signal acquisition line 12 are connected to the bus in a high-impedance manner to complete signal acquisition without affecting the normal communication of the bus, thereby avoiding interference with the bus load characteristics and signal integrity.
[0026] The photoelectric conversion module 2 is configured to generate a state level signal that is electrically isolated from the bus based on the differential signal.
[0027] In some embodiments, the photoelectric conversion module 2 is connected to the bus acquisition module 1 and is used to receive the differential signal acquired by the bus acquisition module 1, and generate a status level signal characterizing the bus state based on the differential signal. The photoelectric conversion module 2 uses optocoupler isolation, electro-optical conversion, or equivalent isolation conversion to electrically isolate the generated status level signal from the bus-side circuit, thereby achieving bus state detection while preventing bus-side voltage, current, or interference from affecting subsequent circuits.
[0028] In one embodiment, the photoelectric conversion module 2 may include an optocoupler, a current limiting unit, and a shaping circuit. After the differential signal is current-limited and shaped, it drives the light-emitting end of the optocoupler. The light-receiving end of the optocoupler outputs a state level signal that is electrically isolated from the bus.
[0029] In one embodiment, the status level signal can be high or low, used to indicate whether the differential signal is in a valid communication state, a drive state, or an idle state. The status level signal can be directly provided to the microcontroller unit, logic control circuit, or status monitoring module.
[0030] Optionally, Figure 3 shows a structural block diagram of a photoelectric conversion module provided in an embodiment of this application. Referring to Figure 3, the photoelectric conversion module 2 specifically includes: a first light-emitting unit 21, a second light-emitting unit 22, and a photoelectric detection unit 23; the first light-emitting unit 21 is configured to generate a first illumination signal based on the differential signal.
[0031] For example, the first light-emitting unit 21 is disposed in the photoelectric conversion module 2, and is used to receive the differential signal acquired by the bus acquisition module, and generate a corresponding first illumination signal according to the level state of the differential signal. The first light-emitting unit 21 converts the electrical changes of the differential signal into changes in illumination intensity, so that the bus state represented by the differential signal is expressed in the form of an optical signal, thereby providing a basis for subsequent electrical isolation and photoelectric conversion.
[0032] In one embodiment, the first light-emitting unit 21 may include a light-emitting diode or other electroluminescent device. The differential signal is current-limited or shaped to drive the first light-emitting unit 21 so that it emits light when the differential signal meets a preset condition, and turns off or changes its light-emitting state when the differential signal does not meet the preset condition.
[0033] In one embodiment, the on / off state, light intensity, or duration of light emission of the first illumination signal corresponds to the relative level relationship of the differential signal, thereby enabling the first illumination signal to accurately reflect the transmission or activity state of the differential signal in the bus.
[0034] The second light-emitting unit 22 is configured to generate a second illumination signal based on the differential signal.
[0035] For example, the second light-emitting unit 22 is disposed in the photoelectric conversion module 2, and is used to receive the differential signal acquired by the bus acquisition module, and generate a corresponding second illumination signal according to the level state of the differential signal. The second light-emitting unit 22 converts the electrical changes of the differential signal into an illumination signal, so that the bus state reflected by the differential signal is expressed in an optical form, thereby cooperating with the first light-emitting unit 21 to realize the optical mapping and isolation conversion of the differential signal.
[0036] In one embodiment, the second light-emitting unit 22 may include a light-emitting diode or other electroluminescent device. The differential signal is applied to the second light-emitting unit 22 after passing through the corresponding driving and current-limiting circuit, so that it emits light when the differential signal is at a specific level and changes its light-emitting state when the differential signal changes.
[0037] In one embodiment, the second illumination signal and the first illumination signal are independent of each other in terms of illumination position, light emission channel or illumination path, and are used to characterize the states of different level signals or different polarities in the differential signal, thereby providing a clear and distinct optical input for subsequent light detection and state determination.
[0038] The photoelectric detection unit 23 is configured to generate a state level signal that is electrically isolated from the bus based on the first illumination signal and the second illumination signal.
[0039] For example, the photoelectric detection unit 23 is disposed in the photoelectric conversion module 2, and is used to receive the first illumination signal generated by the first light-emitting unit 21 and the second illumination signal generated by the second light-emitting unit 22, and generate a status level signal characterizing the bus status based on the two illumination signals. By performing photoelectric conversion on the first illumination signal and the second illumination signal, the photoelectric detection unit 23 makes the status level signal electrically isolated from the bus-side circuit, thereby realizing bus status detection while avoiding the conduction of bus-side voltage fluctuations or interference to subsequent circuits.
[0040] In one embodiment, the photoelectric detection unit 23 may include a photodiode, a phototransistor, or other photoelectric sensing device for converting the first illumination signal and the second illumination signal into corresponding electrical signals, and generating a state level signal based on the combination relationship between the two electrical signals.
[0041] In one embodiment, the photoelectric detection unit 23 can determine the logic state corresponding to the differential signal by comparing the on / off state, light intensity, or time characteristics of the first illumination signal and the second illumination signal, and output a state level signal in the form of a high level or a low level accordingly.
[0042] In one embodiment, the status level signal can be directly provided to the status output module or control unit to indicate whether the bus is in a communication active state, an idle state, or an abnormal state, thereby providing a reliable basis for system operation monitoring and fault diagnosis.
[0043] Optionally, Figure 4 shows a schematic diagram of a photoelectric conversion module provided in an embodiment of this application. Referring to Figure 4, the photoelectric conversion module 2 specifically includes: a first light-emitting diode D1, a second light-emitting diode D2, and a photoelectric detection unit 23.
[0044] The anode of the first light-emitting diode D1 is connected to the second signal acquisition line 12, and the cathode of the first light-emitting diode D1 is connected to the first signal acquisition line 11.
[0045] For example, a first light-emitting diode D1 is disposed in the photoelectric conversion module 2, with its anode electrically connected to the second signal acquisition line 12 and its cathode electrically connected to the first signal acquisition line 11. Through the above connection method, the first light-emitting diode D1 can directly sense the level difference between the first signal acquisition line 11 and the second signal acquisition line 12, and be in a conducting or cut-off state according to the relative level relationship between the two.
[0046] In one embodiment, when the level on the second signal acquisition line 12 is higher than the level on the first signal acquisition line 11 and the forward conduction condition of the first light-emitting diode D1 is met, the first light-emitting diode D1 is forward biased and emits light; when the above level relationship is not met, the first light-emitting diode D1 is in the cutoff state and does not emit light, thereby realizing the optical indication of the polarity state of the differential signal.
[0047] In one embodiment, this connection method allows the first light-emitting diode D1 to respond to relative level changes of the differential signal without the need for additional comparison or decision circuitry, which helps reduce circuit complexity and improve the reliability of bus status detection.
[0048] The anode of the second light-emitting diode D2 is connected to the first signal acquisition line 11, and the cathode of the second light-emitting diode D2 is connected to the second signal acquisition line 12.
[0049] For example, the second light-emitting diode D2 is disposed in the photoelectric conversion module 2, with its anode electrically connected to the first signal acquisition line 11 and its cathode electrically connected to the second signal acquisition line 12. Through the above connection method, the second light-emitting diode D2 can directly sense the level difference between the first signal acquisition line 11 and the second signal acquisition line 12, and be in a conducting or cut-off state according to the relative level relationship between the two.
[0050] In one embodiment, when the level on the first signal acquisition line 11 is higher than the level on the second signal acquisition line 12 and the forward conduction condition of the second light-emitting diode D2 is met, the second light-emitting diode D2 is forward biased and emits light; when the above level relationship is not met, the second light-emitting diode D2 is in the cut-off state and does not emit light, thereby forming a complementary optical indication relationship with the first light-emitting diode D1.
[0051] In one embodiment, the anti-parallel connection structure of the first light-emitting diode D1 and the second light-emitting diode D2 enables bidirectional sensing of the polarity state of the differential signal, allowing the differential signal to generate a corresponding illumination signal under any polarity condition, thus providing a clear and reliable optical input for the subsequent state determination of the photoelectric detection unit.
[0052] Optionally, the first level state and the second level state are two opposite level states of the differential signal; the first light-emitting diode is configured to generate a first illumination signal when the first level signal is in the first level state and the second level signal is in the second level state; the second light-emitting diode is configured to generate a second illumination signal when the first level signal is in the second level state and the second level signal is in the first level state.
[0053] For example, the first level state and the second level state are two opposite level states of the differential signal, wherein the first level state and the second level state are mutually exclusive and are used to characterize the polarity relationship of the differential signal.
[0054] In one embodiment, the first light-emitting diode is configured to be forward biased and turned on when the first level signal is in the first level state and the second level signal is in the second level state, thereby generating a first illumination signal; when the above level combination relationship is not satisfied, the first light-emitting diode is in the cut-off state and does not generate the first illumination signal.
[0055] In one embodiment, the second light-emitting diode is configured to be forward biased and turned on when the first level signal is in the second level state and the second level signal is in the first level state, thereby generating a second illumination signal; when the above level combination relationship is not satisfied, the second light-emitting diode is in the cut-off state and does not generate a second illumination signal.
[0056] With the above configuration, the first light-emitting diode and the second light-emitting diode correspond to two opposite level states of the differential signal, so that the differential signal can generate the corresponding illumination signal under any polarity condition, thereby providing clear and mutually exclusive input conditions for the photoelectric detection unit to make state determination based on optical signals.
[0057] Optionally, Figure 5 shows a circuit diagram of a photoelectric conversion module provided in an embodiment of this application. Referring to Figure 5, the photoelectric conversion module 2 specifically includes: a first light-emitting diode D1, a second light-emitting diode D2, and a photodetector D3. The state level signal includes a first state level signal and a second state level signal with different level states.
[0058] The photodetector D3 is configured to output a first state level signal when either the first illumination signal or the second illumination signal is present.
[0059] For example, photodetector D3 is disposed in photodetector unit 23 for receiving a first illumination signal and a second illumination signal, and generating a corresponding state level signal based on the received illumination signal. Photodetector D3 is configured to output a first state level signal when either the first illumination signal or the second illumination signal is present.
[0060] In one embodiment, the first state level signal can be a low-level signal, used to indicate the presence of a valid differential signal state or communication activity state in the bus.
[0061] In one embodiment, the photodetector D3 can generate a first state level signal when either light signal is detected by performing a logical OR operation on the first light signal and the second light signal, thereby completing a unified determination of the bus state without distinguishing the polarity of the differential signal.
[0062] With the above configuration, the photodetector D3 can output a unified status level indication based on any polarity change of the differential signal, which helps to simplify the subsequent status processing logic and improve the stability and versatility of bus status detection.
[0063] When neither the first illumination signal nor the second illumination signal is present, a second state level signal is output.
[0064] For example, photodetector D3 is further configured to output a second state level signal when neither the first nor the second illumination signal is present. This second state level signal is distinct from the first state level signal and is used to characterize the state where no valid differential signal is detected in the bus.
[0065] In one embodiment, the second state level signal can be a high-level signal to indicate that the bus is in an abnormal state; when either the first illumination signal or the second illumination signal occurs, the photodetector D3 switches from outputting the second state level signal to outputting the first state level signal.
[0066] In one embodiment, the photodetector D3 performs a reverse logical OR operation on the first illumination signal and the second illumination signal to determine whether either illumination signal is detected, thereby forming a dual-state determination mechanism for the bus state.
[0067] With the above configuration, the photodetector D3 can output different status level signals when the differential signal is present and when it is not. This allows the subsequent circuitry to accurately determine whether the bus is active without having to analyze the details of the differential signal, which helps to reduce the complexity of the system implementation and improve the reliability of status detection.
[0068] Optionally, Figure 6 shows a schematic diagram of a first resistor provided in an embodiment of this application. Referring to Figure 6, the photoelectric conversion module 2 further includes a first resistor R1.
[0069] The first resistor R1 is configured to adjust the excitation intensity of the first light-emitting unit 21 and the second light-emitting unit 22 driven by the differential signal, so as to control the generation threshold of the first illumination signal and the second illumination signal.
[0070] For example, a first resistor R1 is disposed in the driving circuit of the first light-emitting unit 21 and the second light-emitting unit 22, and is configured to adjust the excitation intensity of the first light-emitting unit 21 and the second light-emitting unit 22 driven by the differential signal. By limiting or adjusting the magnitude of the driving current flowing through the first light-emitting unit 21 and the second light-emitting unit 22, the first resistor R1 ensures that the first light-emitting unit 21 and the second light-emitting unit 22 are effectively excited only when the differential signal meets a preset amplitude or polarity condition, thereby controlling the generation threshold of the first illumination signal and the second illumination signal.
[0071] In one embodiment, the first resistor R1 is set such that when the level difference of the differential signal is lower than a preset threshold, the driving current is insufficient to turn on the first light-emitting unit 21 or the second light-emitting unit 22 to emit light; when the level difference of the differential signal is higher than the preset threshold, the driving current can reliably enable the corresponding light-emitting unit to generate a light signal.
[0072] In one embodiment, adjusting the excitation intensity through the first resistor R1 can suppress false triggering caused by differential signal noise, jitter, or transient interference, thereby improving the stability and anti-interference capability of the generation process of the first and second illumination signals.
[0073] With the above configuration, the first resistor R1 not only serves as a current limiting protection for the first light-emitting unit 21 and the second light-emitting unit 22, but also participates in the construction of the threshold determination mechanism from differential signal to illumination signal, making the bus status detection more reliable and controllable.
[0074] Optionally, Figure 7 shows a schematic diagram of a second resistor provided in an embodiment of this application. Referring to Figure 7, the photoelectric conversion module 2 further includes a second resistor R2.
[0075] The second resistor R2 is configured to provide a preset level bias to the status output module 3 when the photodetector 23 does not output the first status level signal, so as to control the status output module 3 to output the second status level signal.
[0076] For example, the second resistor R2 is connected to the status output module 3 and is configured to provide a preset level bias to the status output module 3 when the photodetector 23 does not output a first status level signal. Through this preset level bias, the second resistor R2 enables the status output module 3 to stably output a second status level signal when there is no first status level signal input.
[0077] In one embodiment, when the photodetector D3 does not detect the first illumination signal and the second illumination signal, and does not output the first state level signal, the second resistor R2 biases the input terminal of the state output module 3 by pulling up or pulling down, so that its output terminal is kept at the level corresponding to the second state level signal, thereby avoiding the output terminal being in a floating or uncertain state.
[0078] In one embodiment, the resistance value of the second resistor R2 is set such that, without affecting the normal transmission of the first state level signal, the state output module 3 can reliably output the second state level signal when the first state level signal is missing, thereby improving the stability and anti-interference capability of the bus state indication.
[0079] With the above configuration, the second resistor R2 and the photodetector D3 work together to form the default level control mechanism of the status output module 3, so that the system can output a clear and stable second status level signal when the differential signal is absent or the bus is idle, thus avoiding misjudgment of the status.
[0080] The status output module 3 is configured to output the status level signal.
[0081] In some embodiments, the status output module 3 is connected to the photoelectric conversion module 2 and is used to receive the status level signal generated by the photoelectric conversion module 2 and output the status level signal to an external circuit or an upper-level control unit. The status output module 3 buffers, shapes, or performs level matching processing on the status level signal to ensure that the output status level signal meets the interface requirements of the subsequent circuit, thereby achieving stable indication and reliable transmission of the bus status.
[0082] In one embodiment, the status output module 3 may include a buffer drive unit, an interface matching circuit, or a status indication interface, for outputting a status level signal to the input terminal of the microcontroller unit, a status detection interface, or an alarm circuit.
[0083] In one embodiment, the status level signal output by the status output module 3 can be used to indicate whether the bus is in an active communication state, an idle state, or an abnormal state. The output status level signal can serve as the basis for bus status judgment, fault detection, or system control.
[0084] Optionally, Figure 8 shows a structural block diagram of a bus status detection circuit including a baud rate calculation module according to an embodiment of this application. Referring to Figure 8, the bus status detection circuit includes: a bus acquisition module 1, a photoelectric conversion module 2, a status output module 3, and a baud rate calculation module 4.
[0085] The baud rate calculation module 4 is configured to acquire multiple first time intervals between multiple adjacent first state level signals, select the smallest time interval from the multiple first time intervals as a second time interval, and calculate the baud rate of the differential signal based on the second time interval.
[0086] For example, the baud rate calculation module 4 is connected to the status output module 3 and is configured to acquire multiple first status level signals output by the status output module 3, and extract multiple corresponding first time intervals from multiple adjacent first status level signals. The first time interval is used to characterize the time difference between two adjacent occurrences of the first status level signal.
[0087] In one embodiment, the baud rate calculation module 4 selects the smallest time interval from a plurality of acquired first time intervals as the second time interval. The second time interval is used to characterize the shortest effective level change period corresponding to the differential signal in the current communication process, thereby reflecting the highest effective change frequency characteristic of the differential signal.
[0088] In one embodiment, the baud rate calculation module 4 calculates the baud rate of the differential signal based on the second time interval. Specifically, the baud rate value corresponding to the differential signal can be obtained by converting the second time interval with a preset symbol period relationship.
[0089] In one embodiment, by selecting the minimum value among multiple first time intervals as the second time interval, interference from communication interruptions, idle periods, or low-speed data segments on the baud rate calculation results can be effectively avoided, thereby improving the accuracy and stability of the baud rate calculation.
[0090] With the above configuration, the baud rate calculation module 4 can estimate the baud rate of the differential signal based solely on the time characteristics of the state level signal without directly analyzing the differential signal waveform. This helps reduce circuit complexity and improves the system's adaptability to different bus communication rates.
[0091] Optionally, Figure 9 shows a connection circuit diagram of a bus status detection circuit provided in an embodiment of this application. Referring to Figure 9, the bus status detection circuit specifically includes: a bus acquisition module 1, a photoelectric conversion module 2, a status output module 3, and a baud rate calculation module 4.
[0092] The bus acquisition module 1 specifically includes a first signal acquisition line 11 and a second signal acquisition line 12, which are used to connect to two differential signal lines in the bus, respectively. The differential signal consists of a first-level signal and a second-level signal, and the logic state of the differential signal is determined by the relative level relationship between the first-level signal and the second-level signal. Specifically, the first signal acquisition line 11 is configured to acquire the first-level signal on the first differential signal line in the bus; the second signal acquisition line 12 is configured to acquire the second-level signal on the second differential signal line in the bus.
[0093] The photoelectric conversion module 2 specifically includes a first light-emitting unit 21, a second light-emitting unit 22, and a photoelectric detection unit 23. The first light-emitting unit 21 and the second light-emitting unit 22 are composed of two anti-parallel infrared light-emitting diodes. The photoelectric detection unit 23 is a photodetector D3. The first light-emitting unit 21, the second light-emitting unit 22, and the photoelectric detection unit 23 are connected via optical coupling to achieve electrical isolation between the differential signal and the detection side. The photoelectric conversion module 2 also includes a first resistor R1, whose two ends are respectively connected to a first signal acquisition line 11 for acquiring a first-level signal and the input terminal of the light-emitting unit in the photoelectric conversion module 2. This resistor is used to adjust the excitation intensity of the first light-emitting unit 21 and the second light-emitting unit 22 driven by the differential signal, thereby controlling the generation threshold of the first and second illumination signals. The other input terminal of the photoelectric conversion module 2 is connected to a second signal acquisition line 12 for acquiring a second-level signal. One end of the photoelectric detection unit 23 is connected to digital ground, and the other end is connected to a status output terminal. The photoelectric conversion module 2 also includes a second resistor R2, which is configured to pull up the status output terminal to a preset level so as to provide a level bias to the status output module 3 when the photoelectric detection unit 23 does not output a first status level signal, thereby causing the status output module 3 to output a second status level signal; the status output terminal can be connected to a device in an RS485 communication network for real-time operation monitoring, or it can be connected to an external device for performing diagnostic detection.
[0094] The status output module 3 is used to output status level signals. When monitoring or detecting the RS485 bus, the output relationship between the first signal acquisition line 11, the second signal acquisition line 12, and the status output module 3 is as follows: When the first signal acquisition line 11 and the second signal acquisition line 12 are at opposite levels, the differential signal is established, the photoelectric detection unit 23 outputs a first status level signal, and the status output module 3 outputs a corresponding level; during the level switching process between the first signal acquisition line 11 and the second signal acquisition line 12, the status output module 3 outputs a first status level signal for a short period; when the first signal acquisition line 11 and the second signal acquisition line 12 are at the same level, the photoelectric detection unit 23 does not output a first status level signal, and the status output module 3 outputs a second status level signal under the action of the second resistor R2. By detecting the status level signal output by the status output module 3, it is possible to monitor whether the RS485 bus data is normal, detect the bus operating status, and calculate the communication baud rate.
[0095] The baud rate calculation module 4 can be a time interval measurement and baud rate calculation module implemented based on a timing and counting circuit, microcontroller, processor, programmable logic device, or dedicated timing chip. It can also be a master or slave device on the measurement bus. The baud rate calculation module 4 is used to acquire the first time interval between multiple adjacent first state level signals, select the smallest time interval from the multiple first time intervals as the second time interval, and calculate the baud rate of the differential signal based on the second time interval. The data transmission of the RS485 bus conforms to the Universal Asynchronous Receiver / Transmitter (UART) protocol. Whenever the level state corresponding to the differential signal changes, the state output module outputs the first state level signal for a short period. The monitoring device obtains the minimum time interval by repeatedly measuring the time interval between the first state level signals. And calculate the baud rate according to the formula. :
[0096] Determine the communication baud rate of the RS485 bus; for example, when At that time, the calculated baud rate was approximately 10000. Since commonly used standard baud rates include 300, 1200, 2400, 9600, 19200, 38400, 115200, etc., 10000 is closest to 9600. Therefore, it can be determined that the current communication baud rate of the RS485 bus is 9600.
[0097] Optionally, Figure 10 shows a structural block diagram of a bus status detection device provided in an embodiment of this application. Referring to Figure 10, the bus status detection device specifically includes: a bus acquisition module 1, a photoelectric conversion module 2, and a status output module 3.
[0098] The bus acquisition module 1 is configured to acquire differential signals used for differential transmission in the bus; the photoelectric conversion module 2 is configured to generate a status level signal that is electrically isolated from the bus based on the differential signal; and the status output module 3 is configured to output the status level signal.
[0099] This application embodiment utilizes a bus acquisition module to acquire differential signals for differential transmission from the bus, and inputs these differential signals into a photoelectric conversion module. The photoelectric conversion module generates a status level signal that is electrically isolated from the bus based on the differential signals, and then outputs the status level signal by a status output module, thereby achieving the monitoring and detection of the bus operating status. Through the above design, this application achieves real-time perception of the differential bus status without affecting normal bus communication, and improves the safety and stability of the detection process through electrical isolation, thus solving the problems of susceptibility to interference and insufficient reliability in the bus status detection process of the prior art.
[0100] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the scope of protection of this application. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application for those skilled in the art.
[0101] The bus status detection device provided in the above embodiments may include the bus status detection circuit provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the bus status detection circuit provided in any embodiment of this application.
[0102] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application. The scope of this application is determined by the scope of the claims.
Claims
1. A bus status detection circuit, characterized in that, include: Bus acquisition module, photoelectric conversion module, and status output module; The bus acquisition module is configured to acquire differential signals used for differential transmission in the bus; The photoelectric conversion module is configured to generate a status level signal that is electrically isolated from the bus based on the differential signal; The status output module is configured to output the status level signal.
2. The bus status detection circuit according to claim 1, characterized in that, The bus acquisition module includes a first signal acquisition line and a second signal acquisition line, and the differential signal corresponds to the relative state of the first level signal and the second level signal; the first signal acquisition line is configured to acquire the first level signal. The second signal acquisition line is configured to acquire a second level signal.
3. The bus status detection circuit according to claim 1, characterized in that, The photoelectric conversion module includes a first light-emitting unit, a second light-emitting unit, and a photoelectric detection unit; the first light-emitting unit is configured to generate a first illumination signal based on the differential signal; the second light-emitting unit is configured to generate a second illumination signal based on the differential signal; and the photoelectric detection unit is configured to generate a state level signal electrically isolated from the bus based on the first illumination signal and the second illumination signal.
4. The bus status detection circuit according to claim 2, characterized in that, The first light-emitting unit includes a first light-emitting diode, and the second light-emitting unit includes a second light-emitting diode; the anode of the first light-emitting diode is connected to a second signal acquisition line, and the cathode of the first light-emitting diode is connected to a first signal acquisition line; the anode of the second light-emitting diode is connected to the first signal acquisition line, and the cathode of the second light-emitting diode is connected to a second signal acquisition line.
5. The bus status detection circuit according to claim 4, characterized in that, The first level state and the second level state are two opposite level states of the differential signal; the first light-emitting diode is configured to generate a first illumination signal when the first level signal is in the first level state and the second level signal is in the second level state; The second light-emitting diode is configured to generate a second illumination signal when the first level signal is at a second level state and the second level signal is at a first level state.
6. The bus status detection circuit according to claim 2, characterized in that, The photoelectric detection unit includes a photodetector, and the state level signal includes a first state level signal and a second state level signal with different level states. The photodetector is configured to output a first state level signal when either the first illumination signal or the second illumination signal is present. When neither the first illumination signal nor the second illumination signal is present, a second state level signal is output.
7. The bus status detection circuit according to claim 2, characterized in that, The photoelectric conversion module further includes a first resistor; the first resistor is configured to adjust the excitation intensity of the first light-emitting unit and the second light-emitting unit driven by the differential signal, so as to control the generation threshold of the first light signal and the second light signal.
8. The bus status detection circuit according to claim 6, characterized in that, The status output module includes a second resistor; the second resistor is configured to provide a preset level bias to the status output module when the photodetector does not output the first status level signal, so as to control the status output module to output the second status level signal.
9. The bus status detection circuit according to claim 1, characterized in that, The bus status detection circuit further includes a baud rate calculation module; the baud rate calculation module is configured to acquire multiple first time intervals between multiple adjacent first status level signals, select the smallest time interval from the multiple first time intervals as a second time interval, and calculate the baud rate of the differential signal based on the second time interval.
10. A bus status detection device, characterized in that, Includes the bus status detection circuit as described in any one of claims 1 to 9.