An intelligent electric meter detection device based on power line carrier communication

CN224758721UActive Publication Date: 2026-09-15NANJING FORESTRY UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202522060673.2
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2026-09-15
Estimated Expiration
2035-09-25

AI Technical Summary

Benefits of technology

[0025] The aforementioned smart meter detection device based on power line carrier communication can perform the functions of traditional meters, such as energy collection, display, and billing. It achieves both local and remote monitoring of energy information, and features low investment, high efficiency, flexible deployment, and strong scalability. Power line carrier communication-based meters not only greatly simplify the communication methods between smart meters and reduce wiring costs, but also facilitate the digitalization and centralized management of meter reading systems, increasing communication capacity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224758721U_ABST
    Figure CN224758721U_ABST
Patent Text Reader

Abstract

The utility model relates to an intelligent electric meter detection device based on power line carrier communication, including sending end and receiving end, wherein sending end includes: first power supply circuit is used to provide the power required for microcontroller operation, AC collection circuit is used for detecting voltage, current and power of detection, keyboard input circuit is used for inputting the instruction of controlling intelligent electric meter detection device, first carrier communication circuit is used for realizing the remote communication of intelligent electric meter detection device sending end and receiving end based on power line carrier communication, first display output circuit is used for displaying the voltage, current and power obtained by detection, first microcontroller is used for connecting and controlling first power supply circuit, AC collection circuit, keyboard input circuit, first carrier communication circuit and first display output circuit. The device greatly simplifies the communication mode between intelligent electric meters, reduces wiring cost, and is beneficial to the digitization and centralized management of meter reading system, improves communication capacity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This utility model relates to the field of smart meter technology, and in particular to a smart meter detection device based on power line carrier communication. Background Technology

[0002] In my country, electricity production and demand are large, making management difficult. The government mainly adopts two methods to address this: First, it uses administrative means to regulate electricity consumption during peak hours, without increasing equipment or expanding equipment capacity, to cope with the increasingly serious contradiction between electricity supply and demand. Electricity consumption must be controlled during peak hours. The second method is to implement a time-of-use pricing system, using economic means—raising electricity prices during peak hours and lowering them during off-peak hours. Therefore, the power sector generally uses multi-functional electricity meters, which can record complex rates for AC active and reactive power within different rate periods. Simultaneously, to provide wider application opportunities for multi-rate, multi-functional meters, it is necessary to improve the dual-pricing system and expand the application scope of multi-functional meters. Utility Model Content

[0003] Based on this, a smart meter detection device based on power line carrier communication is provided, which can perform local and remote monitoring functions of electrical energy information. It has the characteristics of low investment, high efficiency, flexible layout and strong scalability.

[0004] A smart meter detection device based on power line carrier communication includes a transmitter and a receiver. The transmitter is used to collect the voltage, current, and power of the smart meter under test, and the receiver is used to receive the voltage, current, and power of the smart meter under test and transmit them to a host computer. The transmitter includes:

[0005] The first power supply circuit is connected to the input terminal of the first microcontroller and is used to provide the power required for the operation of the first microcontroller.

[0006] The AC power acquisition circuit is connected to the input terminal of the first microcontroller and is used to detect the voltage, current and power of the smart meter under test.

[0007] The keyboard input circuit is connected to the input terminal of the first microcontroller and is used to input commands to control the smart meter detection device.

[0008] The first carrier communication circuit is connected to the output terminal of the first microcontroller and is used to realize remote communication between the transmitting end and the receiving end of the smart meter detection device based on power line carrier communication.

[0009] The first display output circuit is connected to the output terminal of the first microcontroller and is used to display the detected voltage, current and power according to the instructions of the keyboard input circuit.

[0010] The first microcontroller is used to connect and control the first power supply circuit, the AC power acquisition circuit, the keyboard input circuit, the first carrier communication circuit, and the first display output circuit.

[0011] In one embodiment, the receiving end of the smart meter detection device based on power line carrier communication includes:

[0012] The second carrier communication circuit is connected to the output of the second microcontroller and is used to realize remote communication between the transmitting end and the receiving end of the smart meter detection device based on power line carrier communication.

[0013] The second power supply circuit is connected to the input terminal of the second microcontroller and is used to provide the power required for the operation of the microcontroller.

[0014] The second display output circuit is connected to the output terminal of the second microcontroller and is used to display the detected voltage, current and power.

[0015] The Bluetooth circuit transmits data with the second microcontroller to transmit the voltage, current, and power collected by the smart meter detection device based on power line carrier communication to the host computer.

[0016] The second microcontroller is used to control and connect the second carrier communication circuit, the second display output circuit, the second power supply circuit, and the Bluetooth circuit.

[0017] In one embodiment, the first microcontroller and the second microcontroller include an STM32F103C8T6 microcontroller control chip and a microcontroller minimum system. The microcontroller minimum system includes a crystal oscillator circuit, a reset circuit, a BOOT selection circuit, and a filter circuit. The crystal oscillator circuit is used to provide a clock frequency to the STM32F103C8T6 microcontroller control chip. The reset circuit is used to return the terminal voltage allocated to the STM32F103C8T6 microcontroller control chip to zero. The BOOT selection circuit is used to select the startup mode of the STM32F103C8T6 microcontroller control chip. The filter circuit is used to filter out noise in the microcontroller minimum system through a capacitor.

