This is an old revision of the document!
author Pascu Mihail-Eugen ACES 2021
The purpose of this application is to implement a system that makes the street lights more efficient than the conventional street lighting systems in the matter of energy conservation, reduction of maintenance costs, decrease of maintenance time and increase in the public safety.
The public lighting system in Bucharest is an important source of expenses for the Bucharest City Hall. 1)According to [3] in the last 5 years, the average cost of the public lighting was around 28.650.000RON. This increased cost is due to the fact that the system was not updated to the newer and more efficient lighting solutions. 73% of the bulbs that are used inside the lighting poles (the total numbers are around 90.000 poles and approximately 120.000 bulbs) are still incandescent bulbs which are less efficient and have a shorter life span than the bulbs with LEDs. The LED bulbs consume 75% less energy and have at least double life span, according to [4].
Because the civic spirit is not cultivated in our population and that no efficient maintenance system is in place for the street lighting system, issues are detected and reported after long periods of time. Also, because the issues are not fixed in short time, the public safety at night is at risk because of the possible street dangers (thieves, open sewer entry and others) can not be see without lighting.
The system is composed of two main elements: a central hub and many pole controllers.
All the components that were used in this project are:
Regarding the electrical connections, the central hub has no external devices connected to it. The central hub is connected just to the PC via TTL-USB in order to communicate with the PC, to find out the IP address of the web server hosted on it.
The electrical circuit for the poles is presented in the below image [5]:
In the pole schematic can be seen that one analog input (GPIO36) is used to read the value from the LDR, one analog input (GPIO 34) is used to get the voltage that the ESP32 provides to the Bulb (for diagnostic purpose), one digital input(GPIO13) is used to read the signal from the PIR movement detection sensor and one digital output(GPIO2) is used to control the bulb of the pole.
The power supply issue was not taken into consideration for when the system will be installed in a pole. Currently the pole hardware is powered via USB cable. As a solution for this issue, a step-down power supply could be used to connect to the 220V network and convert to 5V, to power up the system.
The system architecture can be found in the image below:
As can be seen, the poles and the central hub establish a mesh network making use of the library painlessMesh [6][7]. This handles the message transmission environment between the poles and the centralHub. Beside this part of code that handles the mesh, there is also the logic part for handling the poles functionalities. This part is making use of the FreeRTOS [8] concepts.
It that was developed for this project is divided in two parts:Pole and CentralHub code. Each part was again divided in multiple files to improve the code readability, update and maintenance time in this way (<part> can be pole or centralHub):
Pole Code:
Central Hub:
Central hub connected to the Mesh but also provide connection as an AP to the web server. Solution, but not enough time. So workaround. Bulb state detection (burnt, not connected, turned off, turned on min, turned on max). The choice for the movement detection sensor.Delay after muvement detection. Power supply was not taken in consideration.
Improvements: geolocation (at least name of bulb with the location, or QR code on the pole); web server in parallel with the painless mesh and refresh info each minute; SleepMode for less power consumption; the poles will communicate with adiacent ones (for extending the sensing capabilities of the poles or transmiting data from poles to the central station). the central station will log data to cloud.
[1] - Verison Intelligent Lighting Solutions :Smart Street Lighting System
[2] - iNELS SMART CITY - Smart street lighting
[3] - Costul anual al iluminatului public in Bucuresti
[4] - Incandescent vs CFL vs LED bulbs
[5] - NodeMCU ESP32 Pinout
[6] - PainlessMesh
[7] - PainlessMesh API
[8] - FreeRTOS
[9] - PIR Datasheet
[10] - Street Light Pole Height
[11] - ESP32 SleepModes