Skip to content

About

A high-precision, IoT-enabled Non-Intrusive Load Monitoring (NILM) Smart Energy Meter hardware design built with KiCad. This board combines dedicated metering hardware with edge processing capability to analyze electrical loads and power metrics in real time.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NILM Energy Meter PCB

A high-precision, IoT-enabled Non-Intrusive Load Monitoring (NILM) Smart Energy Meter hardware design built with KiCad. This board combines dedicated metering hardware with edge processing capability to analyze electrical loads and power metrics in real time.


Technical Features

  • MCU & Connectivity: ESP32-S2-MINI-2-N4 microcontroller for local data acquisition, Wi-Fi telemetry, and edge inference.

  • Energy Metering AFE: STPM32TR dual-channel energy metering IC connected via SPI for accurate active/reactive power calculation.

  • Current & Voltage Sensing:

  • Primary sensing via CASR-6-NP closed-loop Hall effect current transducer.

  • Secondary precision shunt resistor input for differential AFE sampling.

  • Galvanically isolated voltage measurement channel.

  • Power & Protection:

  • Integrated AC/DC power supply stage (Mains input).

  • High-voltage surge protection featuring MOV (Metal Oxide Varistor) and input fuse protection.

  • Wide AC trace spacing with strict high-voltage isolation creepage barriers (rated up to 16A continuous).

  • Load Control & Peripherals:

  • TRIAC switching and relay control with optocoupler isolation (MOC3052SM).

  • On-board high-accuracy DS3231M real-time clock (RTC) with battery backup.

  • I2C header interface for monochrome OLED display module.


Schematic Architecture

The project uses a 8-sheet hierarchical schematic structure:

Sheet Name / Description
Top Level nilm-energy-meter-pcb.kicad_sch – Main system hierarchy bus interconnect
Sheet 1 sheet-1-nilm-energy-meter-pcb.kicad_sch – AC mains power input & surge protection
Sheet 2 sheet-2-nilm-energy-meter-pcb.kicad_sch – STPM32 AFE & metering differential front-end
Sheet 3 sheet-3-nilm-energy-meter-pcb.kicad_sch – ESP32-S2 MCU core system & programming interface
Sheet 4 sheet-4-nilm-energy-meter-pcb.kicad_sch – Power regulation & 3.3V/5V buck converters
Sheet 5 sheet-5-nilm-energy-meter-pcb.kicad_sch – Isolated current sensing module (CASR sensor)
Sheet 6 sheet-6-nilm-energy-meter-pcb.kicad_sch – Isolated voltage sampling stage
Sheet 7 sheet-7-nilm-energy-meter-pcb.kicad_sch – TRIAC phase switching & relay load control
Sheet 8 sheet-8-nilm-energy-meter-pcb.kicad_sch – DS3231M RTC clock backup & OLED UI interface

Repository Structure

├── nilm-energy-meter-pcb.kicad_pro    # KiCad project file
├── nilm-energy-meter-pcb.kicad_sch    # Main top-level schematic
├── sheet-1-*.kicad_sch                # Hierarchical schematic sheets 1-8
├── ...
├── nilm-energy-meter-pcb.kicad_pcb    # KiCad PCB layout
├── CELUS.kicad_sym                    # Project-specific symbol library
├── CELUS.pretty/                      # Project-specific footprint library
├── sym-lib-table                      # Symbol library table
├── fp-lib-table                       # Footprint library table
├── schematic-frame.kicad_wks          # Custom schematic worksheet template
└── layout-frame.kicad_wks             # Custom PCB layout worksheet template


PCB Fabrication Specifications

  • Board Type: Double-sided PCB (Top & Bottom Ground Pours)
  • Minimum Trace Width: 0.2 mm (Signal lines) / 2.5 mm (16A Mains power lines)
  • Minimum Clearance: 0.3 mm (Edge clearance) / Isolation creepage distance maintained across HV barrier
  • Via Specifications: Standard 0.3 mm drill / 0.6 mm annular ring (Stitching vias added throughout ground plane)
  • Assembly Requirements: Standard SMD assembly with SMT components down to 0402 footprint size

Getting Started

Prerequisites

  • KiCad EDA v7.0 or v8.0+

Opening the Project

  1. Clone or download this repository into your local workspace.
  2. Open KiCad and navigate to File -> Open Project.
  3. Select nilm-energy-meter-pcb.kicad_pro.
  4. Open the Schematic Editor or PCB Editor to view or edit the project design files.

Safety Warning

HIGH VOLTAGE WARNING: This circuit interfaces directly with AC mains voltage (110V–240V AC). Exposed traces and uninsulated components carry live mains electricity. Ensure proper safety equipment and isolation transformers are used when testing under live power conditions.

About

A high-precision, IoT-enabled Non-Intrusive Load Monitoring (NILM) Smart Energy Meter hardware design built with KiCad. This board combines dedicated metering hardware with edge processing capability to analyze electrical loads and power metrics in real time.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors