Bus collision detection circuit, device communication unit, and electric scooter

By designing a bus conflict detection circuit using an interface chip and a conflict detection module, the problem of large delay in bus conflict detection in RS485 or RS422 bus communication is solved, and fast and reliable bus conflict detection is achieved.

CN224356131UActive Publication Date: 2026-06-12NINE INTELLIGENT CHANGZHOU TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
NINE INTELLIGENT CHANGZHOU TECH CO LTD
Filing Date
2025-07-10
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

When using existing RS485 or RS422 bus communication, bus conflicts between multiple device communication units rely on software detection, resulting in significant delays and the inability to detect conflicts in a timely manner, which can easily lead to communication failures.

Method used

A bus collision detection circuit is designed in hardware, including an interface chip and a collision detection module. Bus collision detection is achieved through an XOR gate circuit. The interface chip is used for data transmission, and the collision detection module is used to determine whether there is a collision on the bus. Combined with a bus short-circuit protection module, current and voltage are limited.

Benefits of technology

It enables rapid detection of bus conflicts at the hardware level, improving bus reliability and communication efficiency, and reducing conflict detection latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224356131U_ABST
    Figure CN224356131U_ABST
Patent Text Reader

Abstract

This application provides a bus collision detection circuit, a device communication unit, and an electric mobility scooter. The bus collision detection circuit includes: an interface chip and a collision detection module; the TXD interface of the interface chip is connected to the data transmitting end of the MCU, and the differential signal output end of the interface chip is connected to the bus; the RXD interface of the interface chip is connected to the data receiving end of the MCU, and the differential signal input end of the interface chip is connected to the bus; the first input end of the collision detection module is connected to the data transmitting end of the MCU, the second input end of the collision detection module is connected to the RXD interface of the interface chip, and the output end of the collision detection module is connected to the IO port of the MCU; the interface chip is used to transmit the MCU's transmitted data to the bus and to transmit the received data on the bus to the MCU; the collision detection module is used to determine the detection result of whether the bus is in conflict based on the transmitted data and the received data, realizing hardware-based bus collision detection, which can detect bus collisions in a short time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of bus communication technology, and in particular to a bus collision detection circuit, a device communication unit, and an electric mobility scooter. Background Technology

[0002] RS485 or RS422 bus is a serial bus standard for differential signal transmission and multi-point communication, widely used in various fields.

[0003] When multiple device communication units share a bus, bus conflicts may occur. For example, when device communication unit 1 sends high-level data to the bus and device communication unit 2 sends low-level data to the bus, a bus conflict will occur.

[0004] Currently, RS485 or RS422 communication bus collision detection relies on software. However, software detection has a significant delay, failing to detect bus collisions immediately. When multiple device communication units collide, it can easily cause communication failures between them. Therefore, how to implement bus collision detection in hardware is a pressing technical problem that needs to be solved. Utility Model Content

[0005] This application provides a bus conflict detection circuit, a device communication unit, and an electric mobility scooter, which enables the device communication unit to quickly perform bus conflict detection based on hardware when at least two device communication units are sharing a bus.

[0006] In a first aspect, this application provides a bus collision detection circuit, comprising: an interface chip and a collision detection module; the TXD interface of the interface chip is connected to the data transmitting end of an MCU, and the differential signal output end of the interface chip is connected to the bus; the RXD interface of the interface chip is connected to the data receiving end of an MCU, and the differential signal input end of the interface chip is connected to the bus; the first input end of the collision detection module is connected to the data transmitting end of the MCU, the second input end of the collision detection module is connected to the RXD interface of the interface chip, and the output end of the collision detection module is connected to the I / O port of the MCU;

[0007] The interface chip is used to transmit data sent by the MCU to the bus, and to transmit data received on the bus to the MCU.

[0008] The collision detection module is used to determine the detection result of whether the bus is in conflict based on the transmitted data and the received data.

[0009] Optionally, the collision detection module includes an XOR gate circuit;

