Communication circuit for metering unit and MCU (Microprogrammed Control Unit) of electric energy meter

By designing a communication circuit between the electricity meter metering unit and the MCU, the problem of real-time data transmission between the electricity meter metering unit and the expansion unit was solved, enabling timely acquisition and processing of voltage and current data, and meeting the requirements of the new generation of electricity meter technical specifications.

CN224066889UActive Publication Date: 2026-03-31QINGDAO ITECHENE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

The latest version of the new generation Class A single-phase smart gateway energy meter technical specification requires that the metering unit of the energy meter needs to transmit the metering sampling data to the expansion unit in real time, using SPI unidirectional communication, and the original data requires that 64/128/256 sampling points per cycle can be set, and the SPI communication rate range supports a maximum of 2Mbps. Existing communication circuits cannot meet these requirements.

Method used

A communication circuit between an electricity meter metering unit and an MCU is designed, including an MCU chip U1, a metering chip U6, a voltage sampling circuit, a live wire current sampling circuit, a neutral wire current sampling circuit, and an interface communication circuit. Through these circuits, grid voltage, current data, and data waveforms are acquired and transmitted between the metering chip U6 and the MCU chip U1 to achieve real-time processing and analysis.

Benefits of technology

It enables timely acquisition and processing of voltage and current data, ensuring that the expansion unit can receive reliable data in a timely manner, and meeting the real-time data transmission requirements of the new generation of electricity meter technical specifications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224066889U_ABST
    Figure CN224066889U_ABST
Patent Text Reader

Abstract

The utility model provides a communication circuit of an electric energy meter metering unit and an MCU. The communication circuit comprises an MCU chip U1, a metering chip U6, a voltage sampling circuit, a live wire current sampling circuit, a zero line current sampling circuit and an interface communication circuit. Wherein the voltage sampling circuit, the live line current sampling circuit and the zero line current sampling circuit are respectively connected with the metering chip U6, and can acquire voltage and current data and data waveforms of a power grid; and the interface communication circuit is connected with the MCU chip U1 and the metering chip U6, so that acquired voltage and current data waveforms can be transmitted between the metering chip U6 and the MCU chip U1, the acquired voltage and current data can be processed and analyzed in time, and reliable data can be provided for the expansion unit in time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electricity meter technology, and in particular to a communication circuit between an electricity meter metering unit and an MCU. Background Technology

[0002] With continuous technological advancements, the technical specifications and standards for electricity meters are also constantly being updated. The latest version of the next-generation Class A single-phase smart gateway electricity meter technical specifications explicitly requires that the metering unit transmit metering sampling data to the expansion unit in real time, using SPI unidirectional communication. SPI communication uses mode 1, with the metering unit as the master and the expansion unit as the slave. The raw data requires configurable single-cycle sampling points of 64, 128, or 256, and the SPI communication rate is supported up to 2Mbps. Based on these technical specifications, it is necessary to redesign the communication circuit between the electricity meter's metering unit and the MCU to meet the functional requirements of real-time acquisition of voltage, current, and power data from the power grid and pushing the acquired data to the expansion unit. Utility Model Content

[0003] To solve the above-mentioned technical problems, this application provides a communication circuit between an energy meter metering unit and an MCU, including an MCU chip U1, a metering chip U6, a voltage sampling circuit, a live wire current sampling circuit, a neutral wire current sampling circuit, and an interface communication circuit.

[0004] The voltage sampling circuit, the live wire current sampling circuit, and the neutral wire current sampling circuit are respectively connected to the metering chip U6; the voltage sampling circuit is used to acquire grid voltage data and data waveform; the live wire current sampling circuit and the neutral wire current sampling circuit are used to acquire grid current data and data waveform.

[0005] The interface communication circuit connects the MCU chip U1 and the metering chip U6; the interface communication circuit is used to realize communication between the MCU chip and the metering chip U6.

[0006] In some embodiments of this application, the voltage sampling circuit includes resistors RM1, RM2, RM3, RM4, RM5, RM6, RM7, RM8, RM9, and capacitors CM1 and CM2; wherein RM1, RM2, RM3, RM4, RM5, RM6, and RM7 are connected in series sequentially; one end of resistor RM8 and capacitor CM1, and the other end of resistor RM7 are connected to pin 9 (V3P) of metering chip U6; the other end of resistor RM8 is connected to one end of resistor RM9; the other end of resistor RM9 and one end of capacitor CM2 are connected to pin 10 (V3N) of metering chip U6; and the other end of capacitor CM2, the other end of capacitor CM1, and one end of resistor RM8 are grounded together.

