High-speed two-bus communication protocol method and system

By adopting the SWANBUS protocol frame format and correcting the Miller code encoding format in the fire protection system, the existing fire protection system's second bus communication protocol has been solved, and a high-speed, efficient and low-cost communication solution is achieved.

CN119814495APending Publication Date: 2025-04-11SHENZHEN PENGXIN DATA TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411953570.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The baud rate of the two-bus communication protocol of the existing fire protection system is low and cannot meet the high-speed communication needs. At the same time, the low-level bus cannot meet the stable power supply needs of the terminal, resulting in an increase in costs.

Method used

The SWANBUS protocol frame format is adopted to transmit data communication on the second bus circuit, and the corrected Miller code encoding format and Hamming code check bit are used to ensure that the bus level is high, meet the terminal power supply needs, and improve the communication rate through an up- and down-link independent frame format.

Benefits of technology

It realizes high baud rate communication, with downlink baud rate up to 50kbps and uplink baud rate up to 40kbps, reducing costs and improving the security and flexibility of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814495A_ABST
    Figure CN119814495A_ABST
Patent Text Reader

Abstract

The invention relates to a high-speed two-bus communication protocol method and system. Data communication transmission is carried out on a two-bus circuit by adopting an SWANBUS protocol frame format; comprising an uplink area, a downlink area, a space area and a free area, the downlink region adopts a modified Miller code coding format and comprises a start bit, a data bit and a corresponding Hamming code check bit; the uplink region comprises a start bit, a data bit and a corresponding parity check bit; the blank area is in a high level; the idle area keeps high level; the SWANBUS protocol can ensure the stable power supply of the terminal because the bus level of the SWANBUS protocol is relatively high, and power supply and communication can be realized only by two wires, so that the cost is greatly reduced; in terms of performance, an uplink and downlink independent frame format is adopted, the high-speed communication requirement which cannot be achieved by a traditional fire-fighting two-way bus can be met, flexibility and changeability are achieved in development, and meanwhile the error rate of information transmission is greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fire protection systems, and more specifically, to a high-speed two-bus communication protocol method and system. Background Art

[0002] In the fire protection system, it is generally composed of a fire alarm controller and a terminal module, that is, a host and multiple slaves communicate. The terminal module includes smoke sensors, temperature sensors, manual alarm buttons, sound and light alarms, etc., which generally need to be powered by a bus to work properly. The fire alarm controller uses voltage modulation to transmit data downlink, while the slave uses current debugging to transmit data uplink. In actual applications, the transmission line distance between the controller and the terminal is relatively long, up to several thousand meters. Therefore, in order to save costs, the bus protocol of the fire alarm controller is generally a two-bus system, that is, the controller communicates with the terminal on the line, and also supplies power to the terminal.

[0003] At present, although most of the domestic fire protection system bus communication protocols can realize two-wire technology, the communication baud rate is relatively low, generally below 1000bps. The slow communication baud rate cannot meet certain application requirements, such as the download of fire alarm information, the upload of terminal information, etc. At present, common high-speed communication protocols, such as four-wire SPI and UART, two-wire IIC, CAN, RS485 protocols, etc., although they can achieve high-speed communication, their bus levels are generally low and cannot meet the needs of powering the terminal. Taking the RS485 protocol as an example, its communication baud rate can reach 9600bps or even faster, but the RS485 transceiver stipulates that its common mode voltage is between -7V and 12V, and the signal is transmitted by the voltage difference between the two signal lines. Therefore, two additional cables are required for power supply in the application, which will greatly increase the cost in actual application;

[0004] In view of this situation, a high-speed two-bus communication protocol method and system are needed that can meet the requirements of stable power supply to terminals on the line and realize high baud rate communication between the host and the slave. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a high-speed two-bus communication protocol method and a high-speed two-bus communication protocol system in view of the above-mentioned defects of the prior art.

[0006] The technical solution adopted by the present invention to solve its technical problem is:

[0007] A high-speed two-bus communication protocol method is constructed, wherein the method comprises:

