0% found this document useful (0 votes)
63 views28 pages

Electronics: Smart Public Lighting Control and Measurement System Using Lora Network

apliacaciones LoRA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views28 pages

Electronics: Smart Public Lighting Control and Measurement System Using Lora Network

apliacaciones LoRA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

electronics

Article
Smart Public Lighting Control and Measurement
System Using LoRa Network
F. Sánchez Sutil * and Antonio Cano-Ortega *
Department of Electrical Engineering, University of Jaen, 23071 EPS Jaen, Spain
* Correspondence: [email protected] (F.S.S.); [email protected] (A.C.-O.); Tel.: +34-953-212343 (A.C.-O.)

Received: 12 December 2019; Accepted: 7 January 2020; Published: 9 January 2020 

Abstract: The installation of smart meters in smart cities to monitor streetlights (SLs) provides easy
access to measurements of electrical variables and lighting levels, which improves the operation of
installation. The use of smart meters in cities requires temporary high-resolution data to improve the
energy efficiency (EE) of SLs. Long range (LoRa) is an ideal wireless protocol for use in smart cities due
to its low energy consumption, secure communications, and long range indoors and outdoors. For
this purpose, we developed a low-cost new system and successfully evaluated it by developing three
devices, namely the measure and control device for street lights (MCDSL), lighting level measurement
device (LLMD) and gateway LoRa network (GWLN), based on the Arduino open-source electronic
platform. This paper describes the hardware and software design and its implementation. Further,
an algorithm has been developed to enhance the energy efficiency of public lights using MCDSL,
the energy efficiency for street lights (EESL) algorithm, that use the illumination level measured on
the same set of SLs with a dynamic control, which assumed different lighting levels throughout the
night, and adjusted luminous flux based on the traffic intensity of pedestrians. It sends the acquired
data through the LoRa low-power wide-area-network (LPWAN) to the cloud.

Keywords: measure and control device for street lights (MCDSL); energy efficient (EE); lighting level
measurement device (LLMD); Long Range (LoRa); low-power wide-area-network (LPWAN)

1. Introduction
Nowadays, the energy crisis and environment pollution have become a global problem, and the
increasing use of energy has caused climate change. In order to minimize electricity consumption,
new technology has to be implemented for street lighting systems. This energy consumption can be
reduced considerably by applying new communication and control technologies. Power is required for
most of the services to be implemented in smart cities, among which street lighting demands higher
power consumption.
Kabalci et al. [1] presented the smart infrastructure system that includes a smart energy system as
well as smart communication and smart information systems. In this way, the paper [2] provided a
classification of technical and regulatory characteristics of IoT services for smart cities which are mapped
to corresponding roles in the IoT value chain, and characterize and identify specific requirements for
several smart city services, namely, smart metering, smart parking, smart street lighting and MCS.
In order to make the environment safe, its illumination has to comply with lighting norms, and in
this context, a comparative study of differences in energy consumption while applying 2004 and 2014
releases of the CEN/TR 13201 standard for lighting designs was analysed in [3]. Also, Ref. [4] offered
a set of the most important recommendations regarding the relevant influencing factors for energy
savings in street lighting.
Furthermore, Sedziwy et al. [5] allows obtaining power saving not only by replacing high pressure
lamps with LEDs, but also by improving a design quality and by introducing a dynamic street lighting

Electronics 2020, 9, 124; doi:10.3390/electronics9010124 www.mdpi.com/journal/electronics


Electronics 2020, 9, 124 2 of 28

control. In addition to the paper [6] the authors improved the energy efficiency and quality of street
lighting by applying two different solutions to achieve energy saving in street lighting design: the
installation of luminous flux regulators and the replacement of existing luminaires with LED. Also,
a study has been done to analyse the different devices which influence energy consumption with
the intention of better understanding their behaviour and performance in [7], in which the authors
improve the effectiveness of these regulations and therefore to optimize energy consumption.
Carli et al. [8] studied a multi-criteria decision-making tool to support the public decision maker
in optimizing energy retrofit interventions on existing public street lighting systems. Further, a method
of determining the power losses occurring in a lighting system, depending on the power supply
conditions and the dimming level is described in [9], wherein the authors determined that loss is
dependent on the configuration of the supply network, that is, whether it is single-phase or three-phase.
The paper [10] focused on providing a formal basis to incorporate knowledge regarding multiple
sensors into the lighting control model by introducing the dual graph grammar concept.
On the other hand, the hybrid poles group based on renewable energy, street lighting, and EV
charging, which can realize fast charging and slow charging based on DC micro-grid with help of
energy storage device is proposed in [11].
The bibliographical revision realized for the energy efficiency of SLs with wireless technologies
has been elaborated on the basis of the measured parameters, wireless technology, sensors, and the
base platform. Table 1 shows the results of the review:

Table 1. Analysis of wireless technologies used in SLs monitoring and control.

Parameters Network
Bibliography Sensors Based on
Measured Technologies
Electrical CC2530OEM
[12] Wi-Fi Not provided
parameters module
Weather PIR Sensor
[13] parameters, Object SIM900/GSM/SMS Dust Sensor Arduino
detection Rain Sensor
Lighting Sensor
[14] Light intensity, Not provided Motion Sensor Not provided
PIR Sensor
Object detection, IR Sensor
[15] Not provided Arduino Uno
Light intensity LDR
KNX Basic weather
[16] Illumination level Not provided Not provided
station
Ambient light
[17] Illumination level Not provided Not provided
sensor
[18] Local presence LPWAN Road-user sensor Not provided
IR sensor, PIR
[19] Light intensity Not provided Atmega128
sensors
PIR sensors, LDR,
Presence detector, Westermo GDW-11
[20] LPWAN ISL76671, RADAR
Light intensity 485 GSM
sensor
Electric parameters,
[21] ZigBee MAVOLUX 5032 B Not provided
Light intensity
Electric and
weather
[22] LPWAN Not provided PLC
parameters,
Ambient light
Electronics 2020, 9, 124 3 of 28

Table 1. Cont.

Parameters Network
Bibliography Sensors Based on
Measured Technologies
Humidity, 808H5V5,
[23] temperature, light LPWAN MCP9700A, EKMC, ATmega1281
and infrared sensor LDR
Lux and Temp
[24] L-INX Not provided PLC
sensor
[25] Presence sensor WiMAX Not provided Raspberry-Pi
Electrical
[26] parameters, Not provided Orthoimages GIS
Luminance
[27] Illumination level LPWAN Not provided EMB-LR1272

LPWAN is a generic term for a group of technologies that enable wide area communications
at lower cost points and better power consumption are developed in [28,29]. LoRa is particularly
interesting due to the openness of its higher layer specifications LoRaWAN, and for the wide availability
of low-cost devices. LoRa in [30] was also the only technology allowing construction of private LPWAN
networks. As described in the research [28], the last years have seen the widespread diffusion of novel
LPWAN technologies, which are gaining momentum and commercial interest, as technologies for the
Internet of Things (IoT) are enabled. Finally, the paper [31] discussed some of the most interesting
LPWAN solutions, focusing in particular on LoRa, one of the last born and most promising technologies
for the wide-area IoT.
There are some applications about LoRa such as in the research [32] studied the concept of
a vision system that monitors sag and temperature of overhead transmission lines using LoRa
wireless communication and data transmission, the developed system consists of a camera and a
microcomputer equipped with LoRa communication module. Also, in the paper [33] presented the
development of relays that communicate with each other using LoRa allows for the combination of the
cost-effectiveness and ease of installation of wireless networks with long-range coverage and reliability.
In this way, Paredes-Parra et al. [34] proposed a wireless low-cost solution based on LoRa technology
able to communicate with remote PV power plants, covering long distances with minimum power
consumption and maintenance. Finally, the paper [35] presented a LoRa network for monitoring and
enhancing of efficient energy of inductions motors.
In the literature reviewed, most authors do not design measuring devices for use in street lighting,
instead, they use commercially available equipment already designed, and the transmission network
has not been analysed. Therefore, in this work the authors have designed a measurement system for
public lighting that allows to improve the energy efficiency of the SLs by means of monitoring and
control equipment. In addition, the LoRa network has been designed to obtain the measured data
in real time, to optimize the installation by means of a developed algorithm. This system allows to
reduce the energy consumption of the campus.
In this paper, the authors propose a system to improve the efficient energy of SL using algorithm
developed. Therefore, the authors present a number of novel contributions from our previous work
and the state-of-the-art:

- Design of our own system to improve energy efficiency in public lighting. Three device, namely
the MCDSL, LLMD, and GWLN, have been developed.
- These devices are low cost and open source, and were evaluated successfully.
- Monitoring and control of a public lighting system using the EESL algorithm implemented in
MCDSL, with communication via a LoRa network controlled by GWLN.
Electronics 2020, 9, 124 4 of 28

This paper is structured as follows. Section 2 presents the diverse requirements of street lighting
from different road users’ perspectives and describes the LoRa network used. Subsequently, Section 3
presents the details of MCDSL, LLMD, and GWLN systems to manage SLs and minimise energy
consumption using the EESL algorithm. Section 4 details the lamp tests done, and parameters adopted
Electronics 2019, 8, x FOR PEER REVIEW 4 of 28
in this paper, and also presents the performance of the proposed lighting scheme in terms of the
achieved
adoptedSLs inutility and consumed
this paper, energy.the performance of the proposed lighting scheme in terms
and also presents
of the achieved SLs utility and consumed energy.
2. Theory Description
2. Theory Description
2.1. System Requirements
2.1. System Requirements
The main requirement to be taken into account in the design of the lighting of the proposed system
The main
is the fulfilment requirementstandards
of mandatory to be takendefined
into account in the areas
for various designsuch
of the lighting sidewalks,
as streets, of the proposed
users, etc.
system is the fulfilment of mandatory standards defined for various areas such as streets, sidewalks,
For each of them, an appropriate lighting class is assigned according to the characteristics of the traffic:
users, etc. For each of them, an appropriate lighting class is assigned according to the characteristics
types of users, traffic intensity, average speed, etc.
of the traffic: types of users, traffic intensity, average speed, etc.
The European standard EN 13201-1 [36] and Table 2 of the European standard EN 13201-2 [37]
The European standard EN 13201-1 [36] and Table 2 of the European standard EN 13201-2 [37]
shows lighting classes
shows lighting classesforfor
pedestrians
pedestriansand andcyclists
cyclists that setlighting
that set lightinglevels
levels
forfor pedestrians
pedestrians use.use.

Table 2. 2.P Plighting


Table lightingclasses fromEN
classes from EN13201-2
13201-2 [37].
[37].

Class
Class Horizontal
HorizontalIlluminance
Illuminance Additional Requirements
Additional Requirements
Minimum Minimum
Horizontal
Horizontal Minimum Horizontal Minimum Vertical Minimum
Minimum
Illuminance Horizontal Vertical
IlluminanceE Illuminance Illuminance Ev,min Semicylindrical
Semicylindrical
Illuminance Illuminance
E(lux)
(lux) Emin (lux) (lux) Illuminance
Illuminance Esc,minE(lux)
sc,min (lux)
Emin (lux) Ev,min (lux)
P1 15.0 3.00 5.00 5.00
P1 15.0 3.00 5.00 5.00
P2 10.0 2.00 3.00 2.00
P3 P2 10.0
7.50 2.001.50 3.00 2.50 2.00 1.50
P4 P3 7.50
5.00 1.501.00 2.50 1.50 1.50 1.00
P5 P4 5.00
3.00 1.000.60 1.50 1.00 1.00 0.60
P6 P5 3.00
2.00 0.600.40 1.00 0.60 0.60 0.20
P6 2.00 0.40 0.60 0.20

The proposed
The proposedsystem takes
system takesinto
intoaccount
account the levelofoflighting
the level lightingrequired
required at any
at any given
given moment,
moment,
whichwhich
is modified
is modified if pedestrians are present. Figure 1 shows the scheme of the system developed in in
if pedestrians are present. Figure 1 shows the scheme of the system developed
this research.
this research.

Figure1.1.Architecture
Figure Architecture of
of SLs
SLsinincampus.
campus.

2.2. LoRa
2.2. LoRa Network
Network
LoRaLoRa LPWAN
LPWAN networks
networks composedofof end-device,
composed end-device, gateway
gatewaydevice,
device,andand
network server
network are are
server
organized in a star topology. End-devices send data to gateways over a single wireless hop and
organized in a star topology. End-devices send data to gateways over a single wireless hop and
gateways relay messages to/from central network servers through a non-LoRa LPWAN network.
gateways relay messages to/from central network servers through a non-LoRa LPWAN network.
Noreen et al. [38] provides in depth analysis of the impact of these three parameters on the data rate
and time on air, and the paper [39] offers an in-depth analysis and assessment of LoRa LPWAN
Electronics 2020, 9, 124 5 of 28

Noreen et al. [38] provides in depth analysis of the impact of these three parameters on the data rate and
time on air, and the paper [39] offers an in-depth analysis and assessment of LoRa LPWAN functional
components: its capabilities (total traffic load, packet delivery quality) versus its efficiency (collision
and frequency usage).
The LoRa radio has different configuration parameters: the carrier frequency (CF), spreading
factor (SF), bandwidth (BW) and code rate (CR) [40–43]. The combination of these parameters provides
different energy values and transmission ranges:

• CF is the centre frequency used for the transmission band. For the SX1276/SX1276 transceiver,
and is in the range of 433 MHz in Asia, 868 MHz in Europe, and 915 MHz in North America.
• SF provides a trade-off between data rate and range. The choice of higher spreading factor can
increase the range but decreases the data rate and vice versa. LoRa employs multiple orthogonal
spreading factors (between 7 to 12).
• BW: Transmitter sends the widespread data at a chip rate equal to the system bandwidth in chips
per-second-per-Hertz. LoRa can only be chosen among three options: 125, 250, or 500 kHz.
• CR: Forward error correction (FEC) techniques are used in Lora to further increase the receiver
sensitivity. Code rate defines the amount of FEC. The coding rate expression is CR = 4+4 n , n is
from 1 to 4. It denotes that every four useful bits are encoded by 5, 6, 7, or 8 transmission bits.

The nominal bit-rate (in bits per second), is obtained taking into account these parameters.
Moreover, the expression of the bit-rate is given in Equation (1):

BW
Rb = SF × × CR (1)
2SF
For LoRa, the actual time on the air for a packet can be defined as the duration of uplink and
downlink transmissions. Further, tpk depends on parameters of LoRa modulation, such as SF, BW, CR,
and can be expressed as the sum of the time needed to transmit the preamble and the physical message.

tpk = tp + tPHY (2)

Equations (3) and (4) represent how these two terms have been calculated, where Np is the number
of symbols used by the radio transceiver as the physical preamble of the message and NPHY indicates
the number of symbols transmitted in the physical message and can be determined as shown in
Equation (6). Equation (5) defines tsym as the duration (in seconds) of a symbol which depends on SF
and BW:
tp = tsym × Np + 4.25 (3)

tPHY = tsym × NPHY (4)

2SF
tsym = (5)
BW
" ! #
28 + 8 × PL + 16 × CRC − 4 × SF
NPHY = 8 + max ceil × (CR + 4), 0 (6)
4 × (SF − 2 × DE)
To calculate the time on air (or packet duration), first calculate the payload symbol. For a given
payload denoted by PL (in bytes), a spreading factor (SF) and a coding rate (CR), the number of symbols
NPHY used to transmit the payload can be calculated. CRC (cyclic redundancy check) indicates the
presence (value 1) or not (value 0) of the CRC field in the physical message and DE indicates if the
mechanism to prevent issues about the clock drift of the crystal reference oscillator is used (value 1 for
SF12 and SF11, 0 for others).
Electronics 2020, 9, 124 6 of 28

2.3. EESL Algorithm


The algorithm has two paths: (i) hourly regulation; (ii) regulation by adaptation to the illumination
level. Each of them has a different function in relation to time and pedestrian flow. The goal is
to achieve the best adjustment of the luminous flux of the lamp, and therefore the optimization of
electricity consumption. Thus, the algorithm dynamically adapts the luminous flux to the necessary
conditions, so that the lamp does not always operate at 100% of the luminous flux.
The total energy saved Esav is given by:
n 
X 
Esav = Pb (i) × hb (i) − Pr (i) × hpe (i) (7)
i=1

where n is the number of lamps, Pb the total installed power in the baseline scenario in kW, hb the
number of operating hours in the baseline scenario, Pr the reduced power in kW, and hpe the number
of equivalent operating hours.
The regulation percentage %Reg is given by the following Equation (8)
!
Lcur (t) − Lmin (t)
%Reg(t) = Regmax − × 100 (8)
Lthre (t) − Lmin (t)

where Lcur is the current level, Lmax the maximum level, Lmin the minimum level, Lthre the threshold
level, and Regmax is the maximum regulation allowed by the lamp.

3. Street Lights System Design

3.1. Hardware
This research approaches from zero the design and development of a SL control system to be used
in a smart city with communication based on LoRa protocol and data storage in the cloud.
The system consists of three devices: (i) GWLN (gateway to LoRa network) to centralize
communications and upload data to the cloud; (ii) MCDSL to control the SLs, make measurements of
electrical variables and position with GPS, communicating through LoRa LPWAN with the GWLN;
(iii) LLMD (light level measure device) to measure the lighting level and send the data to the GWLN.

3.1.1. GWLN Design


The core of the GWLN (Figure 2) is the AUR3 board [44] microcontroller on which DLS (Dragino
LoRa shield) [45] version without GPS (global positioning system) is assembled, that centralizes
communications under the LoRa protocol. The modular design allows the GWLN to be scalable
and easy to replace components when one of them fails, so that it does not affect the operation of
the equipment.
Figure 2 shows the GWLN block diagram and the relationship between the components used and
the other components of the lighting system.
GWLN uses the serial port to perform programming with the computer. Once programmed,
the serial port serves as a communication with WMP [46] board for uploading data to the cloud. DLS
acts as GW (Gateway) for the LoRa system composed of MCDSL#1 . . . MCDSL#n and LLMD, all these
components compose the LoRa LPWAN network used in this research. GWLN is powered by a power
supply unit connected to the 230 V AC electrical network with 5 V DC output accepted by the AUR3
and WMP boards. Figure 3 shows the wiring diagram for GWLN.
Electronics 2019, 8, x FOR PEER REVIEW 7 of 28

Electric grid
Electronics 2020, 9, 124 230 V AC 7 of 28
Electronics 2019, 8, x FOR PEER REVIEW 7 of 28

Power supply
Electric grid
5 V DC unit 5 V DC
230 V AC

Data Data
USB Vin Power supply
transfer Vin transfer
Port for AUR35 V board
Serial port
DC unit 5 V DC
WMP boardData Wi-Fi
program with Serial port Data
connection
computer USB Vin transfer Vin transfer
Port for AUR3 board
Serial port WMP board Wi-Fi
program with Serial port connection
computer
Data
transfer
Data
LoRa shield MCDSLs
transfer Firebase
LoRa shield MCDSLs LoRa LPWAN Firebase
cloud store
Data
LoRa LPWAN cloud store
transfer
Data
transfer
LLMD
LLMD

Figure 2. Hardwareblock
Figure block diagram of GWLN.
Figure2.2.Hardware
Hardware blockdiagram
diagramof ofGWLN.
GWLN.

Figure 3. Wiring diagram of GWLN.

Table 3. GWLN components cost.

Description Number Unit Price (€) Total Price (€)


Microcontroller AUR3
Figure 1 20.00 20.00
Figure3.3.Wiring
Wiringdiagram
diagramof
ofGWLN.
GWLN.
Lora shield for Arduino DLS 1 22.91 22.91
Microcontroller WMP 1 4.61 4.61
Table 3 shows the costPower the Table
of supply unit
3. GWLN
components components
used
1 in GWLN, cost.
1.78 and as can
1.78 be seen it is a very small,
very interesting feature forBox
SL container
implementation in 1smart city.6.98 6.98
Description Number Unit Price (€) Total Price (€)
auxiliary material and wiring 1 1.45 1.45
Microcontroller AUR3
Total cost 1 20.00 57.63 20.00
Table 3. GWLN components cost.
Lora shield for Arduino DLS 1 22.91 22.91
Microcontroller WMP
Description 1
Number 4.61Price (€)
Unit 4.61
Total Price (€)
Power supply
Microcontroller AUR3 unit 1 1 1.7820.00 1.78 20.00
Lora shield for Box container
Arduino DLS 1 1 6.9822.91 6.98 22.91
Microcontroller WMP and wiring
auxiliary material 1 1 1.454.61 1.45 4.61
Power supply unit 1 1.78 1.78
Total cost 57.63
Box container 1 6.98 6.98
auxiliary material and wiring 1 1.45 1.45
Total cost 57.63
3.1.2. MCDSL Design
It is very useful to locate the SLs using GPS. Thus, in the design of MCDSL (Figure 4) the DLGS
(Dragino LoRa GPS Shield) [47] has been used, which, in addition to the LoRa features, adds global
positioning.
DLGS
Electronics 2020, uses most of the AUR3 digital outputs for its operation and the GPS position is read by8 of 28
9, 124
means of a serial port, in addition it makes incompatible the reading of the electric variable meter
PZEM-004t (PZEM) [48] with digital inputs and it is necessary to use a serial port for its reading.
3.1.2.From
MCDSLthe above,
Design it follows that at least two serial ports are needed in MCDSL. AUR3 only has one, so
it is necessary to use AMR3 [49] as a microcontroller that has four serial ports.
It is The
verydesign
usefulof to locateis the
MCDSL SLs using
modular, GPS.
as with Thus,
GWLN, in the design
to provide of MCDSL
fault tolerance, and to(Figure
affect as4) the
DLGS little as possible the operation of the equipment. The MCDSL block diagram, together with the adds
(Dragino LoRa GPS Shield) [47] has been used, which, in addition to the LoRa features,
global positioning.
relationship between the components used and the LoRa LPWAN network are shown in Figure 4.

L1
230 V AC Electric grid Lamp
N

PZEM
(voltage and current
sensor) 5 V DC
Power supply
AC Dimmer
unit

USB Vin 2

2
Port for Digital in 47
Serial port
program with 49 Motion sensor
computer
AUM3 board
Data
transfer
LoRa GPS LoRa LPWAN
GWLN
shield

Figure 4. Hardware block diagram of MCDSL.


