Multi-chip data transmission method, device, terminal and storage medium

By broadcasting configuration and triggering commands on the MCU chip, and configuring and triggering the analog signal acquisition chip in parallel, the time extension and calculation error problems when collecting 50Hz AC voltage and current data in the prior art are solved, and more efficient and accurate data are achieved collection.

CN114928514BActive Publication Date: 2025-01-14SHENZHEN TONGYE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210544381.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-18
Publication Date
2025-01-14
Estimated Expiration
2042-05-18

AI Technical Summary

Technical Problem

In the prior art, when the AC contactor module collects 50Hz AC voltage and current data, the operation time of configuring and reading the AD acquisition chip separately takes a long time, resulting in the extended data acquisition cycle, the communication rate cannot be improved, the calculation error is large, and the frequency is not Not accurate when stable.

Method used

The bus simultaneously broadcasts configuration commands and trigger commands to all analog signal acquisition chips, performs parallel configuration and trigger operations, and reads analog signal data in sequence according to the preset acquisition cycle, reducing the data acquisition cycle and improving acquisition efficiency.

Benefits of technology

The data acquisition cycle is shortened, the effectiveness and accuracy of data acquisition is improved, the number of sampling points per power frequency cycle is increased, the transmission delay is reduced, and the real-time and accuracy of data acquisition is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114928514B_ABST
    Figure CN114928514B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a multi-chip data transmission method, device, terminal and storage medium, which are applied to an MCU chip to obtain data of multiple analog signal acquisition chips. The transmission method includes: broadcasting configuration commands and trigger commands to all analog signal acquisition chips at the same time through a bus, so that each analog signal acquisition chip performs corresponding configuration and trigger operations; and reading analog signal data of all analog signal acquisition chips in sequence through the bus according to a preset acquisition cycle. By broadcasting, all analog signal acquisition chips are configured and triggered at the same time, which reduces the configuration and triggering time, shortens the cycle of each data acquisition, and increases the validity of the data finally collected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chip communication, and in particular to a multi-chip data transmission method, device, terminal and storage medium. Background Art

[0002] Existing electrical control systems use a large number of mechanical contact relays and contactors. The realization of each function requires the cooperation of multiple relays and contactors, which not only poses a great challenge to the space structure in the cabinet, but also the unpredictability of mechanical contact failures poses a great challenge to the reliability of the cabinet. The intelligent electrical control system uses I / O modules designed with new power electronic switch technology to replace the relays and contactors in the existing cabinet, which will greatly reduce the number of cables and components in the cabinet and shorten the design and production cycle of the cabinet. Among them, the AC contactor module (ACT module) needs to collect multiple 50Hz AC voltage and current data, and currently each AD (analog signal) acquisition chip must be configured, triggered and read separately. The data acquisition cycle is long and takes about 200us. In addition, the AD data reading task requires 500us for each AD acquisition chip, otherwise it will occupy too much time for other tasks and cause a crash. For 50Hz alternating current, one industrial frequency cycle is 20ms, and one round of acquisition for all AD acquisition chips takes 6ms, so only 3 to 4 points can be collected. The calculated voltage and current will have large errors, and multi-cycle misalignment calculations will also be inaccurate when the frequency is unstable. The communication rate cannot be increased without changing the hardware. Summary of the invention

[0003] In view of this, the present application provides a multi-chip data transmission method, which is applied to an MCU chip. The transmission method includes:

[0004] Through the bus, the configuration command and the trigger command are simultaneously broadcast to all analog signal acquisition chips, so that each of the analog signal acquisition chips performs corresponding configuration and trigger operations;

[0005] Through the bus, according to the preset acquisition cycle, the analog signal data of all analog signal acquisition chips are read in sequence.

[0006] Furthermore, the configuration command includes information for determining a reading mode of the analog signal acquisition chip and the number of channels to be read.

[0007] Furthermore, the trigger command includes information for triggering analog signal conversion of the analog signal acquisition chip.

[0008] Furthermore, all configuration commands include:

[0009] The analog signal data of the six channels of each analog signal acquisition chip are collected, wherein one channel is temperature data and the remaining five channels are 50 Hz AC voltage and current data.

