Daisy chain communication structure and communication method
By employing DUART and Manchester encoding protocols in the daisy-chain communication structure, the problems of multiple interfaces and unbalanced power consumption are solved, achieving balanced power consumption and efficient communication between devices.
Patent Information
- Application Number
- CN201910602482.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-05
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2039-07-05
AI Technical Summary
The existing daisy-chain communication structure has problems with multiple communication interfaces and uneven power consumption.
Using the DUART communication interface and Manchester encoding protocol, the MCU instructions are converted into data packets of a preset format through a conversion module. Half-duplex bidirectional differential communication is used between devices in the daisy chain. The top device integrates feedback information and sends it to the MCU to achieve power balance.
The number of communication interfaces was reduced, power consumption was optimized, balanced power consumption among daisy-chain devices was achieved, and communication efficiency and cost-effectiveness were improved.
Smart Images

Figure CN110471877B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to daisy chaining, and more particularly to daisy chaining communication structures and methods. Background Technology
[0002] A daisy chain is a wreath formed by many daisies strung together. It is used to represent a technology chain. In addition to a star-shaped network, daisy chains are the easiest way to add more computers to a network.
[0003] Currently, daisy-chain technology is relatively expensive. This method typically uses current mode and requires transformer isolation. Furthermore, communication between devices within a daisy chain requires multiple communication interfaces, and the power consumption of devices within the daisy chain is uneven. Summary of the Invention
[0004] In order to overcome the shortcomings of the prior art, one of the objectives of this invention is to provide a daisy-chain communication structure that can solve the problem of uneven power consumption when using multiple communication interfaces in the prior art.
[0005] The second objective of this invention is to improve the daisy-chain communication method, which can solve the problem of uneven power consumption when using multiple communication interfaces in the prior art.
[0006] One of the objectives of this invention is achieved through the following technical solution:
[0007] A daisy-chain communication structure includes a conversion module and a daisy chain. The conversion module is connected to an MCU. The daisy chain includes several sequentially connected devices. The device at one end of the daisy chain is connected to the conversion module, and the device at the other end is defined as the top device. Each pair of adjacent devices communicates via DUART. The MCU receives external instructions and transmits them to the conversion module. The conversion module converts the instructions into data packets of a preset format and sends them to the daisy chain to transmit the data packets to the top device. The top device also sends feedback information to adjacent devices in the daisy chain. Any device in the daisy chain integrates the feedback information from the previous adjacent device and its own feedback information into new feedback information and sends it to the next adjacent device, so that the conversion module sends new feedback information from interconnected devices to the MCU.
[0008] Preferably, the conversion module and the daisy chain, as well as the daisy chain itself, use the Manchester encoding protocol.
[0009] Preferably, in a daisy chain, any two adjacent devices are interconnected via the DUART_H and DUART_L ports.
[0010] Preferably, the MCU and the conversion module are connected via an SPI interface.
[0011] Preferably, the preset format of the data packet is name + valid information + check code.
[0012] Preferably, the feedback information includes status information and data.
[0013] Preferably, the format of the status information is type + data check status + check code.
[0014] Preferably, the data is in the format of type + data + check code.
[0015] The second objective of this invention is achieved through the following technical solution:
[0016] A daisy-chain communication method is applied to a daisy chain, wherein the daisy chain includes several devices connected in sequence, the device at one end of the chain is connected to a conversion module, and the device at the other end is defined as the top device, including the following steps:
[0017] S1: Receive data packets from the conversion module, which are generated by the conversion module converting instructions from the MCU in a preset format;
[0018] S2: Pass the data packets sequentially upwards through the device to the top device;
[0019] S3: Receive feedback information from the top device. Among the adjacent devices, the next device integrates the feedback information from the previous device and its own feedback information into new feedback information. The adjacent devices transmit the new feedback information downwards in sequence, so that the conversion module sends the new feedback information to the MCU.
[0020] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0021] The daisy-chain device of this invention has a built-in DUART communication interface protocol, requiring only two communication interfaces at the top and bottom to achieve half-duplex bidirectional settings and communication protocol support. The top device is set to support bidirectional differential DUART, voltage-mode differential DUART, and low-cost high-voltage capacitor isolation, thereby improving communication efficiency and power consumption balance. Attached Figure Description
[0022] Figure 1 This is a module structure diagram of the daisy-chain communication structure of the present invention;
[0023] Figure 2 This is a diagram of the broadcast read transmission of the daisy-chain communication structure of the present invention;
[0024] Figure 3 This is a flowchart of the daisy-chain communication method of the present invention. Detailed Implementation
[0025] The present invention will now be further described with reference to the accompanying drawings and specific embodiments:
[0026] Combination Figure 1 and Figure 2 As shown, the present invention includes a conversion module ( Figure 1 The system consists of a converter and a daisy chain. The conversion module is connected to an MCU. The daisy chain includes several devices connected in sequence. The device at one end of the chain is connected to the conversion module, and the device at the other end is defined as the top device. Each pair of adjacent devices communicates using DUART (Difference Universal Asynchronous Receiver / Transmitter). The MCU receives external instructions and transmits them to the conversion module. The conversion module converts the instructions into data packets of a preset format and sends them to the daisy chain, which then transmits the data packets to the top device. The top device also sends feedback information to adjacent devices in the daisy chain. Any device in the daisy chain integrates the feedback information from the previous adjacent device and its own feedback information into new feedback information and sends it to the next adjacent device, so that the conversion module sends new feedback information from interconnected devices to the MCU.
[0027] The differential DUART supports communication with various isolated devices, including inductors and capacitors. We employ a single half-duplex bidirectional differential DUART interface, optimizing the number of upper and lower communication interfaces and minimizing the corresponding interface wiring harness. It is suitable for daisy-chain structures with clear control commands. Devices can remain in a low-power sleep state for extended periods and are awakened via the DUART interface to receive communication commands. A top device can be automatically set in the daisy chain. After completing a command operation, the top device sends the result back first, followed by intermediate devices adding more results before sending them back to the MCU. Device communication uses data packets for information transmission; both MCU commands and device responses use data packet structures. Manchester encoding is used between the conversion module and the daisy chain, as well as within the daisy chain itself. Any two adjacent devices in the daisy chain are interconnected via the DUART_H and DUART_L ports. The MCU and conversion module are connected via an SPI interface. In device communication, each bit of valid data transmitted is Manchester encoded. Each data packet contains valid information and an 8-bit CRC checksum. The default format is: Name CMD (16 bits) + Valid Information CTRL (16 bits) + Checksum CRC (8 bits).
[0028] Feedback information includes status information and data. The status information is formatted as TYPE (1 bit) + DC (16 bits) + CRC (8 bits) checksum. The data is formatted as TYPE (1 bit) + DATA (16 bits) + CRC (8 bits) checksum. The highest bit, TYPE, corresponds to register data and non-register data; the last 8 bits are the check bits; and the middle 16 bits contain error status information or ADC test data obtained from the returned data check.
[0029] The power balancing design of this invention is reflected in the following aspects: A) During initialization, the TOP (top-level) device is configured; B) When the master (MCU) writes data, the TOP device synchronously transmits the data and automatically sets up power balancing; C) When the master reads data, it matches the corresponding redundant data when returning data from the TOP device, ensuring that the amount of data transmitted by each device is consistent; D) After the execution instruction is issued, the devices receive the execution instruction sequentially and begin execution. After receiving the instruction, the TOP device also synchronously sends it to the next level to complete the balancing. After the TOP device completes its execution, it returns an OK instruction, which is then ORed with the status registers of each device after execution and returned.
[0030] It supports multi-chip collaborative operation modes including distributed links and daisy-chain links, and adopts the DUART communication interface. In daisy-chain links, communication can be performed in address mode and broadcast mode. Devices can communicate with the MCU via 4-wire SPI, and devices communicate with each other via 2-wire half-duplex differential bidirectional DUART. Active power balancing design is implemented in the daisy-chain communication to ensure that the power consumption of all devices in the entire daisy chain is approximately equal during operation, minimizing uneven power consumption among battery cells in battery string detection applications.
[0031] The communication data transmission of this invention includes two types: commands and responses. The data transmitted from the MCU to the top device is a command, and the data transmitted from the top device to the MCU is a response.
[0032] In a daisy-chain, devices are interconnected via the DUART_H and DUART_L ports. A conversion module at the daisy-chain end connects to the MCU via SPI. This conversion device performs protocol conversion between the general-purpose SPI interface and the DUART interface, performing Manchester encoding / decoding. It converts SPI commands into Manchester-encoded DUART transmissions. Users only need to send unencoded SPI commands, and the devices will automatically transmit instructions and return results within the isolated daisy chain.
[0033] Combination Figure 3The daisy-chain communication method provided by this invention is applied to a daisy chain, which includes a plurality of sequentially connected devices. The devices arranged at one end of the chain are connected to a conversion module, and the devices arranged at the other end are defined as the top devices. The method includes the following steps:
[0034] S1: Receive data packets from the conversion module, which are generated by the conversion module converting instructions from the MCU in a preset format;
[0035] S2: Pass the data packets sequentially upwards through the device to the top device;
[0036] S3: Receive feedback information from the top device. Among the adjacent devices, the next device integrates the feedback information from the previous device and its own feedback information into new feedback information. The adjacent devices transmit the new feedback information downwards in sequence, so that the conversion module sends the new feedback information to the MCU.
[0037] The principle of the daisy-chain communication method of the present invention is consistent with that described in the daisy-chain communication structure, and will not be repeated here.
[0038] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.
Claims
1. A daisy-chain communication structure, characterized in that, The system includes a conversion module and a daisy chain. The conversion module is connected to an MCU. The daisy chain consists of several sequentially connected devices. The device at one end of the daisy chain is connected to the conversion module, and the device at the other end is defined as the top device. Each pair of adjacent devices communicates via DUART. The MCU receives external instructions and transmits them to the conversion module. The conversion module converts the instructions into data packets of a preset format and sends them to the daisy chain, which then transmits the data packets to the top device. The top device also sends feedback information to adjacent devices in the daisy chain. Each device in the daisy chain integrates feedback information from its previous adjacent device and its own feedback information into new feedback information and sends it to the next adjacent device, enabling the conversion module to send new feedback information from interconnected devices to the MCU. The conversion module and the daisy chain, as well as the daisy chain itself, use the Manchester encoding protocol. In a daisy chain, any two adjacent devices are interconnected via DUART_H and DUART_L ports. The MCU and the conversion module are connected via an SPI interface. The preset format of the data packet is name + valid information + checksum. Feedback information includes status information and data. The format of the status information is type + data check status + checksum, and the format of the data is type + data + checksum. During initialization, the top device is set. When the MCU writes data, the top device synchronously sends data and automatically sets power balancing. When the master reads data, it matches the corresponding redundant data when returning data from the top device, ensuring that the number of data transmitted by each device is consistent. After the execution instruction is issued, the devices receive the execution instruction in sequence and begin execution. After receiving the instruction, the top device synchronously sends it to the next level to complete the balancing. After the top device completes the execution, it returns an OK instruction, which is then ORed with the status register of each device after execution and returned.
2. A daisy-chain communication method, characterized in that, The method is applied to a daisy chain, wherein the daisy chain includes several sequentially connected devices, the devices arranged at one end of the chain are connected to a conversion module, and the devices arranged at the other end are defined as top devices, and includes the following steps: S1: Receive data packets from the conversion module, which are generated by the conversion module converting instructions from the MCU in a preset format; S2: Pass the data packets sequentially upwards through the device to the top device; S3: Receive feedback information from the top device. Among adjacent devices, the next device integrates the feedback information from the previous device and its own feedback information into new feedback information. Adjacent devices sequentially transmit the new feedback information downwards, so that the conversion module sends the new feedback information to the MCU. The conversion module and the daisy chain, as well as within the daisy chain, use the Manchester encoding protocol. In the daisy chain, any two adjacent devices are interconnected through the DUART_H and DUART_L ports. The MCU and the conversion module are connected via an SPI interface. The preset format of the data packet is name + valid information + checksum. The feedback information includes... Status information and data, wherein the format of the status information is type + data check status + check code, and the format of the data is type + data + check code; during initialization, the top device is set; when the MCU writes, the top device synchronously sends data and automatically sets power balancing; when the master reads data, when the data is returned from the top device, it will match the corresponding redundant data to ensure that the number of data transmitted by each device is consistent; after the execution instruction is issued, the devices receive the execution instruction in sequence and start execution; after the top device receives the instruction, it synchronously sends it to the next level to complete the balancing; after the top device completes the execution, it returns an OK instruction, which is then ORed with the status register of each device after execution and returned.
Citation Information
Patent Citations
Serial bus unit assigned address by primary device
CN101685433A
Distributed battery management system and method for distributed battery management
CN103580089A
Networking device of ring differential communication
CN107770025A
Battery management device
CN207311148U
Network deployment device of annular difference communication
CN207560032U