[0018] The crystal oscillator circuit is connected to the PD1-OSC_OUT and PD0-OSC_IN pins of the STM32F103C8T6 microcontroller control chip. The reset circuit is connected to the NRST pin of the STM32F103C8T6 microcontroller control chip. The BOOT selection circuit is connected to the BOOT0 pin of the STM32F103C8T6 microcontroller control chip. The filter circuit is connected to the VDD_1, VSS_1, VDD_2, VSS_2, VDD_3, VSS_3, VDDA, and VSSA pins of the STM32F103C8T6 microcontroller control chip.

[0019] In one embodiment, the AC power acquisition circuit uses the HLW8110 chip. The RX pin of the HLW8110 chip is connected to the PA2 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller, and the TX pin of the HLW8110 chip is connected to the PA3 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller.

[0020] In one embodiment, the first power supply circuit and the second power supply circuit adopt a voltage regulator AMS1117. The first power supply circuit is connected to the DIO pin and CLK pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller, and the second power supply circuit is connected to the DIO pin and CLK pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller.

[0021] In one embodiment, the keyboard input circuit includes a billing price setting key and a query key. The billing price setting key is connected to the PA4 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller, and the query key is connected to the PA5 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller.

[0022] In one embodiment, both the first display output circuit and the second display output circuit use SSD1306 chips. The SDA pin of the SSD1306 chip in the first display output circuit is connected to the PB7 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller, and the SCL pin of the SSD1306 chip in the first display output circuit is connected to the PB6 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller. The SDA pin of the SSD1306 chip in the second display output circuit is connected to the PB7 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller, and the SCL pin of the SSD1306 chip in the second display output circuit is connected to the PB6 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller.

[0023] In one embodiment, the first carrier communication circuit and the second carrier communication circuit use a PL3201 chip. The TX pin of the PL3201 chip in the first carrier communication circuit is connected to the PA9 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller, and the RX pin of the PL3201 chip in the first carrier communication circuit is connected to the PA10 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller. The TX pin of the PL3201 chip in the second carrier communication circuit is connected to the PA9 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller, and the RX pin of the PL3201 chip in the second carrier communication circuit is connected to the PA10 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller.

[0024] In one embodiment, the Bluetooth circuit uses a JDY-31 chip. The RXD pin of the JDY-31 chip is connected to the PA2 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller, and the TXD pin of the JDY-31 chip is connected to the PA3 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller.

[0025] The aforementioned smart meter detection device based on power line carrier communication can perform the functions of traditional meters, such as energy collection, display, and billing. It achieves both local and remote monitoring of energy information, and features low investment, high efficiency, flexible deployment, and strong scalability. Power line carrier communication-based meters not only greatly simplify the communication methods between smart meters and reduce wiring costs, but also facilitate the digitalization and centralized management of meter reading systems, increasing communication capacity. Attached Figure Description

[0026] Figure 1 This is a structural diagram of the smart meter side of a smart meter detection device based on power line carrier communication in one embodiment;

[0027] Figure 2 This is a gateway-side structural diagram of a smart meter based on power line carrier communication in one embodiment of a smart meter detection device.

[0028] Figure 3 This is a schematic diagram of the minimum system of the STM32F103CT86 microcontroller in one embodiment;

[0029] Figure 4 This is a circuit diagram of the peripheral circuit of HLW8110 and its interface circuit with STM32F103C8T6 in one embodiment;

[0030] Figure 5 This is a schematic diagram of a power module circuit in one embodiment;

[0031] Figure 6 This is a circuit diagram showing the interface between the keyboard input circuit and the STM32F103C8T6 in one embodiment;

[0032] Figure 7 This is a circuit diagram showing the interface between the keyboard module input circuit and the display output circuit and the STM32F103C8T6 in one embodiment.

[0033] Figure 8 This is a diagram showing the level changes of the internal command control bits SDA and SCL of the SSD1306 in the output circuit of one embodiment.

[0034] Figure 9 This is a circuit diagram of the transmitting end of a carrier communication circuit in one embodiment;

[0035] Figure 10 This is a circuit diagram of the receiving end of a carrier communication circuit in one embodiment;

[0036] Figure 11 This is a hardware connection diagram of Bluetooth circuit JDY-31 and STM32F103C8T6 in one embodiment;

[0037] Figure 12 This is a flowchart of the main program on the smart meter side of a smart meter detection device based on power line carrier communication in one embodiment.

[0038] Figure 13 This is a flowchart of the main program of the smart meter gateway side of a smart meter detection device based on power line carrier communication in one embodiment.

[0039] Figure 14 Here is a flowchart of a sampling procedure in one embodiment;

[0040] Figure 15 This is a flowchart of a measurement procedure sub-process in one embodiment;

[0041] Figure 16 This is a flowchart of a carrier communication transmission interruption procedure in one embodiment;

[0042] Figure 17 This is a flowchart of a carrier communication receive interrupt procedure in one embodiment;

[0043] Figure 18 Here is a flowchart of a keyboard scanning procedure in one embodiment;

