smart-energy-meter
built a high-precision AC energy meter that measures real-time voltage, current, active power, power factor, and energy consumption (kWh) while displaying the live electrical parameters on a screen.
Display:

Mechanical Design
Mounted components inside a safe, insulated enclosure with dedicated areas for high-voltage and low-voltage circuitry
Used AC-rated terminal blocks and cable strain relief to ensure secure and safe wiring
Provided front access to the display for easy reading during operation
Maintained physical separation between the mains sensing front-end and the low-voltage microcontroller section
Added venting slots to prevent heat buildup around the power supply module

Sensors & Sensing
Used a ZMPT101B AC voltage sensor to measure RMS mains voltage with proper scaling and filtering
Integrated a current sensor (SCT-013 clamp or shunt + HLW8032/ADE7753 interface) for accurate AC current detection
Employed an energy-metering IC (HLW8012 / ADE7753) to compute real-time parameters including:
RMS Voltage
RMS Current
Active Power
Apparent Power
Power Factor
Energy (Wh / kWh)
Added hardware filtering networks to stabilize noisy AC waveforms and suppress high-frequency switching noise
Control System
Powered by an Arduino/ESP32 microcontroller to read metering-IC outputs and drive the display
Implemented continuous sampling loops to update:
Voltage and current
Real-time wattage
Running kWh accumulation
PF and frequency
Included a TFT/OLED or 20x4 LCD for clear viewing of live electrical parameters
Added calibration routines using known loads for improved measurement accuracy
Optional serial or wireless telemetry for logging historical power usage
Electronics & PCB Design
Designed a custom PCB integrating:
Voltage and current sensing front-end
Energy metering IC (HLW8012/ADE7753)
Microcontroller header
Display connector
Regulated low-voltage supply
Followed creepage and clearance rules for high-voltage AC measurement circuits
Added input protection: fuse, MOV surge protector, and filtering capacitors
Implemented grounding strategy and filtering to isolate noisy AC sections from digital logic
Created a compact, single-board layout that enables safe, accurate power measurement
see also