[0007] In some embodiments of this application, the live wire current sampling circuit includes a manganin current sensor MT, a shorting pin JP5, resistors RM10, RM11, and RM12, and capacitors CM3 and CM4. One end of resistors RM10 and RM12 is connected to pin 1 of shorting pin JP5; pin 2 of shorting pin JP5 is connected to pin 2 of manganin current sensor MT; the other end of resistor RM12 and one end of resistor RM11 are connected to pin 1 of manganin current sensor MT; one end of capacitor CM3 and the other end of resistor RM10 are connected to pin 6 (V1N) of metering chip U6; one end of capacitor CM4 and the other end of resistor RM11 are connected to pin 5 (V1P) of metering chip U6; and the other ends of capacitors CM3 and CM4 are grounded.

[0008] In some embodiments of this application, the neutral current sampling circuit includes a current transformer CT, resistors R11, R22, RM15, RM16, capacitors CM5 and CM6; wherein, one end of resistors R22 and RM15 is connected to pin 2 of the current transformer CT; the other end of resistor R22 and one end of resistor R11 are grounded together; the other end of resistor R11 and one end of resistor RM16 are connected to pin 1 of the current transformer CT; the other end of resistor RM16 and one end of capacitor CM6 are connected to pin 7 (V2P) of the metering chip U6; the other end of capacitor CM6 and one end of capacitor CM5 are grounded together; and the other end of capacitor CM5 and the other end of resistor RM15 are connected to pin 8 (V2N) of the metering chip U6.

[0009] In some embodiments of this application, the peripheral circuit of the metering chip U6 includes a crystal oscillator circuit, a reference pin filter circuit, and a power supply filter circuit.

[0010] In some embodiments of this application, the crystal oscillator circuit includes crystal oscillator X2, capacitor C7, and capacitor C8; wherein, pin 1 of crystal oscillator X2 and one end of capacitor C7 are connected to pin 1 of metering chip U6 (OSCO port); pin 2 of crystal oscillator X2 and one end of capacitor C8 are connected to pin 16 of metering chip U6 (OSCI port); capacitor C7, capacitor C8, and pin 3 of crystal oscillator X2 are grounded together.

[0011] In some embodiments of this application, the reference pin filtering circuit includes capacitor C1 and capacitor C2; wherein, one end of capacitor C1 and capacitor C2 are connected to pin 11 REFV port of metering chip U6, and the other end is grounded.

[0012] In some embodiments of this application, the power supply filtering circuit includes a resistor R68, a capacitor C36, a capacitor C10, a capacitor C37, and a capacitor C34; wherein, one end of capacitor C36, capacitor C10, and resistor R68 are connected to pin 15 (DVDD port) of metering chip U6; the other end of resistor R68 and one end of capacitor C37 and capacitor C34 are connected to pin 4 (AVDD port) of metering chip U6; the other ends of capacitor C36, capacitor C10, capacitor C37, and capacitor C34 are grounded.

[0013] In some embodiments of this application, the interface communication circuit includes a communication isolation circuit, an active signal output circuit, and a reactive signal output circuit; wherein, the communication isolation circuit includes an isolation chip UM1, capacitors C3 and C4, resistors R2, R4, R7, R8, R3, R5, R9, and R10; one end of capacitor C3 is grounded, and the other end, together with one end of resistor R7 and one end of resistor R8, is connected to pin 1 (VDD1) of isolation chip UM1; the other end of resistor R7 is connected to one end of resistor R2; the other end of resistor R2 is connected to pin 12 (TX) of metering chip U6; the other end of resistor R8 is connected to... One end of resistor R4 is connected to pin 13 (RX / RST port) of metering chip U6; one end of resistors R9, R10, and capacitor C4 is connected to pin 8 (VDD2 port) of isolation chip UM1; the other end of capacitor C4 is grounded; the other end of resistor R9 and one end of resistor R5 are connected to pin 6 (VIB port) of isolation chip UM1; the other end of resistor R5 is connected to pin 61 (TX8290) of MCU chip U1 to transmit signal; the other end of resistor R10 and one end of resistor R3 are connected to pin 7 (VOA port) of isolation chip UM1; the other end of resistor R3 is connected to pin 28 (RX8290) of MCU chip U1 to receive signal.