Figure 4. Hardware block diagram of MCDSL.
The distribution of AMR3 ports and signals for MCDSL is: (i) Serial1 port has been assigned the
DLGS uses most of the AUR3 digital outputs for its operation and the GPS position is read by
function of reading position data with GPS; (ii) serial2 performs the function of acquiring electrical
means of a serial port, in addition it makes incompatible the reading of the electric variable meter
variables v, i and p from the PZEM sensor; (iii) digital inputs 2 and 47 perform the task of
PZEM-004t (PZEM) with
communication [48] the
withAC digital
Dimmerinputs
[50]; and it is necessary
(iv) digital to usethe
input 49 reads a serial portthe
data from formotion
its reading.
sensorFrom
the above, it follows that at least two serial ports are needed in MCDSL.
to detect the presence of people. Figure 5 shows the wiring diagram for GWLN. AUR3 only has one, so it is
necessaryTable
to use AMR3 [49] as a microcontroller that has four serial ports.
4 shows the cost of the components used in GWLN, which is very small, and is especially
The designtoofuse
interesting MCDSL is system
in the SL modular,in aassmart
withcity.
GWLN, to provide fault tolerance, and to affect as little
as possible the operation of the equipment. The MCDSL block diagram, together with the relationship
between the components used and the LoRa LPWAN network are shown in Figure 4.
The distribution of AMR3 ports and signals for MCDSL is: (i) Serial1 port has been assigned the
function of reading position data with GPS; (ii) serial2 performs the function of acquiring electrical
variables v, i and p from the PZEM sensor; (iii) digital inputs 2 and 47 perform the task of communication
with the AC Dimmer [50]; (iv) digital input 49 reads the data from the motion sensor to detect the
presence of people. Figure 5 shows the wiring diagram for GWLN.
Electronics 2020, 9, 124 9 of 28
Electronics 2019, 8, x FOR PEER REVIEW 9 of 28

Figure 5. Wiring diagram of MCDSL.


Figure 5. Wiring diagram of MCDSL.
Table 4. MCDSL components cost.
Table 4 shows the cost of the components used in GWLN, which is very small, and is especially
Description Number Unit Price (€) Total Price (€)
interesting to use in theMicrocontroller
SL system inAUM3a smart city. 1 28.00 28.00
Lora GPS shield for Arduino DLGS 1 35.90 35.90
PZEM-004tTable 4. MCDSL components
1 cost.
10.08 10.08
AC Dimmer 1 3.22 3.22
Description
Motion sensor HC SR501 Number 1 Unit
1.53 Price (€) 1.53 Total Price (€)
Power
Microcontroller AUM3 supply unit 1 1 1.78 28.00 1.78 28.00
Box container
Lora GPS shield for Arduino DLGS 1 1 6.98 35.90 6.98 35.90
auxiliary material and wiring
PZEM-004t 1 1 2.03
10.08 2.03
10.08
Total cost 89.52
AC Dimmer 1 3.22 3.22
Motion sensor HC SR501 1 1.53 1.53
3.1.3. LLMD Design
Power supply unit 1 1.78 1.78
ToBox
measure the level of illumination in each1 SL would lead to error,
container 6.98since when being placed
6.98in
each one material
auxiliary of them, mistakes
and wiringcan be made due to 1the fact that it would2.03
take the illumination that this
2.03
providing the lamp and not the one that really there is in every moment.
Total cost
For this purpose, a device has been designed that measures the actual level of illumination at a
89.52
high point without being affected by the light from the lamps and provides a real measure of the
3.1.3. LLMDillumination
Designto be provided by the SL. The measurement times is 1 s. In case of a change in the lighting
level, the measurement made by the LLMD (Figure 6) is sent by the LoRa LPWAN network to the
GWLN. GWLN
To measure performs
the level the necessary in
of illumination calculations
each SL by applying
would theto
lead EESL algorithm.
error, It then being
since when sends placed in
the new regulation obtained to each of the SLs installed in the network.
each one of them, mistakes can be made due to the fact that it would take the illumination that this
LLMD has been implemented based on AUR3 supplemented with DLS and a TSL2561 [51]
providinglighting
the lamp and not the one that really there is in every moment.
meter connected to the AUR3 I2C (Inter-Integrated Circuit) bus. As for GWLN and MCDSL,
For this purpose,
a modular designaisdevice hasthat
carried out been designed
makes that measures
it more tolerant to faults. Thethe actual
LLMD blocklevel of illumination
diagram, along at
withwithout
a high point the relationship
beingbetween
affected theby
components
the lightusedfrom and
thethelamps
LoRa LPWAN network are
and provides shown
a real in
measure of the
Figure 6.
illumination to be provided by the SL. The measurement times is 1 s. In case of a change in the lighting
level, the measurement made by the LLMD (Figure 6) is sent by the LoRa LPWAN network to the
GWLN. GWLN performs the necessary calculations by applying the EESL algorithm. It then sends the
new regulation obtained to each of the SLs installed in the network.
LLMD has been implemented based on AUR3 supplemented with DLS and a TSL2561 [51] lighting
meter connected to the AUR3 I2C (Inter-Integrated Circuit) bus. As for GWLN and MCDSL, a modular
design is carried out that makes it more tolerant to faults. The LLMD block diagram, along with the
relationship between the components used and the LoRa LPWAN network are shown in Figure 6.
LLMD uses the serial port of AUR3 for computer programming. Analog inputs 4 and 5 are used
to work with the I2C bus in AUR3, in the case of LLMD to read the illumination level measured by
TSL2561. Figure 7 shows the wiring diagram for LLMD.
Electric grid

230 V AC

Electronics 2020, 9, 124


Power supply 10 of 28
Electronics 2019, 8, x FOR PEER REVIEW
unit 10 of 28

5 V DC Electric grid
USB Vin 230 V AC
Port for AUR3 board
Serial port PowerAnalog
TSL2561
program with supply in A4 (Illumination
computer unit A5 sensor)
5 V DC
Data
USB Vin transfer
Port for AUR3 board
Serial port shield
TSL2561 LoRa LPWAN
program with LoRa Analog in A4 LLMD
(Illumination
computer A5 sensor)
Data
transfer
Figure 6. Hardware block diagram of LLMD.
LoRa LPWAN
LoRa shield LLMD
LLMD uses the serial port of AUR3 for computer programming. Analog inputs 4 and 5 are used
to work with the I2C bus in AUR3, in the case of LLMD to read the illumination level measured by
Figure 6. Hardware block diagram of LLMD.
6. Hardware
Figurediagram
TSL2561. Figure 7 shows the wiring block diagram of LLMD.
for LLMD.
LLMD uses the serial port of AUR3 for computer programming. Analog inputs 4 and 5 are used
to work with the I2C bus in AUR3, in the case of LLMD to read the illumination level measured by
TSL2561. Figure 7 shows the wiring diagram for LLMD.

Figure 7. Wiring diagram of LLMD.


Figure
Figure7.7.Wiring
Wiringdiagram
diagramof
ofLLMD.
LLMD.
Table 5 shows the cost of components used in LLMD, which is very small, following the low-
Table cost design
Table 55 shows the philosophy
cost ofthat
cost of is intended used
components
components toused
be achieved withwhich
ininLLMD,
LLMD, the system
which is isobject
very
very ofsmall,
this following
small, research. thethe
following low-cost
low-
design
cost philosophy
design thatthat
philosophy is intended to be
is intended toachieved
LLMD with
be5.achieved
Table the system
with
components the object
cost. system of this
object research.
of this research.
Description
Table5. Number
LLMD
5.LLMD Unit Price
components cost.(€) Total Price (€)
Table components cost.
Microcontroller AUR3 1 20.00 20.00
Lora shield for Arduino DLS
Description Number 1 22.91
Unit 22.91
Description Number Unit PricePrice
(€) (€)Total Total
Price (€)Price (€)
Illumination sensor TSL2561 1 3.76 3.76
Microcontroller
Microcontroller AUR3 AUR3
Power supply unit 1 11 20.0020.00
1.78 1.78 20.00 20.00
Lora shield
Lorafor Arduino
shield forBoxDLS
Arduino DLS
container 1 11 22.9122.91
6.98 6.98 22.91 22.91
Illumination sensor TSL2561 and wiring 1 1 1
auxiliary
Illumination material
sensor TSL2561 3.76 3.76
1.05 1.05 3.76 3.76
Power supply unit Total cost 1 1.78 56.48 1.78
Power supply unit
Box container 1 1 1.78 6.98 1.78 6.98
Box
auxiliary material container
and wiring 1 1 6.98 1.05 6.98 1.05
auxiliary material and wiring
Total cost 1 1.05 1.05 56.48
Total cost 56.48
3.1.4. Components
1. Microcontroller
A microcontroller is a small computer integrated into a simple integrated circuit, containing at
least one processing core, plus memory, and programmable inputs/outputs for use with peripherals.
Electronics 2020, 9, 124 11 of 28

Microcontrollers are widely used in the construction of equipment for industrial and residential
environments due to their control and processing capabilities.
The advances made in electronic devices have made it possible to develop very powerful hardware
equipment at a low cost, which makes them ideal for use in a multitude of devices such as those
developed in this research.
In this paper, three microcontrollers have been used:

• AUR3 in GWLN and LLMD: the AUR3 development board, used in GWLN and LLMD, is
based on the ATmega328P microcontroller, equipped with an open-source platform for electronic
prototypes. The characteristics of AUR3 board are presented in [44].
• AMR3 in MCDSL: in MCDSL has been chosen as the core with the development board AMR3,
which is based on the ATmega2560 microcontroller, which like ATmega328P has open-source
platform for developing electronic prototypes. The characteristics of DLS can be seen in [49].
• WMP in GWLN: cloud access GWLN uses WMP based on the ESP-8266X microcontroller
that allows access to the Wi-Fi network. The microcontroller is compatible with the Arduino
development environment, with the open-source possibilities it offers. The characteristics of DLS
are available in [46].

GWLN and LLMD only use the serial port for programming, since GWLN takes care of all
the control functions and data traffic of the LoRa LPWAN and LLMD network reads the lighting
measurement data via the I2C bus, and it is possible to use AUR3. In contrast, MCDSL uses two serial
ports, one to read the position data with GPS and the other to read the electrical variables coming from
the PZEM sensor and it is necessary to use AMR3 which has up to four serial ports available.
2. Wireless communication access. LoRa Shield
In order to implement the LoRa LPWAN network of the SL control system developed in this
research, there are different options, among which we can highlight: (i) Arduino MKR WAN 1300 [52];
(ii) Monteino [53]; (iii) Lopy4 [54]; (iv) Libelium [55]; (v) Dragino [56]. The LoRa components used in
this equipment are:

• (i) uses the CMWX1ZZABZ chip [57] of the Murata brand.


• (ii) uses the HOPERF chip RFM95/96/97/98 [58].
• (iii) and (v) implement the Semtech SX1276/SX1278 [59] chip.
• (iv) is based on the SX1272 [60] chip of the Semtech brand.

The components used in each platform have similar features. Therefore, the decision to use one or
another platform depends on the added values that each one of them offers. The system developed uses
the Dragino platform, which works with the Arduino family, benefiting from the great versatility that
Arduino offers thanks to the large number of devices that can complement the LoRa LPWAN network.
In this research, components such as GPS positioning, reading of electrical variables, presence detection,
and measurement of the lighting level have been added. As a complement, it is very easy to program
with the Arduino development environment, and being an open source platform, the reproduction of
the system developed is possible by any researcher.
The LoRa SX1276/SX1278 chip developed for use in professional network environments with
installed sensors is the core of DLS. The sensors that can be integrated have different uses such as
irrigation systems, intelligent cities and houses, intelligent meters and industrial automation, etc.
With DLS data can be sent over long distances with different transmission frequencies. An added
advantage is the minimal energy consumption thanks to the use of the ultra-long range extended
spectrum, coupled with a high immunity to interference. The characteristics of DLS are in [45].
Electronics 2020, 9, 124 12 of 28