[0010] Further, the bus is an SPI bus; and sequentially collecting analog signal data of the analog signal acquisition chip through the bus according to a preset acquisition cycle includes:

[0011] Through the SPI bus, according to the preset acquisition cycle, read commands are sent to the analog signal acquisition chip in sequence, so that after the analog signal acquisition chip receives the read command, it sends the analog signal data of its corresponding channel to the MCU chip.

[0012] Furthermore, the preset acquisition period ranges from 3 milliseconds to 6 milliseconds.

[0013] Furthermore, the number of the multiple analog signal acquisition chips is 12.

[0014] Furthermore, the embodiment of the present application also provides a multi-chip data transmission device, which is applied to an MCU chip, and the device includes:

[0015] A broadcast module, used to broadcast the configuration command and the trigger command to all analog signal acquisition chips simultaneously through the bus, so that each of the analog signal acquisition chips performs corresponding configuration and trigger operations;

[0016] The acquisition module is used to sequentially acquire the analog signal data of the analog signal acquisition chip through a bus according to a preset acquisition cycle.

[0017] Furthermore, an embodiment of the present application also provides a terminal, including an MCU chip, multiple analog signal acquisition chips and a memory, wherein the analog signal acquisition chip is used to perform analog signal acquisition, and the memory stores a computer program, and when the computer program runs on the MCU chip, it executes the multi-chip data transmission method described in any of the above embodiments.

[0018] Furthermore, an embodiment of the present application also provides a readable storage medium storing a computer program, wherein the computer program, when executed on a processor, executes the multi-chip data transmission method described in any one of the above embodiments.

[0019] The embodiment of the present invention discloses a multi-chip data transmission method, device, terminal and storage medium, which are applied to an MCU chip to obtain data of multiple analog signal acquisition chips. The transmission method includes: broadcasting configuration commands and trigger commands to all analog signal acquisition chips at the same time through a bus, so that each analog signal acquisition chip performs corresponding configuration and trigger operations; and reading analog signal data of all analog signal acquisition chips in sequence through the bus according to a preset acquisition cycle. By broadcasting, all analog signal acquisition chips are configured and triggered at the same time, which reduces the configuration and triggering time, shortens the cycle of each data acquisition, and increases the validity of the data finally collected. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection of the present invention. In each of the drawings, similar components are numbered similarly.

[0021] Figure 1 A schematic diagram of a multi-chip data transmission method of the present application is shown;

[0022] Figure 2 A schematic diagram of multi-chip data connection in the present application is shown;

[0023] Figure 3 A timing diagram of a multi-chip data transmission method of the present application is shown;

[0024] Figure 4 shows a timing diagram of existing multi-chip data transmission;

[0025] Figure 5 A schematic diagram of a multi-chip data transmission device of the present application is shown. DETAILED DESCRIPTION

[0026] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0027] The components of the embodiments of the present invention generally described and shown in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0028] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.

[0029] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0030] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present invention belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present invention.

[0031] The technical solution of the present application is applied to the AC contactor module (ACT module) of the intelligent electrical control system, which includes a main control board and multiple ACT boards, each ACT board is provided with an analog signal acquisition chip for collecting AD data, and the main control board is provided with an MCU chip for reading the data of the analog signal acquisition chip, and the MCU chip obtains the data of multiple analog signal acquisition chips, and then calculates the voltage, current and temperature data of each board based on the collected data, and the data is used for intelligent functions such as status monitoring, early warning, data storage and recording. In order to ensure the validity of the read data, the reading interval and the time taken for reading should be as short as possible, but the sampling rate is greatly limited due to the functional parameters of the chip itself and the consideration of equipment safety.

[0032] Next, the technical solution of the present application is explained with specific embodiments.

[0033] Example 1

[0034] like Figure 1 FIG. 1 is a flow chart of a multi-chip data transmission method of the present application, the method comprising:

[0035] Step S100, broadcasting the configuration command and the trigger command to all analog signal acquisition chips simultaneously through the bus, so that each of the analog signal acquisition chips performs corresponding configuration and trigger operations.

[0036] There are multiple analog signal acquisition chips. This embodiment takes 12 analog signal acquisition chips as an example. The connection method is as follows: Figure 2 As shown, an MCU chip is connected to 12 AD acquisition chips (analog signal acquisition chips) through an SPI bus, wherein the model of the MCU may be STM32F407, and the model of the analog signal acquisition chip may be TLV2548.