[0044] Figure 19 A flowchart of the process design procedure is shown in one embodiment;

[0045] Figure 20 This is a schematic diagram of the transmitting end of a smart meter detection device based on power line carrier communication in one embodiment.

[0046] Figure 21 This is a schematic diagram of the receiving end of a smart meter detection device based on power line carrier communication in one embodiment. Detailed Implementation

[0047] To make the above-mentioned objects, features, and advantages of this utility model more apparent and understandable, the specific embodiments of this utility model will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a full understanding of this utility model. However, this utility model can be implemented in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of this utility model. Therefore, this utility model is not limited to the specific embodiments disclosed below.

[0048] In the description of this utility model, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this utility model and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this utility model.

[0049] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this utility model, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0050] In this utility model, unless otherwise explicitly specified and limited, the terms "installation," "connection," "joining," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this utility model according to the specific circumstances.

[0051] In this utility model, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "on top of," and "over" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.

[0052] In one exemplary embodiment, a smart meter detection device based on power line carrier communication includes a transmitter and a receiver. The transmitter is used to collect the voltage, current, and power of the smart meter to be detected, and the receiver is used to receive the voltage, current, and power of the smart meter to be detected and transmit them to a host computer. The transmitter includes:

[0053] The first power supply circuit is connected to the input terminal of the first microcontroller and is used to provide the power required for the operation of the first microcontroller.

[0054] The AC power acquisition circuit is connected to the input terminal of the first microcontroller and is used to detect the voltage, current and power of the smart meter under test.

[0055] The keyboard input circuit is connected to the input terminal of the first microcontroller and is used to input commands to control the smart meter detection device.

[0056] The first carrier communication circuit is connected to the output terminal of the first microcontroller and is used to realize remote communication between the transmitting end and the receiving end of the smart meter detection device based on power line carrier communication.

[0057] The first display output circuit is connected to the output terminal of the first microcontroller and is used to display the detected voltage, current and power according to the instructions of the keyboard input circuit.

[0058] The first microcontroller is used to connect and control the first power supply circuit, the AC power acquisition circuit, the keyboard input circuit, the first carrier communication circuit, and the first display output circuit.

[0059] Specifically, the hardware design of the smart meter in this application mainly includes the circuit design of the smart meter itself (i.e., the transmitter) and the smart meter gateway (i.e., the receiver), such as... Figure 1 As shown, the smart meter side (i.e., the transmitting end) includes a power supply circuit, a keyboard input circuit, a carrier communication circuit, and a display output circuit, etc.

[0060] In one exemplary embodiment, the receiving end of the smart meter detection device based on power line carrier communication includes:

[0061] The second carrier communication circuit is connected to the output of the second microcontroller and is used to realize remote communication between the transmitting end and the receiving end of the smart meter detection device based on power line carrier communication.

[0062] The second power supply circuit is connected to the input terminal of the second microcontroller and is used to provide the power required for the operation of the microcontroller.

[0063] The second display output circuit is connected to the output terminal of the second microcontroller and is used to display the detected voltage, current and power.

[0064] The Bluetooth circuit transmits data with the second microcontroller to transmit the voltage, current, and power collected by the smart meter detection device based on power line carrier communication to the host computer.

[0065] The second microcontroller is used to control and connect the second carrier communication circuit, the second display output circuit, the second power supply circuit, and the Bluetooth circuit.

[0066] Specifically, such as Figure 2 As shown, the gateway-side circuit (i.e., the receiver) includes various types of circuits, such as carrier communication circuits, power supply circuits, Bluetooth circuits, and display output circuits. The gateway circuit communicates with the host computer via Bluetooth.

[0067] In an exemplary embodiment, the first microcontroller and the second microcontroller include an STM32F103C8T6 microcontroller control chip and a microcontroller minimum system. The microcontroller minimum system includes a crystal oscillator circuit, a reset circuit, a BOOT selection circuit, and a filter circuit. The crystal oscillator circuit is used to provide a clock frequency to the STM32F103C8T6 microcontroller control chip. The reset circuit is used to return the terminal voltage allocated to the STM32F103C8T6 microcontroller control chip to zero. The BOOT selection circuit is used to select the startup mode of the STM32F103C8T6 microcontroller control chip. The filter circuit is used to filter out noise in the microcontroller minimum system through a capacitor.

[0068] The crystal oscillator circuit is connected to the PD1-OSC_OUT and PD0-OSC_IN pins of the STM32F103C8T6 microcontroller control chip. The reset circuit is connected to the NRST pin of the STM32F103C8T6 microcontroller control chip. The BOOT selection circuit is connected to the BOOT0 pin of the STM32F103C8T6 microcontroller control chip. The filter circuit is connected to the VDD_1, VSS_1, VDD_2, VSS_2, VDD_3, VSS_3, VDDA, and VSSA pins of the STM32F103C8T6 microcontroller control chip.