3. Wireless communication access. LoRa GPS Shield


The chosen manufacturer (Dragino) produces another model of Arduino Shield with LoRa System,
to which it adds a GPS global positioning system that allows georeferencing the monitored equipment,
which gives the system an added feature to the system that provides great versatility.
DLGS, like DLS uses the SX1276/SX1278 chip, to which is added the GPS system based on the
MTK MT3339 chip. DLGS features are exposed in [47].
4. Electric power meter
To measure voltage and current, there are different techniques available on the market, which use
different measurement techniques.
As for current sensors, there are invasive and non-invasive, the first ones need to modify the
installation they monitor. The measurement techniques used are current transformers and Hall
effect sensors. Both techniques convert the electrical current into a voltage signal proportional to
the measured current. Examples of current sensors are the ACS712 [61] which is invasive and the
STC-013 [62] which is non-invasive and is manufactured by the YHDC brand.
Various techniques can be used to measure voltage: (i) 230/12 or 24 V transformer, AC/DC
rectifier and voltage divider; (ii) 230/24 V transformer, AC/DC rectifier, and FZ0430 [63] meter; (iii)
ZMPT101b [64] voltage transformer from 230 to 5 V.
For the sensors mentioned in the previous paragraphs, in order to obtain RMS values of v, i,
p, q, and PF, it is necessary to perform the corresponding calculation process. The PZEM sensor,
chosen in this investigation, measures v, i, and p in a single sensor and offers the measured RMS
values without additional calculations. In the paper [65], the authors developed and successfully
calibrated a new prototype for an accurate low-cost on-time single-phase power smart meter and is
based on the Arduino open-source electronic platform. Another example of the use of smart meters is
in Reference [66], which presents a PF compensation system using a TLBO algorithm for optimization.
5. Illumination sensor
There are several options on the market to use as a lighting meter in combination with the Arduino
platform: (i) sensor BH1750 [67]; (ii) sensor TSL2561.
The TSL2561 has been chosen for installation in LLMD because it is an advanced digital lighting
sensor with applications in a wide range of devices. The sensor is very accurate, and allows you to
select different operating modes by changing the gain and timing, with measurement range from 0.1
. . . 40,000+ lux. The sensor is composed of two diodes, one for the infrared part of the spectrum and
the other for the rest of the spectrum, allowing for the separate measurement of both areas of the
light spectrum.
The communication between the sensor and the Arduino is via the I2C bus, and three different
directions can be selected for the sensor, ensuring that it can work with other devices connected to the
bus without causing addressing problems. The features of the TSL2561 can be found at [51].
6. AC light dimmer
The dimmer used is from RobotDyn brand, which can control equipment up to 600 V and 16 A.
Lighting control can be used to control fans, pumps and so on.
Arduino interruptions are used to control the dimmer, which reduces the wiring between the
dimmer and the microcontroller. The dimmer is based on the triac BTA16-600B [68], with optocoupler
insulation. The characteristics of the dimmer can be seen in [50].
7. Motion sensor
The sensor used is the PIR (passive infrared) type, with two separate detector elements, the signal
that activates the motion alarm is the differential signal between the two detectors. The HC-SR501
Electronics 2020, 9, 124 13 of 28

model with the PIR LHI778 [69] sensor controlled by the BISS0001 [70] integrated circuit was chosen as
the sensor to be installed in MCDSL.
It is possible to select the motion detection range with openings between 90◦ and 110◦ , and distance
Electronics 2019, 8, x FOR PEER REVIEW 13 of 28
ranges between 3 and 7 m. It can be installed on the floor, on the wall or on the roof according to the
needs of theIt isdetection
possible totoselect
be carried out. It
the motion uses two
detection potentiometers
range with openings and a bridge
between 90° to adapt
and 110°,detection
and
distance
sensitivity, ranges between
activation 3 and
time and 7 m. It cantoberepetitive
response installed on the floor,
actions. Inon thethe
[71], wallcharacteristics
or on the roof according
of the sensor
to consulted.
can be the needs of the detection to be carried out. It uses two potentiometers and a bridge to adapt
detection sensitivity, activation time and response to repetitive actions. In [71], the characteristics of
the sensor
3.2. Software can be consulted.
Design

3.2.1.3.2.
GWLNSoftware Design
Program
The
3.2.1.AUR3
GWLN microcontroller
Program manages the LoRa LPWAN network, receiving and sending information
from LLMD and MCDSLs. It is also responsible for sending measurement data of electrical variables
The AUR3 microcontroller manages the LoRa LPWAN network, receiving and sending
and GPS position to WMP to send to the cloud (Firebase).
information from LLMD and MCDSLs. It is also responsible for sending measurement data of
The first variables
electrical working andphaseGPS ofposition
the program
to WMP is to
carried
send toout
thewhen
cloudGWLN is connected, or a reset of the
(Firebase).
equipment is carried out. In this phase the following processes are
The first working phase of the program is carried out when GWLN is connected,developed: (i) enable
or aand initialize
reset of
the serial port for communications;
the equipment (ii) configure
is carried out. In this phase the and start the
following LoRa LPWAN
processes network.
are developed: (i) enable and
initialize
Once thethe serial
first port is
phase fordone,
communications; (ii) configure
the microcontroller andperform
must start the LoRa LPWAN
cyclically network.
while the system is
connectedOnce the firstof
the reading phase is done, level
the lighting the microcontroller
from LLMD, ifmust thereperform cyclically
is any change while
must sendthethe
system is
information
connected the reading of the lighting level from LLMD, if there is any
to all MCDSLs that are part of the LoRa LPWAN network, then must read the electrical variables and change must send the
information to all MCDSLs that are part of the LoRa LPWAN network, then must read the electrical
GPS position of all ESLs and send them to WMP for upload to the cloud (Firebase).
variables and GPS position of all ESLs and send them to WMP for upload to the cloud (Firebase).
The flowchart for GWLN is shown in Figure 8.
The flowchart for GWLN is shown in Figure 8.

GWLN main program

Initialize serial port


Initialize LoRa module

Read Illumination level from


Level measurement device by
LoRa LPWAN Read electrical variables
& GPS position from all MCDSLs using LoRa
LPWAN
If Illumination No
Level change Send all data measured using Serial port
(WMP) to upload to Firebase
Yes

Send new illumination level to all


MCDSL devices using LoRa LPWAN

Figure 8. GWLN main program.


Figure 8. GWLN main program.

Communication in the LoRa LPWAN network is bi-directional between GWLN, MCDSLs, and
Communication in the LoRa LPWAN network is bi-directional between GWLN, MCDSLs,
LLMD with a constant exchange of information between the teams involved in the network.
and LLMD with a constant exchange of information between the teams involved in the network.
3.2.2. MCDSL Program
3.2.2. MCDSL Program
As the GWLN microcontroller, the MCDSL must perform the system initialization tasks when
As the GWLN
connecting microcontroller,
or resetting the MCDSL
the equipment. mustare
These tasks perform the system
distributed initialization
in the following tasks(i)when
sequence:
connecting or resetting the equipment. These tasks are distributed in the following sequence:
prepare the serial ports #1 and #2 to obtain data; (ii) start the PZEM sensor to measure electrical (i) prepare
the serial
variables; (iii) turn on and prepare the AC dimmer for lamp regulation; (iv) start the HC-SR501 (iii)
ports #1 and #2 to obtain data; (ii) start the PZEM sensor to measure electrical variables;
turn on andsensor;
motion prepare (v)the AC dimmer
configure for lamp
and initialize DLGS regulation;
for access (iv) start
to the LoRathe HC-SR501
LPWAN motion sensor; (v)
network.
configureThen, and continuously
and initialize DLGS for while MCDSL
access to the is LoRa
connected,
LPWAN the following
network.processes are carried out: (i)
read the lighting level from the LoRa LPWAN network; (ii) run EESL algorithm; (iii) measure
Electronics 2020, 9, 124 14 of 28

Then, and continuously while MCDSL is connected, the following processes are carried out:
(i) read the lighting
Electronics level
2019, 8, x FOR PEERfrom the LoRa LPWAN network; (ii) run EESL algorithm; (iii)
REVIEW measure
14 of 28
electrical variables and position
Electronics 2019, 8, x FOR PEER REVIEWwith GPS and sending data to GWLN using the LoRa LPWAN network
14 of 28
electrical
to upload to thevariables
cloud. and position with GPS and sending data to GWLN using the LoRa LPWAN
network to
electrical upload to
variables theposition
cloud. with GPS and sending data to GWLN using the LoRa LPWAN
Figure 9 shows theand
flowchart for MCDSL.
Figure
network 9 showstothe
to upload theflowchart
cloud. for MCDSL.
Figure 9 shows the flowchart for MCDSL.
MCDSL main program
MCDSL main program
Initialize serial ports #1 & #2
Initialize PZEM-004t
Initialize serialAC
Initialize ports #1 & #2
dimmer
Initialize
Initialize HV SR501PZEM-004t
Motion Sensor
InitializeLoRa
Initialize AC dimmer
module
Initialize HV SR501 Motion Sensor
Initialize LoRa module
Read Illumination level from
LoRa LPWAN
Read Illumination level from
LoRa LPWAN

Execute EESL
Algorithm
Execute EESL
Algorithm
Measure electrical variables
& GPS position
Measure electrical
send data to LoRavariables
LPWAN
& GPS position
send data to LoRa LPWAN
Figure9.9.GWLN
Figure GWLN mainmainprogram.
program.
Figure 9. GWLN main program.
The EESL
The EESL algorithm
algorithm proposed
proposed ininthis
thisresearch
research and
and described
describedininSection 2.32.3
Section hashas
to be
toexecuted by by
be executed
MCDSL
MCDSL and and
The EESL adjust
adjustalgorithmin real time
proposed
in real time the luminous flux
in this research
the luminous that each lamp
and described
flux that each lamp must
in mustemit
Section according
2.3 has
emit to the data
to be executed
according of of
to the by
data
the
MCDSLlevel of illumination received
and adjust in received
real time thein each
luminousinstant from
fluxfrom the
that eachLoRa LPWAN
lamp must network,
emit network,in addition
according in to
to addition the
the data ofto the
the level of illumination in each instant the LoRa LPWAN
detection
the level ofofillumination
the presencereceived
of peopleinthrough
each the motion
instant from thesensor.
LoRa LPWAN network, in addition to the
detection of the presence of people through the motion sensor.
Figure
detection of 10
theshows the of
presence flow diagram
people of the
through proposed
the EESL algorithm.
motion sensor.
Figure 10 shows the flow diagram of the proposed EESL algorithm.
Figure 10 shows the flow diagram of the proposed EESL algorithm.
EESL
Algorithm
EESL
Algorithm
Exit
Read Motion Exit
sensor
Read Motion Street lights on
sensor
Street lights on
Pedestrian Yes No
Lcur>Lmin? %Reg=0 Dim to %Reg
detected? Yes
Pedestrian No
Lcur>Lmin? %Reg=0 Dim to %Reg
detected? Yes
No
Yes
No
Time in flow
No No
reduction Lcur≤Lmin? Street lights off
Time in flow
hours? No No
reduction Lcur≤Lmin? Street lights off
hours? Yes
Yes %𝑅𝑒𝑔 = 𝑓 𝐿
Yes
Yes %𝑅𝑒𝑔 = 𝑓 𝐿