[0014] In some embodiments of this application, the active signal output circuit includes an optocoupler DM2, resistors R84, R116, R64, and capacitor C53; wherein, one end of resistor R84 is connected to pin 2 (PF port) of metering chip U6, and the other end is connected to pin 1 (input terminal) of optocoupler DM2; pin 2 (input terminal) of optocoupler DM2 is grounded; one end of resistors R64, capacitor C53, and resistor R116 is connected to pin 4 (output terminal) of optocoupler DM2; the other end of resistors R64 and capacitor C53 is grounded; the other end of resistor R116 is connected to pin 83 (PF 8209) of MCU chip U1; pin 3 (output terminal) of optocoupler DM2 is connected to the power supply;

[0015] The reactive power signal output circuit includes an optocoupler DM3, resistors R85 and R65, a capacitor C54, and a resistor R117. One end of resistor R85 is connected to pin 3 (QF port) of the metering chip U6, and the other end is connected to pin 1 of the input terminal of optocoupler DM3. Pin 2 of the input terminal of optocoupler DM3 is grounded. One end of resistors R65, capacitor C54, and resistor R117 is connected to pin 4 of the output terminal of optocoupler DM3. The other ends of resistors R65 and capacitor C54 are also grounded. The other end of resistor R117 is connected to pin 76 (QF 8209) of the MCU chip U1. Pin 3 of the output terminal of optocoupler DM3 is connected to the power supply.

[0016] Compared with the prior art, the present invention has the following advantages and beneficial effects: The communication circuit between the electricity meter metering unit and the MCU of the present application includes an MCU chip U1, a metering chip U6, a voltage sampling circuit, a live wire current sampling circuit, a neutral wire current sampling circuit, and an interface communication circuit; wherein, the voltage sampling circuit, the live wire current sampling circuit, and the neutral wire current sampling circuit are respectively connected to the metering chip U6, and can acquire grid voltage, current data and data waveforms; the interface communication circuit connects the MCU chip U1 and the metering chip U6, so that the acquired voltage and current data waveforms can be transmitted between the metering chip U6 and the MCU chip U1, so as to process and analyze the acquired voltage and current data in a timely manner and provide reliable data to the expansion unit in a timely manner.

[0017] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and do not limit this document. Attached Figure Description

[0018] The accompanying drawings, which form part of this document, are used to provide a further understanding of the document. The illustrative embodiments and descriptions herein are used to explain the document and do not constitute an undue limitation thereof. In the drawings:

[0019] Figure 1 This is a schematic diagram of the communication circuit between the electricity meter metering unit and the MCU provided in an exemplary embodiment of this application;

[0020] Figure 2 This is a voltage sampling circuit diagram provided in an exemplary embodiment of this application;

[0021] Figure 3 This is a circuit diagram of a live wire current sampling circuit provided in an exemplary embodiment of this application;

[0022] Figure 4 This is a circuit diagram of a neutral wire current sampling circuit provided in an exemplary embodiment of this application;

[0023] Figure 5 This is a schematic diagram of the metering chip U6 and its peripheral circuitry provided in an exemplary embodiment of this application;

[0024] Figure 6 This is a crystal oscillator circuit diagram of the metering chip U6 provided in an exemplary embodiment of this application;

[0025] Figure 7 This is a power supply filtering circuit diagram of the metering chip U6 provided in an exemplary embodiment of this application;

[0026] Figure 8 This is a schematic diagram of the MCU chip U1 and its peripheral circuitry provided in an exemplary embodiment of this application;

[0027] Figure 9 This is a communication isolation circuit diagram provided in an exemplary embodiment of this application;

[0028] Figure 10 This is an active signal output circuit diagram provided in an exemplary embodiment of this application;

[0029] Figure 11 This is a circuit diagram of reactive signal output provided in an exemplary embodiment of this application. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other.

