Metering circuit and metering device for sending various information via communication port

By using a communication port and isolation device for signal isolation between the metering chip and the microprocessor, the problem of high cost of traditional metering circuits is solved, and the effects of simplifying the structure and reducing costs are achieved.

CN117676378BActive Publication Date: 2024-10-15SHENZHEN RENERGY TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311340082.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-16
Publication Date
2024-10-15
Estimated Expiration
2043-10-16

Smart Images

  • Figure CN117676378B_ABST
    Figure CN117676378B_ABST
Patent Text Reader

Abstract

The present invention proposes a metering circuit and a metering device for sending multiple types of information through a communication port, wherein the metering circuit includes a metering chip, an isolation device and a microprocessor, the communication output port of the metering chip is connected to the communication input port of the microprocessor through the isolation device, the metering chip sends its own various types of metering information to the microprocessor through a communication port and an isolation device, the microprocessor receives the various types of metering information and performs data processing and / or forwarding, the isolation device is used to achieve signal isolation and prevent signal interference, and by adopting a communication port and an isolation device to transmit multiple types of data, the structure of the metering circuit and the metering device is simplified and the design cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of metering, and in particular relates to a metering circuit and a metering device that send multiple information through a communication port. Background Art

[0002] At present, traditional metering equipment such as electric meters and concentrators usually include metering chips and microprocessors. The microprocessor communicates with the metering chip through a communication port (usually a UART interface) to realize the read and write configuration of the metering chip register. The metering chip sends a variety of electric energy metering pulse signals to the microprocessor through multiple external pins. After receiving the metering pulse, the microprocessor forwards and outputs the metering pulse signal. The interrupt information is sent to the microprocessor through the external pins, and the CPU module of the microprocessor obtains information through the time generated by the interrupt to perform the next operation.

[0003] In conventional application solutions, metering pulse forwarding requires many pins. To prevent interference, each pin between the metering chip and the microprocessor needs to be electrically isolated by an isolation device, which increases the cost of the metering circuit and metering equipment. Summary of the invention

[0004] The object of the present invention is to provide a metering circuit for sending a variety of information through a communication port, aiming to solve the problem of high cost when traditional metering circuits and metering equipment perform metering pulse forwarding.

[0005] A first aspect of an embodiment of the present invention provides a metering circuit for sending multiple information through a communication port, comprising a metering chip, an isolation device and a microprocessor, wherein a communication output port of the metering chip is connected to a communication input port of the microprocessor through the isolation device;

[0006] The metering chip is configured to send various metering information of the chip to the microprocessor;

[0007] The microprocessor is configured to receive various types of metering information and perform data processing and / or forwarding.

[0008] Optionally, the communication input port of the metering chip is connected to the communication output port of the microprocessor through another isolation device;

[0009] The microprocessor is further configured to:

[0010] Sending a mode configuration signal to the metering chip;

[0011] The metering chip is further configured as:

[0012] The mode configuration signal triggers switching to the automatic working mode, and performs the acquisition, configuration and data sending of various metering information.

[0013] Optionally, the metering chip is specifically configured as:

[0014] According to the mode configuration signal, the switch to the automatic working mode is triggered, and the rules for obtaining and sending time periods of various metering information are determined;

[0015] The acquisition, configuration and data transmission of various types of metering information are carried out according to the rules of the acquisition and transmission periods of various types of metering information.

[0016] Optionally, the rules for the acquisition period and the sending period of various metering information of the metering chip are:

[0017] During each preset time period of each interval, various metering information within each time period is obtained; and

[0018] In each preset time period, various types of metering information of the previous preset time period are sent to the microprocessor.

[0019] Optionally, the microprocessor is further configured to:

[0020] Determine the rules for obtaining and forwarding various metering information according to the trigger instructions;

[0021] The acquisition and forwarding of various types of metering information are performed according to the rules of the acquisition period and forwarding period of various types of metering information.

[0022] Optionally, various types of metering information include but are not limited to metering pulse information, interrupt information and configured register data.

[0023] Optionally, the metering pulse information includes but is not limited to the time point or cycle number when the first metering pulse is generated in the last preset time period and the number of metering pulses.

[0024] Optionally, the interruption information includes but is not limited to the time period or cycle number of the first interruption generated within the last preset time period and the number of interruptions.

[0025] A second aspect of an embodiment of the present invention provides a metering device, including a metering circuit as described above that sends a variety of information through a communication port.