i=1 to Nlev Time=Time(i)? %Reg=Level(i)


i=1 to Nlev Time=Time(i)? %Reg=Level(i)

Figure 10. Energy efficient street lights algorithm flow chart.


Figure 10. Energy efficient street lights algorithm flow chart.
Figure 10. Energy efficient street lights algorithm flow chart.
Electronics 2020, 9, 124 15 of 28

Electronics 2019, 8, x FOR PEER REVIEW 15 of 28


Electronics 2019, 8, x FOR PEER REVIEW 15 of 28
3.2.3. LLMD Program
3.2.3.
3.2.3. LLMD
LLMD Program
Program
The function of LLMD is to measure the lighting level for adjustment of all MCDSLs installed in
The
The function
function of
of LLMD
LLMD is
is to measure
to tasks
measure the lighting level for adjustment of
of all MCDSLs installed in
the system. Therefore, the cyclic youthe
mustlighting
performlevel forconnected
once adjustment must all
be:MCDSLs installed
(i) read the in
lighting
the
the system.
system. Therefore,
Therefore, the
the cyclic
cyclic tasks
tasks you
you must
must perform
perform once
once connected
connected must
must be:
be: (i)
(i) read
read the
the lighting
lighting
level; (ii) send the measurement to GWLN using the LoRa LPWAN network.
level; (ii)
level;As send
(ii)for
send the measurement to
to GWLN using the LoRa
LoRa LPWAN network.
thethe
tasksmeasurement GWLN
of device initiation using
in case of the
connection LPWAN network.
or restart are: (i) configure and start DLS
As for the
As fortothe tasks of device initiation in case of connection or restart
restart are: (i)
(i) configure
configure and
and start
for access thetasks
LoRaof device network;
LPWAN initiation (ii)
in case of connection
initialize the TSL2561or lighting are:
meter. start
DLS for
DLS The access
for access to
to the
the LoRa
LoRa LPWAN
LPWAN network;
network; (ii)
(ii) initialize
initialize the
the TSL2561
TSL2561 lighting
lighting meter.
meter.
LLMD flowchart is shown in Figure 11.
The
The LLMD
LLMD flowchart
flowchart is is shown
shown in in Figure
Figure 11.
11.

LLMD
LLMD main
main program
program

Initialize
Initialize LoRa
LoRa module
module
Initialize
Initialize TSL
TSL 2561
2561

Read
Read Illumination
Illumination level
level from
from
TSL 2561
TSL 2561

Send
Send new
new illumination
illumination level
level to
to
GWLN using LoRa LPWAN
GWLN using LoRa LPWAN

Figure 11. LLMD


LLMD main program.
Figure 11. LLMD main program.

3.2.4. WMP Program


3.2.4. WMP
WMP Program
Program
Finally, the program which is responsible for the cloud, is
is exposed.
Finally, the program for for WMP,
WMP, which is responsible for uploading
uploading datadata toto the
the cloud,
cloud, is exposed.
exposed.
Remember that WMP isisinstalled inside GWLN. The initialization tasks forfor
this microcontroller are: (i)
Remember that WMP is installed inside GWLN. The initialization tasks for this microcontroller are:
that WMP installed inside GWLN. The initialization tasks this microcontroller are:
start
(i) the
start serial
the port
serial for
port reading
for information
reading from
information AUR3;
from AUR3;(ii) configure
(ii) configureand start
and the
start Wi-Fi
the system
Wi-Fi for
system
(i) start the serial port for reading information from AUR3; (ii) configure and start the Wi-Fi system
Internet access;
for (iii) startstart
Firebase to upload data to the cloud.
for Internet
Internet access;
access; (iii)
(iii) start Firebase
Firebase to
to upload
upload data
data to
to the
the cloud.
cloud.
As data reading from AUR3; (ii) data
As for the tasks that you must perform cyclically you have: (i)
for the tasks that you must perform cyclically you have: (i) data
data reading
reading from AUR3; (ii) data
upload (iii) data upload confirmation to the cloud.
upload to to Firebase;
Firebase; (iii) data upload confirmation to to the
the cloud.
cloud.
Figure the flow diagram for WMP.
Figure 1212 illustrates
illustrates the flow diagram for WMP. WMP.

WMP main program


WMP main program

Initialize serial port


Initialize serial port
Initialize Wi-Fi system
Initialize Wi-Fi system
Initialize Firebase system
Initialize Firebase system

Date reading from serial port


Date reading from serial port
from AUR3
from AUR3

Data uploading to the cloud


Data uploading to the cloud
(Firebase)
(Firebase)

Confirmation of data
Confirmation of data
uploading Firebase
uploading Firebase

Figure 12. LLMD main program.


Figure 12. LLMD
LLMD main program.

4.
4. Result
Result and
Result and Discussion
and Discussion
Discussion
To
To validate
validate the
the system
system developed
developed in this research,
in this part of
research, part of the
the campus
campus exterior
exterior lighting
lighting equipped
equipped
with High Pressure
High Pressure
with High Sodium
Pressure Sodium lamps
Sodiumlamps was
lampswas used.
wasused. Specifically,
used.Specifically, there
Specifically, is
there
there a sector
is aissector composed
a sector composed
composed of
of 29
of SLs
29 in
in the
29 SLs
SLs in
the
administrative area of the campus. The purpose of the test is to study the reduction
administrative area of the campus. The purpose of the test is to study the reduction of energy of energy
consumption
consumption byby applying
applying the
the proposed
proposed EESL
EESL algorithm.
algorithm.
Electronics 2020, 9, 124 16 of 28

the administrative area of the campus. The purpose of the test is to study the reduction of energy
Electronics 2019, 8,by
consumption x FOR PEER REVIEW
applying the proposed EESL algorithm. 16 of 28

4.1. Test Equipment


It has been assumed that in the supply network, according to EN 50160, the value of the phase
voltage will remain in the range of 230 V ± ± 10%, i.e., from 207 V to 253 V. V. Measurements
Measurements have been
made for voltages of 207, 210, 215, 220, 225, 230, 235, 240, 245, 250 and 253 253 V,
V, based on the assumption
that the supply voltage is pure and sinusoidal
sinusoidal (no
(no distortions).
distortions).
studywas
The study wasperformed
performed withwith 3 types
3 types of lamps:
of lamps: (i) Ceramic
(i) Ceramic metalPhilips
metal halide halidemodel
Philips model
MASTER
MASTER CityWhite
CityWhite CDO-TT PlusCDO-TT Plus 70W/828,
70W/828, luminous luminous
flux 7500 Lm flux(luminous
7500 Lm (luminous
efficacy ofefficacy of 103(ii)
103 Lm/W); Lm/W);
High
(ii) High Pressure
Pressure Sodiummodel
Sodium Philips Philips model150W
SON-T SON-T E40150W E40luminous
1SL/12, 1SL/12, luminous
flux 15000 flux
lm15000 lm (luminous
(luminous efficacy
efficacy
of of 98(iii)
98 Lm/W); Lm/W); (iii) HighMercury
High Pressure Pressure Mercury
Philips model Philips
HPL-N model
125WHPL-N
E27 SG125W1CT/24,E27 SG 1CT/24,
luminous flux
luminous
6200 flux 6200 Lm
Lm (luminous (luminous
efficacy efficacy of 50 Lm/W).
of 50 Lm/W).
electromagnetic ballast
Figures 13–15 show the regulation study carried out with electromagnetic ballast included.
included. The
lighting values were obtained in in the
the laboratory
laboratory onon aa surface
surface ofof 11 m
m.2
2

(a) (b)

(c)
Figure 13. CDO
Figure 13. CDO Lamp
Lamp regulation:
regulation: (a)
(a) Illumination;
Illumination; (b)
(b) Current;
Current; (c)
(c) Active
Active power.
power.

(a) (b)
(c)
Electronics 2020, 9,Figure
124 13. CDO Lamp regulation: (a) Illumination; (b) Current; (c) Active power. 17 of 28

Electronics 2019, 8, x FOR PEER REVIEW 17 of 28

Electronics 2019, 8, x FOR PEER REVIEW 17 of 28

(a) (b)

(c)
(c)
Figure 14. SON Lamp regulation: (a) Illumination; (b) Current; (c) Active power.

Figure14.
Figure 14.SON
SONLamp
Lampregulation:
regulation: (a)
(a) Illumination;
Illumination; (b)
(b) Current;
Current;(c)
(c)Active
Activepower.
power.

(a) (b)
(a) (b)

(c)
(c)
Figure 15. HPL Lamp regulation: (a) Illumination; (b) Current; (c) Active power.

Figure 15. HPL Lamp regulation: (a) Illumination; (b) Current; (c) Active power.
In order to evaluate the accuracy of the LLMD lighting measurements, a comparison was made
with a Konica Minolta LS150 luxmeter. Measurements were taken at 1, 2, 3, 4, 5, 6, and 7 m from the
In order to evaluate the accuracy of the LLMD lighting measurements, a comparison was made
light source. The data obtained are shown in Figure 16 and Table 6.
with a Konica Minolta LS150 luxmeter. Measurements were taken at 1, 2, 3, 4, 5, 6, and 7 m from the
LLMD equipment has a measurement error of less than 1% in the measurements done with
light source. The data obtained are shown in Figure 16 and Table 6.
Electronics 2020, 9, 124 18 of 28

In order to evaluate the accuracy of the LLMD lighting measurements, a comparison was made
with a Konica Minolta LS150 luxmeter. Measurements were taken at 1, 2, 3, 4, 5, 6, and 7 m from the
light source. The data obtained are shown in Figure 16 and Table 6.
LLMD equipment has a measurement error of less than 1% in the measurements done with
different lamps. It can be observed that, as we move away from the lamp, the error decreases
Electronics 2019, 8, x FOR PEER REVIEW 18 of 28
considerably, and for a near distance, it grows.

(a) (b)

(c) (d)

(e) (f)
Figure16.
Figure 16. Illumination
Illumination level test. (a)
(a)Comparison
Comparisonbetween
betweenluxmeter
luxmeterand
andLLMD
LLMD with
withCDOCDOlamp; (b)
lamp;
Luxmeter
(b) Luxmetervs.vs.
LLMD;
LLMD;(c)(c)
Comparison
Comparison between luxmeter
between and
luxmeter LLMD
and LLMD with SON
with SONlamp; (d)(d)
lamp; Luxmeter vs.
Luxmeter
LLMD;
vs. (e)(e)
LLMD; Comparison
Comparison between luxmeter
between and
luxmeter LLMD
and LLMD with
withHPL
HPLlamp; (f)(f)
lamp; Luxmeter vs.vs.
Luxmeter LLMD.
LLMD.

Table 6. Comparative measurements lighting level.

LLMD Konica Minolta Measuring Error (ε)


Distance
CDO SON HPS CDO SON HPS CDO SON HPS
(m)
(lx) (lx) (lx) (lx) (lx) (lx) (%) (%) (%)
1 1024.564 2196.874 675.304 1026.719 2203.661 675.408 0.216 0.010 0.679
2 830.000 719.511 195.838 822.829 720.931 197.047 0.717 0.121 0.142
3 294.286 408.264 108.038 294.916 408.671 107.993 0.063 0.040 0.041
4 158.018 278.451 70.670 158.352 279.267 71.006 0.033 0.034 0.082
5 103.313 211.026 60.251 102.827 210.653 61.024 0.049 0.077 0.037
Electronics 2020, 9, 124 19 of 28