[0037] Before collecting analog signals for each analog signal acquisition chip, you need to configure each acquisition chip to determine the reading mode and the number of channels to be read. Take the TLV2548 chip as an example. The chip collects analog signal data of 6 channels, one of which is temperature data, and the other five channels are 50Hz AC voltage and current data, so there are high requirements for the sampling frequency.

[0038] In order to ensure the validity of the collected voltage and current data, the acquisition speed must be fast enough. At the same time, because each analog signal acquisition chip has the same model, its configuration and trigger command are also exactly the same. Therefore, the MCU can broadcast the configuration and trigger command to each chip through the bus to pre-configure the reading mode of each chip and the number of channels to be read. The bus can be an SPI bus.

[0039] After the configuration is completed, the AD conversion is triggered for the channel that needs to read data through the trigger operation. The trigger command includes information for triggering the analog signal conversion of the analog signal acquisition chip. In addition, it can also carry the protocol information for data acquisition between the MCU and the acquisition chip to ensure that the acquisition chip will not send the wrong data due to other commands. In this way, the channels that need to be sampled by each configured chip are in the triggered activation state, and then only the MCU needs to send a read command to complete the subsequent reading operation.

[0040] Furthermore, the configuration command and the trigger command are sent to all analog signal acquisition chips simultaneously by broadcasting. Therefore, compared with the analog signal acquisition method in the prior art, each analog signal acquisition chip performs the configuration and trigger operations synchronously, which greatly saves the sampling time.

[0041] Specifically, the MCU chip is located on the main control board, and the analog signal acquisition chip is set on the ACT board. Taking 12 analog signal acquisition chips as an example, the main control board will need to regularly monitor the working status of the 12 ACT boards. For this reason, when data needs to be collected, the MCU chip on the main control board sends a broadcast packet to the 12 ACT boards through the SPI bus. The broadcast packet is used to configure the analog signal acquisition chip and trigger the analog signal acquisition chip to perform AD conversion on the channel that needs to read data, so that before the next data collection actually starts, all analog signal acquisition chips are ready for data collection. And it reduces the operation steps required for the actual data collection.

[0042] In addition to the 12 chips, the number of acquisition chips set can fluctuate according to the actual device structure, such as 6, 10, 14 and 18. Configuration commands and trigger commands will also be broadcast to these chips, so that these acquisition chips can be configured and triggered at the same time, saving operation time during the subsequent actual data acquisition.

[0043] Step S200, reading the analog signal data of all analog signal acquisition chips in sequence through the bus according to a preset acquisition cycle.

[0044] After the configuration and triggering of step S100, the MCU can periodically read the analog signal data of all model signal acquisition chips in sequence according to the preset acquisition cycle. Figure 3 to understand through the timing diagram.

[0045] Taking 12 AD chips (analog signal acquisition chips) as an example, the configuration and triggering of each analog signal acquisition chip consumes about 200us, and the task of reading the data of each analog acquisition chip from the MCU takes 500us. The configuration and triggering operations are broadcasted through step S100, so that all chips are processed in parallel, saving a lot of time. Therefore, only 12 data acquisition tasks are required next.

[0046] Through the SPI bus, the MCU sends read commands to each analog signal acquisition chip in turn. After receiving the read command, the analog signal acquisition chip will return the currently collected analog signal data to the MCU according to the read command. From the timing diagram, it can be seen that when sampling, each chip only needs to receive the read signal and feedback the analog signal data, which reduces the communication steps and operation steps required for each chip when the MCU actually performs data acquisition, thereby greatly reducing the time.

[0047] Specifically, after sending the broadcast packet, the main control board can obtain the corresponding current, voltage and temperature data from each ACT board in turn to monitor each ACT board. In this embodiment, 12 analog signal acquisition chips are taken as an example, which means that a main control board needs to monitor at least 12 ACT boards. For all analog acquisition chips, one round of acquisition time is about 3ms. Under 50Hz AC, one power frequency cycle is 20ms, and 6 to 7 points can be collected. Compared with the original solution, the number of sampling points in each power frequency cycle is greatly increased, that is, the transmission delay will also be shorter, ensuring the real-time and accuracy of the collected data.