[0026] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: the above-mentioned metering circuit for sending multiple information through a communication port includes a metering chip, an isolation device and a microprocessor. The communication output port of the metering chip is connected to the communication input port of the microprocessor through the isolation device. The metering chip sends its own various metering information to the microprocessor through a communication port and an isolation device. The microprocessor receives various metering information and performs data processing and / or forwarding. The isolation device is used to achieve signal isolation and prevent signal interference. By adopting a communication port and an isolation device to transmit multiple types of data, the structure of the metering circuit and the metering equipment is simplified and the design cost is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0028] Figure 1 It is a schematic diagram of the structure of a traditional metering circuit;

[0029] Figure 2 A schematic diagram of the structure of a metering circuit provided in an embodiment of the present invention;

[0030] Figure 3 An exemplary flow chart of signal forwarding of a metering chip and a microprocessor provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0032] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0033] A first aspect of an embodiment of the present invention provides a metering circuit for sending multiple information through a communication port, comprising a metering chip 10, an isolation device and a microprocessor, wherein a communication output port of the metering chip 10 is connected to a communication input port of the microprocessor through the isolation device;

[0034] The metering chip 10 is configured to send various metering information of itself to the microprocessor;

[0035] The microprocessor is configured to receive various metering information and perform data processing and / or forwarding.

[0036] In this embodiment, the metering chip 10 is connected to sampling circuits, detection circuits and other circuits in the metering equipment. The sampling circuits, detection circuits and other circuits obtain various types of metering information, such as active power, reactive power, fundamental wave pulses, zero-crossing signals and other data, and send them to the metering chip 10.

[0037] The metering chip 10 is configured to be in automatic working mode, and in the automatic working mode, it detects and obtains various metering information within each preset time period. After receiving various metering information, the metering chip 10 automatically forwards various metering information to the microprocessor 20 using the communication baud rate, that is, the data is transmitted at the same communication rate as the original communication. The microprocessor 20 parses the data uploaded by the metering chip 10, obtains the register data register_data and the interrupt information IRQ therein, and processes and forwards various metering information, for example, forwards it to the storage module in the metering device, or forwards it to the host computer. The specific forwarding object and forwarding method are not limited. By adopting one communication port and one isolation device 30 to transmit multiple types of data, the structure of the metering circuit and the metering device is simplified and the design cost is reduced.

[0038] Among them, the microprocessor 20 includes a CPU module 22 and a second communication module 21, the second communication module 21 is connected to the CPU module 22, the metering chip 10 includes a first communication module 11, and the metering chip 10 also includes a register, and the register memory register data register_data, the first communication module 11 and the second communication module 21 are connected through a single communication port and an isolation device 30 to transmit data, after obtaining various types of metering information, the metering chip 10 sends various types of metering information to the second communication module 21 through the first communication module 11 and the isolation device 30, the second communication module 21 sends the interrupt data to the CPU module 22, the CPU module 22 switches the working state according to the interrupt data, and controls the signal output module inside the microprocessor 20 to forward the metering pulse information.

[0039] The first communication module 11 and the second communication module 21 can adopt communication modules of corresponding protocols, such as RS485 communication module, UART communication module, etc., and the specific structure is not limited.

[0040] In an optional embodiment, various types of metering information include but are not limited to metering pulse information, interrupt information and configured register data, wherein the metering pulse information includes current metering data. In an optional embodiment, the metering pulse information includes active pulse information PF_pulse, reactive pulse information QF_pulse and fundamental wave pulse information FPF_pulse, the active pulse information PF_pulse represents the active power data, the reactive pulse information QF_pulse represents the reactive power data, and the fundamental wave pulse information FPF_pulse represents the fundamental wave data.

[0041] The interrupt information IRQ represents the time point or cycle number of the working state switching of the current event. After receiving the interrupt information IRQ, the microprocessor 20 switches the working state and executes the preset data processing task.

[0042] The register data register_data is the register data register_data that is configured in advance and is waiting to be uploaded.

[0043] Among them, the metering chip 10 can obtain various information data in real time and forward it to the microprocessor 20 in real time, and can also delay forwarding the corresponding data. Similarly, the microprocessor 20 can obtain various information data in real time and forward the metering pulse information in real time, and can also delay forwarding the corresponding metering pulse information of the preset time period before the preset time period, and the specific forwarding timing is not limited.

[0044] The isolation device 30 may be a corresponding capacitor, optocoupler or other device, and the specific structure is not limited.