[0031] With continuous technological advancements, the technical specifications and standards for electricity meters are also constantly being updated. The latest version of the next-generation Class A single-phase smart gateway electricity meter technical specifications explicitly requires that the metering unit transmit metering sampling data to the expansion unit in real time, using SPI unidirectional communication. SPI communication uses mode 1, with the metering unit as the master and the expansion unit as the slave. The raw data requires configurable single-cycle sampling points of 64, 128, or 256, and the SPI communication rate is supported up to 2Mbps. Based on these technical specifications, it is necessary to redesign the communication circuit between the electricity meter's metering unit and the MCU to meet the functional requirements of real-time acquisition of voltage, current, and power data from the power grid and pushing the acquired data to the expansion unit.

[0032] Based on this, an exemplary embodiment of this application provides a communication circuit between an energy meter metering unit and an MCU. The circuit includes an MCU chip U1, a metering chip U6, a voltage sampling circuit, a live wire current sampling circuit, a neutral wire current sampling circuit, and an interface communication circuit. The voltage sampling circuit, live wire current sampling circuit, and neutral wire current sampling circuit are respectively connected to the metering chip U6, enabling the acquisition of grid voltage, current data, and data waveforms. The interface communication circuit connects the MCU chip U1 and the metering chip U6, allowing the acquired voltage and current data waveforms to be transmitted between the metering chip U6 and the MCU chip U1, so as to process and analyze the acquired voltage and current data in a timely manner and provide reliable data to the expansion unit.

[0033] An exemplary embodiment of this application provides a communication circuit between an electricity meter metering unit and an MCU, such as... Figure 1 As shown, the communication circuit includes an MCU chip U1, a metering chip U6, a voltage sampling circuit, a live wire current sampling circuit, a neutral wire current sampling circuit, and an interface communication circuit. The voltage sampling circuit, live wire current sampling circuit, and neutral wire current sampling circuit are all connected to the metering chip U6. The voltage sampling circuit acquires grid voltage data and waveforms; the live wire current sampling circuit and the neutral wire current sampling circuit acquire grid current data and waveforms; the interface communication circuit connects the MCU chip U1 and the metering chip U6, enabling communication between the MCU chip and the metering chip U6. Thus, the voltage sampling circuit and the live wire current sampling circuit can acquire grid voltage and current data and waveforms, and transmit the acquired voltage and current data waveforms between the metering chip U6 and the MCU chip U1, allowing for timely processing and analysis of the acquired voltage and current data, and providing reliable data to the expansion unit.

[0034] like Figure 2As shown, the voltage sampling circuit includes resistors RM1, RM2, RM3, RM4, RM5, RM6, RM7, RM8, RM9, and capacitors CM1 and CM2. RM1, RM2, RM3, RM4, RM5, RM6, and RM7 are connected in series. One end of resistor RM8 and capacitor CM1, and the other end of resistor RM7 are connected to pin 9 (V3P) of the metering chip U6. The other end of resistor RM8 is connected to one end of resistor RM9. The other end of resistor RM9 and one end of capacitor CM2 are connected to pin 10 (V3N) of the metering chip U6. The other end of capacitor CM2, the other end of capacitor CM1, and one end of resistor RM8 are all grounded. Among them, resistors RM1, RM2, RM3, RM4, RM5, RM6, RM7, and RM8 convert the AC high voltage input from the power grid into AC low voltage before inputting it into the metering chip U6; capacitor CM1 filters out unwanted noise; resistor RM9 and capacitor CM2 are the inverting terminals of the differential input, which together with the AC voltage input form a differential pair to enhance anti-interference capability.

[0035] like Figure 3 As shown, the live wire current sampling circuit includes a manganese bronze current sensor MT, a shorting pin JP5, resistors RM10, RM11, and RM12, and capacitors CM3 and CM4. One end of resistors RM10 and RM12 is connected to pin 1 of shorting pin JP5; pin 2 of shorting pin JP5 is connected to pin 2 of the manganese bronze current sensor MT; the other end of resistor RM12 and one end of resistor RM11 are connected to pin 1 of the manganese bronze current sensor MT; one end of capacitor CM3 and the other end of resistor RM10 are connected to pin 6 (V1N) of the metering chip U6; one end of capacitor CM4 and the other end of resistor RM11 are connected to pin 5 (V1P) of the metering chip U6; the other ends of capacitors CM3 and CM4 are grounded. The manganese bronze current sensor MT converts AC current signals into AC voltage signals. Resistors RM10, RM11, and RM12, and capacitors CM3 and CM4 together form a sampling filter circuit, which filters out high-frequency noise signals in the circuit and differentially inputs them into the metering chip U6.

