An energy meter with a data encryption transmission circuit
By using hardware-level encryption chips and independent protection circuit design, the problems of data transmission in electricity meters being vulnerable to attacks and circuits being susceptible to interference have been solved, achieving high security and high reliability in electricity meter operation, and improving anti-interference capabilities and compatibility with applicable scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- HANGZHOU HUALONG ELECTRONIC TECH CO LTD
- Filing Date
- 2025-06-18
- Publication Date
- 2026-06-30
AI Technical Summary
Existing electricity meter data transmission is vulnerable to malicious attacks, communication modules lack hardware protection, circuits are susceptible to surge impacts and signal interference, trip control modules lack electrical isolation, and power supply stability monitoring is insufficient, all of which affect operational reliability.
The entire process is encrypted using a hardware-level encryption chip, a hardware random number generator, an encryption engine, and a key storage area. It is equipped with independent protection circuits, optocoupler isolation and RC absorption circuits to achieve strong and weak current isolation, and voltage detection chip and watchdog circuit to monitor power status in conjunction, forming a complete system that integrates encrypted transmission, anti-interference, anti-malfunction, and power monitoring.
It significantly improves the data security, communication stability, and operational reliability of electricity meters, as well as their anti-interference capabilities and compatibility with applicable scenarios, while reducing the risk of malfunctions and failure rates.
Smart Images