[0010] Specifically, when the XOR gate outputs a high level, the detection result indicates that a bus conflict exists; when the XOR gate outputs a low level, the detection result indicates that no bus conflict exists.

[0011] Optionally, the interface chip includes a first RS485 chip and a second RS485 chip; the bus includes a first differential signal line and a second differential signal line;

[0012] The TXD interface of the first RS485 chip is connected to the data transmission end of the MCU, the positive terminal of the differential signal output of the first RS485 chip is connected to the first differential signal line of the bus, and the negative terminal of the differential signal output of the first RS485 chip is connected to the second differential signal line of the bus.

[0013] The RXD interface of the second RS485 chip is connected to the data receiving end of the MCU and to the second input end of the collision detection module. The positive terminal of the differential signal input of the second RS485 chip is connected to the first differential signal line of the bus, and the negative terminal of the differential signal input of the second RS485 chip is connected to the second differential signal line of the bus.

[0014] Optionally, the interface chip includes an RS422 chip; the TXD interface of the RS422 chip is connected to the data transmitting end of the MCU, the positive terminal of the differential signal output of the RS422 chip is connected to the first differential signal line of the bus, and the negative terminal of the differential signal output of the RS422 chip is connected to the second differential signal line of the bus; the RXD interface of the RS422 chip is connected to the data receiving end of the MCU, and also connected to the second input end of the collision detection module, the positive terminal of the differential signal input of the RS422 chip is connected to the first differential signal line of the bus, and the negative terminal of the differential signal input of the RS422 chip is connected to the second differential signal line of the bus.

[0015] Optionally, it also includes: a bus short-circuit protection module, which is connected between the differential signal output terminal of the interface chip and the bus;

[0016] The bus short-circuit protection module is used to limit the bus current and limit the bus voltage to a target value when a bus conflict occurs.

[0017] Optionally, the bus short-circuit protection module includes a first bus short-circuit protection unit and a second bus short-circuit protection unit; the first bus short-circuit protection unit is connected between the positive terminal of the differential signal output of the interface chip and the first differential signal line of the bus; the second bus short-circuit protection unit is connected between the negative terminal of the differential signal output of the interface chip and the second differential signal line of the bus.

[0018] Optionally, the first bus short-circuit protection unit includes: a first resistor and a first diode; one end of the first resistor is connected to the positive terminal of the differential signal output, and the other end of the first resistor is connected to the first differential signal line of the bus; the cathode of the first diode is connected to the positive terminal of the differential signal output, and the anode of the first diode is connected to the first differential signal line of the bus.

[0019] The second bus short-circuit protection unit includes: a second resistor and a second diode; one end of the second resistor is connected to the negative terminal of the differential signal output, and the other end of the second resistor is connected to the second differential signal line of the bus; the anode of the second diode is connected to the negative terminal of the differential signal output, and the cathode of the second diode is connected to the second differential signal line of the bus.

[0020] Optionally, the first bus short-circuit protection unit includes: a first resistor and a first diode; one end of the first resistor is connected to the positive terminal of the differential signal output, and the other end of the first resistor is connected to the first differential signal line of the bus; the anode of the first diode is connected to the positive terminal of the differential signal output, and the cathode of the first diode is connected to the first differential signal line of the bus.

[0021] The second bus short-circuit protection unit includes: a second resistor and a second diode; one end of the second resistor is connected to the negative terminal of the differential signal output, and the other end of the second resistor is connected to the second differential signal line of the bus; the cathode of the second diode is connected to the negative terminal of the differential signal output, and the anode of the second diode is connected to the second differential signal line of the bus.

[0022] Secondly, this application provides a device communication unit, the device communication unit including an MCU and a bus conflict detection circuit as described in any of the first aspects.

[0023] Thirdly, this application provides an electric mobility scooter, including: a bus and at least two device communication units as described in the second aspect.

