Data Acquisition System Development For A Hydraulic Plant Using Hybrid Communication Network Based On LoRa
Data Acquisition System Development For A Hydraulic Plant Using Hybrid Communication Network Based On LoRa
Abstract—This paper presents the development of a data The technology evolution allows a better comprehension of
acquisition system that uses a hybrid communication network these variables, that helps in the development of hydraulic
based on Long Range (LoRa) modules. The goal of the system is techniques based on optimization algorithms [2], new hy-
to provide the gathered information over long distances. The
proposed hybrid structure minimizes the costs involved with draulic networks optimized models [4], water quality remote
the usage of LoRa transmitters, deploying a wired network monitoring [5], building intelligent meters based on Internet of
to interconnect the sensors and actuators in the vicinity of things (IoT) [6], and many others that provide improvements
the transmission point. This structure is compatible with the in water distribution.
main existing industrial communication protocols, facilitating the There are several metering technologies that use different
connection with the already installed networks. The system was
conceived for a hydraulic plant, aiming its instrumentation as a principles, generally classified in displacement meters, velocity
form of optimization of water distribution systems monitoring. In meters, a combination of displacement and velocity meters and
this paper the performance of LoRa module is analysed in terms electromagnetic meters, which are employed to measure the
of the maximum distance achieved to forward the data gathered water flow [1]. With such technology, it is possible to build
with acceptable quality. The acquired results demonstrated the management interfaces that acquire information and sends it
viability of the proposed solution for remote and local monitoring
of water distribution systems. through radio frequency transceivers (RF) [6].
Index Terms—LoRa, Hybrid Communication, Acquisition Sys- Although a management interface has limitations on the
tem, Water Distribution System, Instrumentation. availability of energy, consumption and transmission range [1],
new technologies are arising to tackle these limitations. LoRa
I. I NTRODUCTION (Long Range) is a technology based on Low Power Wide
Area Network (LPWAN), which provides low power, low
The water is an extremely important natural resource that cost, low consumption, easy network implementation, and
needs a proper management due to its connection with the wide transmission coverage. LoRa is a physical layer for
economy, health, agriculture, and many others aspects [1]. communications with long range and low consumption, which
This management begins in the water distribution system uses Chirp Spread Spectrum modulation (CSS) and operates
(WDS), whose challenge is to provide the correct management in unlicensed bands ISM (Industry, Scientific and Medical). Its
of water in its distribution network efficiently. A WDS is target is to eliminate repeaters, reduce implementation costs,
efficient when operated with low energy consumption, low provide support to many devices and increase the lifetime of
maintenance cost and a suitable water distribution through the batteries [7]. Some LoRa modules reach a coverage area of
pipe according to required demand [2]. up to 5 km in urban areas and up to 15 km in rural areas [8].
To understand and to find out a solution that improves the The LoRaWAN (LoRa Wide Area Network) is a protocol
distribution network, it is necessary to understand the variables developed by LoRa Alliance that uses the physical layer
involved in a WDS, as pressure, flow, water propagation speed, to build the network architecture and data control layer, in
demand, among others. For instance, leakage is a major issue order to optimize the range of communication, aiming the
to deal in such systems which is a major problem as it increase of battery lifetime, network capability, quality of
implies in water loss, water contamination and represent risk service (QoS) and data security [7]. Thereby, it is possible to
of damage to building constructions etc [1], [3]. implement a network with LoRa and LoRaWAN that monitors
a large area of IoT sensors [9]. Also, systems are being
The authors would like to thank the National Council for Scientific and
Technological Development – CNPq for the support to this research (CNPq- developed to monitor sensors and water meters remotely with
Universal Nº 423495/2016-0 and CNPq Nº 315514/2018-3). the use of LoRa in applications like river monitoring, irrigation
Fig. 1: Infrastructure available at LENHS and LAC. Fig. 3: Hardware Block Diagram of DASNI.
An auxiliary device was developed to be fixed on the ceiling The DASNI controls the information flow in the hybrid in-
in each lab to proportionate a direct and unobstructed vision. frastructure, working as a gateway that connects all networks.
The DASNI is a modular structure for coupling commercial data besides LoRa, giving a monitoring inside and outside
transceivers with flexibility that allows a expansion to future of the lab at the same time. However, if this command is
applications. It can be used to flow metering and network not delivered, the data would be sent only through LoRa at
management, even as in different locals to evaluate the quality pre-determined times and through RS485 by TRRS485LoRa
of LoRa signal transmission. transceiver. For the LAC, a firmware was developed to wait
The DASNI have a connector for coupling of Bluetooth for the arrival information.
modules (MCB) HC-05 and a connector for E32-TTL-100
LoRa modules (MCL). For measuring of differential pressure
in the orifice plate, it was used a MPX5010 sensor (SP) that
provides a voltage output of 0-5 V to a range of 0-10 kPa. Its
signal passes through a conditioning circuit (CC) to adapt its
voltage range to the input range of the Analog to Digital(AD)
converter (0-3.3 V), minimizing the noise quantization effect.
Besides the CC avoids over voltage in AD converter input,
it compensates the offset and filters the noise. The CC also
optimizes the signal to noise ratio in the desired measurement
range.
Fig. 5: DASNI Firmware Flowchart Installed at LENHS.
The LaunchPad Tiva 1294 from Texas Instruments is the
CPU that process sensors data and manages the network. It has
a 120 MHz processor, eight UARTs, two CAN controllers, two Protocol
AD modules and many other advantages. These features make To control the information exchange between the nodes and
the Tiva 1294 a suitable module to build a hybrid network. the access to the existing buses, it was developed a protocol
The connection with RS485 is through a transceiver based on ASCII characters, as shown in Table I.
MAX485 (TRRS485). The user can be connected on DASNI
to configure or to monitor the network by a USB interface PC TABLE I: Frame Message.
or RS232 by the transceiver UART-RS232 (MAX232). For the Start Address Command Data End
connection with CAN, it was used a transceiver CAN-UART
(TRCAN) SN65HVD232. The message frame is composed by a begin character (Start),
followed by an address field (Address) to specify the node
B. Software that receives the data, a frame of command that determinates
Considering the conceived software, it was developed inter- a operation to be executed (Command), a frame of data, which
faces, as well as an implementation of the firmware, to help includes specific information or answers, and finally an end
the DASNI in the monitoring based on devices with Android character message(End).
system and PCs. In both interfaces, as presented in Fig. 4, The begin character indicates from which network the data
a graphic of flow rate (y-axis) in function of time elapsed should be forwarded, where: “B” means Bluetooth, “C” refers
(x-axis) is shown and displays, with the actual value of the to CAN, “R” indicates RS232 communication and “P” means
received flow, to monitor the behavior of LENHS flow rate RS485. The address ”0” is reserved to DASNI. For the reading
sensor. of the analog variable, it was established the character ”A”
on the command frame, which application corresponds to
the measure of pressure by DASNI. The character ”A” is
associated to a value that indicates which analog input is read.
The End frame is composed by the ”V” character.
III. M ETHODOLOGY
To evaluate the developed system, some procedures were
established to guarantee adequate LoRA modules’ communi-
cation and analysis of the transmission and flow metering.
The LoRa module E32-TTL-100 operates at 433 MHz
and it was configured with no parity bit, TTL UART baud
rate of 9600 bps, a data air transmission of 0.3 kbps in
Fig. 4: PC and Bluetooth Interfaces transparent transmission mode, transmission power of 20 dBm
and antenna gain of 2.5 dBi. In this configuration, the module
The DASNI was focused on remote monitoring, so, for can achieves the maximum range.
the LENHS, a firmware (Fig. 5) was developed to acquire a To evaluate the transmission, it were chosen different sce-
command coming through any communication modules. These narios to for the LoRa modules behaviors. In each scenario
modules select a communication to transmit the flow sensor three tests were performed. The first one aims to identify the
optimal distance to send the information, evaluating points
with partial or total loss of reception. The transmitter sends an
increased int value per second, while the receiver is monitored
by a device linked to DASNI. One module was moved and
the other was fixed. When there is a loss of information, the
point is identified as well as the region around it, and some
indentation and advancement occurs to determinate the point
where there is a complete data loss (dn ).
In test 2, the transmitter sends data in each second while the
receiver evaluates the received signal power using a spectrum
analyzer N9340B from Keysight Technologies. The transmitter
is moved in each 10 meters until the distance where the signal
can be acquired by analyzer (dpmax ). In each movement, the
analyzer gets an average of 100 samples of the signal received
and store it. Fig. 6: Small aircraft lading strip.
The third test aims the evaluation of packet loss. The trans-
mitter sends a packet with 372 characters “A”. The receiver
increases a counter in each character correctly received and
send its result to a monitoring device. One module was fixed
and the other was moved in each 100 meters until the point
dn obtained in test 1. Then, in this point, ten packets were
sent to find an average percent value of packet received and a
new step of 10 meters was chosen.
The analysis of the flow behavior was performed in LENHS,
where the developed system was fixed and coupled in the
orifice plate. The MPX5010 sensor was connected to the CC
developed, to execute the initial calibration of CC. The first
step was to adjust the offset when there was no flux inside of Fig. 7: Plot Power (dB) in terms of the Distance (m).
the pipe; after this, the flow was increased until the maximum
point of MPX5010 pressure sensor (Pmax ), adjusting it to
output voltage reference of 3.3 V (Vref ). With the CC adjusted, that depends on the environment (it was considered n = 2 for
it was plotted the graphic flow for each flow variation, it was free space) and d0 is the reference distance (d0 = 1m).
noted the displacement of mercury and the data of voltage, A graphic that details the packet loss result obtained in test
pressure and flow acquired by DASNI shown in the PC and 3 is inserted in the Fig.7. Until 900 meters, there was no loss
smart phone interfaces. and starting at 980 meters, the loss increased with the distance
because of the receive power decrease. However, in 940 meters
IV. R ESULTS a high packet loss was observed with the increase of the
A. Analysis of Transmission distance. The consequence is some shadow zone associated
To analyze the signal quality of LoRa modules, two test with a greater influence of buildings around 900 meters point,
sites were considered. One of them is located in a small provoked by multipath interference. Besides, the maximum
aircraft landing strip in downtown of João Pessoa, Paraı́ba. distance was 1030 m because of the area limitation, but even
This location (Fig. 6) is an open environment with few achieving the maximum distance, there were still packets
obstacles around the region. The second scenario (Fig. 8) is received.
the longest road located at the Federal University of Paraı́ba, In scenario 2 the tests 1 and 3 mentioned in Section III were
whose environment has many obstacles around it. executed. In test 1 it was identified that the distance with no
In scenario 1 the tests 1, 2 and 3 were conducted, as detailed loss was also approximately d1 = 900m. Although, after this
on Section III. In test 1 it was identified that the distance with point there were transmission losses in the trajectory, mainly in
no loss started in approximately d1 = 900m. The maximum the area covered by a concrete structure, but no complete loss
distance evaluated was 1030 meters . was observed. However, some other points resulted in partial
With test 2, it was obtained the power signal related to the loss: the first one was nearby a high voltage line perpendicular
distance, as shown in Figure 7. The maximum distance was to the considered trajectory, responsible to provide power
dpmax = 450m. supply to the entire university campus; the second point was
The behavior observed experimentally is similar to the observed on a section of the street that had a detour, as
power obtained through the theoretic model [13], calculated presented in Fig. 8.
by the equation inserted in the Fig. 7. In this model, P (d0 ) is On test 3, after d1, there were significant losses in the
the received power, in dB, at 1 meter of distance, n is a value area covered by a concrete structure near the street’s end, as
Fig. 8: Road evaluated at the Federal University of Paraı́ba.
Fig. 9: Hydraulic plant in the LENHS used for flow measure-
ment and validation of the proposed system
shown in Fig. 8 point of 1075 m), which results in 11% of
character loss. Analysing also the point nearby a high voltage
line, approximately 463 m, the average character loss was 6%.
The lost information in the street detour can be justified by
the vegetation around the detour, which was observed between
the line of sight of the modules. The loss observed around
the high voltage line can be associated to electromagnetic
interferences over the receiver. Finally, the loss in the area
covered by a concrete structure can be associated to multipath
and shadowing interferences.
The obstacle’s influence in the vicinity of the street makes
the modules more susceptible to electromagnetic interference;
however, even over interference and with a length of 1.1
km, there wasn’t total loss of information. The modules Fig. 10: Voltage x Mercury Column Height and Pressure x
monitoring was realized by smart phone connected to DASNI Voltage.
via Bluetooh.
B. Flow measurement
(Cd ), the ratio of internal and external diameters of OP (β)
The flow measurement observed during the instrumental-
and the expandability factor () [14]. With the pressure of
ization in one of the hydraulic plant sensor analysed (Fig. 9),
each sensor, it was calculated the developed sensor flow (Qd )
aims to remotely monitoring the behavior over long distances.
and U-tube manometer (Qr ). The results are shown in Fig.
The flow sensor used was an orifice plate connected by
hoses to a U-tube manometer with mercury. However, the
DASNI used the MPX5010 differential pressure sensor to flow
measurement that was connect to a conditioning circuit. The
developed system used a portable battery for supply and it was
installed over the pipe plant, as shown in Fig. 9.
The flow and pressure values were acquired, stored and
monitored by the PC and smartphone interfaces. The flow
increased gradually through a manual valve opening at pre-
determinated intervals in each mercury column measured.
As it can be observed In Fig. 10, the voltage behavior
was measured in function of the pressure variation in OP
(VCC ). Its behavior is linear until the CC saturation. It Fig. 11: Performance of the flow rate measured by proposed
is verified the initial calibration effect, adapting the output system with MPX5010, U-Type sensor and flow rate theoretic
MPX5010 voltage range (VM P X ) to the ADC input range. value.
The theoretic value without errors ((VT was calculated by
V = ΔP ∗ (Vref /Pmax )). The DASNI calculates the pressure 11. The experimental plots are in accordance to the theoretic
(ΔPM ) through VCC , which presents a linear behavior shown plot, although there is an error associated to the pressure and
on graphic inserted in Fig. 10. flow values between the MPX5010 and U-Tube manometer,
The theoretical flow values in orifice plate (Qv ) were as can be seen in Table II. One of the reasons to justify
obtained by the pressure difference (ΔP ), discharge coefficient these errors is the presence of bubbles inside of the hoses.
TABLE II: Error between the values of MPX and U tube. decreased removing the air bubbles, using accurate sensors or
Mercury Column Height (mm) Pressure Error(%) Flow Error (%) calibrate the sensors. Using the graphic of voltage-pressure,
0 0 0 observed in Fig. 11, it is possible to adjust, by software, the
4 36.81 16.96
8 34.35 15.91
average value, leading to minimum transmission errors. The
16 11.32 5.51 CC allows an initial calibration that is easy to perform, once
21 5.52 2.72 that is necessary to put the hydraulic plant in minimum and its
26 3.65 1.81 maximum flow to adjust the offset and gain respectively. It is
33 4.84 2.39
41 2.21 1.10 also possible to use any sensor with a voltage output, giving
54 6.45 3.17 a flexibility to the system for usage in others applications.
69 0.00 0.00 The presented system is a prototype and the was adopted
in the first experimental work with the objective to integrate
the university to a hybrid communication and data acquisition
The air bubbles are compressed because of increased pressure, applied in a remote management in WDS. It aimed to become
provoking a pressure fall and, consequently, a difference in the a solution for the WDS with difficult access providing the
effective pressure acquired by sensors. This effect is verified integration of sensors acquisition with different standards
according to error increase in small pressures, due to the CC communications to facilitate its maintenance in the local and
adjustment to maximum pressure. Another error comes from monitor all of them over long distances.
Parallax error, associated to a vision angle error of the mercury R EFERENCES
column.
[1] S. G. Kashid, S. A. Pardeshi, “A Survey of Water Distribution System
According to the datasheet, the MPX5010 presents a typical and New Approach to Intelligent Water Distribution System ”, 2014 First
voltage offset of 0.2 V and a maximum of 0.425 V with an International Conference on Networks & Soft Computing (ICNSC2014),
error of 5% related to full scale span voltage (VF SS ). The 19-20 August 2014.
[2] A. M. Righetto, “Operação Ótima de Sistema Urbano de Distribuição
systematic error is minimized through the offset adjustment de Água” January 2002.
on proposed CC. Thus, to analyze the system accuracy, it was [3] N. I. Sherksi, et. al., “Leakage Effects on the Variables of Water
performed a test to determinate the uncertain of measurement. Distribution System”, 2013 IEEE Conference on Systems, Process &
Control (ICSPC), 13-15 December 2013.
The hydraulic plant was maintained with a constant flow rate [4] B. Jiang, et. al., “Based on the Metering Zone Water Distribution
to acquire sensor flow samples (Qd ) by the PC interface (Fig. Network Node Flow Research”, 2012 International Symposium on
4 c-)). The standard deviation was calculated in a range of 100 Geomatics for Integrated Water Resource Management, 19-21 October
2012.
samples of Qd resulting in σ = 0.0068L/s. [5] B. Zhang, Q. Shen, J. Li, “ Monitoring water quality of urban water
supply sources using optical remote sensing”, 2009 Joint Urban Remote
V. C ONCLUSIONS Sensing Event, 20-22 May 2009.
This paper presented a system that can acquire data from a [6] M. Suresh, U. Muthukumar, J. Chandapillar, “A Novel Smart Water-
Meter based on IoT and Smartphone App for City Distribution Man-
flow sensor of a hydraulic plant by different communication agement”, 2017 IEEE Region 10 Symposium (TENSYMP), 14-16 July
modules and send this information mainly through a long 2017.
range module, the LoRa module E32-TTL-100. The hybrid [7] O. Khutsoane, B. Isong, A. M. Abu-Mahfouz, “ IoT Devices and
Applications based on LoRa/LoRaWAN”, IECON 2017 - 43rd Annual
communication allows a system’s expansion, where it can be Conference of the IEEE Industrial Electronics Society, 29 October-1
possible to add other network sensors and actuators based on November 2017.
RS485 or CAN transceivers, providing a remote monitoring [8] M. Centenaro, et. al.,, “Long-Range Communications in Unlicensed
Bands: The Rising Stars in the IoT and Smart City Scenarios”, IEEE
of a specific network. Besides, the Bluetooth capability offers Wireless Communications, 02 November 2016.
an easy local verification with smartphones and this simplifies [9] H. C. Lee, K. H. Ke, “Monitoring of Large-Area IoT Sensors Using a
the local inspection, as well as leads to a faster maintenance. LoRa Wireless Mesh Network System: Design and Evaluation”, IEEE
Transactions on Instrumentation and Measurement, September 2018.
In the transmission analysis, it was seen that the LoRa [10] W. Guibes, et. al., “Evaluation of LPWAN Technologies for Smart
module provided a stable communication until 900 m in open Cities: River Monitoring Use-case”, 2017 IEEE Wireless Communica-
field, with no repeaters and its received power approximates tions and Networking Conference Workshops (WCNCW), 19-22 March
2017.
to theoretical behave, as can be seen in Fig. 7. Among the test [11] W. Zhao, et. al., “Design and Implementation of Smart Irrigation System
scenarios considered, the scenario 2 is denser than scenario 1, Based on LoRa”, 2017 IEEE Globecom Workshops (GC Wkshps), 4-8
and that subjected the LoRa modules to more interference in December 2017.
[12] M. Saravanan, A. Das, V. Iyer, “Smart Water Grid Management using
scenario 2. But, even achieving the maximum range limited by LPWAN IoT Technology”’, 2017 Global Internet of Things Summit
the area, there was still communication between the modules. (GIoTS), 6-9 June 2017.
In the instrumentalization, it was seen the effectiveness of [13] F. P. Correia, et. al., “Propagation Analysis in Precision Agriculture
Environment using XBee Devices”, 2013 SBMO/IEEE MTT-S Interna-
remote monitoring, even over errors. The errors are acceptable tional Microwave & Optoelectronics Conference (IMOC), 4-7 August
because the system presented in this paper is targeted to a data 2013.
acquisition system that provides a wide coverage communica- [14] ISO 5167-1:2003, Measurement of fluid flow by means of pressure dif-
ferential devices inserted in circular cross-section conduits running full -
tion, instead of a precision sensor. The errors shown are related Part 1: General principles and requirements. International Organization
to the measured values by DASNI with only the maximum for Standardization (ISO). 1 March 2003.
point of pressure adjusted and offset. Theses errors could be