[0008] The SWANBUS protocol frame format is used to transmit data on the two-bus circuit;

[0009] The SWANBUS protocol frame format includes an uplink area and a downlink area that are independent of each other, and also includes a blank area and an idle area;

[0010] The downlink area adopts a modified Miller code encoding format, including a start bit, a data bit and a corresponding Hamming code check bit;

[0011] The uplink area includes a start bit, a data bit and a corresponding parity bit;

[0012] The space area is at a high level;

[0013] The idle area maintains a high level.

[0014] In the high-speed two-bus communication protocol method of the present invention, the downlink area includes a 1-bit start bit and 32-bit data bits.

[0015] In the high-speed two-bus communication protocol method described in the present invention, the blank area is a high level with a width of 4 bits to ensure the carrying capacity of the two buses, and the processor can perform data processing operations in the blank area.

[0016] In the high-speed two-bus communication protocol method described in the present invention, the uplink area is provided with a delay of a set length to skip the influence of the oscillating current.

[0017] In the high-speed two-bus communication protocol method of the present invention, the uplink data encoding format of the uplink area is determined by the terminal.

[0018] In the high-speed two-bus communication protocol method of the present invention, the upstream area includes a 1-bit start bit and 32-bit data bits.

[0019] In the high-speed two-bus communication protocol method of the present invention, the width of the idle area is defined according to the time required for actual application.

[0020] The high-speed two-bus communication protocol method of the present invention, wherein the two-bus circuit includes a host and multiple slaves, the host is connected to the multiple slaves via two buses, and the multiple slaves are connected in parallel; the communication between the host and the slaves is completed using the SWANBUS protocol frame format.

[0021] The high-speed two-bus communication protocol method of the present invention, wherein the host comprises an AC-DC circuit, a switch circuit, an LDO circuit and an MCU main control; the AC-DC circuit is connected to the switch circuit, the switch circuit is connected to the MCU main control, and the MCU main control is connected to the LDO circuit;

[0022] The AC-DC circuit is used to convert AC to DC VH as the high level of the SWANBUS protocol;

[0023] The MCU master is used to control the shutdown timing of the switch circuit; when the switch circuit is turned off, the bus outputs a low level VL through the LDO circuit; when the switch circuit is turned on, the bus outputs a high level.

[0024] A high-speed two-bus communication system, wherein the system includes two bus lines, and the two bus lines perform data communication transmission using the high-speed two-bus communication protocol method mentioned above.

[0025] The beneficial effects of the present invention are:

[0026] Compared with the RS485 protocol, the SWANBUS protocol can ensure stable power supply to the terminal due to its relatively high bus level. It only needs two wires to realize power supply and communication. In actual applications, no additional power line is required for power supply, which greatly reduces the cost.

[0027] In terms of performance, it adopts independent frame formats for uplink and downlink, with a downlink baud rate of up to 50kbps and an uplink baud rate of up to 40kbps. Compared with the traditional fire-fighting bus, its communication rate is increased by more than 10 times, which can meet the high-speed communication requirements that the traditional fire-fighting bus cannot achieve.

[0028] In function development, since the uplink and downlink have independent frame formats, the data format of the host end can also be pure downlink mode, such as start bit + downlink area + downlink area + downlink area... This situation can be used in environments where downlink data is required, such as file transfer; the same protocol frame can also be start bit + downlink area + uplink area + uplink area + uplink area... This situation is applied to the situation where the slave returns data, such as uploading its own working status, working information, etc. It is flexible and changeable in development.

[0029] The security of data transmission adopts the verification method of Hamming code, which also greatly reduces the bit error rate of information transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. The drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work:

[0031] Figure 1 It is a schematic diagram of the data frame format of the high-speed two-bus communication protocol method of a preferred embodiment of the present invention;

[0032] Figure 2 It is a level level representation diagram of each encoding mode of the high-speed two-bus communication protocol method of the preferred embodiment of the present invention;

[0033] Figure 3 This is an example diagram of connecting multiple slaves in a high-speed two-bus communication protocol method according to a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the following will be described clearly and completely in combination with the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are partial embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.