[0036] like Figure 4As shown, the neutral current sampling circuit includes a current transformer CT, resistors R11, R22, RM15, RM16, capacitors CM5 and CM6. One end of resistors R22 and RM15 is connected to pin 2 of the current transformer CT. The other end of resistor R22 is grounded along with one end of resistor R11. The other end of resistor R11 is connected to pin 1 of the current transformer CT along with one end of resistor RM16. The other end of resistor RM16 is connected to pin 7 (V2P) of the metering chip U6 along with one end of capacitor CM6. The other end of capacitor CM6 is grounded along with one end of capacitor CM5. The other end of capacitor CM5 is connected to pin 8 (V2N) of the metering chip U6 along with the other end of resistor RM15. Among them, the current transformer (CT) can convert a large AC current signal into a small AC voltage signal. For example, when using a transformer with a transformation ratio of 2000:1, the 60A primary current becomes 0.03A after passing through the transformer. Resistors R11 and R22 are sampling resistors that can convert AC current signals into AC voltage signals. Resistors RM15 and RM16, capacitors CM5 and CM6 form a filter circuit that can filter out high-frequency noise signals in the circuit and input differentially to the metering chip U6.

[0037] like Figures 5 to 7 As shown, the peripheral circuit of the metering chip U6 includes a crystal oscillator circuit, a reference pin filter circuit, and a power supply filter circuit.

[0038] like Figure 6 As shown, the crystal oscillator circuit includes crystal X2, capacitor C7, and capacitor C8. Pin 1 of crystal X2 and one end of capacitor C7 are connected to pin 1 of the metering chip U6 (OSCO port). Pin 2 of crystal X2 and one end of capacitor C8 are connected to pin 16 of the metering chip U6 (OSCI port). Capacitors C7 and C8, along with pin 3 of crystal X2, are grounded. The crystal oscillator circuit provides a clock signal to the metering chip U6, enabling it to operate normally at a certain frequency.

[0039] The reference pin filtering circuit includes capacitors C1 and C2; one end of capacitors C1 and C2 is connected to pin 11 (REFV) of the metering chip U6, and the other end is grounded. The reference pin filtering circuit can filter out interference signals in a certain frequency band, ensuring the stability of the reference.

[0040] like Figure 7As shown, the power supply filtering circuit includes resistor R68, capacitors C36, C10, C37, and C34. One end of capacitors C36, C10, and resistor R68 is connected to pin 15 (DVDD port) of the metering chip U6. The other end of resistor R68, along with one end of capacitors C37 and C34, is connected to pin 4 (AVDD port) of the metering chip U6. The other ends of capacitors C36, C10, C37, and C34 are grounded. This power supply filtering circuit ensures that the power supply to the metering chip U6 is not interfered with.

[0041] Through the aforementioned voltage sampling circuit, live wire current sampling circuit, neutral wire current sampling circuit, and peripheral circuits of metering chip U6, the high-voltage AC current signal from the power grid is converted into a low-voltage AC signal, which is then input to metering chip U6 in differential input form. Metering chip U6 performs a series of ADC sampling processes based on the input signal, stores the data signal in a preset buffer, and awaits a release signal to push the data to MCU chip U1.