[0045] The working modes of the metering chip 10 and the microprocessor 20 can be configured by other control modules or control instructions. In order to reduce the design cost, in an optional embodiment, the communication input port of the metering chip 10 is connected to the communication output port of the microprocessor 20 through another isolation device 30;

[0046] The microprocessor 20 is further configured to:

[0047] Sending a mode configuration signal to the metering chip 10;

[0048] The metering chip 10 is further configured as:

[0049] According to the mode configuration signal trigger, it switches to automatic working mode, and obtains, configures and sends various types of metering information.

[0050] In this embodiment, the microprocessor 20 outputs a mode configuration signal to the communication input port of the first communication module 11 of the metering chip 10 through the communication output port of the second communication module 21, and synchronously controls the metering chip 10 to switch to the automatic working mode. At this time, the communication output port of the second communication module 21 of the microprocessor 20 only outputs the mode configuration signal, and does not output the read-write control signal.

[0051] At the same time, after the metering chip 10 configures the register data register_data and obtains metering information such as each metering pulse information and interrupt information IRQ, the metering chip 10 automatically forwards the metering pulse information, interrupt information IRQ and register data register_data and other metering information to the microprocessor 20 using the communication baud rate, that is, the data is transmitted using the same communication rate as the original communication. The microprocessor 20 obtains the register data register_data and the interrupt information IRQ by parsing the data uploaded by the metering chip 10, and processes and forwards the metering pulse information, for example, forwards it to a storage module in the metering device, or forwards it to a host computer. The specific forwarding object and forwarding method are not limited. By using one communication port and one isolation device 30 to transmit multiple types of data, the structure of the metering circuit and the metering device is simplified and the design cost is reduced.

[0052] Among them, after the metering chip 10 performs data configuration, acquisition and sending mode configuration, it simultaneously performs signal receiving and sending rule configuration, that is, in an optional embodiment, the metering chip 10 is specifically configured as follows:

[0053] Switch to automatic working mode according to the mode configuration signal trigger, and determine the rules for obtaining and sending various metering information;

[0054] The acquisition, configuration and data transmission of various types of metering information are carried out according to the rules of the acquisition and transmission periods of various types of metering information.

[0055] The metering chip 10 sets the information transmission and reception time period according to the mode configuration signal, for example, the acquisition time period and the sending time period of various types of information are performed simultaneously, or the information is first acquired in the i-th preset time period, and the information acquired in the i-th preset time period is sent in the i+n-th preset time period, i and n are both positive integers. In an optional embodiment, the rules for the acquisition time period and the sending time period of various types of metering information of the metering chip 10 are:

[0056] During the preset time period of each interval, various types of metering information within each time period are obtained;

[0057] In each preset time period, various metering information of the previous preset time period is sent to the microprocessor 20 .

[0058] In this embodiment, the metering chip 10 acquires and stores data within each preset time period, configures register data register_data, and automatically uploads register data register_data within the previous preset time period, metering pulse data, and interrupt data to the microprocessor 20 using the communication baud rate, for example Figure 3 As shown, assuming that the time period of each preset time period is 100ms, in the first preset time period, that is, 0ms to 100ms, the metering chip 10 detects and obtains metering pulse information, interrupt information IRQ and configures register data register_data, and in the second preset time period, that is, 100ms to 200ms, the metering chip 10 detects and obtains metering pulse information in the time period, and at the same time, sends the metering pulse information, interrupt information IRQ and register data register_data in the time period of 0ms to 100ms to the microprocessor 20, and in the third preset time period , that is, from 200ms to 300ms, the metering chip 10 detects and obtains the metering pulse information within the time period, and at the same time, sends the metering pulse information, interrupt information IRQ and register data register_data within the time period of 100ms to 200ms to the microprocessor 20, and so on, until the last preset time period, obtains the metering pulse information, interrupt information IRQ and configured register data register_data within the time period, and sends the metering pulse information, interrupt information IRQ and configured register data register_data of the previous preset time period to the microprocessor 20.

[0059] Correspondingly, before the microprocessor 20 performs mode configuration on the metering chip 10, it synchronously performs signal receiving and sending configuration. In an optional real-time example, the microprocessor 20 is further configured as follows:

[0060] Determine the rules for obtaining and forwarding various metering information according to the trigger instructions;

[0061] The acquisition and forwarding of various types of metering information are performed according to the rules of the acquisition period and forwarding period of various types of metering information.