[0035] The background technology is further described as follows:

[0036] In fire protection applications, the wiring distance of transmission lines is usually hundreds of meters or even kilometers. Due to the physical characteristics of transmission lines, such as line resistance, parasitic capacitance, parasitic inductance, characteristic impedance, etc., they will interfere with the integrity of bus transmission signals. Therefore, the physical layer of the protocol designed by the present invention needs to solve the problem of interference of transmission lines to signals, including the bus load capacity, signal integrity and anti-interference ability.

[0037] In the case of low level without power supply, the greater the high level duty cycle of the bus, the better the bus load capacity. At present, the domestic two-bus communication protocol generally adopts NRZ encoding or PWM-like modulation. Taking NRZ encoding as an example, when the downstream data is 1, the bus is high level, and when the downstream data is 0, the bus is low level. Then when the downstream data is continuous 0, the bus will continue to be low level, and the terminal at the end of the bus may lose power. Therefore, in the process of protocol design, the downstream data adopts the modified Miller code encoding method, which can solve this problem well.

[0038] In order to increase the accuracy of signal transmission, the transmitted data is generally checked. The existing two-bus protocol mostly uses parity check. Parity check is a simple error detection method, but it can only detect single-bit errors and cannot detect multi-bit errors. Therefore, this protocol design adopts the Hamming code check method. Through this check method, the terminal can detect 2-bit errors in the downlink data and correct one of the erroneous bits.

[0039] The signal integrity problem is an inevitable problem for long-distance transmission of transmission lines. When the signal is transmitted over a long distance, there will be impedance discontinuity in the process, which will cause signal ringing and oscillating current, which is the biggest factor limiting the bus communication rate.

[0040] For the signal ringing problem, the terminal can filter it through hardware and software, which has nothing to do with the protocol design. The oscillating current is the biggest factor affecting the communication rate. As long as the signal jumps, there will be an oscillating current. Considering the length of the transmission line and the number of terminals on board, the oscillating current can last up to 100us.

[0041] Assuming that the duration of the oscillating current is 100us, with the current technical solution, each signal will be delayed for 100us at the low level to skip the impact of this oscillating current, and then the terminal will modulate the uplink data with current, and the controller will detect the uplink data. This also results in the low-level pulse width of 1bit data being at least 100us, thereby limiting the communication rate of the bus. In terms of the concept of protocol design, an independent frame format for uplink and downlink is adopted. When uplinking data, multiple bits of data can be uploaded at one time in a low-level interval, that is, only one oscillation current needs to be skipped, thereby increasing the uplink rate.

[0042] Based on the above ideas, a new two-bus communication protocol of the present application is invented, such as Figure 1 As shown, the protocol content includes: using the SWANBUS protocol frame format to communicate and transmit data on the two bus circuits;

[0043] The SWANBUS protocol frame format includes an uplink area and a downlink area that are independent of each other, and also includes a blank area and an idle area;

[0044] The downlink area adopts the modified Miller code encoding format, including 1-bit start bit, 32-bit data bits, and the corresponding Hamming code check bit; the space area is a high level with a width of 4 bits, which ensures the bus load capacity, and the MCU can perform data processing and other operations in this area; the uplink area will have a delay of 100us to skip the influence of the oscillating current. The uplink data encoding format is determined by the terminal, and the controller will parse the uplink data. The uplink area contains 1-bit start bit, 32-bit data bits, and the corresponding parity check bit; the idle area maintains a high level, and its width can be customized according to the duration required for the actual application.

[0045] like Figure 2 As shown in the figure, it is a level level representation diagram under each encoding method. Taking the baud rate of 10kbps as an example, if the downstream adopts the NRZ encoding format, the pulse width of 1bit data is 100us. When the downstream data is 1, it needs to maintain a high level for 100us. When the downstream data is continuously 0, the bus needs to maintain a low level for 100us. When the downstream data is continuously 0, for example, a byte is all data 0, the bus needs to maintain a low level for 800us, which may cause the terminal at the end of the transmission line to lose power.

