Street Lamp Intelligent Monitoring System Design Based on NB-IoT Technology

In view of the problems in the practical application of traditional urban Lighting systems, such as inconvenient centralized control of street lamps, untimely information monitoring, and low efficiency of human inspection methods, a design scheme for street lamp monitoring systems based on narrow-band Internet of Things (NB-IoT) technology is proposed. In this solution, the STM32L431 RCT6 chip is used as the main control chip, and the NB-IoT module is used as the communication module. It is connected to the Huawei Internet of Things management platform, and an application program is developed on the application side to remotely monitor the street lights in real time. The experimental results show that the system realizes real-time monitoring and intelligent control of street lamps.


Introduction
Modern times are an era of artificial intelligence. Artificial intelligence has penetrated into every corner of people's production and life. Obviously, the street lamp management system closely related to the smart city is no exception. The traditional way of manually turning on streetlights and inspecting streetlights can no longer meet the requirements of modern society. We urgently need to connect the Internet of Things technology with the streetlight management system. The management of city street lights has low requirements on high data transmission rate and operation is not complicated, but the range of street lights is wide, the number is huge, and the amount of data for communication is huge. This requires a communication technology with low cost, wide coverage, large capacity, and reliable transmission. NB-IoT technology meets these requirements very well.
In this paper, a street lamp monitoring system based on NB-IoT technology is designed. Experiments show that the system can monitor the ambient brightness in real time and automatically control the street lamp to turn on and off according to the ambient brightness. Obviously, manual remote control can also be performed through the application program. And can record all historical data related to street lamps.

Design of street lamp monitoring system
The network architecture diagram of the NB-IoT street lamp intelligent monitoring system is shown in Figure 1, which includes four hierarchical structures: street lamp terminal, NB-IoT network, Huawei Management platform (OceanConnect) and monitoring center. The street lamp terminal integrates a single lamp controller device with an NB-IoT communication module. The device includes street lamp equipment (built-in sensors), main control chip, NB-IoT communication module and power module. Communicate with the wireless network through the NB-IoT communication module to control the on and off of each street lamp and collect street lamp information. NB-IoT network includes NB-IoT technology and core network. The network uses advanced NB-IoT low-power wide-area communication technology, authorized wireless spectrum resources, and uses carrier-grade end-to-end security technology to ensure the security of data and access methods. OceanConnect platform is Huawei's Internet of Things management platform. The platform has rich protocol adaptation capabilities, supports massive diversified street light equipment access, and can achieve unified access and management of different types of street light equipment and different monitoring centers to ensure interconnection. The monitoring center includes applications and servers. After verifying the identity through the server center, the administrator can perform remote data query and monitoring on the application side to realize real-time information monitoring and storage.
The street light terminal of the NB-IoT street light monitoring system consists of a main control chip (STM32L431RCT6), an NB-IoT communication module (BC35-G), a light sensor (BH1750), a temperature and humidity sensor (DHT11), a global positioning system (GPS) sensor, and the power module constitutes, the design block diagram of this system is shown as in Figure 2.  Figure 2, sensors such as light, temperature, humidity, and GPS can collect data such as light intensity, temperature, humidity, and latitude and longitude in real time. The main control chip transmits the data to the NB-IoT communication module through serial communication, and then transmits it through the NB-IoT network. Go to the monitoring center. At the same time, it receives the instructions issued by the monitoring center through the signal receiving device of the NB-IoT communication module to monitor the running status of road lamps. Each street lamp terminal has a unique universal identity recognition module, and the monitoring center can identify each street lamp, thereby achieving single lamp control. In addition, the sensor function can be expanded to monitor the environmental information around the street lights and feed the information back to the monitoring center. The monitoring center can effectively analyze and monitor the surrounding environmental conditions based on the data information.   For NB-IoT downlink channel, there are three physical channels and two physical signals. Three physical channels are: NPBCH, the narrowband physical broadcast channel; NPDCCH, the narrowband physical downlink control channel; NPDSCH, the narrowband physical downlink shared channel.

NB-IoT network
Two physical signals are NRS, Narrowband Reference Signal; NPSS and NSSS, Primary and Secondary Synchronization Signals. NPBCH, NPDCCH and NPDSCH all use QPSK modulation schemes. NPSS and NSSS use Z-Chu modulation. Figure5 shows a constellation of the NPSS signal.

Figure5. NPSS constellation
In the same frequency band, the gain of NB-IoT is 20dB higher than that of GPRS network, which can provide seamless coverage of street lamp monitoring. NB-IoT can support 50,000 to 100,000 connections in a single cell. The street lamp terminal has a low data transmission rate and is insensitive to network delays, allowing more street lamp equipment to be reliably connected at the same time. NB-IoT uses power saving mode (PSM) and extended discontinuous reception (eDRX) to reduce the power consumption of street lamp terminals and provides longer standby and working time. NB-IoT's low bandwidth, low rate, and low power consumption bring its low cost advantages. Based on the above characteristics, NB-IoT can meet the needs of real-time monitoring of road lamps. Its performance characteristics with LoRa and ZigBee technologies are shown in Table 1   The sensor part of this design uses an integrated circuit board designed by the combination of BH1750 light sensor and bright LED. BH1750 is a digital light intensity integrated circuit for two-wire serial bus interface. Can detect a wide range of light intensity changes (1lx-65535lx). It is characterized by strong controllability, support for I 2 C bus interface, spectral sensitivity characteristics close to visual sensitivity, output of digital values corresponding to brightness, support for 1.8V logic input interface, weak light source dependence, minimum error variation of about ± 20%. The physical map and schematic diagram of this part are shown in Figure 8.