[0062] On the one hand, the microprocessor 20 triggers the output mode configuration signal to the metering chip 10 under the trigger instruction to configure the signal receiving and sending rules of the metering chip 10. At the same time, the microprocessor 20 configures its own signal receiving and sending rules according to the trigger instruction. Similarly, the microprocessor 20 can synchronously forward after receiving various metering information from the metering chip 10, or, after receiving various metering information from the metering chip 10 in the i-th preset time period, delay n preset time periods before forwarding, or, after receiving various metering information in multiple preset time periods, collectively forward in batches, and the specific receiving and sending rules are not limited.

[0063] For example Figure 3 As shown, the microprocessor 20 delays information forwarding. In the preset time period of 100ms to 200ms, the microprocessor 20 receives and analyzes the pulse data and register data register_data of 0 to 100ms, and in the preset time period of 200ms to 300ms, the microprocessor 20 receives and analyzes the pulse data and register data register_data of 100ms to 200ms, and in the preset time period of 300ms to 400ms, the microprocessor 20 receives and analyzes the pulse data and register data register_data of 200ms to 300ms, and at the same time, starts forwarding 0 to 100ms. The pulse data of the first pulse is T0, and the interval between each pulse is (T1-T0) / N0. In the preset time period of 400ms to 500ms, the microprocessor 20 receives and parses the pulse data of 300ms to 400ms and the register data register_data. At the same time, it starts to forward the pulse data of 100ms to 200ms. The time point of the first pulse is T1, and the interval between each pulse is (T2-T1) / N1. By analogy, the microprocessor 20 delays the entire metering pulse timing by three preset time periods, and ensures that the number of metering pulses and the interval between metering pulses are consistent with those before forwarding, so as to ensure that the microprocessor 20 knows the time when the interrupt occurs.

[0064] The data information included in the metering pulse information obtained may be the time point, cycle number, number and other data of each metering pulse, and the data information included in the interrupt information IRQ obtained may be the time period and number of interrupts generated, etc. Optionally, as Figure 3 As shown, the metering pulse information includes but is not limited to the time point or cycle number of the first metering pulse generated in the previous preset time period and the number of metering pulses, and the interruption information includes but is not limited to the time period or cycle number of the first interruption generated in the previous preset time period and the number of interruptions.

[0065] For example, in the first preset time period, i.e., 0ms to 100ms, the metering chip 10 detects and obtains metering pulse information, i.e., obtains the time point T0 when the first metering pulse is generated in the time period, and the number of pulses N0 in the time period, and in the second preset time period, i.e., 100ms to 200ms, the metering chip 10 detects and obtains metering pulse information in the time period, i.e., obtains the time point T1 when the first metering pulse is generated in the time period, and the number of pulses N1 in the time period, and at the same time, sends the metering pulse information, interrupt information IRQ and register data register_data in the time period of 0ms to 100ms to the microprocessor 20, and in the third preset time period, i.e., 200ms ~300ms, the metering chip 10 detects and obtains the metering pulse information within the time period, that is, obtains the time point T1 when the first metering pulse is generated within the time period, and the number of pulses N1 within the time period. At the same time, the metering pulse information, interrupt information IRQ and register data register_data within the time period of 100ms~200ms are sent to the microprocessor 20, and so on, until the last preset time period, the metering pulse information, interrupt information IRQ and configured register data register_data within the time period are obtained, and the metering pulse information, interrupt information IRQ and configured register data register_data of the previous preset time period are sent to the microprocessor 20.

[0066] In an optional embodiment, the microprocessor 20 determines the time interval of each metering pulse according to the time point and number of metering pulses, and generates corresponding metering pulse information according to the time interval, wherein the metering pulses of two adjacent preset time periods are output according to the preset time interval;

[0067] The preset time interval is: (Tn-Tn-1) / m;

[0068] Wherein, Tn-1 represents the time point when the first metering pulse is generated in the previous preset time period, Tn represents the time point when the first metering pulse is generated in the next preset time period, and m represents the number of metering pulses in the previous preset time period.

[0069] Assume that in the time period of 0ms to 100ms: the first pulse appears at 60ms, and two pulses appear in the period of 0 to 100ms;

[0070] 100ms~200ms: The first pulse appears at 120ms.

[0071] According to the above information, the interval between 60ms and 120ms is regarded as two pulses with equal intervals, and the pulse interval = (120-60) / 2ms = 30ms. Then, within the preset time period of 0ms to 100ms, the time points at which the two pulses appear are 60ms and (60+30) = 90ms respectively.