[0046] Compared with other encoding formats, the encoding format of the modified Miller code only needs a short low level at the beginning or middle of the data to represent data 1 or data 0. Taking the baud rate of 10kbps as an example, the pulse width of 1bit data is 100us, then the encoding format of the downstream data 1 is 50us high level + 15us low level + 35us high level, and the encoding format of data 0 is 15us low level + 85us high level. When the downstream data is 10, the data 0 remains at a high level. Therefore, even when the downstream data is continuous 0, the duty cycle of the high level is at least 85%, which greatly increases the driving load capacity of the bus;

[0047] Compared with the RS485 protocol, the SWANBUS protocol can ensure stable power supply to the terminal due to its relatively high bus level. It only needs two wires to realize power supply and communication. In actual applications, no additional power line is required for power supply, which greatly reduces the cost.

[0048] In terms of performance, it adopts independent frame formats for uplink and downlink, with a downlink baud rate of up to 50kbps and an uplink baud rate of up to 40kbps. Compared with the traditional fire-fighting bus, its communication rate is increased by more than 10 times, which can meet the high-speed communication requirements that the traditional fire-fighting bus cannot achieve.

[0049] In function development, since the upstream and downstream behaviors have independent frame formats, the downstream data format of the host side can also be a pure downstream mode, such as start bit + downstream area + downstream area + downstream area... This situation can be used in environments where downstream data is required, such as file transfer; the same protocol frame can also be start bit + downstream area + upstream area + upstream area + upstream area... This situation is applied to the situation where the slave returns data, such as uploading its own working status, working information, etc., which is flexible and changeable in development.

[0050] It should be noted that the above-mentioned data of various values ​​are only for illustrating the present solution. For those skilled in the art, they can also be simply replaced with other values ​​to implement the present solution. The solution obtained based on the change of such values ​​also belongs to the protection scope of the present application.

[0051] Furthermore, the SWANBUS protocol can be implemented by the following circuit composition (understandably, it can also be implemented using the existing two-bus line, but the application circuit itself will be easier to implement, and it is not limited to this circuit form). Its principle block diagram is as follows Figure 3 As shown:

[0052] The host consists of AC-DC circuit, switching circuit, LDO circuit and MCU main control part, and outputs SWANBUS bus protocol.

[0053] Normally, the host is powered by 220V AC power, and the AC-DC circuit converts the AC into DC VH, which is used as the high level of the SWANBUS protocol. In the fire protection system, VH is generally 25V, which can meet the power supply requirements of the slaves on the bus. If there are other application requirements, the amplitude of VH can also be adjusted.

[0054] The switching circuit can be implemented using a P-MOS power tube, and the shutdown timing of the MOS tube can be controlled through the IO port of the MCU.

[0055] When the switch circuit is turned on, the bus outputs a high level VH, and when the switch circuit is turned off, the bus outputs a low level VL.

[0056] The baud rate of downlink data can reach 50kbps, that is, the pulse width of 1bit data is 20us, data 1 is 10us high level + 4us low level + 6us high level, data 0 is 4us low level + 16us high level, which is achievable for most current MCU clocks.

[0057] The low level VL is output through LDO. Here VL is 9V, which can also be adjusted according to application requirements. When the host completes the downlink data, the slave receives the complete downlink data and then performs uplink data according to application requirements.

[0058] like Figure 3 As shown, slaves A, B, and C are all connected in parallel on the bus, so all downstream data will be received. Assuming that the downstream data responds to command address C, slaves A and B remain silent after receiving the downstream data, while slave C modulates the upstream data with current, and the host parses the upstream data of the slave in the upstream area to achieve communication. The upstream rate is related to the baud rate sent by the modulated current of the terminal. As long as the MCU clock of the host is fast enough and cooperates with the sampling circuit, stable communication with an upstream baud rate of 40kbps can be achieved at the fastest;

