Electricity metering moduleThe essence of the work is a closed-loop process of "signal acquisition → signal processing → parameter calculation → data output". Through the collaboration of various functional units, the "strong electrical signals" of high voltage and high current in the power grid are converted into readable and analyzable "weak electrical data" (such as electrical energy, power, etc.). The complete working process can be divided into 5 core steps, which are interrelated and ultimately achieve precise measurement, as follows:
Step 1: Strong electrical signal acquisition and voltage/current reduction (signal preprocessing)
The voltage (such as 220V/380V) and current (such as 10A/50A) in the power grid belong to strong electrical signals and cannot be directly processed by metering chips (weak electrical devices with extremely low voltage/current resistance). They need to be first converted into low amplitude, low-power weak electrical signals through a "signal acquisition unit" to avoid damaging the chip and meet subsequent processing requirements.
The core of this step is "isolation and scaling", which is achieved through two types of core components:
Voltage signal processing:
By using voltage transformers (VT) or high-precision voltage divider resistor networks, the high voltage of the power grid (such as 220V) is "stepped down" at a fixed ratio to form a low voltage signal adapted to the metering chip (usually AC weak current of 0-2.5V or 0-5V). For example, after dividing 220V voltage, a low voltage signal of 1.2V is output, and the division ratio is determined by the resistance value or transformer ratio (e.g. 220V: 1.2V ≈ 183:1).
Current signal processing:
By using current transformers (CT) or splitters (high-precision resistors), the high current of the power grid (such as 10A) can be proportionally "reduced" or converted into low voltage signals (usually 0-50mA current or 0-100mV voltage). For example, after converting 10A current through CT, a small current of 50mA is output, with a transformation ratio of 10A: 50mA=00:1; Or it can be converted into a voltage signal of 50mV through a shunt (according to Ohm's law U=IR, the shunt resistance is usually 5m Ω, 10A × 5m Ω=50mV).
Key function: To achieve physical isolation between strong and weak electricity (ensuring chip safety), while "scaling" the signal to the input range of the metering chip.
Step 2: Analog signal to digital signal (AD conversion)
After the first step of processing, the voltage and current signals are still analog signals (with amplitude continuously changing over time, such as sine waves), and the core algorithm of the metering chip needs to be calculated based on digital signals (discrete binary data), so signal conversion needs to be completed through the built-in AD converter (analog-to-digital converter) of the metering chip.
The core of this step is "high-precision sampling", and the specific process is:
Sampling: The AD converter performs "discrete sampling" on the analog signal at a fixed frequency (usually tens of kHz to hundreds of kHz, such as 32kHz, 64kHz), that is, reads the instantaneous amplitude of the analog signal every fixed time (such as 31.25 μ s, corresponding to a 32kHz sampling rate);
Quantization: Convert the sampled instantaneous amplitude (continuous value) into binary digits (discrete value) recognizable by the chip. For example, an analog signal of 0-2.5V corresponds to 8-bit binary 0-255, and a 1.25V analog signal is quantized to 128 (binary 10000000);
Anti interference optimization: The module will add a "low-pass filter" before AD conversion to filter out high-frequency interference signals in the power grid (such as harmonics generated by frequency converters and LEDs), ensuring the stability of the sampled signal.
Key indicators: The "number of bits" (such as 16 bits, 24 bits) and "sampling rate" of AD conversion directly affect measurement accuracy - the higher the number of bits, the smaller the quantization error; The higher the sampling rate, the better it can restore the waveform details of analog signals (especially for complex non sinusoidal loads such as welding machines and charging stations).
Step 3: Data verification and storage (ensuring data reliability)
The calculated electrical parameters (such as power) and cumulative electrical energy (such as 123.45kWh) need to be "verified" and "stored" to avoid data errors or loss, especially in response to "power outages" scenarios (such as power outages in the power grid). This step is completed by the data processing and storage unit of the module, which specifically includes:
Data verification:
Logic verification: Determine whether the calculation result is within a reasonable range (such as whether the voltage is within the civilian wide voltage range of 85-265V, and whether the current exceeds the module range). If it exceeds the range, it is marked as "abnormal data" and triggers an error (some modules support pin level alarm);
Redundancy check: Some modules will use "CRC check" (cyclic redundancy check) to add check codes to the calculated data to ensure that the data has not been tampered with during subsequent transmission or storage.
Data storage:
Real time parameter cache of electricity metering module: Real time changing parameters such as voltage, current, power, etc. are temporarily stored in the "random access memory (RAM)" of the chip for quick reading;
Accumulated energy solidification: Accumulated energy is the core measurement data (directly related to electricity bill calculation), which needs to be stored in non-volatile memory (EEPROM/Flash) - even if the module is powered off, the data in EEPROM/Flash will not be lost (usually saved for more than 10 years). To avoid frequent writes leading to a decrease in memory lifespan, the module will adopt a "timed write" strategy (such as updating the accumulated power in the EEPROM every minute) instead of real-time writing.
Step 4: Data output (interacting with external systems)
The final measurement data (such as voltage 220V, current 5A, and electrical energy 123.45kWh) needs to be transmitted to external devices (such as microcontrollers, PLCs, IoT gateways, and display screens) for users to view, count, or remotely monitor. This step is completed by the data output unit. The common output methods are divided into two categories: "wired output" and "wireless output", as follows:
1. Wired output (mainstream method)
Pulse output:
The traditional output method uses "optocoupler isolation" to output pulse signals - one pulse corresponds to a fixed energy value (such as 1 pulse=1Wh or 1 pulse=0.1kWh, set by module parameters). External devices such as counters and microcontrollers only need to count the number of pulses to calculate the total electrical energy (such as 1000 pulses corresponding to 1kWh), which is suitable for traditional electricity meters and simple energy consumption statistics scenarios.
Digital interface output:
Suitable for scenarios that require reading multiple parameters, transmitting complete data (voltage, current, power, energy, etc.) through standardized digital interfaces:
I2C/SPI: High speed synchronous interface, suitable for close range communication between modules and MCUs (such as modules integrated inside smart sockets), with high transmission efficiency and simple wiring.
2. Wireless output (intelligent scenario)
Some "smart metering modules" will integrate wireless communication modules to directly transmit data to remote platforms (such as cloud and mobile apps) without wired connections, suitable for IoT meter reading and remote monitoring scenarios:
Low power wide area network (LPWAN): such as LoRa, NB IoT, with long coverage distance (LoRa can reach several kilometers), low power consumption (one battery can work for several years), suitable for outdoor equipment (such as photovoltaic inverters, street light energy monitoring);
Short distance wireless: such as WiFi and Bluetooth, suitable for indoor scenarios (such as smart home sockets, connecting to home routers through WiFi, and real-time viewing of power consumption through mobile apps).