[0072] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: the above-mentioned metering circuit for sending multiple information through a communication port includes a metering chip 10, an isolation device 30 and a microprocessor 20. The communication output port of the metering chip 10 is connected to the communication input port of the microprocessor 20 through the isolation device 30. The metering chip 10 sends its own various metering information to the microprocessor 20 through a communication port and an isolation device 30. The microprocessor 20 receives various metering information and performs data processing and / or forwarding. The isolation device 30 is used to achieve signal isolation and prevent signal interference. By adopting a communication port and an isolation device 30 to transmit multiple types of data, the structure of the metering circuit and the metering equipment is simplified and the design cost is reduced.

[0073] The present invention also proposes a metering device, which includes a metering circuit that sends multiple information through a communication port. The specific structure of the metering circuit that sends multiple information through the communication port refers to the above-mentioned embodiment. Since the metering device adopts all the technical solutions of all the above-mentioned embodiments, it has at least all the beneficial effects brought by the technical solutions of the above-mentioned embodiments, which will not be repeated here one by one.

[0074] The metering equipment may be an electric meter, a concentrator or other equipment. At the same time, the metering equipment may also include various sampling circuits, detection circuits, etc., and may also include a display module, etc. The specific structure is not limited.

[0075] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A metering circuit for sending multiple information through a communication port, characterized in that: It comprises a metering chip, an isolation device and a microprocessor, wherein the communication output port of the metering chip is connected to the communication input port of the microprocessor through the isolation device; The metering chip is configured to send various metering information of the chip to the microprocessor; The microprocessor is configured to receive various types of metering information and perform data processing and / or forwarding; Various types of metering information include metering pulse information, interrupt information and configured register data; The microprocessor includes a CPU module and a second communication module, the second communication module is connected to the CPU module, the metering chip includes a first communication module, the metering chip also includes a register, the register stores register data, and the communication output port of the first communication module and the communication input port of the second communication module are connected through an isolation device to transmit data; After acquiring various metering information, the metering chip sends various metering information to the second communication module through the first communication module and the isolation device. The second communication module sends interruption data to the CPU module. The CPU module switches the working state according to the interruption information and controls the signal output module inside the microprocessor to forward metering pulse information. The communication input port of the first communication module of the metering chip is connected to the communication output port of the second communication module of the microprocessor through another isolation device; The microprocessor is further configured to: Sending a mode configuration signal to the communication input port of the first communication module of the metering chip through the communication output port of the second communication module; The metering chip is further configured as: According to the mode configuration signal, the switch to the automatic working mode is triggered, and various metering information is acquired, configured, and data is sent; The microprocessor is further configured to: Determine the time interval of each metering pulse according to the time point and number of metering pulses, and generate corresponding metering pulse information according to the time interval, wherein the metering pulses of two adjacent preset time periods are output according to the preset time interval; The preset time interval is: (Tn-Tn-1) / m; Wherein, Tn-1 represents the time point when the first metering pulse is generated in the previous preset time period, Tn represents the time point when the first metering pulse is generated in the next preset time period, and m represents the number of metering pulses in the previous preset time period.

2. The metering circuit for sending multiple information through a communication port as claimed in claim 1, characterized in that: The metering chip is specifically configured as follows: According to the mode configuration signal, the switch to the automatic working mode is triggered, and the rules for obtaining and sending time periods of various metering information are determined; The acquisition, configuration and data transmission of various types of metering information are carried out according to the rules of the acquisition and transmission periods of various types of metering information.

3. The metering circuit for sending multiple information through a communication port as claimed in claim 2, characterized in that: The rules for the acquisition period and the sending period of various metering information of the metering chip are as follows: During the preset time period of each interval, various types of metering information within each time period are obtained; as well as In each preset time period, various types of metering information of the previous preset time period are sent to the microprocessor.

4. The metering circuit for sending multiple information through a communication port as claimed in claim 1, characterized in that: The microprocessor is further configured to: Determine the rules for obtaining and forwarding various metering information according to the trigger instructions; The acquisition and forwarding of various types of metering information are performed according to the rules of the acquisition period and forwarding period of various types of metering information.

5. The metering circuit for sending multiple information through a communication port as claimed in claim 1, characterized in that: The metering pulse information includes the time point or cycle number when the first metering pulse is generated in the last preset time period and the number of metering pulses.

6. The metering circuit for sending multiple information through a communication port as claimed in claim 1, characterized in that: The interruption information includes the time period or cycle number of the first interruption generated within the last preset time period and the number of interruptions.

7. A measuring device, characterized in that: The invention comprises a metering circuit for sending a plurality of information through a communication port as described in any one of claims 1 to 6.