Figure CN224436440U_ABST
Abstract
Description
Technical Field
[0001] This utility model belongs to the field of electricity meter technology and relates to an electricity meter with a data encryption transmission circuit. Background Technology
[0002] With the ongoing development of smart grids, electricity meters, as core terminals for power data collection and transmission, face severe challenges in data security and circuit stability. Existing electricity meter data transmission generally employs software encryption, making it vulnerable to malicious attacks that could lead to data leakage or tampering. Furthermore, the lack of robust hardware protection mechanisms in communication modules makes them susceptible to communication failures or circuit damage under surge impacts and signal interference. Simultaneously, traditional electricity meter modules such as trip control and pulse output lack effective electrical isolation, potentially leading to malfunctions due to strong electrical interference. In addition, the absence of a power stability monitoring mechanism prevents the main control module from resetting promptly in case of voltage anomalies, impacting overall operational reliability. To address these issues, a novel electricity meter circuit design is needed, featuring hardware-level encrypted transmission, multi-module protection, and intelligent power monitoring to meet the higher requirements of smart grids for data security, equipment stability, and anti-interference capabilities. Summary of the Invention
[0003] To address the problems existing in the background technology, this utility model proposes an energy meter with a data encryption transmission circuit.
[0004] To achieve the above objectives, the technical solution adopted by this utility model is as follows: an energy meter with a data encryption transmission circuit, characterized in that it includes: a microprocessor MCU, a metering module, an encryption chip, a carrier communication module, an infrared module, a 4G communication module, an RS485 module, a trip control module, a pulse output module, and a power detection module;
[0005] The microprocessor (MCU) is connected to the metering module, encryption chip, carrier communication module, infrared module, 4G communication module, RS485 module, trip control module, pulse output module, and power detection module, respectively.
[0006] The carrier communication module includes: resistor R2, resistor R1, carrier communication chip, resistor R3, power amplifier, resistor R4, comparator 1, inductor L1, coupling transformer, capacitor C3, and varistor RV1;
[0007] The UART1_RX pin of the microprocessor MCU is connected to the TXD pin of the carrier communication chip through a series resistor R2. The UART1_TX pin of the microprocessor MCU is connected to the RXD pin of the carrier communication chip through a series resistor R1 and one end of a resistor R3. The other end of a resistor R3 is connected to the input terminal of the power amplifier. The output terminal of the power amplifier is connected to the primary coil of the coupling transformer through a series inductor L1. The secondary coil of the coupling transformer is connected in parallel with a capacitor C3 and a varistor RV1. One end of capacitor C3 and one end of varistor RV1 are connected to the non-inverting input terminal of comparator 1 and ground. The inverting input terminal of comparator 1 is connected to the reference voltage. The output terminal of comparator 1 is connected to the feedback terminal of the power amplifier through a series resistor R4.
[0008] The trip control module includes: optocoupler OC1, resistor R5, transistor Q1, relay K1, resistor R6, capacitor C4, and diode D1;
[0009] The GPIO1 pin of the microprocessor MCU is connected to the optocoupler OC1. The collector of the optocoupler OC1 is connected to the base of the transistor Q1 through a series resistor R5. The emitter of the transistor Q1 is connected to ground. The collector of the transistor Q1 is connected to one end of the coil of the relay K1. The other end of the coil of the relay K1 is connected to the +12V power supply. The two ends of the relay K1 contact are connected in parallel with a resistor R6, a capacitor C4, and a diode D1.
[0010] The pulse output module includes: optocoupler OC2, resistor R7, resistor R8, reference voltage source REF1, comparator 2, and resistor R9;
[0011] The GPIO2 pin of the microprocessor MCU is connected to the cathode of optocoupler OC2. The anode of optocoupler OC2 is connected to the +5V power supply through series resistor R7. The emitter of optocoupler OC2 is grounded. The collector of optocoupler OC2 is connected to the non-inverting input of comparator 2 through series resistor R8. The inverting input of comparator 2 is connected to the reference voltage source REF1. The output of comparator 2 is connected to an external device through series resistor R9.
[0012] The RS485 module includes: a differential chip, resistor R10, transient suppressor TVS1, resistor R11, fuse F1, fuse F2, and resistor R12.
[0013] The UART4_TX pin of the microprocessor MCU is connected to the DI pin of the differential chip, the UART4_RX pin of the microprocessor MCU is connected to the RO pin of the differential chip, and the common terminal of the RE and DE pins of the differential chip is connected to the GPIO4 pin of the microprocessor MCU. The A line of the differential chip is connected to one end of fuse F1 and one end of resistor R11. The other end of resistor R11 is connected to the +3.3V power supply, and the other end of fuse F1 is connected to an external device. The B line of the differential chip is connected to one end of fuse F2 and one end of resistor R12. The other end of resistor R12 is connected to ground, and the other end of fuse F2 is connected to an external device. Resistor R10 and transient suppressor TVS1 are connected in parallel between the A line and the B line of the differential chip.
[0014] The encryption chip includes: encryption logic control, key storage area EEPROM, key management unit, encryption engine AES1, data selector MUX, and hardware random number generator RNG;
[0015] The encryption engine AES1 includes a key register and a microprocessor MCU's I / O pin. 2 The C interface connects to the encryption chip. 2 The C-bus connects the encryption logic control to the key storage area EEPROM, the key storage area EEPROM to the key management unit, the key management unit to the encryption engine AES1, the encryption engine AES1 to the data selector MUX, and the data selector MUX to the hardware random number generator RNG.
[0016] The data selector MUX is configured to selectively inject random numbers generated by the hardware random number generator RNG into the data transmission path of the carrier communication module, 4G communication module, or RS485 module via the microcontroller MCU, depending on the communication protocol type.
[0017] The power detection module includes: resistor R13, resistor R14, voltage detection chip, diode D2, and watchdog circuit;
[0018] A +3.3V power supply is connected to one end of resistor R13 and one end of resistor R14. The other ends of resistor R13 and R14 are connected to the VIN pin of the voltage detection chip. The OUT pin of the voltage detection chip is connected to the positive terminal of diode D2 and the RST pin of the watchdog circuit. The negative terminal of diode D2 is connected to the RESET pin of the microprocessor MCU. The GPIO3 pin of the microprocessor MCU is connected to the WDI pin of the watchdog circuit.
[0019] The voltage detection chip and watchdog circuit work together. When an abnormal voltage is detected or the program crashes, the watchdog is reset first without affecting the key storage area EEPROM of the encryption chip.
[0020] Compared with existing technologies, this utility model has the following advantages: This utility model constructs a data security barrier through a hardware-level encryption chip, utilizing a hardware random number generator, encryption engine, and key storage area to achieve end-to-end encryption of data transmission, significantly improving anti-cracking capabilities compared to traditional software encryption; each communication module is equipped with an independent protection circuit, effectively resisting surge impacts and signal interference, ensuring communication stability; the trip control module uses optocoupler isolation and RC absorption circuits, combined with transient suppression diodes, to achieve safe isolation between high and low voltage, avoiding the risk of malfunction; the power monitoring module, through voltage detection chip and watchdog circuit linkage, monitors the power status in real time and triggers the main control module reset, ensuring rapid system recovery in case of voltage abnormalities; the entire solution, through modular design and hardware-level protection mechanisms, forms a complete system integrating encrypted transmission, anti-interference, anti-malfunction, and power monitoring, significantly improving the safety, reliability, and compatibility of the electricity meter across various application scenarios. Attached Figure Description
[0021] Figure 1 This is a main block diagram of a power meter circuit with a data encryption transmission circuit according to the present invention.
[0022] Figure 2 This is a circuit connection diagram of the carrier communication module of this utility model;
[0023] Figure 3 This is the circuit connection diagram of the trip control module of this utility model;
[0024] Figure 4 This is the circuit connection diagram of the pulse output module of this utility model;
[0025] Figure 5 This is the circuit connection diagram of the RS485 module of this utility model;
[0026] Figure 6 This is a circuit connection diagram of the encryption chip of this utility model;
[0027] Figure 7 This is the circuit connection diagram of the power detection module of this utility model. Detailed Implementation
[0028] The technical solutions of the present utility model will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present utility model, and not all embodiments. Based on the embodiments of the present utility model, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present utility model.
[0029] like Figures 1-7As shown, the technical solution adopted by this utility model is as follows: an energy meter with a data encryption transmission circuit includes: a microprocessor MCU, a metering module, an encryption chip, a carrier communication module, an infrared module, a 4G communication module, an RS485 module, a trip control module, a pulse output module, and a power detection module.
[0030] The microprocessor (MCU) is connected to the metering module, encryption chip, carrier communication module, infrared module, 4G communication module, RS485 module, trip control module, pulse output module, and power detection module, respectively.
[0031] The microprocessor MCU's SPI interface is connected to the metering module's SPI bus, and the microprocessor MCU's I... 2 The C interface connects to the encryption chip. 2 The C-bus connects the UART1_TX pin of the microprocessor MCU to the RXD pin of the carrier communication module, the UART2_TX pin of the microprocessor MCU to the IR_TX pin of the infrared module, the UART2_RX pin of the microprocessor MCU to the IR_RX pin of the infrared module, the UART3_TX pin of the microprocessor MCU to the DATA_IN pin of the 4G communication module, and the UART3_RX pin of the microprocessor MCU to the DATA_OUT pin of the 4G communication module. The UART4_TX pin of the microprocessor MCU connects to the A / B differential line of the RS485 module, the GPIO1 pin of the microprocessor MCU connects to the TRIP_CTRL pin of the trip control module, and the GPIO2 pin of the microprocessor MCU connects to the PULSE_OUT pin of the pulse output module.
[0032] The microcontroller MCU is an STM32F103 series microcontroller with a 72MHz clock frequency and 128KB Flash and 20KB RAM. As the system core, it coordinates the work of various modules, acquires metering data via the SPI interface, and processes it through I... 2 The C-controller is an encryption chip that uses UART to achieve multi-channel communication and outputs GPIO signals to control the trip and pulse modules.
[0033] The metering module uses the ATT7022E dedicated metering chip, which collects analog signals through a voltage divider resistor network and a current transformer. The signals are then converted into digital quantities by the internal ADC to calculate active / reactive power, effective voltage value, etc. The data is transmitted to the microprocessor MCU via the SPI bus.
[0034] The infrared module enables short-range wireless data transmission. It uses an HX1838 infrared receiver and a TSAL6200 infrared transmitter. The UART signal of the microprocessor (MCU) is modulated and transmitted through the transmitter. The receiver demodulates the signal and restores it to a digital signal.
[0035] The 4G communication module enables remote wireless data transmission using the SIM800C module. The main control module sends AT commands via UART3 to control the module. Data is capacitively coupled and then enters the module's DATA_IN / DATA_OUT pins to achieve data interaction with the base station. The 4G communication module has a built-in watchdog timer that automatically restarts when communication is interrupted, reducing the call drop rate to below 0.1%.
[0036] The carrier communication module includes: resistor R2, resistor R1, carrier communication chip, resistor R3, power amplifier, resistor R4, comparator 1, inductor L1, coupling transformer, capacitor C3, and varistor RV1.
[0037] The UART1_RX pin of the microprocessor MCU is connected to the TXD pin of the carrier communication chip through a series resistor R2. The UART1_TX pin of the microprocessor MCU is connected to the RXD pin of the carrier communication chip through a series resistor R1 and one end of a resistor R3. The other end of a resistor R3 is connected to the input terminal of the power amplifier. The output terminal of the power amplifier is connected to the primary coil of the coupling transformer through a series inductor L1. The secondary coil of the coupling transformer is connected in parallel with a capacitor C3 and a varistor RV1. One end of capacitor C3 and one end of varistor RV1 are connected to the non-inverting input terminal of comparator 1 and ground. The inverting input terminal of comparator 1 is connected to the reference voltage. The output terminal of comparator 1 is connected to the feedback terminal of the power amplifier through a series resistor R4.
[0038] The carrier communication module transmits data via power lines.
[0039] The coupling transformer is model CT-102 with a turns ratio of 1:10, which realizes the isolation coupling between the signal and the power line.
[0040] The power amplifier is model PA85 with a gain of 40dB, and the drive signal is transmitted on the power line.
[0041] Comparator 1 uses the LM393 to perform signal shaping.
[0042] The UART serial digital signal output by the microprocessor (MCU) is first connected to the input of the power amplifier via resistor R3. Resistor R3 serves to limit current and match impedance, preventing excessive signal amplitude from damaging the power amplifier and ensuring that the output impedance of the UART signal from the MCU matches the input impedance of the power amplifier, guaranteeing efficient signal transmission. The power amplifier amplifies the weak UART signal, enhancing its driving capability and enabling long-distance transmission over the power line. The amplified signal is then coupled into the power line through the primary coil of a coupling transformer. The coupling transformer serves a dual purpose: electrical isolation and signal coupling. On one hand, it prevents high-voltage backflow from the power line into the MCU circuitry, ensuring the safety of the low-voltage control circuitry; on the other hand, it couples the amplified signal onto the power line medium through electromagnetic induction, enabling signal transmission over the power line.
[0043] When receiving a signal, the high-frequency signal carrying data on the power line is stepped down by the secondary coil of the coupling transformer, converting the high-voltage signal into a low-voltage signal suitable for subsequent circuit processing. This prevents the high-voltage signal from directly entering the receiving circuit and damaging components. The stepped-down signal then passes through a filter circuit composed of capacitor C3. Capacitor C3 utilizes its characteristics to filter out the DC component and low-frequency noise in the signal, retaining the valid high-frequency data signal. The signal filtered by capacitor C3 then enters a comparator for shaping. The comparator compares the irregular analog signal waveform with a preset threshold voltage, converting it into a standard digital signal, which is finally output to the microprocessor (MCU) for analysis, thus completing the entire signal transmission and reception process of power line carrier communication. This process, through multi-level signal conditioning and protection mechanisms, ensures the reliability, anti-interference capability, and security of power line carrier communication.
[0044] The trip control module includes: optocoupler OC1, resistor R5, transistor Q1, relay K1, resistor R6, capacitor C4, and diode D1.
[0045] The GPIO1 pin of the microprocessor MCU is connected to the optocoupler OC1. The collector of the optocoupler OC1 is connected to the base of the transistor Q1 through a series resistor R5. The emitter of the transistor Q1 is connected to ground. The collector of the transistor Q1 is connected to one end of the coil of the relay K1. The other end of the coil of the relay K1 is connected to the +12V power supply. The two ends of the relay K1 contact are connected in parallel with a resistor R6, a capacitor C4, and a diode D1.
[0046] The relay K1 is model G5LE-14 with a contact capacity of 10A / 250VAC.
[0047] The driving transistor Q1 is model S8050 with a β value ≥100.
[0048] The resistor R6 = 100Ω and the capacitor C4 = 0.1μF are used to absorb the back electromotive force when the relay coil is de-energized.
[0049] When the GPIO1 pin of the microprocessor MCU outputs a high level, the internal LED of the optocoupler OC1 is turned on and emits light, which turns on the phototransistor inside the optocoupler. This pulls down the base level of the driving transistor Q1, causing transistor Q1 to saturate and conduct. The coil of relay K1 is energized and generates electromagnetic attraction, closing the contacts to achieve the circuit breaker closing.
[0050] When the GPIO1 output of the microprocessor MCU is low, the optocoupler OC1 is cut off, the base of transistor Q1 loses its driving voltage and is cut off, the coil of relay K1 is de-energized, and the contacts open. During this process, the resistor R6 and capacitor C4 connected in parallel across the contacts of relay K1 absorb the back electromotive force generated when the coil is de-energized, and the transient suppression diode D1 further suppresses the surge voltage. The optocoupler OC1 achieves electrical isolation between the weak current signal of the microprocessor MCU and the strong current circuit of the relay, ensuring safe and reliable control and avoiding malfunctions caused by strong current interference.
[0051] The pulse output module includes: optocoupler OC2, resistor R7, resistor R8, reference voltage source REF1, comparator 2, and resistor R9.
[0052] The GPIO2 pin of the microprocessor MCU is connected to the cathode of optocoupler OC2. The anode of optocoupler OC2 is connected to the +5V power supply through series resistor R7. The emitter of optocoupler OC2 is grounded. The collector of optocoupler OC2 is connected to the non-inverting input of comparator 2 through series resistor R8. The inverting input of comparator 2 is connected to the reference voltage source REF1. The output of comparator 2 is connected to an external device through series resistor R9.
[0053] The optocoupler OC2 uses model PC817 to achieve electrical isolation.
[0054] Comparator 2 uses model LM339, and the threshold voltage is set by reference voltage source REF1.
[0055] The GPIO2 pin of the microprocessor (MCU) outputs a pulse signal, which is connected to the cathode of optocoupler OC2. The anode of optocoupler OC2 is connected to a +5V power supply via resistor R7, forming a drive circuit. When the GPIO2 pin of the MCU outputs a high level, the internal LED of optocoupler OC2 conducts, causing the phototransistor on the collector side to conduct. The collector potential is pulled low through resistor R8 and input to the non-inverting input of comparator 2. The inverting input of the comparator is connected to a reference voltage source REF1 to set a threshold voltage. When the potential at the non-inverting input is lower than that at the inverting input, the comparator outputs a low level; otherwise, it outputs a high level, thus shaping the pulse signal into a standard square wave. The shaped signal is then current-limited by resistor R9 to form the PULSE_OUT pulse output, used for metering and calibration of external devices such as electricity meters. The optocoupler provides electrical isolation between strong and weak currents, while the comparator ensures the edge steepness and amplitude stability of the pulse signal.
[0056] The RS485 module includes: a differential chip, resistor R10, transient suppressor TVS1, resistor R11, fuse F1, fuse F2, and resistor R12.
[0057] The UART4_TX pin of the microprocessor MCU is connected to the DI pin of the differential chip, the UART4_RX pin of the microprocessor MCU is connected to the RO pin of the differential chip, and the common terminal of the RE and DE pins of the differential chip is connected to the GPIO4 pin of the microprocessor MCU. The A line of the differential chip is connected to one end of fuse F1 and one end of resistor R11. The other end of resistor R11 is connected to the +3.3V power supply, and the other end of fuse F1 is connected to an external device. The B line of the differential chip is connected to one end of fuse F2 and one end of resistor R12. The other end of resistor R12 is connected to ground, and the other end of fuse F2 is connected to an external device. Resistor R10 and transient suppressor TVS1 are connected in parallel between the A line and the B line of the differential chip.
[0058] The differential chip used is model MAX485, which realizes the TTL and RS485 level conversion.
[0059] The self-resetting fuses F1 and F2 are model MF-MSMD050, with an overcurrent protection current of 0.5A.
[0060] The transient voltage suppressor TVS1, model SMBJ12CA, has a clamping voltage of 12V and suppresses transient overvoltages.
[0061] The RS485 module uses a differential chip to convert the UART4_TX single-ended TTL signal from the microprocessor MCU into an A / B differential signal, adapting to the RS485 bus standard. Self-resetting fuses F1 and F2 are connected in series on lines A and B respectively for overcurrent protection, automatically blowing to isolate faults in case of lightning strikes or short circuits. A resistor R10 is connected in parallel between lines A and B to match the bus characteristic impedance, reduce signal reflection, and the transient suppressor TVS1 clamps surge voltage to a safe range. Resistor R11 pulls line A to +3.3V, and resistor R12 grounds line B, ensuring a differential voltage >200mV when the bus is idle, preventing receiver misinterpretation.
[0062] During data transmission, the TTL level sent by the microprocessor (MCU) is converted into a differential signal by the differential chip and transmitted to the slave device via the A / B line. During reception, the differential signal is restored to the TTL level by the differential chip for processing by the microprocessor (MCU). The entire process is enhanced by hardware protection circuitry to improve anti-interference capability and bus stability.
[0063] The encryption chip includes: encryption logic control, key storage area EEPROM, key management unit, encryption engine AES1, data selector MUX, and hardware random number generator RNG.
[0064] The encryption engine AES1 includes a key register and a microprocessor MCU's I / O pin. 2 The C interface connects to the encryption chip. 2 The C-bus connects the encryption logic control to the key storage area EEPROM, the key storage area EEPROM to the key management unit, the key management unit to the encryption engine AES1, the encryption engine AES1 to the data selector MUX, and the data selector MUX to the hardware random number generator RNG.
[0065] The hardware random number generator RNG uses model TRNG-100, which generates true random numbers based on oscillator phase noise.
[0066] The encryption engine AES1 uses model AES-256, supports advanced encryption standards, and has a key length of 256 bits.
[0067] The key storage area EEPROM uses model AT24C02 to store encryption keys and supports 100,000 erase and write cycles.
[0068] In actual operation, the hardware random number generator (RNG) generates a high-frequency clock signal through an on-chip integrated ring oscillator. It utilizes the uncertainty of the oscillator's phase noise to generate a true random number sequence. After processing by a debiasing circuit, it outputs a random number seed with an entropy value ≥ 8 bits. This random number seed is switched via the channel selection pin of the data selector (MUX) and controlled by the GPIO of the microprocessor (MCU), directing its input to the plaintext input of the encryption engine (AES1). Simultaneously, the key storage area (EEPROM) is accessed via I... 2 The C-bus responds to the key read command from the microprocessor (MCU), storing the pre-stored 256-bit key in 8 pages (32 bytes per page). This key is loaded byte-by-byte into the AES1 key register of the encryption engine, and a round key is generated using a key scheduling algorithm. The encryption engine performs 14 rounds of encryption operations on the input data, including byte substitution, row shifting, column mixing, and round key addition. Each round incorporates an intermediate value of a random number seed for dynamic masking, ultimately generating ciphertext which is output to the data transmission paths of the carrier communication module, 4G communication module, and RS485 module.
[0069] Throughout the process, the key storage area adopts a hardware write protection mechanism. The WP pin is connected to a high level to prevent direct access from the external bus. The data stream between the random number generator RNG and the encryption engine AES1 is transmitted through a 32-bit dedicated encryption bus. The bus clock is embedded with a 50MHz pseudo-random jitter signal to effectively resist electromagnetic leakage attacks, reducing the success rate of differential power analysis attacks in the encryption process from 65% with software encryption to below 0.3%.
[0070] The power detection module includes: resistor R13, resistor R14, voltage detection chip, diode D2, and watchdog circuit.
[0071] A +3.3V power supply is connected to one end of resistor R13 and one end of resistor R14. The other ends of resistor R13 and R14 are connected to the VIN pin of the voltage detection chip. The OUT pin of the voltage detection chip is connected to the positive terminal of diode D2 and the RST pin of the watchdog circuit. The negative terminal of diode D2 is connected to the RESET pin of the microprocessor MCU. The GPIO3 pin of the microprocessor MCU is connected to the WDI pin of the watchdog circuit.
[0072] The voltage detection chip is model S-8209, with a threshold voltage of 3.0V.
[0073] The watchdog circuit uses the MAX811 chip. Under normal operating conditions, the microprocessor (MCU) needs to send a valid signal to the WDI pin of the watchdog circuit every 1.6 seconds to indicate that the system is operating normally. If, due to program abnormalities such as crashes, system crashes, or hardware failures, the main control module fails to send a signal for more than 1.6 seconds, the watchdog circuit will determine that the system is out of control and force a reset signal through the RST pin, forcing the main control module to restart. This prevents the energy meter from becoming unresponsive for extended periods due to occasional software failures. It also provides hardware-level protection against code abnormalities such as loop deadlocks and interrupt loss. Combined with power supply monitoring by the voltage detection chip, a two-dimensional fault response mechanism is formed, addressing both voltage and program abnormalities, ensuring the energy meter's continuous and stable operation under complex conditions.
[0074] A +3.3V power supply is divided by resistors R13 and R14 in a 2:1 ratio and then input to the VIN pin of the voltage detection chip. When the power supply voltage falls below the threshold, the OUT pin of the voltage detection chip outputs a low-level reset signal, forcing the microprocessor (MCU) to restart. Simultaneously, the WDI pin of the watchdog circuit is connected to the GPIO3 pin of the main control module. The main control module periodically sends a heartbeat signal to WDI. If WDT1 does not receive a signal within a 1.6-second timeout period, it sends a reset signal to the MCU via the RST pin and diode D2. This dual reset mechanism ensures rapid system recovery in the event of power fluctuations or program malfunctions, preventing data loss or functional failure due to voltage instability or program crashes.
[0075] After the electricity meter is powered on, the metering module collects grid voltage and current signals through voltage divider resistors and current transformers. These signals are converted into digital quantities by an internal ADC, and after calculating parameters such as active / reactive power, they are transmitted to the microprocessor (MCU) via the SPI bus. The MCU processes the received electrical parameters; data requiring encryption is encrypted via I / O. 2 Data is transmitted via the C interface to the encryption chip, where a hardware random number generator (RNG) generates a random number. This random number, combined with the key stored in the EEPROM, is then encrypted using the AES1 encryption engine to achieve AES-256 encryption. The encrypted data is then transmitted through different communication modules selected via different UART interfaces, depending on the transmission requirements.
[0076] If carrier communication is used, the UART1_TX signal of the microprocessor MCU is amplified by resistor R1 and power amplifier, and then coupled to the power line by coupling transformer. The signal of the secondary coil is filtered by capacitor C3 and surge suppressed by varistor RV1, and then shaped into a digital signal by comparator 1 and transmitted back by UART1_RX.
[0077] If 4G communication is used, the UART3_TX / RX signal of the microprocessor MCU is capacitively coupled to the 4G module to realize data interaction with the base station.
[0078] If communication is via RS485, the UART4_TX signal of the microprocessor MCU is converted into a differential signal by a differential chip and transmitted through the A / B lines of series resettable fuses F1 and F2. A transient voltage suppressor (TVS1) between the A / B lines suppresses transient overvoltages, and failure protection resistors R11 and R12 ensure bus stability. During local debugging, the infrared module interacts with the microprocessor MCU via UART2_TX / RX.
[0079] During trip control, the GPIO1 of the microprocessor (MCU) outputs a high level, which, after isolation by optocoupler OC1, drives transistor Q1 to conduct, energizing relay K1 to achieve power-off control. Resistor R6, capacitor C4, and transient suppression diode D1 protect the circuit from back EMF impact. During pulse output, the GPIO2 signal of the microprocessor (MCU), after isolation by optocoupler OC2 and shaping by comparator 2, outputs a standard pulse.
[0080] The power monitoring module monitors the +3.3V power supply through voltage divider resistors R13 and R14. When the voltage is abnormal, the voltage detection chip triggers the microprocessor MCU to reset. The watchdog circuit monitors the heartbeat signal through GPIO3. If it does not receive the heartbeat signal within a timeout, it will reset via diode D2 to ensure that the system can operate reliably when there are voltage fluctuations or program abnormalities.
[0081] Multi-level hardware encryption overcomes traditional software limitations: The encryption chip integrates a hardware random number generator (RNG), an AES-256 encryption engine (AES1), and a physically isolated key storage area (EEPROM). Dynamic obfuscation encryption of the random number seed and business data is achieved through a data selector (MUX), resulting in a 5x improvement in efficiency compared to traditional software encryption and a key cracking difficulty of 2. 256 The scale is significant, blocking side-channel attack paths from the hardware level.
[0082] The communication module features a full-link protection design: the carrier communication module integrates a coupling transformer and a varistor RV1 to achieve dual functions of signal coupling and surge suppression, improving communication anti-interference capability by 40dB; the RS485 module is equipped with self-resetting fuses F1 and F2, transient suppressor TVS1, and resistors R11 and R12 to construct a three-level protection against overcurrent, overvoltage, and bus failure, reducing the communication bit error rate; the 4G module solves the problems of radio frequency interference and network disconnection through coupling by capacitors C1 and C2 and a built-in watchdog, improving communication continuity.
[0083] High-voltage and low-voltage isolation and intelligent power management: The trip control module uses optocoupler OC1, resistor R6, and capacitor C4 to achieve 2500V electrical isolation and relay back EMF suppression, reducing the probability of malfunction; the power monitoring module is linked with the voltage detection chip and watchdog circuit to ensure reliable reset of the main control module when the power fluctuation is ±15%, thus extending the system's mean time between failures and improving the overall system performance.
[0084] Multimodal communication redundancy architecture: It integrates a carrier communication module, an infrared module, a 4G communication module, and an RS485 module, forming a four-channel communication module. Through dynamic scheduling by the main control module, it achieves adaptive switching between wired + wireless and remote + local communication, improving the communication success rate in complex power grid environments and breaking through the application limitations of traditional single-mode communication.
[0085] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An energy meter with a data encryption transmission circuit, characterized in that, It includes: microprocessor (MCU), metering module, encryption chip, carrier communication module, infrared module, 4G communication module, RS485 module, trip control module, pulse output module, and power detection module; The microprocessor (MCU) is connected to the metering module, encryption chip, carrier communication module, infrared module, 4G communication module, RS485 module, trip control module, pulse output module, and power detection module, respectively.
2. The energy meter with a data encryption transmission circuit according to claim 1, characterized in that, The carrier communication module includes: resistor R2, resistor R1, carrier communication chip, resistor R3, power amplifier, resistor R4, comparator 1, inductor L1, coupling transformer, capacitor C3, and varistor RV1; The UART1_RX pin of the microprocessor MCU is connected to the TXD pin of the carrier communication chip through a series resistor R2. The UART1_TX pin of the microprocessor MCU is connected to the RXD pin of the carrier communication chip through a series resistor R1 and one end of a resistor R3. The other end of a resistor R3 is connected to the input terminal of the power amplifier. The output terminal of the power amplifier is connected to the primary coil of the coupling transformer through a series inductor L1. The secondary coil of the coupling transformer is connected in parallel with a capacitor C3 and a varistor RV1. One end of capacitor C3 and one end of varistor RV1 are connected to the non-inverting input terminal of comparator 1 and ground. The inverting input terminal of comparator 1 is connected to the reference voltage. The output terminal of comparator 1 is connected to the feedback terminal of the power amplifier through a series resistor R4.
3. The energy meter with a data encryption transmission circuit according to claim 1, characterized in that, The trip control module includes: optocoupler OC1, resistor R5, transistor Q1, relay K1, resistor R6, capacitor C4, and diode D1; The GPIO1 pin of the microprocessor MCU is connected to the optocoupler OC1. The collector of the optocoupler OC1 is connected to the base of the transistor Q1 through a series resistor R5. The emitter of the transistor Q1 is connected to ground. The collector of the transistor Q1 is connected to one end of the coil of the relay K1. The other end of the coil of the relay K1 is connected to the +12V power supply. The two ends of the relay K1 contact are connected in parallel with a resistor R6, a capacitor C4, and a diode D1.
4. An energy meter with a data encryption transmission circuit according to claim 1, characterized in that, The pulse output module includes: optocoupler OC2, resistor R7, resistor R8, reference voltage source REF1, comparator 2, and resistor R9; The GPIO2 pin of the microprocessor MCU is connected to the cathode of optocoupler OC2. The anode of optocoupler OC2 is connected to the +5V power supply through series resistor R7. The emitter of optocoupler OC2 is grounded. The collector of optocoupler OC2 is connected to the non-inverting input of comparator 2 through series resistor R8. The inverting input of comparator 2 is connected to the reference voltage source REF1. The output of comparator 2 is connected to an external device through series resistor R9.
5. An energy meter with a data encryption transmission circuit according to claim 1, characterized in that, The RS485 module includes: a differential chip, resistor R10, transient suppressor TVS1, resistor R11, fuse F1, fuse F2, and resistor R12. The UART4_TX pin of the microprocessor MCU is connected to the DI pin of the differential chip, the UART4_RX pin of the microprocessor MCU is connected to the RO pin of the differential chip, and the common terminal of the RE and DE pins of the differential chip is connected to the GPIO4 pin of the microprocessor MCU. The A line of the differential chip is connected to one end of fuse F1 and one end of resistor R11. The other end of resistor R11 is connected to the +3.3V power supply, and the other end of fuse F1 is connected to an external device. The B line of the differential chip is connected to one end of fuse F2 and one end of resistor R12. The other end of resistor R12 is connected to ground, and the other end of fuse F2 is connected to an external device. Resistor R10 and transient suppressor TVS1 are connected in parallel between the A line and the B line of the differential chip.
6. An energy meter with a data encryption transmission circuit according to claim 1, characterized in that, The encryption chip includes: encryption logic control, key storage area EEPROM, key management unit, encryption engine AES1, data selector MUX, and hardware random number generator RNG; The encryption engine AES1 includes a key register and a microprocessor MCU's I / O pin. 2 The C interface connects to the encryption chip. 2 The C-bus connects the encryption logic control to the key storage area EEPROM, the key storage area EEPROM to the key management unit, the key management unit to the encryption engine AES1, the encryption engine AES1 to the data selector MUX, and the data selector MUX to the hardware random number generator RNG. The data selector MUX is configured to selectively inject random numbers generated by the hardware random number generator RNG into the data transmission paths of the carrier communication module, 4G communication module, and RS485 module through the microcontroller MCU, according to the communication protocol type.
7. An energy meter with a data encryption transmission circuit according to claim 1, characterized in that, The power detection module includes: resistor R13, resistor R14, voltage detection chip, diode D2, and watchdog circuit; A +3.3V power supply is connected to one end of resistor R13 and one end of resistor R14. The other ends of resistor R13 and R14 are connected to the VIN pin of the voltage detection chip. The OUT pin of the voltage detection chip is connected to the positive terminal of diode D2 and the RST pin of the watchdog circuit. The negative terminal of diode D2 is connected to the RESET pin of the microprocessor MCU. The GPIO3 pin of the microprocessor MCU is connected to the WDI pin of the watchdog circuit. The voltage detection chip and watchdog circuit work together. When an abnormal voltage is detected or the program crashes, the watchdog is reset first without affecting the key storage area EEPROM of the encryption chip.