River Water Quality Monitoring Using LoRa-Based IoT
<p>LTE carrier operation modes for NB-IoT: (<b>a</b>) in-band; (<b>b</b>) guard band; (<b>c</b>) stand-alone (adapted from [<a href="#B10-designs-08-00127" class="html-bibr">10</a>]).</p> "> Figure 2
<p>Sigfox network architecture: A device broadcasts a message using its radio antenna; multiple base stations in the area will receive the message, and the base stations then send the message to the Sigfox Cloud, which eventually sends the message to the customer’s end platform. (adapted from [<a href="#B11-designs-08-00127" class="html-bibr">11</a>]).</p> "> Figure 3
<p>LoRaWAN network architecture: Gateway receives messages from any end node, forwards these data messages to the network server, and they are finally accessed by the application server (adapted from [<a href="#B14-designs-08-00127" class="html-bibr">14</a>]).</p> "> Figure 4
<p>LPWAN advantage compromise in terms of some IoT factors (adapted from [<a href="#B15-designs-08-00127" class="html-bibr">15</a>]).</p> "> Figure 5
<p>Up-chirp signals, with SF = 7: (<b>a</b>) decimal information symbol of 32; (<b>b</b>) decimal information symbol of 64 (adapted from [<a href="#B16-designs-08-00127" class="html-bibr">16</a>]).</p> "> Figure 6
<p>Bitrate and spreading factor relationship (CR = 1).</p> "> Figure 7
<p>LoRa packet format (adapted from [<a href="#B18-designs-08-00127" class="html-bibr">18</a>]).</p> "> Figure 8
<p>Packet duration and spreading factor relationship (CR = 1, BW = 125 kHz).</p> "> Figure 9
<p>Packet duration and bandwidth relationship (CR = 1, SF = 7).</p> "> Figure 10
<p>System block diagram of the developed prototype, with the two supporting, IoT Node and Gateway.</p> "> Figure 11
<p>DFRobot DFR0198, temperature sensor, parameters (adapted from [<a href="#B24-designs-08-00127" class="html-bibr">24</a>]).</p> "> Figure 12
<p>DFRobot SEN0161-V2, pH sensor, parameters (adapted from [<a href="#B27-designs-08-00127" class="html-bibr">27</a>]).</p> "> Figure 13
<p>pH sensor calibration steps: (<b>a</b>) pH = 7 point; (<b>b</b>) pH = 4 point.</p> "> Figure 14
<p>DFRobot DFR0300, conductivity sensor, parameters (adapted from [<a href="#B28-designs-08-00127" class="html-bibr">28</a>]).</p> "> Figure 15
<p>Conductivity sensor calibration steps: (<b>a</b>) EC = 12.88 mS point; (<b>b</b>) EC =1413 µS point.</p> "> Figure 16
<p>Seed Studio 101020752, turbidity sensor, parameters (adapted from [<a href="#B29-designs-08-00127" class="html-bibr">29</a>]).</p> "> Figure 17
<p>Relationship between turbidity and voltage (adapted from [<a href="#B29-designs-08-00127" class="html-bibr">29</a>]).</p> "> Figure 18
<p>SX1276, LoRa module characteristics (adapted from [<a href="#B20-designs-08-00127" class="html-bibr">20</a>]).</p> "> Figure 19
<p>Electrical schematic of IoT Node subsystem.</p> "> Figure 20
<p>PCB developed for IoT Node subsystem (Arduino shield).</p> "> Figure 21
<p>IoT Node subsystem prototype, practical assembly.</p> "> Figure 22
<p>IoT Node program flowchart. After the peripherals are initialized (setup), it periodically sends LoRa messages with sensor data (loop).</p> "> Figure 23
<p>Electrical schematic of Gateway subsystem.</p> "> Figure 24
<p>PCB developed for Gateway subsystem (Pi HAT).</p> "> Figure 25
<p>Gateway subsystem prototype, practical assembly: (<b>a</b>) front view; (<b>b</b>) rear view.</p> "> Figure 26
<p>Gateway program flowchart, initialization and receive interrupt handler.</p> "> Figure 27
<p>MQTT architecture flowchart in Gateway subsystem.</p> "> Figure 28
<p>Dashboard, real time data page: (<b>a</b>) water data; (<b>b</b>) radio LoRa data.</p> "> Figure 29
<p>Dashboard, historical page, data and log files.</p> "> Figure 30
<p>IoT Node, power measurements.</p> "> Figure 31
<p>LoRa radio coverage test.</p> "> Figure 32
<p>River Jamor, test site: (<b>a</b>) openstreetmap location; (<b>b</b>) test site photo.</p> "> Figure 33
<p>River water parameter variation: (<b>a</b>) temperature, (<b>b</b>) pH, (<b>c</b>) conductivity and (<b>d</b>) turbidity.</p> ">
Abstract
:1. Introduction
- pH—Indicates the acidity or alkalinity of a solution [2]. It does not represent the measure of the quantity of acids or bases, but the relationship between them. The pH varies between 0 and 14. High or low pH values can be indicative of pollution, with normal values being considered between 6.5 and 8.5.
- Conductivity—This is an important parameter due to the ease of detecting contamination levels when measuring water conductivity [3]. High conductivity means that the water contains a high level of contaminants, and the opposite means that drinking water is practically incapable of conducting electrical current. The unit of measurement for electrical conductivity is mS/cm and the normal value is up to 2 mS/cm.
- Turbidity—Is a measure of water transparency [4]. Cloudy water is often caused by suspended particles such as silt, (seaweed, etc.), organic materials, etc. These particles soak up (like a towel) and scatter the light rays instead of letting them pass through the water, which is detrimental to water-based plants and animals. A high turbidity value indicates cloudier water, and a low value means clear water. Turbidity measurements are represented in Nephelometric Turbidity Units (NTU) and normal values are up to 5 NTU.
- Temperature—There is no ideal temperature for river water, but many water-based organisms are sensitive to high temperatures and the oxygen solubility is lower in warmer waters, thus limiting the supply of oxygen [5]. The unit for temperature is degrees Celsius (°C).
2. State of the Art
3. IoT Technologies
3.1. LPWAN
3.2. LoRa Modulation
- SF is the spreading factor (7…12);
- BW is the modulation bandwidth (Hz).
- SF is the spreading factor [7…12];
- BW is the modulation bandwidth [Hz];
- is the symbol period [s].
- SF is the spreading factor [7…12];
- BW is the modulation bandwidth [Hz];
- , symbol rate [sym/s].
- SF is the spreading factor [7…12];
- BW is the modulation bandwidth [Hz];
- CR is the code rate (number of redundant bits) [1…4].
- is the number of programmed preamble symbols;
- is the symbol period [s].
- Explicit mode—This is the default mode of operation [20]. Here, the header provides information on the payload, namely payload length in bytes, forward error correction code rate and presence of an optional 16-bit CRC for the payload [20]. The header is transmitted with maximum error correction code (4/8) [20]. It also has its own CRC to allow the receiver to throw out invalid headers.
- Implicit mode—In certain pictures/situations, where the payload, coding rate and CRC presence are fixed or known in advance, it may provide an advantage to reduce transmission time by calling for/using an understood header mode [20]. In this mode, the header is removed from the packet [20]. In this case, the payload length, error coding rate and presence of the payload CRC must be manually configured on both sides of the radio link [20].
- PL is the number of payload bytes;
- SF is the spreading factor [7…12];
- H = 0 when the header is enabled, and H = 1 when no header is present;
- DE = 1 when low data rate optimization is enabled, and DE = 0 when disabled;
- CR is the code rate (number of redundant bits) [1…4].
- is the preamble period [s];
- is the number of symbols;
- is the symbol period [s].
- is the Time on Air (equal to ) [s];
- is the channel occupancy time ratio.
4. System Design
4.1. Sensors and LoRa Module
4.2. IoT Node
4.3. Gateway
5. Results
5.1. Energy Consumption
- is phase A: sensors reading time [s];
- is phase B: [s];
- is phase C: Arduino powerDown (sleep) time [s].
5.2. LoRa Radio Coverage
5.3. Monitoring a River (Real Scenario)
6. Conclusions and Future Work
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Khan, M.A.I.; Hoque, M.A.; Ahmed, S. IoT-based System for Real-time Water Pollution Monitoring of Rivers. In Proceedings of the 2021 International Conference on Electronics, Communications and Information Technology (ICECIT), Khulna, Bangladesh, 14–16 September 2021. [Google Scholar]
- YSI. Understanding pH in Water Quality. Available online: https://www.ysi.com/parameters/ph (accessed on 2 May 2024).
- YSI. Conductivity of Water. Available online: https://www.ysi.com/parameters/conductivity (accessed on 4 May 2024).
- YSI. What Is Turbidity? Available online: https://www.ysi.com/parameters/turbidity (accessed on 7 May 2024).
- ORACLE. What Is IoT? Available online: https://www.oracle.com/pt/internet-of-things/what-is-iot/ (accessed on 3 April 2024).
- ANACOM. Utilização da Inernet das Coisas. Relatório Utilização da Inernet das Coisas, IoT. 2023, p. 7. Available online: https://www.anacom.pt/render.jsp?contentId=1737942 (accessed on 2 October 2024).
- Alnajjar, K.A.; Fahmy, M.M.A.; Ali, Y.M.; Ansari, S. Water Quality Monitoring System Based on the Internet of Things. In Proceedings of the IEEE 6th International Conference on Electrical, Electronics and System Engineering (ICEESE), Shah Alam, Malaysia, 29–30 August 2023; pp. 32–37. [Google Scholar]
- Savel, V.; Rakluea, P.; Jangjing, T.; Kumkhet, B.; Mahatthanajatuphat, C.; Thaiwirot, W. IoT Based Water Quality Monitoring System Using Solar Powered and LoRaWAN. In Proceedings of the International Electrical Engineering Congress (iEECON), Khon Kaen, Thailand, 9–11 March 2022; pp. 1–4. [Google Scholar]
- Cinterion, T. NB-IoT Explained: What Is It, and How Does It Work? 28 November 2022. Available online: https://www.telit.com/blog/nb-iot-new-cellular-standard-means-business/ (accessed on 11 April 2024).
- ROHDE & SCHWARZ. Narrowband Internet of Things. 2016. Available online: https://www.rohde-schwarz.com/us/applications/narrowband-internet-of-things-white-paper_230854-314242.html (accessed on 4 April 2024).
- Sigfox. What Is Sigfox 0G Technology? Available online: https://www.sigfox.com/what-is-sigfox/ (accessed on 11 April 2024).
- Semtech. What Are LoRa and LoRaWAN? Available online: https://lora-developers.semtech.com/documentation/tech-papers-and-guides/lora-and-lorawan/ (accessed on 14 April 2024).
- What Is LoRaWAN® Specification? Available online: https://lora-alliance.org/about-lorawan/ (accessed on 14 April 2024).
- Würth Elektronik. What Is a LoRaWAN® Gateway? Available online: https://www.we-online.com/en/components/products/DAPHNIS-I (accessed on 19 November 2024).
- Kais, M.; Eddy, B.; Frederic, C.; Fernand, M. A comparative study of LPWAN technologies for large-scale IoT deployment. ICT Express 2019, 5, 1–7. [Google Scholar]
- Kamoona, Z.; Ilyas, M. Investigating the Performance of LoRa Communication for Nominal LoRa and Interleaved Chirp Spreading LoRa. In Proceedings of the International Conference on Artificial Intelligence of Things (ICAIoT), Istanbul, Turkey, 29–30 December 2022. [Google Scholar]
- SEMTECH. LoRa Modulation Basics. AN1200.22. 2015. Available online: https://www.semtech.com/uploads/technology/LoRa/lora-and-lorawan.pdf (accessed on 3 April 2024).
- SEMTECH. Designer’s Guide. AN1200.13. 2013. Available online: https://www.openhacks.com/uploadsproductos/loradesignguide_std.pdf (accessed on 23 April 2024).
- LoRa Alliance Technical Committee Regional Parameters Workgroup. LoRaWAN™ 1.1 Regional Parameters; LoRa Alliance, Inc.: Fremont, CA, USA, 2017; p. 8. Available online: https://lora-alliance.org/wp-content/uploads/2020/11/lorawan-regional-parameters-v1.1ra.pdf (accessed on 23 April 2024).
- Semtech. SX1276/77/78/79 Datasheet. Semtech, 2020. Available online: https://www.semtech.com/products/wireless-rf/lora-connect/sx1276 (accessed on 5 April 2024).
- Arduino. Arduino Mega ADK Rev3. Available online: https://docs.arduino.cc/retired/boards/arduino-mega-adk-rev3/ (accessed on 12 March 2024).
- OpenJS Foundation. Node-RED. OpenJS Foundation. Available online: https://nodered.org/ (accessed on 12 March 2024).
- Raspberry Pi 3 Model B+. Raspberry Pi. Available online: https://www.raspberrypi.com/products/raspberry-pi-3-model-b-plus/ (accessed on 10 June 2024).
- DFRobot. Waterproof DS18B20 Digital Temperature Sensor for Arduino. DFRobot. Available online: https://www.dfrobot.com/product-689.html (accessed on 12 March 2024).
- Dallas, M. DS18B20. Analog Devices. Available online: https://www.analog.com/en/products/ds18b20.html (accessed on 12 March 2024).
- Maxim, A.D. Overview of 1-Wire Technology and Its Use. Available online: https://www.analog.com/en/resources/technical-articles/guide-to-1wire-communication.html (accessed on 12 March 2024).
- DFRobot. Gravity: Analog pH Sensor/Meter Kit V2. DFRobot. Available online: https://www.dfrobot.com/product-1782.html (accessed on 12 March 2024).
- DFRobot. Gravity: Analog Electrical Conductivity Sensor. DFRobot. Available online: https://www.dfrobot.com/product-1123.html (accessed on 12 March 2024).
- Seed Studio. Grove—Turbidity Sensor (Meter) V1.0. Seed Studio. Available online: https://www.seeedstudio.com/Grove-Turbidity-Sensor-p-4399.html (accessed on 12 March 2024).
- TXB0108 8-Bit Bidirectional Voltage-Level Shifter. Texas Instruments. Available online: https://www.ti.com/product/TXB0108 (accessed on 10 June 2024).
- Python Software Foundation. Python. Python Software Foundation. Available online: https://www.python.org/ (accessed on 12 March 2024).
- Eclipse Foundation. Eclipse Mosquitto—An Open Source MQTT Broker. Eclipse Foundation. Available online: https://mosquitto.org/ (accessed on 12 March 2024).
- Eclipse Paho MQTT Python Client Library. Eclipse. Available online: https://eclipse.dev/paho/index.php?page=clients/python/index.php (accessed on 22 March 2024).
- Pires, L. Redes de Sensores sem Fios: Aplicações para Supervisão e Monitorização de Infraestruturas. Revista Manutenção (Portuguese Magazine) No. 135. 2017, pp. 66–68. Available online: https://www.revistamanutencao.pt/artigo-cientifico/redes-de-sensores-sem-fios-aplicacoes-para-supervisao-e-monitorizacao-de-infraestruturas/ (accessed on 27 February 2024).
- Incibe. The LoRaWAN Protocol. 15 June 2023. Available online: https://www.incibe.es/en/incibe-cert/blog/lorawan-and-its-contribution-iiot (accessed on 18 May 2024).
- YSI. Temperature. Available online: https://www.ysi.com/parameters/temperature (accessed on 18 May 2024).
Sigfox | LoRaWAN | NB-IoT | |
---|---|---|---|
Modulation | BPSK | CSS | QPSK |
Freq. Band | ISM | ISM | LTE |
BW | 100 Hz | 125/250 kHz | 180 kHz |
Bidirectional | Limited Half-duplex | Yes Half-duplex | Yes Half-duplex |
Messages/day (max) | 140 (UL) 4 (DL) | Limited (duty-cycle) | Unlimited |
Message size (max) | 12 Byte (UL) 8 Byte (DL) | 243 Byte | 1600 Byte |
Throughput (max) | 100 bit/s | 50 kbit/s | 160 kbit/s (UL) 120 kbit/s (DL) |
Range | 10 km (urban) 40 km (rural) | 5 km (urban) 20 km (rural) | 1 km (urban) 10 km (rural) |
Interference immunity | High | High | Low |
Encryption | No | Yes (AES 128 bits) | Yes (LTE) |
Private networks | No | Yes | No |
Standard | Sigfox | LoRa Alliance | 3GPP |
Air temperature | Around 25 °C |
Weather conditions | Partly cloudy and light rain sometimes occurred |
Water depth | Around one meter |
Water speed | Very slow |
Water | Temp. | pH | Conductivity | Turbidity |
---|---|---|---|---|
River Jamor | 21 | 7.7 | 0.7 | 0 |
Pub. Water supply (Cascais) | n.a. | 6.8 | 0.12 | 0 |
Bottled Luso water | n.a. | 6 | 0 | 0 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Pires, L.M.; Gomes, J. River Water Quality Monitoring Using LoRa-Based IoT. Designs 2024, 8, 127. https://doi.org/10.3390/designs8060127
Pires LM, Gomes J. River Water Quality Monitoring Using LoRa-Based IoT. Designs. 2024; 8(6):127. https://doi.org/10.3390/designs8060127
Chicago/Turabian StylePires, Luís Miguel, and José Gomes. 2024. "River Water Quality Monitoring Using LoRa-Based IoT" Designs 8, no. 6: 127. https://doi.org/10.3390/designs8060127
APA StylePires, L. M., & Gomes, J. (2024). River Water Quality Monitoring Using LoRa-Based IoT. Designs, 8(6), 127. https://doi.org/10.3390/designs8060127