[0024] This application provides a bus collision detection circuit, a device communication unit, and an electric mobility scooter. The bus collision detection circuit includes an interface chip and a collision detection module. The TXD interface of the interface chip is connected to the data transmitting end of the MCU, and the differential signal output end of the interface chip is connected to the bus. The RXD interface of the interface chip is connected to the data receiving end of the MCU, and the differential signal input end of the interface chip is connected to the bus. The first input end of the collision detection module is connected to the data transmitting end of the MCU, the second input end of the collision detection module is connected to the RXD interface of the interface chip, and the output end of the collision detection module is connected to the IO port of the MCU. The interface chip is used to transmit data sent by the MCU to the bus and to transmit data received on the bus to the MCU. The collision detection module is used to determine the detection result of whether the bus is in conflict based on the transmitted data and the received data, realizing hardware-based bus collision detection. Compared with software detection, it can detect bus collisions in a shorter time after a collision occurs. Attached Figure Description

[0025] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0026] Figure 1 A schematic diagram of a bus collision detection circuit provided in an embodiment of this application;

[0027] Figure 2 A schematic diagram of another bus collision detection circuit provided in an embodiment of this application;

[0028] Figure 3 This is a schematic diagram illustrating communication between two device communication units and a bus, provided as an embodiment of this application.

[0029] Figure 4 A schematic diagram of yet another bus collision detection circuit provided in an embodiment of this application;

[0030] Figure 5 This is a schematic diagram illustrating communication between multiple device communication units and a bus, as provided in an embodiment of this application.

[0031] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0032] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0033] In existing technologies, bus conflicts rely on software detection. However, software detection has a significant delay, and it cannot detect bus conflicts immediately when they occur.

[0034] In view of the above problems, this application considers to provide a bus conflict detection circuit based on hardware implementation. By setting the bus conflict detection circuit on the device communication unit, when the device communication unit communicates with the bus, it can automatically and quickly detect whether there is a bus conflict.

[0035] The MCU mentioned in this application is a Microcontroller Unit.

[0036] Figure 1 This is a schematic diagram of a bus collision detection circuit provided in an embodiment of this application, as shown below. Figure 1 As shown, it includes: an interface chip and a collision detection module; the TXD interface of the interface chip is connected to the data transmitting end of the MCU, and the differential signal output end of the interface chip is connected to the bus; the RXD interface of the interface chip is connected to the data receiving end of the MCU, and the differential signal input end of the interface chip is connected to the bus; the first input end of the collision detection module is connected to the data transmitting end of the MCU, the second input end of the collision detection module is connected to the RXD interface of the interface chip, and the output end of the collision detection module is connected to the I / O port of the MCU;

[0037] The interface chip is used to transmit data sent by the MCU to the bus, and to transmit data received on the bus to the MCU.

[0038] The collision detection module is used to determine the detection result of whether the bus is in conflict based on the transmitted data and the received data.

[0039] The interface chip can receive digital signals sent by the MCU to the bus, convert the digital signals into differential signals, and transmit them to the bus.

[0040] Optionally, the data output by the MCU can be high or low level, and the interface chip can convert the high and low levels into differential signals.

[0041] For example, when the data received by the interface chip is high, the interface chip can obtain two voltage values ​​and output two voltage values, +5V and 0V respectively, through the differential signal output line, and transmit them to the bus, that is, transmit data 1 to the bus. The bus includes a first differential signal line RS485A and a second differential signal line RS485B, wherein the first differential signal line receives a voltage value of +5V, and the second differential signal line RS485B receives a voltage value of 0V.

[0042] For example, when the data received by the interface chip is low, the interface chip can obtain two voltage values ​​and output two voltage values, 0V and +5V respectively, through the differential signal output line, and transmit them to the bus, that is, transmit the data 0 to the bus. The bus includes a first differential signal line RS485A and a second differential signal line RS485B, wherein the first differential signal line receives a voltage value of 0V, and the second differential signal line RS485B receives a voltage value of +5V.

[0043] Similarly, after receiving the voltage values ​​on the bus through the differential signal input terminal, the interface chip can convert the two voltage values ​​into digital signals, thereby transmitting the received data to the MCU. For example, when the bus is low, the interface chip can output received data 0 to the MCU; when the bus is high, the interface chip can output received data 1 to the MCU.