[0069] Specifically, such as Figure 3As shown, the microcontroller uses the STM32F103C8T6 chip, which employs an ARM Cortex-M3 core and boasts rich peripherals and communication interfaces. It is widely used in industrial automation, consumer electronics, and communication equipment. The VBAT pin in the STM32F103C8T6 chip is a backup power supply pin, providing power to both the internal RTC (Real-Time Clock) and backup registers. NRST is the reset pin. VSSA and VDDA represent the internal partial power supply and the external 3.3V voltage, respectively. PA0–PA15, PB0–PB15, PC13–PC15, PD0–PD2, PE0–PE5, and PF0–PF1 are general-purpose I / O pins, usable for input / output, external interrupts, analog input, etc. The working principle of the special pins of STM32F103C8T6 is as follows: PB2 is the BOOT1 pin, which is used to configure the boot mode. In this application, BOOT0 is set to 0 so that it can boot from the main flash memory. PA13 and PA14 are download and debug ports, which are generally not used as I / O ports.

[0070] Furthermore, the crystal oscillator circuit acts as a clock multiplier, providing the clock frequency for the microcontroller to operate, ensuring the smooth operation of the microcontroller's minimum system clock circuit. Notably, this circuit uses an 8MHz high-speed crystal oscillator, enabling the RC oscillator to reach a speed of 72MHz. The reset circuit employs a low-level reset method. When the reset button is pressed, the voltage at the NRTS pin of the microcontroller returns to zero, effectively grounding the system, resulting in a successful system reset. The BOOT selection circuit selects the boot mode of the STM32 microcontroller chip. BOOT0 is grounded via a 10K resistor to boot from the main flash memory. The filter circuit uses capacitors to filter out circuit noise and ambient noise.

[0071] In an exemplary embodiment, the AC power acquisition circuit uses the HLW8110 chip. The RX pin of the HLW8110 chip is connected to the PA2 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller, and the TX pin of the HLW8110 chip is connected to the PA3 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller.

[0072] Specifically, the HLW8110 includes two configurable pulse output pins, INT1 and INT2, which can be used to implement functions such as overcurrent, overvoltage, zero-crossing voltage or current detection, and leakage current detection. The HLW8110 can communicate via a UART interface. The TX pin is used to send data from the HLW8110, and the RX pin is used to receive data from the microcontroller. Its pin configuration and wiring are as follows... Figure 4 As shown, its RX pin is connected to the microcontroller's PA2 port for analog AC power input. The TX pin is connected to the microcontroller's PA3 port for analog AC power output, measuring AC voltage in the range of 0–311V. The HLW8110 module internally includes two high-precision Σ-Δ analog-to-digital conversion channels and a power metering circuit. Simultaneously, the STM32 microcontroller sends the voltage and current signals, after conditioning, to the ADC (Analog-to-Digital Converter) channel for conversion from analog to digital signals. During operation, three modes requiring three-phase voltage and current can be freely selected based on specific conditions. Therefore, a 6-channel ADC conversion is used, sampling every 1.25ms. At a power frequency of 50Hz, 16 signal sampling points are set for each voltage and current cycle.

[0073] In an exemplary embodiment, the first power supply circuit and the second power supply circuit adopt a voltage regulator AMS1117. The first power supply circuit is connected to the DIO pin and CLK pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller, and the second power supply circuit is connected to the DIO pin and CLK pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller.

[0074] Specifically, the power supply circuit (also known as the power module circuit) uses the AMS1117 voltage regulator. The AMS1117 is a low-leakage voltage regulator composed of PNP-driven NPN transistors. Two versions of the AMS1117 are available: a fixed output voltage version and an adjustable output voltage version. The fixed output voltage version offers the following voltage options: 1.2V, 1.5V, 1.8V, 2.5V, 2.85V, 3.0V, 3.3V, and 5.0V. The circuit's overheat protection function provides overload and overheat protection while preventing junction temperature rise due to excessively high ambient temperatures. To ensure the stability of the AMS1117, for the adjustable voltage version, at least a 22μF tantalum capacitor must be connected to the output terminal. Figure 5As shown, in the power module circuit design, the Vin pin is connected to the original power supply, typically 5V. After the voltage is reduced by the internal transistor circuit and current transformer, Vout outputs a 3.3V voltage to power the STM32F103C8T6 microcontroller. The GND pin of the AMS1117 is grounded to ensure circuit safety. Since this microcontroller only supports 3.3V power supply and not 5V, the circuit uses a step-down chip AMS1117 for voltage conversion. The converted 3.3V voltage powers the STM32F103C8T6 microcontroller. When designing the power module circuit, because the input and output voltages of the AMS1117 chip have harmonic components, capacitors are connected in parallel on both sides of the chip to filter out the harmonic components generated during the step-down process.

[0075] In one exemplary embodiment, the keyboard input circuit includes a billing price setting key and a query key. The billing price setting key is connected to the PA4 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller, and the query key is connected to the PA5 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller.

[0076] Specifically, all buttons on the electricity meter can be configured to allow users to check electricity consumption in real time, including voltage, current, real-time power consumption, and billing information. Therefore, the keypad input circuit includes a billing price setting key (KEY1) and a query key (KEY2). For example... Figure 6 The button group shown consists of buttons KEY1 and KEY2. When button KEY2 is pressed, the microcontroller pin receives an instruction, and the real-time detected power parameters appear on the OLED (Organic Light-Emitting Diode Display) screen for user viewing. When button KEY1 is pressed, the microcontroller pin receives an instruction to automatically adjust the electricity price per unit, thus estimating the cost.

