Design and Build Automatic Transfer Switch (ATS) with Zero Crossing Detection for Off-Grid Solar Power Systems and PLN Networks

ats zero crossing off-grid pv phase angle blynk iot

Authors

November 30, 2026

Downloads

Power interruptions can disrupt the operation of essential electrical loads, while transferring between utility-grid power and a photovoltaic (PV) inverter requires careful coordination when both sources are energized. This study designed, developed, and evaluated an automatic transfer switch (ATS) incorporating zero-crossing detection to estimate the phase-angle difference between a battery-backed, off-grid PV inverter and the utility grid operated by Indonesia's State Electricity Company (Perusahaan Listrik Negara, PLN). An Arduino Nano ESP32 microcontroller controlled electrically interlocked relays across three operating modes, supported by a local display and remote monitoring through the Blynk platform. Laboratory testing evaluated voltage and frequency measurement accuracy by comparing sensor readings with reference multimeter and oscilloscope measurements. The tests also assessed control logic, phase-angle-based transfer decisions, and switching performance under resistive and nonlinear electrical loads. The mean absolute percentage errors (MAPEs) for voltage and frequency measurements were below 5%, while the mean absolute phase-angle error was 1.20°. The prototype operated as intended across all 17 operating scenarios and six additional trials involving configurable phase-angle thresholds ranging from 5° to 10°. Following a utility-grid failure, the transfer from PLN to the inverter was completed within 46.8 ms. During planned transfers back to the PLN grid, the controller delayed switching until the measured phase-angle difference satisfied the configured threshold. These findings demonstrated that the proposed ATS prototype could restore power rapidly following a utility-grid interruption while incorporating a configurable phase-angle criterion for planned source transfers. The results supported the feasibility of integrating zero-crossing detection with microcontroller-based ATS control for battery-backed off-grid PV systems, although the demonstrated performance was limited to the specified laboratory conditions and tested load characteristics.