ESP32 Poly-Phase Power Meter
ESP32 Poly-Phase Power Meter
Summary
This project integrates an ESP32-S3, Analog Devices ADE7878, and WIZnet W5500 onto a single PCB to deliver an industrial-grade 3-phase power meter. By combining W5500's hardware TCP/IP offloading with a PoE module, a single Ethernet cable handles both power delivery and data communication simultaneously. An onboard web server serves a browser-based UI with no additional software required. This design consolidates precision metering, network communication, and power supply into one board — making it a compelling reference for developers and engineers looking to simplify power monitoring infrastructure in industrial environments.
Overview
Power metering in industrial environments demands more than simple consumption tracking. Each phase must be monitored in real time for active power, reactive power, power factor, and harmonic distortion. Conventional industrial meters are either expensive dedicated instruments or require additional gateways and serial-to-Ethernet converters to achieve network connectivity. Wiring complexity and installation costs become significant burdens, especially in small-scale deployments or retrofit projects.
This project addresses those challenges head-on with a single-board design. By integrating a high-precision 3-phase AFE (Analog Front-End), hardware TCP/IP Ethernet, and PoE power delivery onto one PCB, everything needed at the installation site is a single Ethernet cable connected to a PoE switch. The target audience includes embedded developers designing industrial metering systems, energy management system (EMS) engineers, and smart grid makers.