[0077] In one exemplary embodiment, both the first display output circuit and the second display output circuit employ an SSD1306 chip. The SDA pin of the SSD1306 chip in the first display output circuit is connected to the PB7 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller, and the SCL pin of the SSD1306 chip in the first display output circuit is connected to the PB6 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller. Similarly, the SDA pin of the SSD1306 chip in the second display output circuit is connected to the PB7 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller, and the SCL pin of the SSD1306 chip in the second display output circuit is connected to the PB6 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller.

[0078] Specifically, such as Figure 7 As shown, the OLED display uses an SSD1306, which is directly connected to the PB6 and PB7 pins of the microcontroller. This enables serial data transmission without relying on a separate display driver chip, thus simplifying the circuit. This application uses the I2C interface of the display's MCU (Microcontroller Unit Functional Block). Its data transmission principle is as follows: During initial data communication, the host device establishes a startup condition by pulling SDA (Serial Data Analog) low and keeping SCL (Serial Clock Line) high. The startup condition is followed by the machine address. For the SSD1306, by changing SA0 to LOW or HIGH (D / C pin is SA0), the slave address can be "B0111100" or "B0111101"; R / W# is set to logic 0, thus establishing write mode. After receiving a byte of data, the slave address and r / w# bits determine the timing of the response signal. The acknowledge bit is defined as pulling the SDA line low during the high period of the clock pulse associated with the acknowledge bit. Control or data bytes are transmitted via SDA after transmitting the slave address. A control byte typically consists of six 0s followed by CO and D / C# bits. The acknowledge bit is immediately modified after each received control or data byte. Write mode ends after the stop condition is used. Stop condition: Pull SDA high while keeping SCL high. The level changes of the SSD1306 internal command control bits SDA and SCL are as follows: Figure 8 As shown.

[0079] In an exemplary embodiment, the first carrier communication circuit and the second carrier communication circuit use a PL3201 chip. The TX pin of the PL3201 chip in the first carrier communication circuit is connected to the PA9 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller, and the RX pin of the PL3201 chip in the first carrier communication circuit is connected to the PA10 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller. The TX pin of the PL3201 chip in the second carrier communication circuit is connected to the PA9 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller, and the RX pin of the PL3201 chip in the second carrier communication circuit is connected to the PA10 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller.

[0080] Specifically, power line carrier communication is a technology that uses power lines to transmit data. By superimposing communication signals onto the power signals of transmission lines, data can be transmitted within the power system without the need to lay separate communication lines. This design uses the PL3201 power line carrier communication chip, whose operating parameters are shown in Table 1.

[0081] Table 1

[0082]

[0083] The carrier signal is output through the chip's TX pin, amplified by a power amplifier circuit, filtered by a filter circuit, and finally coupled to the power line via a carrier coupling circuit. The received signal is first coupled to the receiving circuit via the carrier coupling circuit, where it undergoes bandpass filtering and attenuation before being input to the chip's RX pin. The chip mixes the received signal with its internal local oscillator signal to obtain a difference frequency signal. This mixed signal is then input to a filter for further filtering, and the filtered signal is sent back to the chip to restore the effective parameters. The internal power amplification and the cooperation of the receiving circuit mean that the entire communication process requires the chip to complete. The signal amplified by the carrier module contains various harmonics, which need to be filtered at the receiving end to reduce harmonic pollution to the power grid. The microcontroller's filter circuit is responsible for shaping and filtering the signal, and then coupling the filtered signal to the low-voltage power line protecting the entire circuit via a coupling coil. The transmitting end (first carrier communication circuit) of the carrier communication circuit is as follows: Figure 9 As shown. The receiving end of the carrier communication circuit (second carrier communication circuit) is as follows. Figure 10 As shown.

[0084] In one exemplary embodiment, such as Figure 11 As shown, the Bluetooth circuit uses the JDY-31 chip. The RXD pin of the JDY-31 chip is connected to the PA2 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller, and the TXD pin of the JDY-31 chip is connected to the PA3 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller.

[0085] Specifically, the JDY-31 Bluetooth circuit uses a Bluetooth serial port design, and the cloud platform software is already built, making it convenient and quick to use. This Bluetooth circuit supports data transmission from Microsoft and Android devices, operates at a frequency of 2.4GHz, uses GFSK (Gaussian Frequency Shift Keying) modulation, and has a maximum transmit power of 8dB. Users can modify device names, port speeds, and other settings via AT commands, making it easy and quick to use. The functions of this Bluetooth circuit include: supporting the Bluetooth SPP serial port protocol; having a built-in PCB antenna; supporting a UART interface; supporting connection to the main Bluetooth circuit via the SPP Bluetooth protocol; and supporting SPP (Serial Port Profile) communication with Android phones. In this module circuit, the Bluetooth chip's TXD pin is responsible for serial port output, connecting to the STM32 microcontroller's PA3 pin, and the RXD pin is responsible for serial port input, also connecting to the STM32 microcontroller's PA3 pin, thus completing data reception, transmission, and data transfer. The specific working principle of the Bluetooth circuit is as follows: Initialization: After the microcontroller is powered on, the JDY-31 Bluetooth circuit will automatically initialize; Broadcast: After Bluetooth is enabled, the JDY-31 module will periodically send Bluetooth signals to surrounding devices to inform them that the device has been found; Scanning: When a Bluetooth-enabled device is in search mode, it can scan the broadcast packets sent by the JDY-31 module to obtain relevant information about the module; Connection: When a Bluetooth-enabled device initiates a connection request, the JDY-31 module will accept the request and establish a connection; Interoperability: After establishing a connection with a Bluetooth device, the JDY-31 module can realize bidirectional data transmission for various applications.