[0048] Relative to Figure 4As for the timing diagram of the existing multi-chip data transmission shown in , when the MCU performs actual data acquisition, it is not necessary to send configuration and trigger commands to each chip individually, which reduces the time required for each chip reading. By reducing the time required for each data acquisition, the time required to complete a round of acquisition is shortened by nearly half, greatly improving the efficiency of analog signal acquisition, and then increasing the speed, so that after the analog signal data is acquired through this application, more data can be obtained, and the calculated AC voltage and current data are more accurate and reliable.

[0049] Example 2

[0050] The present application also provides a multi-chip data transmission device, which is applied to an MCU chip, such as Figure 5 The device shown comprises:

[0051] The broadcast module 10 is used to broadcast the configuration command and the trigger command to all analog signal acquisition chips through the bus at the same time, so that each of the analog signal acquisition chips performs corresponding configuration and trigger operations;

[0052] The acquisition module 20 is used to sequentially acquire the analog signal data of the analog signal acquisition chip through a bus according to a preset acquisition cycle.

[0053] Furthermore, an embodiment of the present application also provides a terminal, including an MCU chip, multiple analog signal acquisition chips and a memory, wherein the analog signal acquisition chip is used to perform analog signal acquisition, and the memory stores a computer program, and when the computer program runs on the MCU chip, it executes the multi-chip data transmission method described in any of the above embodiments.

[0054] Furthermore, an embodiment of the present application also provides a readable storage medium storing a computer program, wherein the computer program, when executed on a processor, executes the multi-chip data transmission method described in any one of the above embodiments.

[0055] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow chart, and the combination of boxes in the structure diagram and / or the flow chart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0056] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0057] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0058] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A multi-chip data transmission method, characterized in that: Applied to MCU chip, the transmission method includes: Through the SPI bus, the configuration command and the trigger command are simultaneously broadcast to all analog signal acquisition chips, so that each of the analog signal acquisition chips performs corresponding configuration and trigger operations; Through the SPI bus, according to a preset acquisition cycle, read commands are sent to the analog signal acquisition chips in the trigger activation state in sequence, so that after each of the analog signal acquisition chips receives the read command, the analog signal data of its corresponding channel is sent to the MCU chip; The number of the multiple analog signal acquisition chips is 12; the preset acquisition period ranges from 3 milliseconds to 6 milliseconds.

2. The multi-chip data transmission method according to claim 1, characterized in that: The configuration command includes information for determining a reading mode of the analog signal acquisition chip and the number of channels to be read.

3. The multi-chip data transmission method according to claim 1, characterized in that: The configuration command includes: The analog signal data of the six channels of each analog signal acquisition chip are collected, wherein one channel is temperature data and the remaining five channels are 50 Hz AC voltage and current data.

4. A multi-chip data transmission device, characterized in that: Applied to MCU chip, the device includes: A broadcast module, used to broadcast configuration commands and trigger commands to all analog signal acquisition chips simultaneously through the SPI bus, so that the analog signal acquisition chips perform corresponding configuration and trigger operations; An acquisition module, used for sending read commands to the analog signal acquisition chips in a triggered activation state in sequence through the SPI bus according to a preset acquisition cycle, so that each of the analog signal acquisition chips sends the analog signal data of its corresponding channel to the MCU chip after receiving the read command; The number of the multiple analog signal acquisition chips is 12; the preset acquisition period ranges from 3 milliseconds to 6 milliseconds.

5. A terminal, characterized in that: The invention comprises an MCU chip, a plurality of analog signal acquisition chips and a memory, wherein the analog signal acquisition chip is used for performing analog signal acquisition, and the memory stores a computer program, and when the computer program is run on the MCU chip, the multi-chip data transmission method according to any one of claims 1 to 3 is executed.

6. A readable storage medium, characterized in that: The computer program is stored therein, and when the computer program is run on a processor, the multi-chip data transmission method according to any one of claims 1 to 3 is executed.

Citation Information

Patent Citations

  • Receiving device, receiving method, transmitting device, and transmitting method

    CN104396267A

  • Sensor data collection device, system and ectoskeleton robot

    CN206162125U