[0044] Interface chips can convert digital signals into differential voltage signals, or convert received differential voltage signals into digital signals, thereby enabling data transmission between the MCU and the bus.

[0045] The collision detection module can obtain transmitted data from the MCU and received data from the interface chip. The received data is represented as data on the bus. The collision detection module can compare whether the transmitted data and the received data are the same, and thus output the detection result of whether the bus is in conflict. For example, when the transmitted data is 1 and the received data is 0, the transmitted data and received data are inconsistent, and the detection result is that the bus is in conflict; when both the transmitted data and received data are 1 or both are 0, the transmitted data and received data are consistent, and the detection result is that the bus is not in conflict.

[0046] The output of the collision detection module can be a data indicating whether the sent and received data are consistent. The output of the collision detection module is connected to the MCU's I / O port, and the detection result can be transmitted to the MCU. The MCU can determine whether there is a collision on the bus based on the data from the I / O port.

[0047] Detecting bus conflicts using hardware and stopping data transmission when a conflict is detected can improve bus reliability.

[0048] This application provides a bus conflict detection circuit, which includes an interface chip and a conflict detection module. The TXD interface of the interface chip is connected to the data transmitting end of the MCU, and the differential signal output end of the interface chip is connected to the bus. The RXD interface of the interface chip is connected to the data receiving end of the MCU, and the differential signal input end of the interface chip is connected to the bus. The first input end of the conflict detection module is connected to the data transmitting end of the MCU, the second input end of the conflict detection module is connected to the RXD interface of the interface chip, and the output end of the conflict detection module is connected to the I / O port of the MCU. The interface chip is used to transmit data sent by the MCU to the bus and to transmit received data on the bus to the MCU. The conflict detection module is used to determine the detection result of whether the bus is conflicted based on the transmitted data and the received data, thereby realizing hardware-based bus conflict detection. Compared with software detection, it can detect bus conflicts in a shorter time after a conflict occurs.

[0049] Optionally, the collision detection module includes an XOR gate circuit;

[0050] Specifically, when the XOR gate outputs a high level, the detection result indicates that a bus conflict exists; when the XOR gate outputs a low level, the detection result indicates that no bus conflict exists.

[0051] The collision detection module can be implemented using an XOR gate. The XOR gate can have two inputs. When the two inputs are the same, the output of the XOR gate is 0. When the output of the XOR gate is transmitted to the MCU's I / O port, if the I / O port is 0, the detection result is that there is no bus collision. When the two inputs are different, the output of the XOR gate is 1. When the output of the XOR gate is transmitted to the MCU's I / O port, if the I / O port is 1, the detection result is that a bus collision exists.

[0052] For example, depending on actual needs, the conflict detection module may also include an XOR gate circuit and a NOT gate circuit. The NOT gate circuit can invert the result of the XOR gate circuit and transmit the inverted result to the MCU's I / O port, so that when the I / O port is 0, the detection result is that there is a bus conflict; when the I / O port is 1, the detection result is that there is no bus conflict.

[0053] By setting up an XOR gate circuit, a single device communication unit can detect whether its own transmit and receive operations are conflicting. When a device communication unit's own data is simultaneously transmitted and received by itself, if there is no bus conflict, the transmitted and received data are the same, and the result after XOR gate processing is a low level. When a bus conflict occurs, the transmitted and received data are different, and the result after XOR gate processing is a high level. When the MCU detects a high-level signal output from the XOR gate, it considers a bus conflict to have occurred.

[0054] Optionally, the interface chip includes a first RS485 chip and a second RS485 chip; the bus includes a first differential signal line and a second differential signal line;

[0055] The TXD interface of the first RS485 chip is connected to the data transmission end of the MCU, the positive terminal of the differential signal output of the first RS485 chip is connected to the first differential signal line of the bus, and the negative terminal of the differential signal output of the first RS485 chip is connected to the second differential signal line of the bus.