[0086] In one exemplary embodiment, by Figure 12 It can be seen that the design concept of the main program on the smart energy meter side is as follows: the program first initializes the system clock, then initializes the timer and serial port, and at this time, the microcontroller's timer refresh time is set to 1 second. When 1 second has elapsed, an energy acquisition command is sent once per second, followed by the energy meter's response to the acquisition, and then the data is transmitted to the HLW8110 AC metering chip for acquisition, and then sent through the carrier chip; if 1 second has not elapsed, the program waits for the timer to arrive. Figure 13 As can be seen, the design concept of the gateway-side main program is as follows: After the system powers on, it first initializes the system, sets the microcontroller's timed refresh interval to 100ms, and processes and saves the data when the interval expires; it also sets the display screen's timed refresh interval, refreshing the screen once when the refresh time expires; if the refresh time has not expired, it automatically enters the key input judgment stage; if a key is pressed, the system will perform the corresponding function, such as switching options or setting the billing price. Finally, all power parameters are sent to the Bluetooth circuit to achieve communication with the host computer.

[0087] In an exemplary embodiment, the system operation requires initialization, that is, each module is "reset" to avoid affecting the sampling and transmission of subsequent power data. The modules that need to be initialized are: (1) clock configuration and timer initialization program; (2) ADC and GPIO (General-Purpose Input / Output) initialization subroutine; (3) display initialization program; and (4) keyboard initialization.

[0088] In one exemplary embodiment, the sampling subroutine software design employs six channels. After adjusting the hardware circuitry, the signals are sent to the A / D converter port for processing. During program execution, the A / D converter acquires signals by selecting an interrupt subroutine call. In this subroutine, data sampling occurs in cycles of 16 sets. Whenever the latest set of data is acquired, the oldest data in the array is replaced with this set. This ensures that the data used is the most recent 16 sets of sample data. Ultimately, the author completed the sampling of six signals using the above program flow. The design process is as follows: Figure 14 As shown, clear the interrupt flag bit and then sample the ADC signal.

[0089] In an exemplary embodiment, the software design of the metering subroutine includes: sending a series of discrete current and voltage digital sequences, after passing through a conditioning circuit to obtain a conditioning signal, into an A / D conversion interface, and then processing it according to the following algorithm to obtain the actual measured value. In this embodiment, the voltage circuit uses a resistor divider network method. The voltage digital sequence obtained through A / D conversion is the voltage divider signal U, where T is the period and t is time. The effective value of the voltage within one period is equal to its root mean square value, which can be expressed by the following formula:

[0090]

[0091] Where u is the instantaneous voltage, which is discretized to obtain the following formula:

[0092]

[0093] In the equation, T n Indicates a time interval, u n Let N represent the instantaneous voltage value at the nth point, and N represent the total number of points within the range. According to N = t / t n The following formula is derived, assuming that u is calculated by t. n Keep it unchanged and set its value to t. n And due to ΔT n Since the value is very small, meaning the time interval is extremely short, we can assume that the voltage changes negligibly within the calculation time, i.e., it remains constant. The following formula can then be derived:

[0094]

[0095] This yields the effective value of the voltage. Similarly, the formula for the effective value of the current I can be obtained as follows:

[0096]

[0097] Where i n This represents the instantaneous current value at the nth point.

[0098] Furthermore, power measurement involves multiplying the voltage and current to obtain the result, which is the method for calculating power. For a single-phase circuit, the power calculation is as follows:

[0099]

[0100] Where P represents power, the formula for calculating the total active power of the three phases is:

[0101]

[0102] Where i an i represents the instantaneous current value at the nth point of phase a. bn i represents the instantaneous current value at the nth point of phase b. cn This represents the instantaneous current value at the nth point of phase c; u an U represents the instantaneous voltage value at the nth point of phase a. bn U represents the instantaneous voltage value at the nth point of phase b. cn This represents the instantaneous voltage value at the nth point of phase c, where N is the total number of sampling points. Both voltage and current sampling are performed at the same time.

[0103] After undergoing conditioning, the voltage and current signals are sent to the ADC conversion channel, where the analog signals are converted into digital signals. In this design, a six-channel ADC conversion channel with a sampling interval of 1.25ms is required to acquire the three-phase voltage and current. At a power frequency of 50Hz, 16 signal sampling points are needed for each voltage and current cycle. If the ADC reference voltage is +3.3V, the relationship between the analog signal and the converted digital signal can be expressed by the following formula:

[0104]

