Metering circuit and smart meter with asymmetric communication baud rate
By adopting a metering circuit with asymmetric communication baud rate in the smart meter, and using a low-speed isolation device and a high-speed isolation device to connect the metering chip and MCU, the problem of insufficient communication baud rate in the existing technology is solved, and efficient Power quality analysis and harmonic measurement reduce design costs.
Patent Information
- Application Number
- CN202311342391.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-16
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2043-10-16
AI Technical Summary
The communication baud rate between the metering chip of the existing smart meter and the MCU is not enough to meet the needs of the high-frequency power grid, resulting in a large number of isolation devices and high cost.
A metering circuit using asymmetric communication baud rate connects the metering chip and MCU through a low-speed isolation device and a high-speed isolation device. The MCU outputs mode control instructions to switch the metering chip to active sending mode, and uses the high-speed isolation device to transmit at a high baud rate. Send metering information.
It reduces the number of isolation components, saves design costs, and can transmit voltage and current waveform data and interruption information in real time to meet the communication needs of high-frequency power grids.
Smart Images

Figure CN117394879B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of smart electric meters, and in particular relates to a metering circuit with an asymmetric communication baud rate and a smart electric meter. Background Art
[0002] With the development of China's smart grid, as an important part of the smart grid electricity consumption link, the demand for smart meters and electricity consumption information collection equipment continues to increase. According to data from the State Grid, the number of smart meter tenders by the State Grid has maintained an overall upward trend in recent years. Smart meters are the basic facilities for data collection in smart distribution networks and an important part of grid construction. Driven by the ubiquitous power Internet of Things, the "dual-core" smart meter based on the IR46 concept requires the new generation of smart meters to adopt a dual-core mode of "metering core" and "management core". At the same time, relevant standards for smart IoT meters have been promulgated.
[0003] Among them, the pulses and interrupts of the metering chip at the user end, as well as the real-time waveforms of voltage and current, are the key data sources. The electrical isolation and real-time issues between the pulses, interrupts, waveforms and other data of the metering chip and the MCU transmission are worth considering. Usually, isolation devices such as capacitors and optocouplers are used for signal isolation. Among them, the current mainstream method for pulse and interrupt transmission is to use low-speed isolation devices to electrically isolate the MCU. If the current mainstream UART communication method of single-phase meters is used, the actual baud rate is required to be at least 844.800bps. Considering the changes in the power grid frequency, the baud rate needs to support about 900Kbps.
[0004] The single-phase metering chips currently used in electric energy meters generally adopt a UART rate of only 4800bps, which is far from meeting the requirement of 900Kbps rate, and the active power, reactive power, fundamental wave pulse and interruption require 4 optocouplers for isolation.
[0005] You can also consider using serial communication with a rate higher than 900Kbps to achieve real-time waveform data output of voltage and current. At the same time, active power, reactive power, fundamental pulse and interruption are isolated by 4 low-speed isolation devices, such as Figure 1As shown in the figure, in this mode, the single-phase metering chip is a slave device of serial communication, and the MCU is a master device; the MCU periodically obtains the metering parameters of the single-phase metering chip, such as sending a serial communication command to the single-phase metering chip through the TX port of the MCU serial port at a fixed 1s timing. After receiving the command from the MCU, the RX port of the single-phase metering chip detects the validity of the command. If it is valid, it responds to the MCU, that is, returns data to the MCU through the TX port of the single-phase metering chip. In this process, the baud rate of the MCU actively initiating the command is consistent with the rate at which the single-phase metering chip replies to the message. However, in this mode, four low-speed optocouplers and two high-speed optocouplers are required, and the implementation cost is relatively high. Summary of the invention
[0006] The object of the present invention is to provide a communication method of a metering circuit of an asymmetric communication baud rate, aiming to solve the problem of high cost of a traditional metering circuit of an asymmetric communication baud rate.
[0007] A first aspect of an embodiment of the present invention provides a metering circuit with an asymmetric communication baud rate, which is used for a smart meter, and includes a metering chip, a first low-speed isolation device, a high-speed isolation device, and an MCU, wherein the metering chip includes a first UART interface circuit, and the MCU includes a second UART interface circuit;
[0008] The RX port of the first UART interface circuit is connected to the TX port of the second UART interface circuit through the first low-speed isolation device, and the TX port of the first UART interface circuit is connected to the RX port of the second UART interface circuit through the high-speed isolation device;
[0009] The MCU sends a mode control instruction to the RX port of the first UART interface circuit of the metering chip at a low baud rate through the TX port of the second UART interface circuit and the first low-speed isolation device;
[0010] The metering chip switches to the active sending mode according to the mode control instruction, and sends a variety of metering information to the RX port of the second UART interface circuit of the MCU through the TX port of the first UART interface circuit and the high-speed isolation device at a high baud rate.
[0011] Optionally, the various metering information includes but is not limited to waveform data, electric energy pulse information, interruption information and zero-crossing information.
[0012] A second aspect of the embodiments of the present invention provides a smart electric meter, comprising the metering circuit with the asymmetric communication baud rate as described above.
[0013] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: the above-mentioned metering circuit with asymmetric communication baud rate includes a metering chip, a low-speed isolation device, a high-speed isolation device and an MCU; the metering chip is connected to the MCU via a low-speed isolation device and a high-speed isolation device; the MCU outputs a mode control instruction to the metering chip; the metering chip switches to an active sending mode, and sends a variety of metering information to the MCU at a high baud rate via a high-speed isolation device, thereby providing a source of original voltage and current waveform data for power quality analysis, harmonic metering, etc.; at the same time, in the active sending mode, only one low-speed isolation device and one high-speed isolation device need to be set, thereby saving the number of isolation devices and reducing the design cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] 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.
[0015] Figure 1 It is a circuit structure diagram of a conventional asymmetric communication baud rate metering circuit;
[0016] Figure 2 A first circuit diagram of an asymmetric communication baud rate metering circuit provided by an embodiment of the present invention;
[0017] Figure 3 A second circuit diagram of the asymmetric communication baud rate metering circuit provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] 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.
[0019] 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.
[0020] A first aspect of an embodiment of the present invention provides a metering circuit with an asymmetric communication baud rate, which is used in a smart meter, such as Figure 2As shown, the metering circuit of asymmetric communication baud rate includes a metering chip 10, a first low-speed isolation device 40, a high-speed isolation device 30 and an MCU 20, the metering chip 10 includes a first UART interface circuit 11, and the MCU 20 includes a second UART interface circuit 21;
[0021] The RX port of the first UART interface circuit 11 is connected to the TX port of the second UART interface circuit 21 through the first low-speed isolation device 40, and the TX port of the first UART interface circuit 11 is connected to the RX port of the second UART interface circuit 21 through the high-speed isolation device 30;
[0022] MCU20 sends the mode control instruction to the RX port of the first UART interface circuit 11 of the metering chip 10 at a low baud rate through the TX port of the second UART interface circuit 21 and the first low-speed isolation device 40;
[0023] The metering chip 10 is configured to switch to the active transmission mode according to the mode control instruction, and send various metering information to the RX port of the second UART interface circuit 21 of the MCU 20 at a high baud rate through the TX port of the first UART interface circuit 11 and the high-speed isolation device 30.
[0024] In this embodiment, the metering chip 10 is also connected to sampling circuits, detection circuits and other circuits in the smart meter. The sampling circuits, detection circuits and other circuits obtain various 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.
[0025] The MCU20 includes a processor and a second UART interface circuit 21, which is connected to the processor. The metering chip 10 includes a first UART interface circuit 11, which also includes a register, and the register stores register data. The signal end of the first UART interface circuit 11 constitutes the signal input end and signal output end of the metering chip 10, and the signal end of the second UART interface circuit 21 constitutes the signal input end and signal output end of the MCU20. The second UART interface circuit 21 and the first UART interface circuit 11 communicate and transmit data through a first low-speed isolation device 40 and a high-speed isolation device 30.
[0026] After power-on or according to the received trigger instruction, MCU20 outputs a low baud rate mode control instruction to the metering chip 10. The metering chip 10 is triggered to switch to the active sending mode under the control of the mode control instruction. In the active sending mode, the metering chip 10 actively sends various types of metering information to MCU20 at a high baud rate through the TX port of the first UART interface circuit. At the same time, the TX port of the metering chip 10 is electrically isolated from the MCU20 through the high-speed isolation device 30.
[0027] At the same time, after MCU20 sends the mode control instruction, MCU20 itself switches to the signal receiving mode, and switches the communication baud rate of the RX port of the second UART interface circuit 21 to a high baud rate, that is, adjusts its own serial port baud rate to the baud rate of the metering chip 10 in the active sending mode, that is, adjusts it to a high baud rate. In this way, when the metering chip 10 actively sends data at a high baud rate, MCU20 can correctly receive the data and parse the data into pulses, interrupts, waveform data, etc. MCU20 parses the data uploaded by the metering chip 10, obtains the register data and interrupt information IRQ therein, and processes and forwards various types of metering information, such as forwarding it to the storage module in the smart meter, or forwarding it to the host computer. The specific forwarding object and forwarding method are not limited.
[0028] In an optional embodiment, various types of metering information include but are not limited to waveform data, electric energy pulse information, interruption information and zero-crossing information, wherein the waveform data includes the collected real-time waveform data of voltage and current.
[0029] The electric energy pulse information includes the current metering data. In an optional embodiment, the electric energy pulse information includes active pulse information PF, reactive pulse information QF and fundamental wave pulse information FPF. The active pulse information PF represents the active power data, the reactive pulse information QF represents the reactive power data, and the fundamental wave pulse information FPF represents the fundamental wave data.
[0030] The zero-crossing information represents the input state of the detected electric energy. The MCU 20 can determine the current input state of the electric energy of the electric meter according to the zero-crossing information.
[0031] 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 MCU20 switches the working state and executes the preset data processing work.
[0032] Among them, various types of metering information may also include register data, wherein the register data is register data configured in advance and waiting to be uploaded. By automatically uploading the register data, MCU20 no longer obtains the register data by reading the register, that is, there is no need to additionally set up a signal port and an isolation device for transmitting read and write control signals between MCU20 and the metering chip 10, which further simplifies the metering circuit with asymmetric communication baud rate and the structure of the smart meter and reduces the design cost.
[0033] In the active sending mode, the metering chip 10 does not need to use the RX port, but only needs to use the TX port to periodically send data to the MCU 20. By replacing the first low-speed isolation device 40 of the original TX port of the metering chip 10 with a high-speed isolation device 30, the high-speed isolation device 30 is used on the TX port of the metering chip 10, and the conventional first low-speed isolation device 40 is still used on the RX port of the metering chip 10. The transmission of real-time power pulses, interrupts, waveform data, register data and other information can be realized on the TX port of the metering chip 10, and there is no need to face the problem that the power pulse and interrupt output need to be isolated by isolation devices respectively, which makes the acquisition of real-time power pulses and interrupts simple and convenient, saves isolation devices, and thus reduces the design cost.
[0034] The isolation device can be a structure such as an optocoupler, a capacitor, etc. Taking an optocoupler as an example, the price of a high-speed optocoupler is about 4 times that of a low-speed optocoupler. This application only uses 1 high-speed optocoupler and 1 low-speed optocoupler, which can not only realize the output of power pulses and interrupts but also transmit waveform data and register data in real time, saving the number of optocouplers and reducing design costs.
[0035] Further, in order to ensure that the metering chip 10 is reliably switched to the active transmission mode and to determine whether a communication abnormality occurs in the metering chip 10, optionally, the MCU 20 is further configured as follows:
[0036] When various metering information is not received within a preset time period, a reset control instruction is sent to the metering chip 10 through the first low-speed isolation device 40 to switch the metering chip 10 to a reset state.
[0037] MCU20 maintains the signal receiving mode within a preset time period after issuing the mode control command, and determines whether there is any metering information input within the time period. When receiving the metering information output by the metering chip 10, it determines that the communication with the metering chip 10 is normal. MCU20 continues to maintain the signal receiving mode and receives various metering information periodically output by the metering chip 10. When no metering information is received within the preset time period, it is determined that the communication with the metering chip 10 is abnormal. It is possible that the metering chip 10 fails or the first low-speed isolation device 40 and the high-speed isolation device 30 are abnormal. In this case, MCU20 It is configured to output a reset control instruction to the metering chip 10 to reset the metering chip 10 and switch it to the reset state. Within a preset time period after outputting the reset control instruction, MCU20 can be configured to output a mode control instruction to the metering chip 10 again, and to determine again whether the metering information output by the metering chip 10 is received. When the metering information is received, it can be determined that the metering chip 10 is reset successfully, and the metering chip 10 resumes communication with MCU20. When the metering chip 10 is not received again, MCU20 can send an indication signal through the indication module to inform the current abnormal communication state so as to carry out subsequent maintenance work.
[0038] Furthermore, if Figure 3 As shown, the metering circuit for asymmetric communication baud rate further includes a plurality of second low-speed isolation devices 50;
[0039] The metering chip 10 further includes a plurality of first signal ports, and the MCU 20 further includes a plurality of second signal ports. The plurality of first signal ports of the metering chip 10 are connected one by one with the plurality of second signal ports of the MCU 20 through a plurality of second low-speed isolation devices 50.
[0040] The metering chip 10 is configured to switch to a normal working mode according to a mode control instruction, and read parameters through the first low-speed isolation device 40 and the RX port of the first UART interface circuit 11, and send different types of metering information to multiple second signal ports of the MCU 20 through multiple first signal ports and multiple second low-speed isolation devices 50;
[0041] Alternatively, it is configured to switch to the active transmission mode according to the mode control instruction, and send the various types of metering information transmitted by each first signal port and each second low-speed isolation device 50 to the MCU through the TX port of the first UART interface circuit 11 and the high-speed isolation device 30.
[0042] In this embodiment, the metering chip 10 can operate in a normal working mode or an active sending mode. In the normal working mode, the metering chip 10 outputs different types of metering information such as active pulse information, reactive pulse information, fundamental pulse information, interrupt information, etc. to MCU20 through multiple first signal ports and multiple second low-speed isolation devices 50. At the same time, in this mode, the metering chip 10 communicates with MCU20 through the TX port and RX port of the first UART interface circuit 11. The metering chip 10 acts as a slave of the UART serial port communication, and MCU20 acts as a host of the UART serial port communication. It can receive the parameters output by MCU20 and return data to MCU20.
[0043] Alternatively, in the active sending mode, the multiple first signal ports of the metering chip 10 are in a silent state and do not send signals. Different types of metering information such as active pulse information, reactive pulse information, fundamental pulse information, interrupt information, etc. originally sent through the multiple first signal ports and the multiple second low-speed isolation devices are actively sent to MCU20 through the TX port of the first UART interface circuit 11 at a high baud rate. At the same time, the TX port of the first UART interface circuit of the metering chip 10 is electrically isolated from the MCU20 through the high-speed isolation device 30. Through mode switching, the setting of the second isolation device can be reduced in the active sending mode, thereby simplifying the structure of the metering circuit and reducing the cost.
[0044] Furthermore, the MCU 20 is also configured as follows:
[0045] Before outputting the mode control signal, a reset control instruction is output to the metering chip 10 through the first low-speed isolation device 40, and a low baud rate configuration parameter is sent to the metering chip 10;
[0046] And when it is determined that the configuration parameters of the metering chip 10 are normal, the first low-speed isolation device 40 outputs a mode control instruction to control the metering chip 10 to switch to the active sending mode.
[0047] In this embodiment, after MCU20 and the metering chip 10 are powered on, MCU20 first outputs a reset control instruction to the metering chip 10 according to the initial configuration parameters, and the metering chip 10 is reset and switched to the normal working mode. After that, MCU20 sends the configuration parameters to the metering chip 10 according to the default low baud rate after the metering chip 10 is reset, so as to perform parameter configuration and mode state configuration on the metering chip 10. At the same time, MCU20 determines whether the configuration parameters of the metering chip 10 are normal through the second UART interface circuit 21. When it is determined that the configuration parameters of the metering chip 10 are normal, MCU20 is configured to send a mode control instruction to the metering chip 10, so that the serial port mode of the metering chip 10 is switched to the active sending mode, and MCU20 modifies its own serial port baud rate to the high baud rate in the active sending mode and configures it to the signal receiving mode.
[0048] Wherein, in the active sending mode, the RX port of the metering chip 10 can be selectively switched to a corresponding working mode. In an optional embodiment, the metering chip 10 is further configured as follows:
[0049] In the active transmission mode, the RX port of the first UART interface circuit 11 is configured to switch to a silent state.
[0050] That is, in the active transmission mode, the RX port of the metering chip 10 is switched to a silent state, and does not receive any signal output by the MCU 20 , and the metering chip 10 only performs data transmission of various metering information.
[0051] In another optional embodiment, MCU20 is further configured to:
[0052] In the active sending mode, the parameter configuration instruction is sent through the first low-speed isolation device 40 to rewrite and switch the configuration parameters and / or working mode of the metering chip 10.
[0053] In this embodiment, in the active sending mode, the RX port of the metering chip 10 is in a working state, and the MCU 20 is configured to send parameter configuration instructions in a corresponding time period. The metering chip 10 rewrites its internal parameters according to the received parameter configuration instructions, or switches the mode according to the parameter configuration instructions, switching from the active sending mode to the normal working mode, or the metering chip 10 performs a global reset and / or resets the internal first UART interface circuit 11.
[0054] Among them, the specific baud rate sizes of the low baud rate and the high baud rate can be set accordingly, among which the low baud rate is about 4800bps, and the high baud rate is about 900Kbps.
[0055] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: the above-mentioned metering circuit with asymmetric communication baud rate includes a metering chip 10, a first low-speed isolation device 40, a high-speed isolation device 30 and an MCU20; the metering chip 10 is connected to the MCU20 via a first low-speed isolation device 40 and a high-speed isolation device 30; the MCU20 outputs a mode control instruction to the metering chip 10; the metering chip 10 switches to an active sending mode, and sends a variety of metering information to the MCU20 at a high baud rate via the high-speed isolation device 30, providing a source of original voltage and current waveform data for power quality analysis, harmonic metering, etc.; at the same time, in the active sending mode, only a first low-speed isolation device 40 and a high-speed isolation device 30 need to be set, thereby saving the number of isolation devices and reducing the design cost.
[0056] The present invention also proposes a smart electric meter, which includes a metering circuit for an asymmetric communication baud rate. The specific structure of the metering circuit for an asymmetric communication baud rate refers to the above-mentioned embodiment. Since the smart electric meter 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 described one by one here.
[0057] The smart meter may also include various sampling circuits, detection circuits, etc., and may also include a display module, etc., and the specific structure is not limited.
[0058] 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 with an asymmetric communication baud rate, used for a smart meter, characterized in that: It includes a metering chip, a first low-speed isolation device, a high-speed isolation device and an MCU, wherein the metering chip includes a first UART interface circuit, and the MCU includes a second UART interface circuit; The RX port of the first UART interface circuit is connected to the TX port of the second UART interface circuit through the first low-speed isolation device, the TX port of the first UART interface circuit is connected to the RX port of the second UART interface circuit through the high-speed isolation device, the signal end of the first UART interface circuit constitutes the signal input end and signal output end of the metering chip, and the signal end of the second UART interface circuit constitutes the signal input end and signal output end of the MCU; The MCU sends a mode control instruction to the RX port of the first UART interface circuit of the metering chip at a low baud rate through the TX port of the second UART interface circuit and the first low-speed isolation device, and switches to a signal receiving mode to switch the communication baud rate of the RX port of the second UART interface circuit to a high baud rate; The metering chip switches to the active sending mode according to the mode control instruction, and sends a variety of metering information to the RX port of the second UART interface circuit of the MCU through the TX port of the first UART interface circuit and the high-speed isolation device at a high baud rate; The various metering information includes, but is not limited to, waveform data, power pulse information, interruption information, and zero-crossing information.
2. A smart electric meter, characterized in that: A metering circuit comprising the asymmetric communication baud rate as claimed in claim 1.
