Internet-of-Things for Smart Street Lighting System using ESP8266 on Mesh Network

IoT concept gained tremendous momentum in this century's technological advancements because it has efficiently connected various devices wirelessly. The ESP8266 Wi-Fi serial transceiver module is one of the most used devices for IoT applications. This paper designs the IoT-based smart street lighting system using ESP8266 configured as a Mesh network. The ESP8266 was instructed (programmed) to control the light level by producing a PWM signal, then it sends a dimmer value and reads the sensor's data. We can access our system wirelessly via a web server. The overall system was successful as a smart street lighting system in a wireless Mesh environment. This research result is also compared to the existing similar project in terms of the system complexity aspect.


Introduction
Smart street lighting system based on IoT is one of the solutions to minimize the energy consumption within the city as well as reduce the crews on site in maintenance processes [1]. IoT technology is being integrated into street lights that can be monitored remotely and provide notification to the admin user. The ESP8266 module is one solution to implement IoT. Moreover, the ESP8266 is a low-cost Wi-Fi technology compared to other IoT technologies (e.g., Zigbee, LoRa, Wi-Fi shield for Arduino, etc.) as shown in Table I. In previous work [2], we have reported the ESP8266 application for street lighting with a single node. The results confirmed that the node (LED module) could be controlled and monitored its status through an HTML-based web server.
The motivation of this paper is to add more nodes (street light) in our system. Hence, the link topology must be applied. The Mesh topology was chosen due to its simple network. In addition, the ESP8266 supports a feature to be configured as Mesh. Through this configuration, the street lights can communicate with each other wirelessly. Thus, the street light can be installed extensively with massive area coverage. If the node of street light blacks out, the other nodes (within range) will autonomously reconfigure the network. Therefore, the wireless connection of the street light is still be maintained.

Methods
In this part, we describe the hardware and software parts of the smart street lighting system. The hardware can be divided into four blocks as illustrated in Fig. 1, i.e., 1) gateway system as coordinator, 2) node system as an end device, 3) modem and 4) web server as the primary user. The gateway is responsible for coordinating each node and it can send brightness packets to other nodes in the network through one or more wireless hops. Gateway has several services such as web services, light sensors (BH1750), temperature sensors, humidity (DHT11) and LEDs as end devices. Light sensors and humidity sensors have a function as a feedback system to determine the brightness value that will be sent to other nodes.

WIRELESS ROUTER
The BH1750 works by sensing the intensity of light in its environment. The output from the sensor is in Lux (Lx) that will be calculated to determine the optimal light intensity for saving energy. Whereas the DHT11 is used to detect temperature and humidity in environmental detection as previously elaborated in [3]. While node system consists of NodeMCU and LED. In this work, we used one LED module (type NL200D produced by NoBi TM ). Therefore, the electronic driver for dimmer control is needed. The driver output is 0 -10 VDC depends on the PWM value as an input. In this work, we used five nodes: one node uses the real street light (LED module), and four nodes employ 3 Watt pLED as the actual visualization of street lights. The hardware setup is visualized in Fig. 2.

Fig. 2. System Architecture
The second part is software that could be categorized into two components, i.e., firmware and web server. The firmware part refers to Mesh network design. Besides the mesh network connecting function, the firmware has roles in transmitting and receiving a packet of nodes. In this work, we design Mesh networks as defined by ESP-Mesh, which has several features as following 1) Messages between different nodes are sent in JSON format because it makes the code and the messages human iJES -Vol. 9, No. 2, 2021 readable and easy to understand. It can be integrated into various programming languages, web applications, and other apps; 2) Single message and broadcast message are possible; 3) Accurate time synchronization, it means that all nodes share the same clock with a precision; 4) Mesh autoconfigure, it means that node can be disconnected at any moment so new node is integrated automatically; and 5) Routing message will be transmitted through hop from the closest node.
The designed Web server for smart street lighting system has four main features, i.e., 1) it can display the sensor data which is integrated into gateways such as light sensor, temperature, and humidity sensor; 2) display the information about mesh routing table from each LED streetlights. In addition, it displays information of PWM level in a Mesh network; 3) ON/OFF feature for single or broadcast nodes which connected to Mesh networks, and 4) dimming features for single or broadcast node in a Mesh network.

Results and Analysis
After the hardware and software are integrated carefully as in Fig. 2, we first test the system functionally by sending the command ON/OFF to the LED module through a web server as reported in [2]. Once the test was successfully done, later we test the Mesh connection in which the experimental setup is depicted in Fig. 3. Moreover, we also observe web server performance in displaying the sensor information and Mesh table.
Based on the test result, the Mesh table can show the Mesh network routing as shown in Fig. 4 where node 3948426995 acts as a gateway (HOST GW). Node 2391201568 (Node 4) and 2391201607 (Node 1) are directly connected to the gateway. Node 1 has two sub connections and will be an access point for the next sub connection. Meanwhile, Node 4 in this table only has one sub connection. The node sequence shows the order of Mesh network connection that is connected directly to the gateway. Node 2391203490 (Node 2) as the first sub receive the message from Node 1. Node 2391204268 (Node 3) as the second sub receive a message from Node 2 as the first sub. Node 2391201549 (Node 5) as an NL200D LED module receive the message from 2391201568 (Node 4) that is directly connected to the gateway. After receiving a broadcast message, the node will process brightness value as PWM level and send an acknowledgment (ACK) to the gateway.

Conclusion
An IoT-based Smart Street Lighting System using ESP8266 based on Mesh network has been developed and tested. In line with the functional test, we can conclude that the system works well as expected. Compared to [4] that use the analog sensor, our system is built with digitally-outputted sensors. Therefore, our system has a lower complexity. In future work, we address several scenarios for system testing related to Mesh connection.