[0105] Where D is the digital signal, A is the analog signal value, Vref+ represents the positive reference voltage, which is usually chosen as +3.3V, and Vref- represents the negative reference voltage, which is usually chosen as 0V. Substituting the known parameter values, the conversion factor can be obtained as 3.3 / 4095 = 0.667.

[0106] Furthermore, the metering algorithm programming, including the aforementioned metering algorithms, mainly involves calculating the digital signals acquired and converted by the ADC, which requires program writing. The metering algorithm design program to obtain valid measurement values, the required displayed voltage and current values, and power consumption is as follows: Figure 15 As shown, determine if the counter is less than 16. If it is, calculate the power by squaring the voltage, squaring the current, summing the squares, taking the square root of the voltage, and taking the square root of the current.

[0107] In an exemplary embodiment, the software design of the carrier communication subroutine includes: a PL3201 carrier communication unit using QPSK modulation supports multi-address communication technology and can dynamically adjust the rate and bandwidth of the pseudo-random code. The transmitted information is extended across a wide bandwidth at the receiving end using a pseudo-random code sequence, while the received and restored information uses the same pseudo-random code sequence at the receiving end. To improve CPU (Central Processing Unit) efficiency, this design uses interrupt handling for each interrupt triggered when processing 1-byte data reception or transmission tasks. At the transmitting end, after the hardware is set to transmit state, it first sends a complete 40-cycle pseudo-code sequence of "1"s to synchronize the pseudo-random code between the receiving and transmitting ends. Then, the hardware automatically sends a frame header sequence, followed by a data body. Figure 16 The diagram shows a carrier communication transmission interrupt procedure. Upon entering the transmission interrupt routine, it checks if the system is in a transmission state, then checks if the transmission enable flag is enabled. If not, it continues checking; if enabled, it fills in one byte of data and checks if the data area has been completely transmitted. If not, it continues checking; if enabled, it clears the transmission flag, clears the transmission buffer, and sets the carrier transmission completion flag. At the receiving end, the hardware circuitry within the SOC (System on Chip) fully implements the spread spectrum and despreading operations for carrier communication. The receiving end receives the synchronization frame header of the carrier communication via a sliding window method. The acquisition and synchronization process is automatically completed by the hardware circuitry of the carrier communication control unit, processed via interrupts. An interrupt service routine is triggered once for each byte of data received, indicating successful frame header reception. Figure 17This diagram shows the carrier communication block diagram of the receive interrupt routine. Upon entering the receive interrupt routine, it checks if it's in receive mode, receives one byte of data, checks if the address flag is 1, and if so, receives subsequent bytes sequentially. It then checks if all bytes have been received; if so, the carrier reception is resynchronized, the carrier reception success flag is set, and the main program finishes receiving data. It then checks if the address flag is 1; if not, it checks if all addresses have been received. If so, the address flag is set; otherwise, it returns. The carrier module is typically set to receive mode because carrier communication uses a bus. Different communication addresses are assigned to different carrier modules. When a carrier module receives a data frame, address identification is the first step. If the addresses match, the communication process proceeds according to the agreed-upon response, thus completing the process.

[0108] In one exemplary embodiment, such as Figure 18 As shown, the keyboard processing program for the energy meter uses a scanning method. It calls a program with a 12ms delay to check if a key is pressed. If not, it returns. If a key is pressed, it checks the key's value, releases the key, and checks if a key is pressed again. If not, it continues pressing and releasing keys. If a key is pressed, it checks if the key value is sent to register A. If so, it calls a program with a 12ms delay; otherwise, it performs the corresponding function. The program checks the "key pressed" event in the main program, looping through the main program. When a key is pressed, the program performs the following: a software delay is applied, and then the keyboard state is rechecked. If a key is still pressed, it is considered a valid key press; otherwise, key bounce is handled. By scanning, the value of a pressed button can be obtained. Each time a key is pressed, the key function operation is performed only once. For functions requiring multiple key combinations, the obtained key values ​​are added together and sent to register A before performing the corresponding function.

[0109] In one exemplary embodiment, such as Figure 19 As shown, the display processing program corresponds to the two buttons in the display module. The program first initializes the system clock, then initializes the GPIO ports of the SSD1306 display module chip and the OLED. Next, it checks if any buttons are pressed. If a button is pressed, the program displays the billing amount to be modified on the screen, and the user can continue to press the button to set the amount. In addition, the display can receive signals containing voltage, current, and power consumption parameters from the carrier communication circuit and display them on the screen.

[0110] In an exemplary embodiment, the overall schematic diagram of the transmitter of the electricity meter (a smart meter detection device based on power line carrier communication) is as follows: Figure 20 As shown, the overall schematic diagram of the electricity meter receiver is as follows: Figure 21 As shown.

[0111] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0112] The embodiments described above are merely illustrative of several implementations of this utility model, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the utility model patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this utility model, and these all fall within the protection scope of this utility model. Therefore, the protection scope of this utility model patent should be determined by the appended claims.

Claims