[0042] like Figures 8 to 11 As shown, the interface communication circuit includes a communication isolation circuit, an active signal output circuit, and a reactive signal output circuit. The communication isolation circuit includes an isolation chip UM1, capacitors C3 and C4, and resistors R2, R4, R7, R8, R3, R5, R9, and R10. One end of capacitor C3 is grounded, and the other end, along with one end of resistors R7 and R8, is connected to pin 1 (VDD1) of the isolation chip UM1. The other end of resistor R7 is connected to one end of resistor R2. Resistor R2... The other end is connected to pin 12 (TX port) of metering chip U6; the other end of resistor R8 is connected to one end of resistor R4; the other end of resistor R4 is connected to pin 13 (RX / RST port) of metering chip U6; one end of resistor R9, resistor R10, and capacitor C4 are connected to pin 8 (VDD2 port) of isolation chip UM1; the other end of capacitor C4 is grounded; the other end of resistor R9 and one end of resistor R5 are connected to pin 6 (VIB port) of isolation chip UM1; the other end of resistor R5 is connected to pin 61 (TX 8290) of MCU chip U1; the other end of resistor R10 and one end of resistor R3 are connected to pin 7 (VOA port) of isolation chip UM1; the other end of resistor R3 is connected to pin 28 (RX 8290) of MCU chip U1. Among them, capacitors C3 and C4 are filter capacitors, which can filter out interference signals; resistors R2, R4, R3, and R5 are series matching resistors on the signal line, which can reduce the overshoot phenomenon of high frequency signals; resistors R7, R8, R9, and R10 are pull-up resistors on the signal line, which can keep the signal line at a high level when idle, reducing the risk of signal interference.

[0043] like Figure 10 As shown, the active signal output circuit includes optocoupler DM2, resistors R84, R116, R64, and capacitor C53. One end of resistor R84 is connected to pin 2 (PF) of metering chip U6, and the other end is connected to pin 1 (input) of optocoupler DM2. Pin 2 (input) of optocoupler DM2 is grounded. One end of resistors R64, C53, and R116 is connected to pin 4 (output) of optocoupler DM2. The other ends of resistors R64 and C53 are also grounded. The other end of resistor R116 is connected to pin 83 (PF8209) of MCU chip U1. Pin 3 (output) of optocoupler DM2 is connected to the power supply. Optocoupler DM2 isolates the input and output. Resistor R84 is a current-limiting resistor, limiting the current at the input of optocoupler DM2. Resistor R64 is a pull-down resistor, keeping the signal pulled to ground when there is no signal, ensuring signal stability. Capacitor C53 is a filter capacitor. Resistor R116 provides signal matching and current limiting.

[0044] like Figure 11 As shown, the reactive power signal output circuit includes an optocoupler DM3, resistors R85 and R65, capacitor C54, and resistor R117. One end of resistor R85 is connected to pin 3 (QF port) of the metering chip U6, and the other end is connected to pin 1 of the input terminal of optocoupler DM3. Pin 2 of the input terminal of optocoupler DM3 is grounded. One end of resistors R65, capacitor C54, and resistor R117 is connected to pin 4 of the output terminal of optocoupler DM3; the other end of resistors R65 and capacitor C54 is also grounded. The other end of resistor R117 is connected to pin 76 (QF8209) of the MCU chip U1. Pin 3 of the output terminal of optocoupler DM3 is connected to the power supply. The optocoupler DM3 isolates the input and output. Resistor R85 is a current-limiting resistor, limiting the current at the input terminal of optocoupler DM3. Resistor R65 is a pull-down resistor, keeping the signal pulled down to ground when there is no signal, ensuring signal stability. Capacitor C54 is a filter capacitor. Resistor R117 provides signal matching and current limiting.

[0045] For example, the configuration of an electricity meter is as follows:

[0046] 1) When the energy meter is powered on and initialized, the MCU chip U1 communicates with the metering chip U6 and configures the metering chip U6 to LSTX mode through the UART port;

[0047] 2) In LSTX mode, configure and initialize the calibration parameters, including parameters such as voltage RMS correction, current RMS correction, current offset correction, start-up power threshold setting, active power threshold setting, phase correction, etc.

[0048] 3) Configure the metering chip U6 as HSTX function and initialize the UART of the MCU chip U1 to enable the DMA function;

[0049] 4) When the metering chip U6 sends data to the MCU chip U1 through the interface, the UART DMA will automatically enter the hardware interrupt state when it is half full or full.

[0050] 5) When the MCU chip U1 enters the interrupt routine, it performs data calculation and verification based on the half-wave or full-wave period and bank data;

[0051] 6) If the verification data is incorrect, the program disables UART DMA, restarts the waveform buffer function, resets UART DMA, enables and receives data, and clears the corresponding interrupt flags.

[0052] 7) If the verification data is correct, temporarily store the waveform data in memory and determine whether it meets the requirements for one cycle of data. If it does not meet the requirements, clear the corresponding interrupt flag. If it meets the requirements for one cycle of data, frame the data to prepare for subsequent data transmission.