Software design
The realization of this design is mainly through the software control hardware to cloud the device and control the device on the IoT cloud platform. The software is mainly to drive the light sensor to drive the I2C drive development and the calculation of the algorithm program of the light intensity numerical conversion And the communication interface initialization, clock initialization, communication module using UART and AT commands for device network configuration and cloud operation, and AT command call code development, and cloud platform communication program development, and finally the highlight LED light Driver developed. Platform development and application development are also required on the Internet of Things platform. The development of the Internet of Things platform is mainly to define device profiles and codec plug-in operations. Application development can use Huawei IOT Booster for visual development of application software. In addition, an application program has been written to allow visual operation on the monitoring terminal. After joint debugging, each software and hardware module can complete the corresponding functions.
A limited application protocol (CoAP) is used between the street lamp terminal and the OceanConnect platform. This protocol is an application layer communication protocol, follows the client / server (C / S) architecture, is based on UDP transmission, and does not need to establish three handshake Access the Internet. The minimum data packet of the protocol is only 4B, which can meet the communication requirements between microcomputers. The data communication protocol between the OceanConnect platform and the monitoring center uses Hypertext Transfer Protocol (HTTP), which is an application layer communication protocol that contains commands and transmission information, follows the C / S architecture, and can be used in Internet application systems Communication between them, so as to achieve the integration of hypermedia access to various application resources.
The main function of the data acquisition terminal is mainly to do hardware initialization: GPIO initialization corresponding to LED, IIC initialization corresponding to BH1750 light sensor, UART initialization corresponding to serial printing and NB-IoT module communication, SPI initialization such as screen display, Lite OS kernel Initialization, task initialization and start task scheduling, Lite OS starts to perform work, etc.
The application program is mainly completed on the OceanConnect platform, and the profile files are used to describe the types and service capabilities of street light equipment. The profile file is a json format program. The program describes the capabilities of street light equipment, including manufacturer (manufacturerName), model (model), protocol type (protocolType), device type (deviceType), and provided services. Temperature, Humidity, Light, Longitude, and Latitude service-specific information. After the codec plug-in corresponding to the profile file is written, the OceanConnect platform is responsible for calling the codec plug-in to realize the function of

Figure9. Huawei Management Platform(OceanConnect platform)
In the upstream direction, first collect the data of street lamp equipment, encode the data according to custom rules, and send the encoded data to the NB-IoT communication module in the form of AT commands through the serial port. After receiving the AT command, the NB-IoT communication module automatically encapsulates the command as a message of the CoAP protocol and sends it to the configured OceanConnect platform. After receiving the data, the OceanConnect platform automatically parses the CoAP protocol package, finds the matching codec plug-in based on the street light device profile file, parses the data into json data matching the street light device profile, and stores it on the OceanConnect platform. Finally, the monitoring center obtains the data on the OceanConnect platform through the data query interface (RESTful).
In the downstream direction, the monitoring center first calls the RESTful interface to send asynchronous commands (json data) to the OceanConnect platform. If the OceanConnect platform judges that the street lamp device is online, it immediately issues a command; if the street lamp device is offline, it caches the command in the database of the OceanConnect platform. Then, the street lamp equipment reports the data at a certain moment. After the OceanConnect platform receives the data, it retrieves whether the corresponding street lamp equipment has a valid but unissued command in the database. Finally, the command is encoded by the codec plug-in and sent to the street light device. The street light device receives the command, executes the command, and returns the execution result to the OceanConnect platform. According to the command execution result, the OceanConnect platform modifies the corresponding command status.
In addition to manually sending street light switch commands, rules can also be set on the OceanConnect IoT platform. Complete the command to automatically switch street lights according to the ambient light intensity. When the light intensity is greater than the threshold, the cloud platform issues a light-off command, and when the light intensity is less than the threshold, the cloud platform issues a light-on command. Setting rules can be done on the OceanConnect platform, as shown in  real-time information such as light, temperature, and humidity in the form of graphs and clear record all operation history. The light intensity curve is shown in Figure 12, the command issuing window is shown in Figure13, and the cloud platform's historical operation record is shown in Figure 14.
Light intensity change

Summary
Designed a street lamp monitoring system based on NB-IoT technology, real-time collection of temperature, humidity, light intensity and latitude and longitude status information of the street lamp environment, and remotely transmitted information to the monitoring center through the NB-IoT network The mobile APP terminal of the mobile phone provides users with remote network monitoring services for the working status of street lamps, which is convenient for users to obtain the street lamp perception information in time and deploy related tasks. Through the temperature information of the street lamp, the service life of the street lamp can be predicted; through the data of the ambient humidity of the street lamp, the optimized design of the ingress protection (IP) waterproof level of the lamp can be provided; through the detection data of illumination and GPS sensors, the switch control of the street lamp can be realized And fault location. Through the data collection, reporting and storage of various sensors, the online environment quality monitoring of the surrounding environment temperature, humidity, light intensity and other factors. The author of this article mainly studied the influence of light intensity on street lamp monitoring system, but did not consider other factors such as infrared conditions. NB-IoT itself has low power consumption characteristics, but the development board used in this research has high power consumption problems. These all need further research and improvement.

Acknowledgement
First of all, I would like to express my sincere gratitude to my college. The college provided me with a good learning environment and financial support. At the same time, I would also like to thank all the leaders and colleagues who have taught, cared and helped me during the completion of the project. I am grateful to my parents. They provide me with all possible help for my upbringing and silent life. The support of my parents will always be my strongest backing.
I am grateful for the many help my husband has provided for me, so that I can enjoy the warmth of my family after my busy work. No matter how busy I am, as long as I return home, I can quickly recover and invest in new learning and life. At the same time, I also want to thank my lovely son, who gave me unlimited motivation and determination.