[0056] The RXD interface of the second RS485 chip is connected to the data receiving end of the MCU and to the second input end of the collision detection module. The positive terminal of the differential signal input of the second RS485 chip is connected to the first differential signal line of the bus, and the negative terminal of the differential signal input of the second RS485 chip is connected to the second differential signal line of the bus.

[0057] Figure 2 A schematic diagram of another bus collision detection circuit provided in an embodiment of this application is shown below. Figure 2 As shown, the interface chip can be implemented using two RS485 chips. The first RS485 chip (containing the TXD interface) can serve as the data transmission unit, and the second RS485 chip (containing the RXD interface) can serve as the data reception unit. The MCU's TX port is the MCU's data transmission terminal; the MCU's RX port is the MCU's data reception terminal.

[0058] The first RS485 chip includes differential signal output terminals, namely a differential signal output positive terminal (RS485A in the chip containing the TXD interface) and a differential signal output negative terminal (RS485B in the chip containing the TXD interface). The differential signal output positive terminal is connected to the first differential signal line (RS485A) of the bus, and the differential signal output negative terminal is connected to the second differential signal line (RS485B) of the bus.

[0059] Optionally, when the transmitted data is high, the voltage at the positive terminal of the differential signal output is greater than the voltage at the negative terminal of the differential signal output; when the transmitted data is low, the voltage at the positive terminal of the differential signal output is less than the voltage at the negative terminal of the differential signal output.

[0060] Similarly, the second RS485 chip includes differential signal input terminals, namely a differential signal input positive terminal (RS485A in the chip containing the RXD interface) and a differential signal input negative terminal (RS485B in the chip containing the RXD interface). The differential signal input positive terminal is connected to the first differential signal line (RS485A) of the bus, and the differential signal input negative terminal is connected to the second differential signal line (RS485B) of the bus.

[0061] By setting up two RS485 chips, it is possible to send data to the bus and receive data from the bus and send it to the MCU, which has the advantage of low cost.

[0062] Optionally, the interface chip includes an RS422 chip; the TXD interface of the RS422 chip is connected to the data transmitting end of the MCU, the positive terminal of the differential signal output of the RS422 chip is connected to the first differential signal line of the bus, and the negative terminal of the differential signal output of the RS422 chip is connected to the second differential signal line of the bus; the RXD interface of the RS422 chip is connected to the data receiving end of the MCU, and also connected to the second input end of the collision detection module, the positive terminal of the differential signal input of the RS422 chip is connected to the first differential signal line of the bus, and the negative terminal of the differential signal input of the RS422 chip is connected to the second differential signal line of the bus.

[0063] The interface chip can be implemented using two RS485 chips or one RS422 chip. The RS422 chip includes TXD and RXD interfaces, and includes a differential signal output positive terminal, a differential signal output negative terminal, a differential signal input positive terminal, and a differential signal input negative terminal.

[0064] The specific connection method is as follows: the TXD interface is connected to the data transmitting end of the MCU, and the RXD interface is connected to the data receiving end of the MCU; the positive terminal of the differential signal output is connected to the first differential signal line RS485A of the bus, and the negative terminal of the differential signal output is connected to the second differential signal line RS485B of the bus; the positive terminal of the differential signal input is connected to the first differential signal line RS485A of the bus, and the negative terminal of the differential signal input is connected to the second differential signal line RS485B of the bus.

[0065] By setting up an RS422 chip, it is possible to send data to the bus and receive data from the bus and send it to the MCU, which has higher reliability and lower data transmission latency.

[0066] Optionally, it also includes: a bus short-circuit protection module, which is connected between the differential signal output terminal of the interface chip and the bus;

[0067] The bus short-circuit protection module is used to limit the bus current and limit the bus voltage to a target value when a bus conflict occurs.