Table 6. Comparative measurements lighting level.

LLMD Konica Minolta Measuring Error (ε)


Distance (m) CDO SON HPS CDO SON HPS CDO SON HPS
(lx) (lx) (lx) (lx) (lx) (lx) (%) (%) (%)
1 1024.564 2196.874 675.304 1026.719 2203.661 675.408 0.216 0.010 0.679
2 830.000 719.511 195.838 822.829 720.931 197.047 0.717 0.121 0.142
3 294.286 408.264 108.038 294.916 408.671 107.993 0.063 0.040 0.041
4 158.018 278.451 70.670 158.352 279.267 71.006 0.033 0.034 0.082
5 103.313 211.026 60.251 102.827 210.653 61.024 0.049 0.077 0.037
Electronics 2019,68, x FOR PEER REVIEW172.416
68.429 48.830 68.322 171.608 48.603 0.011 0.023 19 of 28
0.081
7 46.000 130.901 32.272 46.236 131.437 32.093 0.024 0.018 0.054
4.2. Measurement Level Illumination
4.2. Measurement Level
In this section, Illumination
tests have been carried out during the year in order to obtain measurements of
the lighting levels on different dayscarried
In this section, tests have been in orderout
to during
observethe
theyear
behaviour
in orderoftothe proposed
obtain system during
measurements of the
the different lighting hours and their variations in the different seasons of the year.
lighting levels on different days in order to observe the behaviour of the proposed system during the
In summary,
different Figureand
lighting hours 17 their
showsvariations
the results
in obtained for seasons
the different a cloudyofand
thesunny
year. summer and winter
day. In summary, Figure 17 shows the results obtained for a cloudy and sunny summer and winter day.

(a) (b)

(c) (d)
Figure
Figure 17.
17. Study
Study of
of lighting
lighting levels:
levels: (a)
(a)Summer
Summersunny
sunnyday;
day;(b)
(b)Winter
Winter sunny
sunny day;
day; (c)
(c) Summer
Summer cloudy
cloudy
day; (d) Winter cloudy day.
day; (d) Winter cloudy day.

4.3. Development
4.3. Development of
of Energy
Energy Saving
Saving Strategies
Strategies
The regulation
The regulation period
period runs
runs from
from 17:00 to 8:00,
8:00, aa time
time frame
frame that
that covers
covers lighting
lighting needs
needs every
every day
day
of the
of the year.
year.
On the
On the other
other hand,
hand, the
the academic
academic activity
activity extends
extends until
until 22:00,
22:00, from
from this
this time
time until
until 7:00
7:00 two
two levels
levels
of flow reduction
of flow reduction areare established: (i) from 23:00 to 0:00 and from 6:00 to 7:00 with a reduction
(i) from 23:00 to 0:00 and from 6:00 to 7:00 with a reduction of 20%; of 20%;
(ii) from 00:00 to 06:00 with a reduction of 40%. Flow Flow regulation
regulation percentages
percentages varyvary depending
depending on on the
the
lamp used. In this
lamp thiscase
caseaaPhilips
PhilipsHigh
High Pressure Sodium
Pressure Sodium lamp
lampmodel SON-T
model 150W
SON-T E40 1SL/12
150W was used.
E40 1SL/12 was
used.
Between 17:00 and 23:00 and between 07:00 and 08:00, the proposed EESL algorithm is applied,
which regulates the luminous flux according to the level of illumination measured by LLMD. The
illumination data is taken every 5 s (time that can be modified) and sent to GWLN which distributes
them to the 29 MCSDL to act in the regulation of each of the SLs.
Using the data obtained, a detailed analysis has been performed, which has made it possible to
Electronics 2020, 9, 124 20 of 28

Between 17:00 and 23:00 and between 07:00 and 08:00, the proposed EESL algorithm is applied,
which regulates the luminous flux according to the level of illumination measured by LLMD. The
illumination data is taken every 5 s (time that can be modified) and sent to GWLN which distributes
them to the 29 MCSDL to act in the regulation of each of the SLs.
Using the data obtained, a detailed analysis has been performed, which has made it possible
to configure all the parameters of importance for the system, as they can be: (i) the minimum and
maximum levels that will define the regulation of the luminaires; (ii) the duration of the time range of
these levels; (iii) measurement time.
When these limits are exceeded, or the presence of pedestrians is detected, the system acts
appropriately, regulating the lighting level of each lamp. The final objective is the reduction of energy
consumption in each SL, and therefore of the whole. This is done through an intelligent and efficient
management ofx the
Electronics 2019, 8, FORluminous flux by means of the proposed EESL algorithm.
PEER REVIEW 20 of 28

Pedestrian
Pedestrian Distribution
Distribution
The distribution of pedestrians in the study area is related to the period of academic academic activity,
activity,
which
which isis between
between 08:00
08:00 and
and 22:00.
22:00. Outside this time zone, pedestrian traffic is residual, and practically
non-existent,
non-existent, except
except for
for security
security personnel.
personnel.
As can
can bebe seen,
seen, the
the academic
academic activity is between the hours of operation of the EESL algorithm,
and
and outside
outside these
thesehours,
hours,the
thealgorithm
algorithmproceeds
proceedstotothe
thechosen
chosenflow
flowreduction,
reduction,which
which can bebe
can changed
changed if
necessary.
if necessary.If a If
pedestrian is detected
a pedestrian withinwithin
is detected the flowthereduction zone, thezone,
flow reduction flow reduction
the flow isreduction
eliminated is
in the coverage
eliminated in the area of eacharea
coverage SL, returning
of each SL,later to the previous
returning level.
later to the previous level.
Figure
Figure 18 18shows
showsthethe
variation in the
variation in distribution of pedestrians
the distribution per dayper
of pedestrians in relation
day intorelation
the minimum
to the
flow, whichflow,
minimum is detected during
which is night
detected hours.night hours.
during

Figure 18.
Figure 18. Pedestrian flow distribution.

Variations
Variationsininthe flow
the of pedestrians
flow lead lead
of pedestrians to great energyenergy
to great savingssavings
throughthrough
the use of theuse
the proposed
of the
system. The main objective is to reduce the luminous flux as much as possible and, therefore,
proposed system. The main objective is to reduce the luminous flux as much as possible and, the energy
consumption
therefore, the produced. The maximum
energy consumption luminous
produced. flux will only
The maximum be maintained
luminous whenbenecessary
flux will only maintainedor
depending on theorpresence
when necessary of pedestrians,
depending so thatofregulatory
on the presence requirements
pedestrians, are always
so that regulatory met.
requirements are
always met.
4.4. LoRa System Performance
4.4. LoRa System Performance
The equipment used are MCDSL and LLMD, which are located in the adminastrative zone of
the campus, in different
The equipment usedplaces according
are MCDSL andto LLMD,
zone distribution. The parameters
which are located assigned to the
in the adminastrative LoRa
zone of
network are BW = 250 kHz, CR = 6, SF = 8.
the campus, in different places according to zone distribution. The parameters assigned to the LoRa
The objective
network are BW = of 250this
kHz,section
CR =is6,to SFevaluate
= 8. the functioning of the LoRa LPWAN Network. In this
sense,The
theobjective
parameters to be evaluated will be:
of this section is to evaluate the (i) received signalofstrength
functioning indicator
the LoRa LPWAN (RSSI); (ii) time
Network. on
In this
air (ToA); (iii) packet lost rate (PLR). Measurements have been made with a frequency
sense, the parameters to be evaluated will be: (i) received signal strength indicator (RSSI); (ii) time on of 20 s.
The PayLoad
air (ToA); used
(iii) packet is in
lost CayenneLPP
rate format, with
(PLR). Measurements a length
have been of
made27 bytes
withdistributed
a frequencyasoffollows:
20 s. (i) 4
bytesThe
for MCDSL number; (ii) 4 bytes for voltage; (iii) 4 bytes for current; (iv) 4
PayLoad used is in CayenneLPP format, with a length of 27 bytes distributed as follows: bytes for active power;(i)
(v) 11 bytes for GPS position.
4 bytes for MCDSL number; (ii) 4 bytes for voltage; (iii) 4 bytes for current; (iv) 4 bytes for active
power; (v) 11 bytes for GPS position.
Table 7 shows the location of the equipment used in the test.

Table 7. Location of test devices.

UTM Coordinates Zone 30


Electronics 2020, 9, 124 21 of 28

Table 7 shows the location of the equipment used in the test.

Table 7. Location of test devices.

UTM Coordinates Zone 30


Device Place
X (m) Y (m)
MCDSL #1 SL #1 431,300 4,182,653
MCDSL #2 SL #9 431,408 4,182,749
MCDSL #3 SL #23 431,320 4,182,808
LLMD Terrace of administration building 431,308 4,182,777

Figure 19 shows the result of the measurements made on the LoRa LPWAN network during a full
week of measurement.
Electronics Enough
2019, 8, x FOR PEER REVIEWtime to evaluate the behavior of the network and be able to perform a
21 of 28
detailed analysis of the performance.

(a) (b)

(c)
Figure 19. LoRa
LoRa characteristic:
characteristic: (a)
(a)RSSI;
RSSI; (b)
(b) ToA;
ToA; (c)
(c) PLR.

Figure 19a shows the evolution of RSSI, which can be seen seen toto be
be stable
stable with
with mean
mean values
values around
around
−73.43 dBm
−73.43 dBm for
for MCDSL −94.85 dBm
MCDSL #1, −94.85 dBm for
for MCDSL −102.94 dBm
MCDSL #2, −102.94 dBm for
for MCDSL −101.42 dBm
MCDSL #3 and −101.42 dBm
for ILD. Values that are within the range as a function
function of
of distance
distance toto GWLN.
GWLN.
ToA parameters are shown in Figure 19b, and they have an average time for all devices around
35 ms.
ms. Finally,
Finally,Figure
Figure19c shows
19c shows thethe
most critical
most measured
critical parameter,
measured PLR, which
parameter, alludesalludes
PLR, which to the amount
to the
of information lost within the LoRa LPWAN network. This parameter determines
amount of information lost within the LoRa LPWAN network. This parameter determines the the transmission
quality withinquality
transmission the network. It isnetwork.
within the possible to observe
It is in to
possible Figure 19c,inthat
observe the PLR
Figure 19c, is quite
that the small,
PLR iswith
quitea
maximum
small, witharound
a maximum4% maximum,
around 4% which ensureswhich
maximum, the quality
ensuresof the
communication.
quality of communication.
order to describe the behaviour of the LoRa
In order LoRa network,
network, the authors
authors have
have obtained
obtained thethe statistical
statistical
distribution of the measured parameters, which are shown in Tables Tables 88 and
and 9.
9.

Table 8. Transmission statistics.

RSSI (dBm) Time on Air (ms) Packets Lost Rate (%)


Device
µ σ µ σ µ σ
MCDSL #1 −73.430 1.511 34.989 2.991 1.352 0.235
Electronics 2020, 9, 124 22 of 28

Table 8. Transmission statistics.

RSSI (dBm) Time on Air (ms) Packets Lost Rate (%)