[0053] 8) After the MCU chip U1 completes the framing of one cycle of data, it configures the corresponding SPI port for transmission to DMA function and enables data push to the backward expansion unit; after the task is received, the corresponding interrupt flag is cleared.

[0054] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that an article or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such an article or device. Without further limitation, an element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the article or device that includes said element.

[0055] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0056] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if these modifications and variations fall within the scope of the claims of this application and their equivalents, the intent of this application also includes these modifications and variations.

Claims

1. A communication circuit between a metering unit and an MCU of an electric energy meter, characterized in that, The MCU chip U1, the metering chip U6, a voltage sampling circuit, a live wire current sampling circuit, a zero line current sampling circuit, and an interface communication circuit are included. The voltage sampling circuit, the live wire current sampling circuit, and the zero line current sampling circuit are connected with the metering chip U6; the voltage sampling circuit is used for acquiring grid voltage data and data waveforms; the live wire current sampling circuit and the zero line current sampling circuit are used for acquiring grid current data and data waveforms. The interface communication circuit connects the MCU chip U1 and the metering chip U6; the interface communication circuit is used for realizing communication between the MCU chip and the metering chip U6.

2. The communication circuit of the metering unit and MCU of the electric energy meter according to claim 1, characterized in that, The voltage sampling circuit includes resistors RM1, RM2, RM3, RM4, RM5, RM6, RM7, RM8, RM9, capacitors CM1 and CM2; the resistors RM1, RM2, RM3, RM4, RM5, RM6, and RM7 are connected in series; one end of the resistor RM8, one end of the capacitor CM1, and the other end of the resistor RM7 are commonly connected to the 9-pin V3P port of the metering chip U6; the other end of the resistor RM8 is connected to one end of the resistor RM9; the other end of the resistor RM9 and one end of the capacitor CM2 are commonly connected to the 10-pin V3N port of the metering chip U6; the other end of the capacitor CM2, the other end of the capacitor CM1, and one end of the resistor RM8 are commonly grounded.

3. The communication circuit of the metering unit and MCU of the electric energy meter according to claim 1, characterized in that, The live wire current sampling circuit includes a manganese-copper current sensor MT, a shorting pin JP5, resistors RM10, RM11, and RM12, capacitors CM3 and CM4; one end of the resistors RM10 and RM12 is commonly connected to the 1-pin of the shorting pin JP5; the 2-pin of the shorting pin JP5 is connected to the 2-pin of the manganese-copper current sensor MT; the other end of the resistor RM12 and one end of the resistor RM11 are commonly connected to the 1-pin of the manganese-copper current sensor MT; one end of the capacitor CM3 and the other end of the resistor RM10 are commonly connected to the 6-pin V1N port of the metering chip U6; one end of the capacitor CM4 and the other end of the resistor RM11 are commonly connected to the 5-pin V1P port of the metering chip U6; the other ends of the capacitors CM3 and CM4 are commonly grounded.

4. The communication circuit of the metering unit and MCU of the electric energy meter according to claim 1, characterized in that, The zero line current sampling circuit includes a current transformer CT, resistors R11 and R22, resistors RM15 and RM16, capacitors CM5 and CM6; one end of the resistor R22 and the resistor RM15 is commonly connected to the 2-pin of the current transformer CT; the other end of the resistor R22 and one end of the resistor R11 are commonly grounded; the other end of the resistor R11 and one end of the resistor RM16 are commonly connected to the 1-pin of the current transformer CT; the other end of the resistor RM16 and one end of the capacitor CM6 are commonly connected to the 7-pin V2P port of the metering chip U6; the other end of the capacitor CM6 and one end of the capacitor CM5 are commonly grounded; the other end of the capacitor CM5 and the other end of the resistor RM15 are commonly connected to the 8-pin V2N port of the metering chip U6.

5. The communication circuit of the metering unit and MCU of the electric energy meter according to claim 1, characterized in that, The peripheral circuit of the metering chip U6 includes a crystal circuit, a reference pin filter circuit and a power filter circuit.

6. The communication circuit of the metering unit and MCU of the electric energy meter according to claim 5, characterized in that, The crystal circuit includes a crystal X2, a capacitor C7 and a capacitor C8; wherein the 1 pin of the crystal X2 is connected to the 1 pin OSCO port of the metering chip U6 together with one end of the capacitor C7; the 2 pin of the crystal X2 and one end of the capacitor C8 are connected to the 16 pin OSCI port of the metering chip U6 together; the capacitor C7, the capacitor C8 and the 3 pin of the crystal X2 are grounded together.