[0068] A bus short-circuit protection module can also be included in the bus conflict detection circuit. This module limits current when a conflict occurs on the bus. For example, when a bus conflict occurs—that is, when two device communication units send different data, such as device communication unit 1 sending a high level to the bus and device communication unit 2 sending a low level—a voltage difference will exist between the first differential signal line RS485A and the second differential signal line RS485B on the bus, resulting in a large current. By including the bus short-circuit protection module, the bus current can be limited, thus achieving the conflict protection function.

[0069] In addition, the bus short-circuit protection module also has a voltage limiting function, which limits the voltage of the first differential signal line RS485A and the second differential signal line RS485B in the bus when there is a bus conflict, thereby limiting the bus voltage to a certain value, so that the bus presents a certain low level or high level state.

[0070] Optionally, the bus short-circuit protection module includes a first bus short-circuit protection unit and a second bus short-circuit protection unit; the first bus short-circuit protection unit is connected between the positive terminal of the differential signal output of the interface chip and the first differential signal line of the bus; the second bus short-circuit protection unit is connected between the negative terminal of the differential signal output of the interface chip and the second differential signal line of the bus.

[0071] Since the bus includes a first differential signal line RS485A and a second differential signal line RS485B, the bus short-circuit protection module can include two bus short-circuit protection units, which limit the current of the two buses and the voltage of the two buses respectively.

[0072] The first bus short-circuit protection unit is located between the positive terminal of the differential signal output of the interface chip and the first differential signal line RS485A of the bus; the second bus short-circuit protection unit is located between the negative terminal of the differential signal output of the interface chip and the second differential signal line RS485B of the bus.

[0073] Optionally, the bus short-circuit protection unit may include a resistor and a diode connected in parallel, with the resistor limiting current and the diode limiting the bus voltage.

[0074] Optionally, the first bus short-circuit protection unit includes: a first resistor R1 and a first diode D1; one end of the first resistor R1 is connected to the positive terminal of the differential signal output, and the other end of the first resistor R1 is connected to the first differential signal line of the bus; the cathode of the first diode D1 is connected to the positive terminal of the differential signal output, and the anode of the first diode D1 is connected to the first differential signal line of the bus.

[0075] The second bus short-circuit protection unit includes: a second resistor R2 and a second diode D2; one end of the second resistor R2 is connected to the negative terminal of the differential signal output, and the other end of the second resistor R2 is connected to the second differential signal line of the bus; the anode of the second diode D2 is connected to the negative terminal of the differential signal output, and the cathode of the second diode D2 is connected to the second differential signal line of the bus.

[0076] When the two bus short-circuit protection units are connected in the manner described above, the bus will present a low level when the two device communication units send high and low levels respectively.

[0077] Figure 3 This is a schematic diagram illustrating communication between two device communication units and a bus, as provided in an embodiment of this application. Figure 3 As shown, when device communication unit 1 sends a high level and device communication unit 2 sends a low level, D1 in device communication unit 2 is turned on, limiting the voltage of the first differential signal line RS485A of the bus to 0V + 0.7V (diode forward voltage drop) = 0.7V. This diode forward voltage drop is an exemplary value. When the cathode of D1 in device communication unit 1 is pulled high to 5V (exemplary), the anode potential of D1 in device communication unit 1 is 0.7V, so D1 in communication unit 1 is turned off, and device communication unit 1 outputs current to the first differential signal line RS485A of the bus through the first resistor R1. Similarly, at this time, D2 in device communication unit 2 is turned on, limiting the voltage of the second differential signal line RS485B of the bus to 5V - 0.7V (diode forward voltage drop) = 4.3V. This diode forward voltage drop is an exemplary value. When the anode of D2 in device communication unit 1 is pulled low to 0V (exemplary), the cathode potential of D2 in device communication unit 1 is 4.3V. D2 in communication device unit 1 is then cut off, and device communication unit 1 outputs current to the second differential signal line RS485B of the bus through the second resistor R2. Therefore, the voltage difference between the first differential signal line RS485A and the second differential signal line RS485B is -3.6V, and the bus presents a low level.