Device
µ σ µ σ µ σ
MCDSL #1 −73.430 1.511 34.989 2.991 1.352 0.235
MCDSL #2 −94.853 1.679 34.997 3.007 2.029 0.393
MCDSL #3 −102.936 2.990 34.983 2.998 3.158 0.958
LLMD −101.417 3.892 35.001 3.020 3.750 1.967

Table 9. Packet transmission.

Device Packet Send Packet Delivery Packet Lost Packets Delivery Rate (%)
MCDSL #1 30240 29831 409 98.65
MCDSL #2 30240 29626 614 97.97
MCDSL #3 30240 29285 955 96.84
LLMD
Electronics 2019, 8, x FOR PEER 30240
REVIEW 29106 1134 96.25 22 of 28

4.5.
4.5. Dayly
Dayly Electrical
Electrical Variables
Variables
The
The MCDSL
MCDSL device
device is
is equipped,
equipped, inin addition
addition to
to the
the regulation
regulation equipment
equipment andand the
the PZEM
PZEM variable
variable
measurement sensor, which allows the electrical variables to be obtained at any time. Subsequently,
measurement sensor, which allows the electrical variables to be obtained at any time. Subsequently,
the
the electrical data of
electrical data of each
each of
of the
the installed
installed MCDSLs
MCDSLs are are uploaded
uploaded to
to the
the cloud.
cloud.
The electrical variables measured with the MCDSL equipment
The electrical variables measured with the MCDSL equipment for one day for oneofday of operation
operation are
are shown
shown in 20.
in Figure Figure 20.

(a) (b)

(c)
Figure 20. Electrical
Electrical variables.
variables. (a)
(a) Voltage;
Voltage; (b) Current; (c) Active power.

4.6. Annual
4.6. Annual Energy
Energy Saving
Saving of
of Street
Street Lights
Lights
The annual
The annual study
study has
has been
been done
done inin order
order to
to determine
determine the the operation of the
operation of the system
system over
over an
an
extended period of time, including all seasons of the year. The study was done from 1 September
extended period of time, including all seasons of the year. The study was done from 1 September 2018
to 1 September
2018 2019.2019.
to 1 September Figure 21 shows
Figure the result
21 shows of theofstudy
the result performed.
the study performed.
4.6. Annual Energy Saving of Street Lights
The annual study has been done in order to determine the operation of the system over an
extended period of time, including all seasons of the year. The study was done from 1 September
Electronics 2020, 9, 124 23 of 28
2018 to 1 September 2019. Figure 21 shows the result of the study performed.

(a) (b)

(c) (d)

Figure 21. Annual energy saved: (a) Active energy per lamp (kWh) 2D; (b) Total active energy (kWh)
2D; (c) Active energy per lamp (kWh) 3D; (d) Total active energy (kWh) 3D.

In Table 10, the energy saved obtained by each MCDSL can be observed, with the two proposed
flow reduction levels and through the application of the EESL algorithm. The last column of the table
reflects the energy savings in the total MCDSLs installed.

Table 10. Energy saved (kWh).

Type NSL ESL Esav


EESL Algorithm 6.126 117.654
Flow reduction 40% (0:00–6:00) 29 134.685 3436.587
Flow reduction 20% (23:00–0:00, 6:00–7:00) 22.265 645.685
Total 4259.926

5. Conclusions
This study developed and successfully evaluated a new system for real-world SL facilities that
is both accurate and low-cost. This system is based on the Arduino open-source electronic platform.
Input data were gathered with a set of sensors based on Arduino components.
This system has a number of advantages. In fact, MCDSL is able to perform real-time monitoring
with high resolution time data, every 5 s, and able to be modified depending on the resolution of the
monitoring. Evidently, this real-time calculation capability and the support of large data in the cloud
have applications in real systems.
Three devices have been developed for the GWLN, MCDSL, and LLMD units, which allow the
configuration of a complete monitoring and control system of the SLs, and achieve energy savings
in the control of the SL. It can also be adapted to other types of luminaires with different regulations
within the same system.
The developed system allows to control the SLs and to monitor the electrical variables (MCDSL),
and also measures the levels of illumination (LLMD). The devices are located on the campus of the
administrative area.
This research provided a new EESL algorithm to improve the energy efficiency of SLs, with data
collection in real public lighting installations with high temporal resolution.
Electronics 2020, 9, 124 24 of 28

The results obtained show that the GWLN has a lower rate of lost packages, with a PLR of less
than 4%, and ToA parameters have an average time for all devices around 35 ms. The data sent
to the cloud with Firebase has an upload rate of 5 s. Firebase allows an upload speed of 200 ms, a
characteristic that makes it possible to adapt the time for sending packets on the LoRa network, with
shorter time intervals.
The system developed makes it possible to obtain satisfactory energy savings, improving the
energy efficiency of the SL installation, and increasing the energy sustainability of the whole.
The proposed system can accommodate many different realities of other installations, ensuring
scalability, interoperability, and accessibility (in the sense that the system is accessible from multiple
platforms: mobile phone, PC, tablet), and its ease of deployment, with the case study of its
implementation in a section of SLs in smart cities.

Author Contributions: All authors have contributed actively and fundamentally to the development of the
presented work. And A.C.-O. and F.S.S. have developed the hardware and software design, assembled the
prototypes and have designed and carried out the tests. The writing of the paper has been done by each author
attending to their corresponding part of the development of the work. All authors have read and agreed to the
published version of the manuscript.
Funding: This research received no external funding.
Acknowledgments: The authors would like to thank the Department of Electrical Engineering of the University
of Jaén. for allowing the use of their laboratories and material in the development of this research.
Conflicts of Interest: The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript:

AMR3 Arduino Mega R3


AUR3 Arduino Uno R3
BW Bandwidth
CF Carrier Frequency
CR Code Rate
CRC Cyclic Redundancy Check
DLS Dragino LoRa Shield
DLGS Dragino LoRa GPS Shield
E Active energy
EE Energy Efficiency
EESL Energy Efficiency for Street Lights
FEC Forward error correction
GPS Global Positioning System
GWLN GateWay LoRa Network
LLMD Lighting Level Measurement Device
I2C Inter-Integrated Circuit
IoT Internet of Things
L Level
LED Light Emitting Diode
LLMD Lighting Level Measurement Device
LoRa Long Range
LoRaWAN Long Range Wide Area Network
LPWAN Low Power Wide Area Network
MCDSL Measure and Control Device for Street Lights
N Number
P Active power
PIR Passive infrared
Electronics 2020, 9, 124 25 of 28

PF Power factor
PL PayLoad
PLR Packet Lost Rate
PZEM PZEM-004t
RMS Root Mean Square
RSSI Received Signal Strength Indicator
SF Spreading Factor
SL Street Light
SNR Signal-to-Noise Ratio
t Time
ToA Time on Air
Wi-Fi Wireless Fidelity
WMP Arduino Wemos Mini Pro
WNS Wireless Sensor Networks
Greek symbols
ε Measuring error
µ mean
σ standard deviation
Subscripts
b baseline
cur actual
lev level
min minimum
max maximum
p preamble
pe operation equivalent
PHY symbols transmitted in the physical message
pk packet
r reduced
sav saved
sym symbol
thre threshold

References
1. Kabalci, Y.; Ersan Kabalci, E.; Padmanaban, S.; Holm-Nielsen, J.B.; Blaabjerg, F. Internet of Things Applications
as Energy Internet in Smart Grids and Smart Environments. Electronics 2019, 8, 972. [CrossRef]
2. Weber, M.; Podnar Žarko, I. A Regulatory View on Smart City Services. Sensors 2019, 19, 415. [CrossRef]
[PubMed]
3. Wojnicki, I.; Komnata, K.; Kotulski, L. Comparative Study of Road Lighting Efficiency in the Context of
CEN/TR 13201 2004 and 2014 Lighting Standards and Dynamic Control. Energies 2019, 12, 1524. [CrossRef]
4. Kostic, M.; Djokic, L. Recommendations for energy efficient and visually acceptable street lighting. Energy
2009, 34, 1565–1572. [CrossRef]
5. Sedziwy, A.; Kotulski, L. Towards Highly Energy-Efficient Roadway Lighting. Energies 2016, 9, 263. [CrossRef]
6. Beccali, M.; Bonomolo, M.; Ciulla, G.; Galatioto, A.; Lo Brano, V. Improvement of energy efficiency and
quality of street lighting in South Italy as an action of Sustainable Energy Action Plans. The case study of
Comiso (RG). Energy 2015, 92, 394–408. [CrossRef]
7. Gutierrez-Escolar, A.; Castillo-Martinez, A.; Gomez-Pulido, J.M.; Gutierrez-Martinez, J.M.; Stapic, Z.;
Medina-Merodio, J.A. A Study to Improve the Quality of Street Lighting in Spain. Energies 2015, 8, 976–994.
[CrossRef]
8. Carli, R.; Dotoli, M.; Pellegrino, R. A decision-making tool for energy efficiency optimization of street lighting.
Comput. Oper. Res. 2018, 96, 222–234. [CrossRef]
9. Sikora, R.; Markiewicz, P.; Pabjanczyk, W. Computing Active Power Losses Using a Mathematical Model of
a Regulated Street Luminaire. Energies 2018, 11, 1386. [CrossRef]
Electronics 2020, 9, 124 26 of 28