7. The communication circuit of the metering unit and MCU of the electric energy meter according to claim 5, characterized in that, The reference pin filter circuit includes a capacitor C1 and a capacitor C2; wherein one end of the capacitor C1 and the capacitor C2 is connected to the 11 pin REFV port of the metering chip U6 together, and the other end is grounded together.

8. The communication circuit of the metering unit and MCU of the electric energy meter according to claim 5, characterized in that, The power filter circuit includes a resistor R68, a capacitor C36, a capacitor C10, a capacitor C37 and a capacitor C34; wherein one end of the capacitor C36, the capacitor C10 and the resistor R68 is connected to the 15 pin DVDD port of the metering chip U6 together; the other end of the resistor R68 is connected to the 4 pin AVDD port of the metering chip U6 together with one end of the capacitor C37 and the capacitor C34; the other end of the capacitor C36, the capacitor C10, the capacitor C37 and the capacitor C34 is grounded together.

9. The communication circuit of the metering unit and MCU of the electric energy meter according to claim 1, characterized in that, The interface communication circuit includes a communication isolation circuit, an active signal output circuit and a reactive signal output circuit; wherein the communication isolation circuit includes an isolation chip UM1, a capacitor C3, a capacitor C4, a resistor R2, a resistor R4, a resistor R7, a resistor R8, a resistor R3, a resistor R5, a resistor R9 and a resistor R10; one end of the capacitor C3 is grounded, and the other end is connected to the 1 pin VDD1 port of the isolation chip UM1 together with one end of the resistor R7 and one end of the resistor R8; the other end of the resistor R7 is connected to one end of the resistor R2; the other end of the resistor R2 is connected to the 12 pin TX port of the metering chip U6; the other end of the resistor R8 is connected to one end of the resistor R4; the other end of the resistor R4 is connected to the 13 pin RX / RST port of the metering chip U6; one end of the resistor R9, the resistor R10 and one end of the capacitor C4 are connected to the 8 pin VDD2 port of the isolation chip UM1 together; the other end of the capacitor C4 is grounded; the other end of the resistor R9 and one end of the resistor R5 are connected to the 6 pin VIB port of the isolation chip UM1 together; the other end of the resistor R5 is connected to the 61 pin sending signal TX 8290 of the MCU chip U1; the other end of the resistor R10 and one end of the resistor R3 are connected to the 7 pin VOA port of the isolation chip UM1 together; the other end of the resistor R3 is connected to the 28 pin receiving signal RX 8290 of the MCU chip U1.

10. The communication circuit of the metering unit and the MCU of the electric energy meter according to claim 9, characterized in that, The active signal output circuit comprises an optical coupler DM2, a resistor R84, a resistor R116, a resistor R64 and a capacitor C53; one end of the resistor R84 is connected to a 2-pin PF port of the metering chip U6, and the other end is connected to an input end 1-pin of the optical coupler DM2; an input end 2-pin of the optical coupler DM2 is grounded; one end of the resistor R64, the capacitor C53 and the resistor R116 is commonly connected to an output end 4-pin of the optical coupler DM2; the other end of the resistor R64 and the capacitor C53 is commonly grounded; the other end of the resistor R116 is connected to a 83-pin PF 8209 of the MCU chip U1; an output end 3-pin of the optical coupler DM2 is connected to a power supply; The reactive signal output circuit comprises an optical coupler DM3, a resistor R85, a resistor R65, a capacitor C54 and a resistor R117; one end of the resistor R85 is connected to a 3-pin QF port of the metering chip U6, and the other end is connected to an input end 1-pin of the optical coupler DM3; an input end 2-pin of the optical coupler DM3 is grounded; one end of the resistor R65, the capacitor C54 and the resistor R117 is commonly connected to an output end 4-pin of the optical coupler DM3; the other end of the resistor R65 and the capacitor C54 is commonly grounded; the other end of the resistor R117 is connected to a 76-pin QF 8209 of the MCU chip U1; an output end 3-pin of the optical coupler DM3 is connected to a power supply.