[0078] With the resistor connection method described above, when the two device communication units send high and low levels respectively, the bus will present a low level.

[0079] like Figure 3As shown, when device communication unit 1 sends a high level and device communication unit 2 sends a low level, the voltage of the first differential signal line RS485A on the RS485 bus will be lower than the voltage of the second differential signal line RS485B due to the influence of the bus short-circuit protection module composed of diodes and resistors. At this time, both device communication unit 1 and device communication unit 2 receive a low level. After passing through the XOR gate, device communication unit 1 detects a bus conflict, while device communication unit 2 does not detect a bus conflict. Therefore, device communication unit 2 continues to send data, and the data logic on the bus is consistent with that of device communication unit 2.

[0080] Optionally, the first bus short-circuit protection unit includes: a first resistor and a first diode; one end of the first resistor is connected to the positive terminal of the differential signal output, and the other end of the first resistor is connected to the first differential signal line of the bus; the anode of the first diode is connected to the positive terminal of the differential signal output, and the cathode of the first diode is connected to the first differential signal line of the bus.

[0081] The second bus short-circuit protection unit includes: a second resistor and a second diode; one end of the second resistor is connected to the negative terminal of the differential signal output, and the other end of the second resistor is connected to the second differential signal line of the bus; the cathode of the second diode is connected to the negative terminal of the differential signal output, and the anode of the second diode is connected to the second differential signal line of the bus.

[0082] Figure 4 A schematic diagram of another bus collision detection circuit provided in the embodiments of this application is shown below. Figure 4 As shown, if the connection method of diodes D1 and D2 changes, the analysis method is the same as described above. Figure 3 The analysis method is the same. When the two device communication units send high level and low level respectively, the two diodes in the device communication unit that sends high level are turned on, which limits the voltage of the first differential signal line and the second differential signal line of the bus respectively, so that the bus presents a high level.

[0083] The connection method of the diodes in the above-mentioned bus short-circuit protection module can be set according to actual needs. When the bus needs to be consistent with the communication unit of the device sending a low level, then the following method is adopted: Figure 2 The connection method is adopted when the bus needs to maintain consistency with the communication unit of the device sending a high level. Figure 4 The connection method.

[0084] Figure 5 This is a schematic diagram of multiple device communication units communicating with a bus, provided in an embodiment of this application. N device communication units (communication units in the figure) can be connected to the bus respectively to realize communication with the bus. Each communication device unit can detect whether there is a bus conflict.

[0085] The bus conflict detection circuit provided in this application can detect bus conflicts in hardware, which can detect the existence of bus conflicts faster than software methods.

[0086] This application also provides a device communication unit, which includes an MCU and the bus conflict detection circuit described in the foregoing embodiments.

[0087] Optionally, in the field of electric mobility scooters, the device communication unit can be an instrument panel, an ECU (Electronic Control Unit), on-board diagnostic equipment, a charger, a battery management system, etc.

[0088] This application also provides an electric mobility scooter, including: a bus and at least two device communication units as described in the foregoing embodiments.

[0089] Optional electric mobility scooters can be electric two-wheelers, electric bicycles, etc.

[0090] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the utility models disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0091] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A bus collision detection circuit, characterized in that, include: An interface chip and a collision detection module are included. The TXD interface of the interface chip is connected to the data transmitting end of the MCU, and the differential signal output end of the interface chip is connected to the bus. The RXD interface of the interface chip is connected to the data receiving end of the MCU, and the differential signal input end of the interface chip is connected to the bus. The first input end of the collision detection module is connected to the data transmitting end of the MCU, the second input end of the collision detection module is connected to the RXD interface of the interface chip, and the output end of the collision detection module is connected to the I / O port of the MCU. The interface chip is used to transmit data sent by the MCU to the bus, and to transmit data received on the bus to the MCU. The collision detection module is used to determine the detection result of whether the bus is in conflict based on the transmitted data and the received data.