1. A smart meter detection device based on power line carrier communication, characterized in that, The device includes a transmitter and a receiver. The transmitter collects the voltage, current, and power of the smart meter under test and sends them to the receiver. The receiver receives the voltage, current, and power of the smart meter under test and transmits them to a host computer. The transmitter includes: The first power supply circuit is connected to the input terminal of the first microcontroller and is used to provide the power required for the operation of the first microcontroller. The AC power acquisition circuit is connected to the input terminal of the first microcontroller and is used to detect the voltage, current and power of the smart meter under test. The keyboard input circuit is connected to the input terminal of the first microcontroller and is used to input commands to control the smart meter detection device. The first carrier communication circuit is connected to the output terminal of the first microcontroller and is used to realize remote communication between the transmitting end and the receiving end of the smart meter detection device based on power line carrier communication. The first display output circuit is connected to the output terminal of the first microcontroller and is used to display the detected voltage, current and power according to the instructions of the keyboard input circuit. The first microcontroller is used to connect and control the first power supply circuit, the AC power acquisition circuit, the keyboard input circuit, the first carrier communication circuit, and the first display output circuit.

2. The smart meter detection device based on power line carrier communication according to claim 1, characterized in that, The receiving end of the smart meter detection device based on power line carrier communication includes: The second carrier communication circuit is connected to the output of the second microcontroller and is used to realize remote communication between the transmitting end and the receiving end of the smart meter detection device based on power line carrier communication. The second power supply circuit is connected to the input terminal of the second microcontroller and is used to provide the power required for the operation of the second microcontroller. The second display output circuit is connected to the output terminal of the second microcontroller and is used to display the detected voltage, current and power. The Bluetooth circuit transmits data with the second microcontroller to transmit the voltage, current, and power collected by the smart meter detection device based on power line carrier communication to the host computer. The second microcontroller is used to control and connect the second carrier communication circuit, the second display output circuit, the second power supply circuit, and the Bluetooth circuit.

3. The smart meter detection device based on power line carrier communication according to claim 2, characterized in that, Both the first and second microcontrollers include an STM32F103C8T6 microcontroller control chip and a microcontroller minimum system. The microcontroller minimum system includes a crystal oscillator circuit, a reset circuit, a BOOT selection circuit, and a filter circuit. The crystal oscillator circuit provides a clock frequency to the STM32F103C8T6 microcontroller control chip. The reset circuit returns the terminal voltage allocated to the STM32F103C8T6 microcontroller control chip to zero. The BOOT selection circuit selects the startup mode of the STM32F103C8T6 microcontroller control chip. The filter circuit filters out noise in the microcontroller minimum system through a capacitor. The crystal oscillator circuit is connected to the PD1-OSC_OUT and PD0-OSC_IN pins of the STM32F103C8T6 microcontroller control chip. The reset circuit is connected to the NRST pin of the STM32F103C8T6 microcontroller control chip. The BOOT selection circuit is connected to the BOOT0 pin of the STM32F103C8T6 microcontroller control chip. The filter circuit is connected to the VDD_1, VSS_1, VDD_2, VSS_2, VDD_3, VSS_3, VDDA, and VSSA pins of the STM32F103C8T6 microcontroller control chip.

4. The smart meter detection device based on power line carrier communication according to claim 2, characterized in that, The AC power acquisition circuit uses the HLW8110 chip. The RX pin of the HLW8110 chip is connected to the PA2 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller, and the TX pin of the HLW8110 chip is connected to the PA3 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller.

5. A smart meter detection device based on power line carrier communication according to claim 2, characterized in that, Both the first power supply circuit and the second power supply circuit use an AMS1117 voltage regulator. The first power supply circuit is connected to the DIO pin and CLK pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller, and the second power supply circuit is connected to the DIO pin and CLK pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller.

6. The smart meter detection device based on power line carrier communication according to claim 2, characterized in that, The keyboard input circuit includes a billing price setting key and a query key. The billing price setting key is connected to the PA4 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller, and the query key is connected to the PA5 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller.

7. A smart meter detection device based on power line carrier communication according to claim 2, characterized in that, Both the first display output circuit and the second display output circuit use SSD1306 chips. The SDA pin of the SSD1306 chip in the first display output circuit is connected to the PB7 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller, and the SCL pin of the SSD1306 chip in the first display output circuit is connected to the PB6 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller. The SDA pin of the SSD1306 chip in the second display output circuit is connected to the PB7 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller, and the SCL pin of the SSD1306 chip in the second display output circuit is connected to the PB6 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller.

8. A smart meter detection device based on power line carrier communication according to claim 2, characterized in that, Both the first carrier communication circuit and the second carrier communication circuit use the PL3201 chip. The TX pin of the PL3201 chip in the first carrier communication circuit is connected to the PA9 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller, and the RX pin of the PL3201 chip in the first carrier communication circuit is connected to the PA10 pin of the STM32F103C8T6 microcontroller control chip of the first microcontroller. The TX pin of the PL3201 chip in the second carrier communication circuit is connected to the PA9 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller, and the RX pin of the PL3201 chip in the second carrier communication circuit is connected to the PA10 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller.

9. A smart meter detection device based on power line carrier communication according to claim 2, characterized in that, The Bluetooth circuit uses a JDY-31 chip. The RXD pin of the JDY-31 chip is connected to the PA2 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller, and the TXD pin of the JDY-31 chip is connected to the PA3 pin of the STM32F103C8T6 microcontroller control chip of the second microcontroller.