[0059] It should be noted that the above-mentioned data of various values ​​and module names are only for illustrative purposes of the present solution. For those skilled in the art, they can also be simply replaced with other values ​​or other modules with the same functions to implement the present solution. The solution obtained based on the change of such values ​​or modules also belongs to the protection scope of the present application.

[0060] Furthermore, to implement this protocol, an acceleration capacitor can be set in the design of the switching circuit to ensure that the rising and falling edges of the bus level flip are steep enough, so as to minimize the distortion of the signal under long-distance transmission lines. In addition, since the bus level ΔV is tens of volts, considering the Miller platform effect of the MOS tube, the junction capacitance charging and discharging should be prevented from causing damage to the MOS tube. In terms of model selection, power tubes should be selected, and a certain current limiting should be performed on the charging and discharging current of the junction capacitance.

[0061] Since the uplink of the SWANBUS protocol is at a low level, the transmission line has a certain line resistance. Assuming that the length is 1.5mm for 1000m 2 The twisted pair cable has a line resistance of 40ohm and a current modulation of 50mA. For every 1bit of return code, there will be a voltage drop of 40ohm*50mA=2V. Therefore, the selected LDO must have a strong enough load capacity to avoid the low-level VL power failure affecting the power supply to the terminal.

[0062] A high-speed two-bus communication system, wherein the system includes two bus lines, and the two bus lines perform data communication transmission using the high-speed two-bus communication protocol method mentioned above.

[0063] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all these improvements and changes should fall within the scope of protection of the appended claims of the present invention.

Claims

1. A high-speed two-bus communication protocol method, characterized in that: Methods include: The SWANBUS protocol frame format is used to transmit data on the two-bus circuit; The SWANBUS protocol frame format includes an uplink area and a downlink area that are independent of each other, and also includes a blank area and an idle area; The downlink area adopts a modified Miller code encoding format, including a start bit, a data bit and a corresponding Hamming code check bit; The uplink area includes a start bit, a data bit and a corresponding parity bit; The space area is at a high level; The idle area maintains a high level.

2. The high-speed two-bus communication protocol method according to claim 1, characterized in that: The downlink area includes a 1-bit start bit and 32-bit data bits.

3. The high-speed two-bus communication protocol method according to claim 1, characterized in that: The space area is a high level with a width of 4 bits, so as to ensure the carrying capacity of the two buses. Meanwhile, the processor can perform data processing operations in the space area.

4. The high-speed two-bus communication protocol method according to claim 1, characterized in that: The uplink zone is provided with a delay of a set length for skipping the influence of the oscillating current.

5. The high-speed two-bus communication protocol method according to claim 1, characterized in that: The uplink data coding format of the uplink area is determined by the terminal.

6. The high-speed two-bus communication protocol method according to claim 1, characterized in that: The uplink area includes a 1-bit start bit and 32-bit data bits.

7. The high-speed two-bus communication protocol method according to claim 1, characterized in that: The width of the idle area is defined according to the duration required by the actual application.

8. The high-speed two-bus communication protocol method according to claim 1, characterized in that: The two-bus circuit includes a host and multiple slaves. The host is connected to the multiple slaves via two buses, and the multiple slaves are connected in parallel. The communication between the host and the slaves is completed using the SWANBUS protocol frame format.

9. The high-speed two-bus communication protocol method according to claim 8, characterized in that: The host comprises an AC-DC circuit, a switch circuit, an LDO circuit and an MCU main control; the AC-DC circuit is connected to the switch circuit, the switch circuit is connected to the MCU main control, and the MCU main control is connected to the LDO circuit; The AC-DC circuit is used to convert AC to DC VH as the high level of the SWANBUS protocol; The MCU master is used to control the shutdown timing of the switch circuit; when the switch circuit is turned off, the bus outputs a low level VL through the LDO circuit; when the switch circuit is turned on, the bus outputs a high level.

10. A high-speed two-bus communication system, characterized in that: The system includes two bus lines, and the two bus lines perform data communication and transmission using the high-speed two-bus communication protocol method described in any one of claims 1-9.

Citation Information

Cited By

  • High-speed communication gateway system and communication method

    CN121098665A