2. The bus collision detection circuit according to claim 1, characterized in that, The collision detection module includes an XOR gate circuit; Specifically, when the XOR gate outputs a high level, the detection result indicates that a bus conflict exists; when the XOR gate outputs a low level, the detection result indicates that no bus conflict exists.

3. The bus collision detection circuit according to claim 1, characterized in that, The interface chip includes a first RS485 chip and a second RS485 chip; the bus includes a first differential signal line and a second differential signal line. The TXD interface of the first RS485 chip is connected to the data transmission end of the MCU, the positive terminal of the differential signal output of the first RS485 chip is connected to the first differential signal line of the bus, and the negative terminal of the differential signal output of the first RS485 chip is connected to the second differential signal line of the bus. The RXD interface of the second RS485 chip is connected to the data receiving end of the MCU and to the second input end of the collision detection module. The positive terminal of the differential signal input of the second RS485 chip is connected to the first differential signal line of the bus, and the negative terminal of the differential signal input of the second RS485 chip is connected to the second differential signal line of the bus.

4. The bus collision detection circuit according to claim 1, characterized in that, The interface chip includes an RS422 chip; the TXD interface of the RS422 chip is connected to the data transmitting end of the MCU, the positive terminal of the differential signal output of the RS422 chip is connected to the first differential signal line of the bus, and the negative terminal of the differential signal output of the RS422 chip is connected to the second differential signal line of the bus; the RXD interface of the RS422 chip is connected to the data receiving end of the MCU, and also connected to the second input end of the collision detection module, the positive terminal of the differential signal input of the RS422 chip is connected to the first differential signal line of the bus, and the negative terminal of the differential signal input of the RS422 chip is connected to the second differential signal line of the bus.

5. The bus collision detection circuit according to claim 3 or 4, characterized in that, Also includes: A bus short-circuit protection module is connected between the differential signal output terminal of the interface chip and the bus. The bus short-circuit protection module is used to limit the bus current and limit the bus voltage to a target value when a bus conflict occurs.

6. The bus collision detection circuit according to claim 5, characterized in that, The bus short-circuit protection module includes a first bus short-circuit protection unit and a second bus short-circuit protection unit; the first bus short-circuit protection unit is connected between the positive terminal of the differential signal output of the interface chip and the first differential signal line of the bus; the second bus short-circuit protection unit is connected between the negative terminal of the differential signal output of the interface chip and the second differential signal line of the bus.

7. The bus collision detection circuit according to claim 6, characterized in that, The first bus short-circuit protection unit includes: a first resistor and a first diode; one end of the first resistor is connected to the positive terminal of the differential signal output, and the other end of the first resistor is connected to the first differential signal line of the bus; the cathode of the first diode is connected to the positive terminal of the differential signal output, and the anode of the first diode is connected to the first differential signal line of the bus; The second bus short-circuit protection unit includes: a second resistor and a second diode; one end of the second resistor is connected to the negative terminal of the differential signal output, and the other end of the second resistor is connected to the second differential signal line of the bus; the anode of the second diode is connected to the negative terminal of the differential signal output, and the cathode of the second diode is connected to the second differential signal line of the bus.

8. The bus collision detection circuit according to claim 6, characterized in that, The first bus short-circuit protection unit includes: a first resistor and a first diode; one end of the first resistor is connected to the positive terminal of the differential signal output, and the other end of the first resistor is connected to the first differential signal line of the bus; the anode of the first diode is connected to the positive terminal of the differential signal output, and the cathode of the first diode is connected to the first differential signal line of the bus; The second bus short-circuit protection unit includes: a second resistor and a second diode; one end of the second resistor is connected to the negative terminal of the differential signal output, and the other end of the second resistor is connected to the second differential signal line of the bus; the cathode of the second diode is connected to the negative terminal of the differential signal output, and the anode of the second diode is connected to the second differential signal line of the bus.

9. A device communication unit, characterized in that, The device communication unit includes an MCU and a bus collision detection circuit as described in any one of claims 1-8.

10. An electric mobility scooter, characterized in that, include: The bus and at least two device communication units as described in claim 9.