System Architecture
The key principle of this design is clear separation of responsibilities. The ADE7878 handles all analog metering, the W5500 owns the network layer, and the ESP32-S3 focuses on data processing and application logic in between. This division prevents any single component from becoming a bottleneck.
Core Hardware: ADE7878 Polyphase AFE
In 3-phase power metering, the accuracy of the AFE determines the reliability of the entire system. This project uses the ADE7878 from Analog Devices — one of the most capable polyphase metering ICs available for industrial applications.
Key specifications of the ADE7878:
- Measured parameters: Per-phase active, reactive, and apparent power; fundamental-only active and reactive power; RMS voltage and current
- Accuracy: Less than 0.1% error in active and reactive energy over a dynamic range of 1000:1 at 25°C
- ADC configuration: 7-channel 2nd-order Σ-Δ ADC — 3 voltage channels + 3 current channels + 1 neutral current channel
- Harmonic analysis: Simultaneously measures fundamental-only energy and total energy (fundamental + harmonics)
- Standards compliance: IEC 62053-21/22/23, EN 50470-1/3
- Wiring compatibility: Supports both 3-wire (delta) and 4-wire (wye) 3-phase configurations
- Interface: SPI and I2C, plus a high-speed data capture (HSDC) port
- Operating temperature: -40°C to +85°C (industrial range)
A standout feature of the ADE7878 is its neutral current mismatch detection. When the sum of the three phase currents does not match the measured neutral current, the IC can flag wiring errors or tampering — bringing commercial-grade meter integrity to a custom embedded design.
W5500: The Network Layer That Keeps ESP32-S3 Free
The network layer in this design is handled by the WIZnet W5500 — a hardwired Ethernet controller with an integrated MAC, PHY, and full TCP/IP stack, connected to the ESP32-S3 via SPI.
The significance of hardware TCP/IP offloading becomes clear when you consider the workload on the ESP32-S3. It is already parsing metering data from the ADE7878, running a web server, and serving the Svelte UI — all concurrently. If the MCU also had to manage a software TCP/IP stack, something would have to give: either metering cycle frequency or web responsiveness. The W5500 absorbs that burden entirely at the hardware level.
The other key design decision is the integration of PoE (Power over Ethernet):
- A 10W PoE module receives power through the Ethernet cable
- Data communication via W5500 and PoE power delivery share a single RJ45 connector
- No separate power adapter or power wiring is needed at the installation site — just connect to a PoE switch
W5500 key specifications:
- Speed: 100Mbps Full Duplex
- Hardware sockets: 8 independent sockets supported simultaneously
- Supported protocols: TCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE
- Host interface: SPI (up to 80MHz)
- Supply voltage: 3.3V single supply
Onboard Web Server and Svelte UI
The firmware is developed in ESP-IDF (C language). A web server runs directly on the ESP32-S3, handling incoming HTTP requests from client browsers via the W5500.
The web UI is built with Svelte and TypeScript. Svelte compiles to optimized vanilla JavaScript at build time, producing no runtime framework overhead — making it particularly well-suited for resource-constrained embedded web server environments. The small build output fits comfortably in the ESP32-S3's Flash storage for direct serving.
The resulting user experience is straightforward:
- Open a browser, navigate to the board's IP address, and immediately access live power data
- No app installation, driver setup, or dedicated software required
- Per-phase power quality metrics visualized in real time
Business Value and Application Scenarios
The core value proposition of this design is simplification through integration. What previously required a separate meter, gateway, and power adapter is now consolidated onto a single board.
Customer-facing value:
- Reduced wiring complexity: PoE integration eliminates separate power runs to the meter
- Smaller installation footprint: Metering, communication, and power supply in one PCB
- Operational convenience: Browser-based UI removes the need for proprietary monitoring software
- Regulatory confidence: IEC/EN-compliant AFE meets industrial metering standards
Real-world application scenarios:
- Factory panel monitoring: Real-time tracking of per-line 3-phase power consumption; early detection of overload conditions
- Building Energy Management (EMS): Floor- or zone-level power quality monitoring; identification of power factor correction opportunities
- Solar and ESS inverter monitoring: 3-phase power quality surveillance at grid interconnection points; harmonic distortion analysis
- Data center power management: 3-phase load imbalance monitoring at UPS output; neutral current anomaly detection
Limitations and Improvements
This project demonstrates clear success as a hardware integration design and prototype validation. That said, several considerations remain before deploying in production industrial environments.
Current limitations:
- Security posture unconfirmed: Whether the web UI implements authentication or TLS/HTTPS encryption is not documented in publicly available information. Exposure on non-isolated networks carries access risk
- Data persistence: No local storage or external database integration has been confirmed. Data loss on reboot or network failure is a possibility [estimated]
- External system integration: MQTT, Modbus TCP, REST API, or other upstream integration interfaces have not been confirmed in the current implementation
- Scalability: The single-board architecture does not address multi-node distributed deployment scenarios
Improvement directions:
- MQTT broker integration: Leveraging W5500's hardware TCP sockets to add an MQTT client would enable connectivity with standard energy monitoring stacks such as Node-RED, InfluxDB, and Grafana
- TLS support: Enabling HTTPS via mbedTLS (built into ESP-IDF) would significantly improve web UI security
- Modbus TCP support: W5500's hardware socket architecture is well-suited for implementing a Modbus TCP slave — opening a direct integration path with existing SCADA systems
- Multi-node architecture: The same PCB design could be deployed at multiple metering points and aggregated by a central server, enabling scalable distributed metering
FAQ
Q1. Is ESP-IDF experience required to build on this design? ESP-IDF is a professional firmware framework based on FreeRTOS and has a steeper learning curve than Arduino. However, WIZnet's open-source ioLibrary_Driver significantly lowers the barrier for the network layer. ADE7878 register control requires familiarity with SPI/I2C communication and the IC's datasheet.
Q2. What kind of PoE switch is needed? Any PoE switch supporting IEEE 802.3af (15.4W) or higher is sufficient. The onboard PoE module delivers 10W, which falls within the 802.3af standard. Most commercial and industrial PoE switches are compatible.
Q3. Does this support 3-wire (delta) configurations in addition to 4-wire (wye)? The ADE7878 supports both wye and delta wiring configurations. The firmware register settings and calibration procedures differ by configuration, so refer to the wiring-specific setup guidance in the ADE7878 datasheet.
Q4. Can metering data be sent to an external server or cloud platform? The current implementation confirms browser-based access via the onboard web server. W5500's hardware socket support makes it straightforward to extend the firmware with MQTT or HTTP POST to push data to external servers — though this requires additional firmware development.
Q5. What would need to be addressed before commercializing this design? At minimum, three areas require attention: authentication and TLS encryption for the web UI; local data logging or external database integration; and field calibration procedures aligned with IEC 62053 standards. On the hardware side, overvoltage and surge protection circuitry would also be important for industrial certification
요약
이 프로젝트는 ESP32-S3, Analog Devices ADE7878, WIZnet W5500을 단일 PCB에 통합한 산업용 3상 전력 계측기입니다. W5500의 하드웨어 TCP/IP 오프로딩과 PoE 모듈의 조합으로 이더넷 케이블 한 가닥만으로 전원 공급과 데이터 통신을 동시에 처리하며, 내장 웹 서버를 통해 별도 소프트웨어 없이 브라우저만으로 실시간 전력 데이터를 열람할 수 있습니다. 정밀 계측부터 네트워크 통신, 전원 공급까지를 하나의 보드로 해결한 설계로, 산업 현장의 전력 모니터링 인프라를 단순화하려는 개발자와 엔지니어에게 주목할 만한 레퍼런스입니다.
개요
산업 현장의 전력 계측은 단순한 소비량 측정을 넘어, 3상 각각의 유효 전력·무효 전력·역률·고조파까지 실시간으로 파악해야 하는 복잡한 요구를 수반합니다. 기존 산업용 전력 계측기는 전용 장비로서 고가이거나, 네트워크 연결을 위해 별도의 게이트웨이나 시리얼-이더넷 변환기를 추가해야 하는 경우가 많습니다. 배선 공사 비용과 설치 복잡도는 소규모 현장이나 레트로핏(retrofit) 프로젝트에서 특히 큰 부담이 됩니다.
이 프로젝트는 이러한 문제를 단일 PCB 설계로 정면 돌파합니다. 고정밀 3상 AFE(Analog Front-End), 하드웨어 TCP/IP 이더넷, PoE 전원 공급을 하나의 보드에 통합함으로써, 설치 현장에서 필요한 것은 PoE 스위치와 연결된 이더넷 케이블 한 가닥뿐입니다. 대상 독자는 산업용 전력 계측 시스템을 직접 설계하거나 구축하려는 임베디드 개발자, 에너지 관리 시스템(EMS) 엔지니어, 스마트 그리드 관련 메이커입니다.

