DESIGN AND IMPLEMENTATION OF A SMART URBAN LIGHTING SYSTEM USING AN ADAPTIVE TINYML AND SELF-RECOVERY OF LORA COMMUNICATION
Main Article Content
Tóm tắt
Conventional urban lighting systems often rely on fixed schedules or astronomical sunrise and sunset times, which limits their ability to react to local weather, support reliable field communication, and recover from peripheral faults. This paper presents an adaptive smart urban lighting system based on a distributed gateway-node architecture and focuses on three measurable contributions. First, we implement a gateway-side TinyML module that uses only two normalized inputs, average ambient illuminance and normalized API time, to estimate an offset for sunrise and sunset switching times. Second, we realize a
hybrid ISR/Timer-based AC dimming mechanism that separates zero-cross detection from TRIAC gating to obtain stable and flicker-free brightness control for 220 V LED luminaires. Third, we add a communication self-recovery framework that detects and recovers from LoRa and I2C faults without restarting the whole system. The TinyML module is intentionally lightweight: the deployed linear regression model contains only six float parameters in total, requires 24 bytes for weights and biases, and performs a single dot-product-style inference at the gateway. Experimental validation on real ESP32-based hardware shows stable bi-directional LoRa communication, deterministic dimming behavior, successful peripheral recovery, and adaptive sunrise/sunset switching under varying environmental conditions. Compared with fixed-schedule lighting and cloud-dependent control approaches, the proposed design shifts adaptation to the gateway edge and keeps runtime overhead minimal, making it suitable for deployable smart city lighting systems.