10. Djuretic, A.; Kostic, M. Actual energy savings when replacing high-pressure sodium with LED luminaires in
street lighting. Energy 2018, 157, 367–378. [CrossRef]
11. Yao, J.; Zhang, Y.; Yan, Z.; Li, L. A Group Approach of Smart Hybrid Poles with Renewable Energy, Street
Lighting and EV Charging Based on DC Micro-Grid. Energies 2018, 11, 3445. [CrossRef]
12. Bellido-Outeiriño, F.J.; Quiles-Latorre, F.J.; Moreno-Moreno, C.D.; Flores-Arias, J.M.; Moreno-García, I.;
Ortiz-López, M. Streetlight Control System Based on Wireless Communication over DALI Protocol. Sensors
2016, 16, 597. [CrossRef] [PubMed]
13. Hadipour, M.; Farrokhi Derakhshandehb, J.; Aghazadeh Shiranc, M.; Rezaei, R. Automatic washing system
of LED street lighting via Internet of Things. Internet Things 2018, 1, 74–80. [CrossRef]
14. Mohandasa, P.; Sheebha, J.; Dhanarajb, A.; Xiao-Zhi, G. Artificial Neural Network based Smart and Energy
Efficient Street Lighting System: A Case Study for Residential area in Hosur. Sustain. Cities Soc. 2019, 48,
101499. [CrossRef]
15. Mumtaz, Z.; Ullah, S.; Ilyas, Z.; Aslam, N. An Automation System for Controlling Streetlights and Monitoring
Objects Using Arduino. Sensors 2018, 18, 3178. [CrossRef]
16. Kaminska, A.; Ozadowicz, A. Lighting Control Including Daylight and Energy Efficiency Improvements
Analysis. Energies 2018, 11, 2166. [CrossRef]
17. Castillo-Martinez, A.; Medina-Merodio, J.A.; Gutierrez-Martinez, J.M.; Aguado-Delgado, J.; de-Pablos-
Heredero, C.; Otón, S. Evaluation and Improvement of Lighting Efficiency in Working Spaces. Sustainability
2018, 10, 1110. [CrossRef]
18. Ping Lau, S.; Merrett, G.V.; Weddell, A.S.; Neil, M. White A traffic-aware street lighting scheme for Smart
Cities using autonomous networked sensors. Comput. Electr. Eng. 2015, 45, 192–207.
19. Jagadeesha, Y.M.; Akilesha, S.; Karthika, S. Prasantha Intelligent Street Lights. Procedia Technol. 2015, 21,
547–551. [CrossRef]
20. Sánchez, L.; Elicegui, I.; Cuesta, J.; Muñoz, L.; Lanza, J. Integration of Utilities Infrastructures in a Future
Internet Enabled Smart City Framework. Sensors 2013, 13, 14438–14465. [CrossRef]
21. Wojnicki, I.; Kotulski, L. Improving Control Efficiency of Dynamic Street Lighting by Utilizing the Dual
Graph Grammar Concept. Energies 2018, 11, 402. [CrossRef]
22. Kovacs, A.; Batai, R.; Csan, B.; Dudas, P.; Haya, B.; Pedone, G.; Revesz, T.; Vancza, J. Intelligent control for
energy-positive street lighting. Energy 2016, 114, 40–51. [CrossRef]
23. Elejoste, P.; Angulo, I.; Perallos, A.; Chertudi, A.; García Zuazola, I.J. An Easy to Deploy Street Light Control
System Based on Wireless Communication and LED Technology. Sensors 2013, 13, 6492–6523. [CrossRef]
[PubMed]
24. Ożadowicz, A.; Grela, J. Energy saving in the street lighting control system—A new approach based on the
EN-15232 standard. Energy Effic. 2017, 10, 563–576. [CrossRef]
25. Leccese, F.; Cagnetti, M.; Trinca, D. A Smart City Application: A Fully Controlled Street Lighting Isle Based
on Raspberry-Pi Card, a ZigBee Sensor Network and WiMAX. Sensors 2014, 14, 24408–24424. [CrossRef]
26. Rabaza, O.; Molero-Mesa, E.; Aznar-Dols, F.; Gómez-Lorente, D. Experimental Study of the Levels of Street
Lighting Using Aerial Imagery and Energy Efficiency Calculation. Sustainability 2018, 10, 4365. [CrossRef]
27. Pasolini, G.; Buratti, C.; Feltrin, L.; Flavio Zabini, F.; De Castro, C.; Verdone, R.; Andrisano, O. Smart City
Pilot Projects Using LoRa and IEEE802.15.4 Technologies. Sensors 2018, 18, 1118. [CrossRef]
28. LPWA Technologies Unlock New IoT Market Potential. Machina Research. Nov. 2015. Available
online: https://www.lora-alliance.org/portals/0/documents/whitepapers/LoRa-Alliance-Whitepaper-LPWA-
Technologies.pdf (accessed on 10 December 2019).
29. Vangelista, L.; Zanella, A.; Zorzi, M. Long-Range IoT Technologies: The Dawn of LoRa. Future Access Enablers of
Ubiquitous and Intelligent Infrastructures; Springer: Berlin/Heidelberg, Germany, 2015; pp. 51–58.
30. LoRa Alliance. Available online: https://lora-alliance.org (accessed on 10 December 2019).
31. De Carvalho Silva, J.; Rodrigues, J.J.P.C.; Alberti, A.M.; Solic, P.; Aquino, A.L.L. LoRaWAN—A Low Power
WAN Protocol for Internet of Things: A Review and Opportunities. In Proceedings of the 2nd International
Multidisciplinary Conference on Computer and Energy Science (SpliTech), Split, Croatia, 12–14 July 2017.
32. Wydra, M.; Kubaczynski, P.; Mazur, K.; Ksiezopolski, B. Time-Aware Monitoring of Overhead Transmission
Line Sag and Temperature with LoRa Communication. Energies 2019, 12, 505. [CrossRef]
33. Angrisani, L.; Bonavolontà, F.; Liccardo, A.; Schiano, R. On the Use of LoRa Technology for Logic Selectivity
in MV Distribution Networks. Energies 2018, 11, 3079. [CrossRef]
Electronics 2020, 9, 124 27 of 28

34. Paredes-Parra, J.M.; García-Sánchez, A.J.; Mateo-Aroca, A.; Molina-García, A. An Alternative


Internet-of-Things Solution Based on LoRa for PV Power Plants: Data Monitoring and Management.
Energies 2019, 12, 881. [CrossRef]
35. Cano-Ortega, A.; Sánchez-Sutil, F.J. Monitoring of the Efficiency and Conditions of Induction Motor
Operations by Smart Meter Prototype Based on a LoRa Wireless Network. Electronics 2019, 8, 1040.
[CrossRef]
36. CEN/TR 13201e1:2014, Light and Lighting, Road Lighting e Part 1: Performance Requirements. Available
online: https://www.en-standard.eu/csn-en-13201-1-4-road-lighting/ (accessed on 10 December 2019).
37. DIN EN 13201-2: 2016—Road Lighting—Part 2: Performance Requirement. Available online: https:
//www.en-standard.eu/csn-en-13201-1-4-road-lighting/ (accessed on 10 December 2019).
38. Noreen, U.; Bounceur, A.; Clavier, L. A Study of LoRa Low Power and Wide Area Network Technology. In
Proceedings of the International Conference on Advanced Technologies for Signal and Image Processing
(ATSIP), Fez, Morocco, 22–24 May 2017.
39. Phung, K.H.; Hieu Tran, H.; Nguyen, Q. Analysis and Assessment of LoRaWAN. In Proceedings of the
2nd International Conference on Recent Advances in Signal Processing, Telecommunications & Computing
(SigTelCom), Ho Chi Minh, Vietnam, 29–31 January 2018.
40. Bouguera, T.; Diouris, J.F.; Chaillout, J.J.; Jaouadi, R.; Andrieux, G. Energy Consumption Model for Sensor
Nodes Based on LoRa and LoRaWAN. Sensors 2018, 18, 2104. [CrossRef] [PubMed]
41. Polonelli, T.; Brunelli, D.; Marzocchi, A.; Benini, L. Slotted ALOHA on LoRaWAN-Design. Analysis and
Deployment. Sensors 2019, 19, 838. [CrossRef]
42. Sornin, N.; Yegin, A. LoRaWANTM 1.1 Specification. 2017. Available online: https://lora-alliance.org/sites/
default/files/2018-04/lorawantm_specification_-v1.1.pdf (accessed on 10 December 2019).
43. LoRa Alliance Technical Committee Regional Parameters Workgroup. LoRaWANTM 1.1 Regional Parameters.
2018. Available online: https://lora-alliance.org/sites/default/files/2018-04/lorawantm_regional_parameters_
v1.1rb_-_final.pdf (accessed on 10 December 2019).
44. Arduino Home. Available online: https://store.arduino.cc/arduino-uno-rev3 (accessed on 15 October 2019).
45. Dragino LoRa Shield for Arduino. Available online: https://www.dragino.com/products/module/item/102-
lora-shield.html (accessed on 10 December 2019).
46. Wemos Electronics. Available online: https://wiki.wemos.cc/products:d1:d1_mini_pro (accessed on 10
December 2019).
47. Dragino LoRa GPS Shield for Arduino. Available online: http://www.dragino.com/products/lora/item/108-
lora-gps-shield.html (accessed on 10 December 2019).
48. Ningbo Peacefair Electronic Co., Ltd. Available online: https://peacefair.en.made-in-china.com (accessed on
10 December 2019).
49. Arduino Mega Rev3. Available online: https://store.arduino.cc/mega-2560-r3 (accessed on 10 December 2019).
50. RobotDyn AC Dimmer. Available online: https://robotdyn.com/ac-light-dimmer-module-1-channel-3-3v-
5v-logic-ac-50-60hz-220v-110v.html (accessed on 10 December 2019).
51. Adafruit TSL2561. Available online: https://www.adafruit.com/product/439 (accessed on 10 December 2019).
52. Arduino MKR WAN 1300. Available online: https://store.arduino.cc/mkr-wan-1300 (accessed on 10 December
2019).
53. Monteino. Available online: https://lowpowerlab.com/guide/moteino/ (accessed on 10 December 2019).
54. Lopy4. Available online: https://docs.pycom.io/gettingstarted/connection/lopy4/ (accessed on 10
December 2019).
55. Libelium. Available online: http://www.libelium.com/extreme-range-wireless-sensors-connectivity-through-
buLLMDings-in-city-lora-868mhz-915mhz/ (accessed on 10 December 2019).
56. Dragino LoRa Products. Available online: http://www.dragino.com/products/lora.html (accessed on 22
June 2019).
57. Murata Electronics. Available online: https://wireless.murata.com/pub/RFM/data/type_abz.pdf (accessed on
10 December 2019).
58. HOPERF Chip RFM95/96/97/98. Available online: https://cdn.sparkfun.com/assets/learn_tutorials/8/0/4/
RFM95_96_97_98W.pdf (accessed on 10 December 2019).
59. Semtech SX1276. Available online: https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1276
(accessed on 10 December 2019).
Electronics 2020, 9, 124 28 of 28

60. Semtech SX1272. Available online: https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1272


(accessed on 10 December 2019).
61. ACS712. Available online: https://www.sparkfun.com/datasheets/BreakoutBoards/0712.pdf (accessed on 10
December 2019).
62. STC013 Dechang Electronics Co. Ltd. Available online: http://en.yhdc.com/product/SCT013-401.html
(accessed on 10 December 2019).
63. FZ0430 Voltage Sensor. Available online: http://www.ekt2.com/pdf/412_ARDUINO_SENSOR_VOLTAGE_
DETECTOR.pdf (accessed on 10 December 2019).
64. ZMPT101B Voltage Sensor. Available online: https://www.datasheet4u.com/datasheet-pdf/ETC/ZMPT101B/
pdf.php?id=1031464 (accessed on 10 December 2019).
65. Sánchez-Sutil, F.; Cano-Ortega, A.; Hernández, J.C.; Rus-Casas, C. Development and calibration of an
open source, low-cost power smart meter prototype for PV household-prosumers. Electronics 2019, 8, 878.
[CrossRef]
66. Cano-Ortega, A.; Sánchez-Sutil, F.J.; Hernández, J.C. Power Factor Compensation using Teaching Learning
Based Optimization and Monitoring System by Cloud Data Logger. Sensors 2019, 19, 2172. [CrossRef]
[PubMed]
67. BH1750 Illumination Sensor. Available online: http://rohmfs.rohm.com/en/products/databook/datasheet/ic/
sensor/light/bh1721fvc-e.pdf (accessed on 10 December 2019).
68. BTA16-600B Triac. Available online: https://www.alldatasheet.com/datasheet-pdf/pdf/440942/ISC/BTA16-
600B.html (accessed on 10 December 2019).
69. PIR Sensor LHI1778. Available online: https://www.alldatasheet.com/datasheet-pdf/pdf/14901/
PERKINELMER/LHI778.html (accessed on 10 December 2019).
70. BISS0001 Integrated Circuit. Available online: https://www.alldatasheet.com/datasheet-pdf/pdf/88732/ETC/
BISS0001.html (accessed on 10 December 2019).
71. HC-SR501 Motion Sensor. Available online: https://www.mpja.com/download/31227sc.pdf (accessed on 10
December 2019).

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access
article distributed under the terms and conditions of the Creative Commons Attribution
(CC BY) license (http://creativecommons.org/licenses/by/4.0/).

You might also like