시스템 아키텍처
이 설계의 핵심은 역할 분리입니다. ADE7878이 아날로그 계측을 전담하고, W5500이 네트워크를 전담하며, ESP32-S3는 그 사이에서 데이터 처리와 애플리케이션 로직을 담당합니다. 각 IC가 자신의 전문 영역에 집중하는 구조 덕분에, MCU에 과도한 부하가 집중되지 않습니다.
핵심 하드웨어: ADE7878 폴리페이즈 AFE
3상 전력 계측에서 AFE의 정밀도는 시스템 전체 신뢰성을 결정합니다. 이 프로젝트는 Analog Devices의 ADE7878을 채택했습니다.
ADE7878의 주요 사양은 다음과 같습니다.
- 계측 항목: 3상 유효(Active)·무효(Reactive)·피상(Apparent) 전력, 기본파(Fundamental) 전력, RMS 전압·전류
- 정밀도: 동적 범위 1000:1에서 유효·무효 전력 오차 0.1% 이내 (25°C 기준)
- ADC 구성: 7채널 2차 Σ-Δ ADC — 3상 전압 3채널 + 전류 3채널 + 중성선(Neutral) 전류 1채널
- 고조파 분석: 기본파 에너지와 전체(기본파 + 고조파) 에너지를 동시에 측정 가능
- 규격 호환: IEC 62053-21/22/23, EN 50470-1/3 등 산업 계측 국제 규격 지원
- 결선 호환: 3상 3선(델타), 3상 4선(와이) 모두 지원
- 인터페이스: SPI 및 I2C, 고속 데이터 캡처(HSDC) 포트
- 동작 온도: -40°C ~ +85°C (산업용 범위)
특히 중성선 전류 불균형 감지는 ADE7878만의 차별점입니다. 3상 전류의 합이 중성선 전류와 일치하지 않을 경우 배선 오류나 계측 조작을 감지할 수 있어, 상업용 전력량계 수준의 신뢰성을 구현할 수 있습니다.
W5500으로 완성하는 유선 네트워크 계층
이 설계에서 네트워크 계층은 WIZnet W5500이 담당합니다. W5500은 MAC, PHY, TCP/IP 스택을 하나의 칩에 내장한 하드웨어 이더넷 컨트롤러로, ESP32-S3와 SPI 인터페이스로 연결됩니다.
하드웨어 TCP/IP 오프로딩이 이 설계에서 갖는 의미는 분명합니다. ESP32-S3는 이미 ADE7878로부터 수신한 계측 데이터를 파싱하고, 웹 서버를 구동하며, Svelte UI를 서빙하는 작업을 동시에 처리합니다. 만약 소프트웨어 TCP/IP 스택까지 MCU가 직접 처리해야 한다면, 계측 처리 주기나 웹 응답성 중 하나를 타협해야 합니다. W5500은 이 부담을 하드웨어 수준에서 흡수합니다.
이 프로젝트의 또 다른 설계 포인트는 PoE(Power over Ethernet)와의 통합입니다.
- 10W PoE 모듈을 탑재하여 이더넷 케이블로 전원을 수신
- W5500을 통한 데이터 통신과 PoE 전원 공급이 RJ45 커넥터 하나로 통합
- 현장에서 별도 전원 어댑터나 전원 배선 없이 PoE 스위치 연결만으로 즉시 운영 가능
W5500의 주요 사양을 정리하면 다음과 같습니다.
- 통신 속도: 100Mbps Full Duplex
- 내장 소켓: 하드웨어 소켓 8개 동시 지원
- 지원 프로토콜: TCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE
- 인터페이스: SPI (최대 80MHz)
- 전원: 3.3V 단일 전원
내장 웹 서버와 Svelte UI
펌웨어는 ESP-IDF(C 언어)로 개발되었습니다. ESP32-S3 위에서 웹 서버가 직접 구동되며, W5500을 통해 클라이언트 브라우저의 HTTP 요청을 처리합니다.
웹 UI는 Svelte + TypeScript 조합으로 개발되었습니다. Svelte는 런타임 프레임워크 없이 컴파일 타임에 최적화된 바닐라 JS를 생성하기 때문에, 임베디드 웹 서버 환경처럼 리소스가 제한된 환경에 적합합니다. 빌드 결과물의 크기가 작아 ESP32-S3의 Flash에 저장하고 서빙하기에 유리합니다.
이 구조가 제공하는 사용자 경험은 다음과 같습니다.
- 브라우저에서 보드 IP로 접속하면 즉시 전력 데이터 열람 가능
- 별도 앱 설치, 드라이버 설치, 전용 소프트웨어 불필요
- 3상 각각의 전력 품질 지표를 실시간으로 시각화
비즈니스 가치 및 적용 시나리오
이 설계가 제공하는 핵심 가치는 통합으로 인한 단순화입니다. 기존에는 계측기, 게이트웨이, 전원 어댑터가 별도로 필요했던 구성을 단일 보드로 대체합니다.
외부 고객 관점에서의 가치:
- 배선 공수 절감: PoE 통합으로 전원 배선 별도 시공 불필요
- 설치 공간 절감: 단일 PCB로 계측·통신·전원 통합
- 운영 편의성: 브라우저 기반 UI로 전용 소프트웨어 없이 모니터링
- 규격 신뢰성: IEC/EN 호환 AFE로 산업 계측 기준 충족
실제 적용 시나리오:
- 공장 분전반 모니터링: 생산 라인별 3상 전력 소비 실시간 추적, 과부하 조기 감지
- 빌딩 에너지 관리(EMS): 층별·구역별 전력 품질 모니터링, 역률 개선 포인트 도출
- 태양광·ESS 인버터 모니터링: 계통 연계 지점의 3상 전력 품질 감시, 고조파 왜곡 분석
- 데이터센터 전력 관리: UPS 출력단 3상 부하 불균형 감시, 중성선 전류 이상 감지
한계 및 개선 방향
이 프로젝트는 하드웨어 통합 설계와 프로토타입 검증이라는 측면에서 명확한 성과를 보여줍니다. 다만 산업 현장 본격 배포를 위해서는 몇 가지 고려 사항이 남아 있습니다.
현재 한계:
- 보안 구조 미확인: 웹 UI의 인증(로그인) 및 암호화(TLS/HTTPS) 적용 여부가 공개 정보상 확인되지 않음. 내부망 외 환경에서는 무단 접근 리스크 존재
- 데이터 영속성: 계측 데이터의 로컬 저장 또는 외부 DB 연동 구조가 확인되지 않음. 네트워크 장애 또는 재부팅 시 데이터 유실 가능성 [추정]
- 외부 시스템 연동: MQTT, Modbus TCP, REST API 등 상위 시스템 연동 인터페이스가 현재 구성에서 확인되지 않음
- 확장성 제약: 단일 보드 구조로, 다수 계측 포인트를 분산 배치하는 멀티노드 구성 아키텍처가 별도로 제시되지 않음
개선 방향:
- MQTT 브로커 연동: W5500의 TCP 소켓을 활용해 MQTT 클라이언트를 추가하면 Node-RED, InfluxDB, Grafana 등 표준 에너지 모니터링 스택과 연결 가능
- TLS 적용: mbedTLS(ESP-IDF 내장)를 활용한 HTTPS 전환으로 웹 UI 보안 강화
- Modbus TCP 지원: W5500의 하드웨어 소켓 구조는 Modbus TCP 슬레이브 구현에 적합. 기존 SCADA 시스템과의 통합 경로 확보 가능
- 멀티노드 구성: 동일 PCB를 복수로 배치하고 중앙 서버에서 집계하는 분산 계측 구조로 확장 가능
FAQ
Q1. ESP-IDF 경험 없이도 이 설계를 기반으로 개발할 수 있나요? ESP-IDF는 FreeRTOS 기반의 전문 펌웨어 프레임워크로, Arduino보다 진입 장벽이 높습니다. 다만 W5500용 드라이버 라이브러리(ioLibrary_Driver)가 공개되어 있어 네트워크 부분의 초기 구현 부담은 낮출 수 있습니다. ADE7878 레지스터 제어는 SPI/I2C 통신과 데이터시트 이해가 필요합니다.
Q2. 어떤 PoE 스위치가 필요한가요? IEEE 802.3af(15.4W) 이상을 지원하는 PoE 스위치면 충분합니다. 이 보드의 PoE 모듈은 10W 출력으로, 802.3af 표준 범위 내에 있습니다. 기존 사무용·산업용 PoE 스위치 대부분과 호환됩니다.
Q3. 3상 4선(와이) 외에 3상 3선(델타) 결선도 지원하나요? ADE7878은 와이(Wye) 및 델타(Delta) 모두 지원합니다. 결선 방식에 따라 펌웨어의 레지스터 설정과 교정(calibration) 절차가 달라지므로, ADE7878 데이터시트의 결선별 구성 가이드를 참조해야 합니다.
Q4. 계측 데이터를 외부 서버나 클라우드로 보낼 수 있나요? 현재 공개된 구성에서는 내장 웹 서버를 통한 브라우저 열람이 확인됩니다. W5500의 하드웨어 소켓을 활용하면 MQTT 또는 HTTP POST로 외부 서버에 데이터를 전송하는 구조로 확장할 수 있습니다. 이는 펌웨어 수준의 추가 개발이 필요합니다.
Q5. 이 설계를 상용 제품으로 발전시키려면 어떤 점을 보완해야 하나요? 최소한 다음 세 가지가 필요합니다. 첫째, 웹 UI에 인증 및 TLS 암호화 적용. 둘째, 계측 데이터 로컬 저장 또는 외부 DB 연동. 셋째, IEC 62053 규격 기준의 현장 교정 절차 수립입니다. 하드웨어 측면에서는 과전압·서지 보호 회로의 적용 여부도 산업 인증 획득 시 중요한 항목입니다.

