An Open Source LoRa Based, Low-Cost IoT Platform for Renewable Energy Generation Unit Monitoring and Supervisory Control

SCADA provides real-time system monitoring by constant communication and data exchange between various system devices to achieve data visualization and logging. Presently, in industrial systems, commercial SCADA systems are being used for data monitoring and control. These systems can be expensive, and as such can only be afforded by select industries. Even at these costs, the commercial SCADA systems face some challenges, which include interoperability and scalability issues. Research has shown that these problems can be solved by the introduction of low-cost materials and open-source software to achieve data monitoring for all levels of processes. This paper proposes an open source, low-cost Internet of Things (IoT)-based SCADA system that employs the IoT architecture for SCADA functions. The proposed system is an improvement to the existing IoT solutions by eliminating cloud based IoT platforms and introducing a single machine system. This solution increases the robustness of the system while reducing costs. voltage and current sensors, Arduino Uno microcontroller and Raspberry Pi. The sensors acquire data from the monitored unit. The Arduino Uno receives the data and processes them for transmission to the Raspberry Pi using the LoRa communication technology. At the Raspberry Pi, the local Chirpstack platform processes the data and displays the measured data using the Grafana dashboard for real-time data monitoring, and the data is stored in an InfluxDB database. For system validation purposes, the prototype is designed, developed, and set up to monitor the panel voltage, current and battery voltage of a solar photovoltaic system. The results obtained from the experimental set-up are compared with the test data from physical digital multimeters. The system presented in this paper is a low-cost, open source, scalable and interoperable system. This, therefore, makes the proposed SCADA system an alternative for commercial SCADA systems, especially for select applications. The system proposed in this paper can be deployed to large industrial systems with appropriate upgrades and customization. The main contribution of this research is the design and development of a SCADA system that performs all the functions of a proprietary SCADA system at a very low-cost with scalable and interoperability features which are the main limitations of the traditional SCADA systems.

voltage and current sensors, Arduino Uno microcontroller and Raspberry Pi. The sensors acquire data from the monitored unit. The Arduino Uno receives the data and processes them for transmission to the Raspberry Pi using the LoRa communication technology. At the Raspberry Pi, the local Chirpstack platform processes the data and displays the measured data using the Grafana dashboard for real-time data monitoring, and the data is stored in an InfluxDB database. For system validation purposes, the prototype is designed, developed, and set up to monitor the panel voltage, current and battery voltage of a solar photovoltaic system. The results obtained from the experimental set-up are compared with the test data from physical digital multimeters. The system presented in this paper is a low-cost, open source, scalable and interoperable system. This, therefore, makes the proposed SCADA system an alternative for commercial SCADA systems, especially for select applications. The system proposed in this paper can be deployed to large industrial systems with appropriate upgrades and customization. The main contribution of this research is the design and development of a SCADA system that performs all the functions of a proprietary SCADA system at a very lowcost with scalable and interoperability features which are the main limitations of the traditional SCADA systems.

Keywords
Internet of things; LoRa; open source; renewable energy systems; SCADA

Introduction
There is a lot of interest in renewable energy sources for power generation due to its environmental benefits such as greenhouse gas reduction and reduced dependence on fossil fuels for power generation. The renewable energy generation installation capacity in the world at the end of 2019 stands at 2,351GW [1]. This entails an increasing penetration of the renewable energy sources for power generation with possibly very high penetration in years to come both at the macro, mini and micro generation levels.
With the dispersed geographical distribution of the renewable energy generation units leading to a distributed structure, system monitoring, or supervision is very important for optimum performance. The continuous requirement for supervision, monitoring and control of the various units of the generation systems led to the development the Supervisory Control and Data Acquisition (SCADA) systems. SCADA systems have been the core of industrial automation and control over the years [2]. An observation of the industrial automation pyramid shown in Figure 1 depicts that SCADA systems are responsible for monitoring and control of functional procedures among all devices while acting as an interface for human supervision from the downstream to upstream [2].
Generally, a SCADA system is comprised of multiple sensors and actuators that make up the Field Instrumentation Devices controlled through the Remote Terminal Units (RTUs) [2]. The Communication Channel, Master Terminal Units (MTU) hosting the Human Machine Interface (HMI) are also important components of the SCADA system with functions that include data transfers between the RTUs and the MTU, data processing and display respectively. The MTU also allows the injection of controls from the HMI to the field instruments. The continuous increase in the sizes of the systems have also caused an increase in complexity hence a requirement for a more robust control system.
One of the very promising components of the shift in paradigm to the industry 4.0 [2] is the Internet of Things (IoT) [3]. The IoT is a network architecture that was initially motivated by wireless communication for data exchange featuring low power consumption during data transfer [2]. In recent years, IoT has matured enough from field to server data communication [4][5][6].
IoT as a solution for industrial monitoring can be applied to distributed units of a renewable energy generation system. Due to the increased installed power capacity from renewable energy sources, there is an increasing need for more components. These systems can only be monitored and controlled by systems that allow for the connection of multiple sensors at very large distances for data collection, with good interoperability, low cost, and low power consumption. Currently the industrial monitoring systems have mostly employed proprietary SCADA systems for data monitoring and remote control. These systems, however, face some challenges that include high cost of installation, operating and routine maintenance, high technical know-how requirement, and low level of interoperability. Furthermore, these proprietary SCADA systems face high scalability issues. To achieve a comprehensive solution to these challenges, a system for data acquisition, processing, transfer, and display will have to be developed for application at the macro, mini and micro processing systems. To this end, low-cost, open source IoT SCADA systems are being developed by various researchers.
This paper proposes the design and development of a low-cost, open-source SCADA system based on the IoT architecture for monitoring and supervision of the distributed renewable energy generation systems employing the LoRa communication Protocol as the communication channel for data transfer. LoRa communication has been employed in the work due its features such as, lowcost, low power consumption, and the long range of data transfer. The proposed SCADA system brings a solution to many problems faced by the present-day commercial SCADA systems and an improvement to existing IoT solutions for system monitoring and supervisory control. As such, this can be applied to distributed renewable energy generation units.
The scope of this work is on the design, development and testing of the low-cost open-source SCADA system for the remote monitoring and supervisory control of energy generating systems. The remaining sections of the paper are organized as follows: Section 2 presents the review of traditional SCADA and the IoT SCADA systems. This section also reviews other research works that have been carried out to date. Section 3 describes the implementation of the proposed IoT SCADA system. Section 4 presents a detailed description of the components for the proposed system. Section 5 presents the implementation of the proposed prototype. Section 6 describes the design of the system prototype. The experimental setup of the proposed SCADA system is presented in Section 7. In Section 8, the results obtained from the prototype testing are presented. Section 9 discusses key features of the proposed SCADA system. The paper is concluded in Section 10.

Proprietary (Traditional) SCADA Systems
Over the years, SCADA systems have been an integral part of industrial systems which include the energy generation systems. The SCADA system is made up of the field instruments (sensors and actuators), Programmable Logic Controllers (PLCs: proprietary), communication channels (MODBUS, ProfiBus), industrial PCs that stand as the Master Terminal Unit (MTU) hosting the SCADA server and HMI.
A classification of the existing high end proprietary SCADA systems developed by the top companies are shown in Table 1.  [7]. This also entails complications in troubleshooting where high level of expertise is needed. 2. Scalability: The commercial SCADA systems were originally developed with options to connect a fixed number of devices. Therefore, an increase in the number of components usually has a drastic degrading effect on the system performance [7]. 3. High security requirements: Considering the exposure of the plant data to the internet due to its unavoidable application for data transfer, a lot of emphasis must be placed on development of strong security protocols to enhance data security. 4. High cost: Being an industrial work horse and considering the early mentioned drawbacks, to continue the usability of the traditional SCADA system, the cost of development, operating and maintenance will therefore be high. While large oil and gas companies, power producers, and other industries may afford it, smaller entities need to opt for more costeffective solutions.

IoT Application for Industrial Systems Monitoring
With the advent of the Internet of Things (IoT), there is an extended improvement in the SCADA industry with better device monitoring, data visualization and device control being achieved with this shift in paradigm [8]. The IoT can be defined as a combination of diverse technologies to provide functional solutions to various industries. Although IoT solutions developed by various companies and researchers may differ at their various functions, attributes, and target industry, IoT solutions shares the following core characteristics [8]: 1. Data access: This Characteristic deals with extraction of data from a particular monitored system. This is achieved by the employment of sensors. 2. Data transfer: The data must be transferred from the point of extraction to where it will be analysed for efficiency purposes. 3. Data management: This deals with the conversion of the extracted data to useful information for analytic or control use. 4. Data visualization: For proper control decisions to be taken by either human personnel or machine controllers, the useful information which arises from data manipulation will have to be visualized.
A diagrammatic comparison of traditional SCADA architecture and the IoT solution architecture for a same plant scenario are displayed in Figure 2 and   From Figure 2 and Figure 3, at the field instrumentation level, SCADA and IoT share the same manner of data extraction systems with sensors connected to the monitored system which depicts a level of relationship between SCADA and IoT. The communication channel is also another factor that may be considered in the relationship analysis. However, the Programmable Logic controllers and the Human-Machine interfaces in the SCADA systems are replaced with the IoT gateways and platforms respectively which depicts a significant shift to a system with a reduced number of components, hence less expensive, less power consuming but at the same time achieving same results as the traditional SCADA system. To better understand the application of IoT for SCADA solutions, the functionalities of the two replacement components in the IoT architecture that has facilitated the shift are explained.

IoT Gateway
An IoT gateway is basically a solution to enable the communication of various IoT components for data transfer [2]. There has been a continuous development and deployment of different types of IoT gateways with very vast features for industrial applications [2]. In all the differences, there are some very important features that must be possessed by every IoT gateway which are explained as follows: 1. Data management and handling: An IoT gateway for industrial application should have a full ability to acquire and process data. This feature is a must have feature for an IoT gateway. 2. Event management: With industrial systems tending more towards event driven control, an IoT gateway to be applied to industrial applications is supposed to have a very strong event management feature for proper and seamless control of the process plant. 3. Real-Time response: This is a very important IoT gateway feature considering the criticality of real-time data exchange and control in industrial systems for performance evaluation. 4. Scalability: Expansion is very continuous in industrial systems. Therefore, a good IoT gateway will be highly scalable without any negative effect to its host system. 5. Reliability and robustness: This feature is a must have for any IoT gateway for industrial application. This is due to the very harsh environment to which most of these gateways are deployed. 6. Security: The IoT gateway should be able to reject unauthorized access to the system for security purposes.

IoT Platform
An IoT platform is defined as a middleware and infrastructure that allows interaction between end users and the edge devices [2]. With the increase in the diversity of the IoT devices, the IoT platform has become of high necessity for data retrieval and further processing. The IoT platform over the years have been observed to possess the following very important features: 1. Monitoring capability: The IoT platform can monitor the operating status of the various devices that are connected in the system. 2. Software management: Continuous downloading and updating of the device software 3. Data centralization: Data from the IoT devices are centralized by the IoT platform with the use of brokers through IoT protocols. 4. Data processing: The presence of algorithms for data processing. For instance, per-forming arithmetic operations of received data to provide another data. 5. Security: The IoT platform has the feature for communication authentication and encryption for data integrity.

Review of Previous IoT SCADA Research Designs
Several IOT based SCADA systems have been designed and developed by researchers aiming at achieving better monitoring at lower costs compared to those of the commercial SCADA systems. In [9], the authors proposed a low-cost, open-source SCADA system for solar photovoltaic system monitoring. The system consists of sensors to measure electrical parameters off a photovoltaic system, and the data is transferred to a locally installed EMMON CMS server for monitoring and control. The work has an advantage of reduced overall system cost for deployment and operation and low power consumption. However, the system employs internet for data exchange. This employment of internet for data transfer could be a draw-back when considering the system for deployment to remote areas for monitoring purposes. The work in [10] implemented a web-based monitoring and control system for real-time electrical data measurement of a hybrid power system using web-based in-Touch system as the graphical user interface. Although the work also highlights a very high solution for the challenges faced by the traditional SCADA systems, it still faces the challenges of being prone to high cyber-attacks because it is a web-based system and the IoT platform is hosted in the cloud requiring internet for data transfer which therefore incurs more cost. The functions of a LoRa-based SCADA system were emphasized in [11]. The work focused majorly on the security of the communication system employed such as data encryption algorithm and security in the context of communication in microgrids. Ref [12] featured a low-cost SCADA system for CO2 enhanced oil recovery. This system uses sensors and actuators connected to the wellhead, and the data is stored in MYSQL DBMS database and presented on a graphical user interface. The proposed system has the advantage of very high-level data acquisition and logging but has a drawback with the communication Zigbee which cannot be employed for long distance industrial systems. The work highlighted in [13] designed and developed a low-cost, open source IoT-based SCADA system using Thinger.IO and the ESP32 microcontroller board. This system acquires electrical parameters and transfers to the IoT platform via the gateway. Although this work seemed to meet all the criteria, it employed the use of a cloud based IoT platform and therefore employed required Wi-Fi for data transfer. This, therefore, affects it robustness for full integration as an autonomous system for data monitoring.
A review of the previous works shows that the main communication channels for data transfer in the systems are Wi-Fi and internet. Furthermore, none of the reported works have considered a remote initiated supervisory control of the monitored units. They have focused mostly on accurate monitoring of the system parameters for control decisions.
In this research work, a LoRa-based low-cost IoT SCADA system is designed and developed to monitor distributed renewable energy generation units. The proposed low-cost SCADA system employs LoRa communication for data transfer. This system includes a remote supervisory control functionality which has not been considered by previous research works done on the development of low-cost SCADA solutions. Employing LoRa for data transfer in this work depicts the system's ability to be deployed to areas without the existence of any communication infrastructure such as cellular and internet.

Proposed IoT SCADA System Implementation
The proposed low-cost, open-source SCADA system is based on the internet of things infrastructure. The proposed system is proposed to meet all the criteria of the proprietary SCADA systems with more features that mitigate the challenges of the traditional SCADA system. The criteria considered for full integration of the proposed IoT SCADA system into the energy generation systems include: 1. Latency: For real-time data exchange, the project considered a maximum data and command transfer time of 1 second. This level of latency is assumed very good for the data transfer at the supervisory level. 2. Reliability: Considering the distributed nature of the various components of the generating system which most times are in very harsh environments, the system components are supposed to be reliable enough to perform the monitoring function. The reliability of the communication channel is also of very high importance to ensure accurate and timely data delivery at every level. 3. Low-cost and open source: The proposed system should be of low cost and at the same time meet the monitoring requirements of the plant. The low cost will be achieved by the employment of low-cost materials and as well open source IoT platforms. 4. Interoperability: The components of the proposed system will be highly interoperable and as such will mitigate the interoperability challenges faced by the traditional SCADA system. This feature is achieved by the employment of materials from different manufacturers put together to achieve the proposed system. 5. Scalability: Scalability is very important in the current energy system as there are numerous improvements with the addition of more components and therefore the proposed system will have to be highly scalable to accommodate the continuous growth in components of the energy generation unit. 6. Low power consumption: One of the main advantages of IoT systems is the low power consumption. Therefore, the proposed system has also been designed to have an overall low power consumption capability. 7. Robustness for remote area application: The proposed system has been considered for application and deployment to remote areas for data acquisition and supervisory control.
For this system, the LoRa communication protocol is chosen as the communication channel. This makes the system totally internet independent and can there-fore be deployed to remote areas without any existing communication infrastructure. 8. Long range of data transfer: The proposed system will have to achieve long range of data transfer. The application of LoRa as the communication channel depicts that the proposed system will achieve long range of data transfer. LoRa has been shown in various research to achieve data transfer distances of up to 15km especially in re-mote areas with little or no obstructions. 9. Supervisory control: Supervisory control is also a very important feature which the proposed system featured. This feature was considered a very important factor to achieving a complete SCADA system. This control feature can be either event driven, or personnel applied.
The architecture of the IoT SCADA solution proposed in this paper is shown in Figure 4.

Figure 4
Proposed IoT SCADA solution architecture. Figure 4 shows that in the proposed IoT SCADA solution, the IoT platform, IoT gateway and the integrations are installed on a single host machine. This therefore eliminates the cloud hosted IoT platform in previous works and therefore internet is not required for data transfer. This makes the proposed system an independent and autonomous system which can be deployed to any area, especially remote areas without the need for any other communication infrastructure. This architecture also allows for the security and integrity of data as only authorized personnel can have access to data being transferred. Furthermore, being that only LoRa is used for data transfer, data encryption can also be carried out easily at the sensor level before data is transferred over the LoRa communication protocol. Additionally, the schematic diagram of the proposed SCADA prototype is shown in Figure 5.

Components of the Proposed IoT Scada System Prototype
The proposed SCADA system was designed to meet the implementation criteria which have been enumerated in section 3. The software employed in this prototype include: Chirpstack IoT platform, Node-Red programming tool, InfluxDB database and Grafana IoT dashboard for data display. On the other hand, the hardware employed include voltage and current sensors, Arduino Uno microcontroller (RTU) and the Raspberry pi model 3B+ (MTU). Each of these components is described in detail below:

Chirpstack IoT Platform
Chirpstack is an open source LoRaWAN Network Server stack [18]. This platform is a costeffective network platform for the design of low-cost IoT experiments and projects. The Chirpstack IoT platform is made up of the following services: The Bridge, network server and the application server. The Chirpstack gateway bridge is a service responsible for the conversion of LoRa packet forwarder protocols into a Chirpstack network server common data-format (JSON and Protobuf). The network server is an open source LoRaWAN server with the responsibility of de-duplication of the received data frames [18]. The application server handles functions such as the join-request and encryption of the application payloads [18]. Furthermore, the application server offers a web interface for device management with a gRPC and RESTful API for integration with external services [18]. The main feature for data transfer across the components of the Chirpstack platform is the MQ Telemetry Transport (MQTT). The Chirpstack architecture is shown in Figure 6. This IoT platform was chosen due to its proven level of stability, data processing and high-level integration with LoRa communication which include data decoding and encoding, decryption, storage, and display. Moreover, this platform was compared with other IoT platforms such as the Things box, Thing's network, and Things speak that require cloud hosting. The Chirpstack IoT platform applied for the proposed system can be installed locally on a single machine with all its dependencies thereby increasing the compatibility of the system for various applications.

InfluxDB Database
InfluxDB is an open-source time series database developed by InfluxData [19]. The InfluxDB is written in the Go programming language and optimized to handle time series data. The open-source version provides a full time series database platform with various other services. InfluxDB can either be run on the cloud or locally on a device. InfluxDB was compared with other IoT databases such as CrateDB, MongoDB, RethinkDB, SQLite. InfluxDB database being a time-series database has the following advantages over the above-mentioned databases.
• Very high speed of data recovery.
• Very large data storage comparison.
• Possess an SQL-like query language.
• Provides a built-in linear interpolation for missing data.

Grafana IoT Dashboard
Grafana is a web-based data visualization platform that allows for interactive data analysis by employing various charts and graphs [20]. This dashboard has the capabilities to be integrated with various databases for data visualization. Recently, Grafana has gained increased usage in IoT applications for real-time monitoring of systems due to the following important features; dynamic display, alert systems, downlink plugins for system control, security system, ability to mix data sources and display on same graph, an-notation capabilities [20].

Node-Red Programming Tool
Node-Red is an open-source visual editor for connecting and communicating within IoT elements invented by IBM [21]. Node-Red is an easy-to-use tool as it eliminates the bulky programming function, involving a lot of code writing for connection of various project components for monitoring [21]. This tool is made up of various components known as "Nodes" that simply look like icons that can be dragged and dropped in the Editor Interface and wired together [21]. These different nodes offer different functions that range from simple debugging to more complicated flow operations [21]. Node-Red can be installed on a PC or microcomputer for system monitoring where various nodes can be connected to form a flow for data acquisition and node control.

Voltage Sensor
The voltage sensor employed in this design was built using the voltage divider principle. The sensor consists of a series connection of two resistors. The voltage sensor's output pin is connected to the pin the Arduino Uno microcontroller and the acquired data is drawn from this pin. Furthermore, the ground is connected to the Arduino Uno ground pin. In this sensor, the voltage drop across the second resistor is measured to scale down the voltage to a value under 5V which the microcontroller can handle. During processing, it is scaled up with the expression shown in equation (1) and the value of the Arduino ADC to obtain the proportional and accurate voltage value.

ACS 712 Hall-Effect Current Sensor
The ACS712 Hall-effect current sensor manufactured and distributed by the allegro microsystems is employed to measure the line current. The sensor is a low-cost, Hall-effect based linear current sensor with 2.1 KV Rms isolation with a low-resistant current conductor [13]. The sensor allows up to 5 V of power supply [22]. The magnetic field inside the sensor is converted to a proportional voltage by the hall IC, which is fused into the sensor system. The voltage obtained at the output is proportional to the measured current [22]. Three classes of the cur-rent sensor (30A, 20A and X5B) were employed for this work. These classes of current sensors measure current values, which correspond to 2.5V to 5V. The values of the current sensors are collected from the data pin of the sensor, which is connected to the A0 pin of the Arduino Uno. The Vcc and Ground are connected accordingly. These pin connections are also duly considered while programming the systems.

Arduino Uno Microcontroller
Arduino uno is a microcontroller board employed for various IoT applications because it is very cheap and as well requires a low amount of power [23]. Arduino employs a simplified version of C++, which makes programming easier [23]. The Arduino Uno is the most popular member of the Arduino family. The Arduino Uno allows a maximum voltage of 5V [23]. Figure 8 shows the Arduino Uno pin distribution.

Dragino LoRa Shield (V 1.3)
The LoRa shield is a single channel transceiver module that attains long distance communication in low data rates ranges. This module employs LoRa communication technology for data transfer [24]. The module is based on the Semtech SX1276/SX1278 chip and has been instrumental to the enormous growth in low-cost IoT applications [24]. The Dragino shield as a sensitivity of over -148 dBm and +20 dBm power which has enabled achieve a very high link budget of 168 dBm [24]. LoRa shields are generally very suitable for robust and long-range projects IoT projects [24]. Figure 9 shows the Dragino LoRa shield. For this prototype implementation, three (3) LoRa shields are interfaced with the Arduino Uno to transmit data as LoRa Packets from the RTU to the MTU.

RAK 831 LoRa Concentrator
The RAK 831 high-performance transceiver module [25] is employed in this work as the LoRa gateway. The concentrator is based on the Semtech SX1301, half-duplex gateway module, and supports up to 10 channels, 8 downlinks, 1 uplink and 1 FSK channel [25]. The Industrial Scientific and Medical (ISM) bands supports these channels for various regions. This module is typically employed to receive LoRa data packets from the end nodes which is also its function in this work.
The RAK 831 is connected to a host machine and forwards the received data to the IoT platform hosted on the machine. A block diagram of the SX1301 base-band chip system is shown in Figure  10.

Raspberry Pi Micro-computer
The Raspberry Pi 3 model B+ was employed in this work. This is a single board micro-computer that operates on the Broadcom BCM283730, Cortex-A53 (ARMV8) 64-BIT SoC processor with a 1.4 GHz clock frequency [25]. The Raspberry Pi hosts the Chirpstack IoT platform and its dependences acting as the Master Terminal Unit. The features enumerated below makes the Raspberry Pi suitable for application in the prototype of the proposed IoT SCADA system: • 1GB LPDDR2 SDRAM.

MUN Electrical Engineering Laboratory Solar PV System
The Memorial University of Newfoundland (MUN) Electrical Engineering Laboratory houses a solar photovoltaic system which is made up of 12 solar panels that produce about 130 W at 7.6 A each. Two photovoltaic modules are connected in parallel to make six sets of panels producing 260 W of power and about 14 A of current per set. The system also employs a Maximum Power Point Tracking (MPPT) system for maximum power capturing in all operating conditions. A battery (lead acid) storage system is also connected to the system for energy storage.
In this work, the system prototype is set up to acquire the PV voltage, PV current, PV power and the Battery voltage for remote monitoring and supervisory control.

Proposed System Prototype Implementation Methodology
To implement the proposed low-cost IoT SCADA system prototype, a voltage sensor and a current sensor are connected to the PV panels before the MPPT controller to measure the actual current and voltage being produced by the solar panels. A second voltage sensor is connected to the battery system to always monitor the battery voltage level. This process was set on three sets of modules. A 12V DC bulb was also connected to each system to represent the load. The load was in ON state all through the test period to allow for constant flow of current. The Arduino Uno is programmed on the Arduino IDE to process the sensor data, display on the IDE serial monitor and transmit the data via LoRa to the IoT gateway and platform installed on the Raspberry Pi. On arrival on the Raspberry Pi (MTU) through the LoRa gateway, the data is further processed by NodeRed and stored in the InfluxDB database. A Grafana dashboard is installed on the MTU to display data from the database. Subsequently, there is need for either personnel or automatic control of the unit being monitored, LEDs are connected to each Arduino Uno (RTU) to represent actuators, which could be switches, motors, relays etc. In this prototype, the LEDs (Green and Red) are controlled (ON and OFF) from the Grafana dashboard. As earlier mentioned, the LEDs used in this prototype can be replaced by actual electrical actuators when being applied to full scale generation systems.

Prototype Design
The described hardware and software components were employed to develop a prototype of the proposed low-cost solution as shown in Figure 11. Here, three sensors are connected to the Arduino Uno microcontroller. A Dragino LoRa shield (transceiver) is connected to the Arduino Uno for transmission of the acquired data over the LoRa communication technology. The sensors and the LoRa shields are powered by the 5V pin of the microcontroller. The MTU setup on the Raspberry Pi as shown in Figure 12 is located a distance away from the RTU setup. The MTU setup is made up of the Raspberry Pi, RAK 831 LoRa concentrator, a screen, and other accessories. The Chirpstack IoT server and the other integrations such as the InfluxDB database, Node-Red programming tool and Grafana dashboard are hosted on the Raspberry Pi. Although the components of the prototype system were placed close hence not showing the long-distance abilities of the LoRa communication system. Range tests for data delivery and packet delivery ratio analysis for LoRa communication have been already carried out by literatures such as [8] and [26] and therefore will not be repeated in this work.

Experimental Setup
Testing of the designed prototype was carried out by connecting the implemented hardware to the solar photovoltaic system at the Memorial University Electrical Engineering Laboratory as shown by the block diagram in Figure 13. Three units of the system were monitored using three RTUs, which acquire and transmit data to the MTU. On each RTU, there are two voltage sensors and a current sensor that collect the PV voltage, battery voltage and PV current respectively. The sensor data are acquired by the Arduino Uno through cable connection to the analog pins of the microcontroller. The data acquired is processed and transmitted to the MTU through the LoRa transceivers that are connected to the Arduino Uno microcontrollers. The experimental setup is shown in Figure 14.

Figure 13
The system prototype block diagram.

Figure 14
Experimental setup of the proposed SCADA system including RTUs connected to PV system.

Results
The flowcharts in Figure 15 and Figure 16 depict the process of data acquisition at the RTUs and the data processing as it is performed at the MTU before being displayed at the Grafana dashboard for visualization.  The sensor data were acquired from the units being monitored and transmitted to the IoT platform using the LoRa communication technology and posted on the Chirpstack platform console through the device profiles created on the platform as shown in Figure 17. On reception of the data, they are logged in the InfluxDB database and displayed on the Grafana dashboard for remote monitoring and supervisory control. The prototype of the proposed SCADA system was tested for a period of 3 weeks with series of disconnection and connections for system reliability check. During the test a load (12V DC bulb) was connected to the battery storage system to discharge the battery system and as such allow the continuous flow of a substantial amount of current to charge the battery. A Grafana dashboard with the data measurements was created and displayed the PV voltages, current and power of each unit as shown in Figure 18. The power of each PV unit was calculated as a product of the PV voltage and PV current measured from the system. The battery voltage level for the storage units were also monitored and displayed on the dashboard. To test the accuracy of the prototype, digital multimeters were connected to each of the measurement points of each unit to compare the multimeter values to those displayed on the IoT dashboard. The values from the dashboard and the multimeter readings matched with very minimal deviations, which indicates that the programming of the SCADA system was accurately carried out and the data being displayed are very accurate. The proposed SCADA solution has a data sampling time of 1 second depicting a very high and reliable data transfer speed. This, therefore, is suitable even in systems that require high speed data resolution. The LEDs connected to the RTUs were used to represent various forms of actuators that can be used in electrical generation systems such as relays, isolators, and switches. The LEDs were connected to the Arduino Uno microcontroller and programmed on the Arduino IDE to be controlled from the IoT platform either automatically or by the personnel on site.

Figure 17
The device profiles shown on the Chirpstack application server console. Two supervisory control scenarios were considered with the proposed SCADA solution. Firstly, a scenario with an operator watching the dashboard and observing the measured data, who can send a supervisory control command to the RTUs in case of any anomalies. In this scenario, the commands carry out one or two of the functions: Turn ON the RED LED, Turn ON the GREEN LED, Turn ON both LEDs and Turn OFF both LEDs. In another scenario, the LEDs were also set to turn ON and OFF automatically through programming carried out on Node-Red. In this case, when the PV current and voltage are below the threshold (in the evening), the Green LED is automatically turned OFF while the RED is turned ON to indicate that the bulbs (loads) connected to the battery system are discharging the batteries. In the morning, when the sun is rising and the PV voltage and current begins to charge the battery and the voltages go above the threshold, the RED LED is turned OFF while the GREEN is turned ON. The Node-Red flow for the process is shown in Figure 19.

Figure 19
Node-red flow for the supervisory control of the LEDs connected to the RTUs.

Discussion
The features of the low-cost open-source SCADA system proposed and designed in this work are aimed to mitigate the limitations of the conventional proprietary commercial SCADA systems. Some of the key characteristics of this proposed IoT SCADA solution are enumerated below: • Open Source and Interoperability: The proposed system is made up of a mix of components from various vendors such as the Arduino Uno, Raspberry Pi and the Chirpstack IoT platform, InfluxDB, Grafana and Node-Red. The programming of the systems is found in open-source sites such as the GitHub and Chirpstack forum. This indicates that the system is not tied to any proprietary vendor and troubleshooting, and resolution of the system does not require the service of an OEM.
• System scalability: The IoT concept allows connectivity of a very high number of sensors without any negative effect on the system. The proposed SCADA solution being built on the IoT architecture is robust enough to allow for a high level of scalability of the RTUs.
• Robustness for remote area deployment: The proposed system is an internet independent system. LoRa physical level communication protocol was employed for the data transfer in the system. This ensures that the proposed IoT SCADA solution can be deployed in remote areas with no internet or any other form of connectivity. The key components such as the Raspberry Pi and the Arduino can work in harsh conditions once they are well packaged.
• Low-Cost: The components employed in this design cost effective. Table 2 shows the cost of each component and the overall cost of the system that consists of the sensors, three RTUs and the MTU as purchased from Amazon website. From the table, the overall cost of the system shows that the proposed SCADA system is relatively low cost when compared to the commercial SCADA systems when employed in the same system monitoring and control scenario.
• User friendliness: All the components ranging from the hardware to the software employed in the design and development of the system are easy to use. Most importantly, the Chirpstack IoT platform, InfluxDB database and the Grafana IoT dashboards are very user friendly. Feasibility of deployment to large generation systems: The architecture of the pro-posed SCADA system is such that can be applied for monitoring of large generation systems. It is anticipated that the proposed system can be deployed to large systems for monitoring with appropriate upgrade to the various hardware. This level of monitoring can be achieved with the key features such as the low-cost, scalability, interoperability and reliability still maintained as those of the IoT SCADA solution proposed in this work.

Conclusions
This work proposes a low-cost SCADA system developed for the monitoring of electrical parameters from distributed energy generation systems. The proposed system presents an IoT solution to the current challenges faced by the proprietary SCADA systems that causes them not to be applied for system monitoring at some levels. The pro-posed IoT system also presents a modification for the IoT solutions that have earlier been proposed by various researchers.
This modified system employed a system where the IoT platform, gateway and all integrations are hosted on a single machine thereby eliminating the need for cloud based IoT platform hosting and as a result remove the need for internet for communication with the cloud and at the same time increase system compactness. The reduction in components reduced the price of developing such system and increased the system's level of autonomy. This means that the proposed IoT SCADA solution in this work can be employed for system monitoring in areas with no existing communication infrastructure. Furthermore, the long-range capability of LoRa has also made the proposed system suitable for data collection from distributed energy units up to distances of between 5 to 15 km especially in remote areas.
A prototype was designed using a combination of the hardware and software to achieve the IoT SCADA solution. To validate the system performance, the prototype was set up and tested at the Memorial University Electrical Engineering Laboratory. The system measured the PV voltage, PV current and battery voltage of photovoltaic units in the laboratory. For control purposes, LEDs were connected to the RTUs to represent actuators such as relays, switches, and pumps.
The results from the testing show that the system achieved SCADA functionalities, which include data retrieval, transmission, data management and display, and system control. The overall cost of the prototype to monitor the three solar PV units is about $600 CAD without any form of continuous subscriptions. The system has an IoT database from InfluxDB, which is a time-series database that allows the storage of all parameters over a very long period. The data presented on the IoT dashboard as measured by the system conformed to those measured using digital multimeters.
The whole solution was implemented as a local system where the server and all software elements were hosted on a single machine. This enhances security and data integrity as only authorized personnel can have access to the data as opposed to the cloud servers prone to cyberattacks and makes the system robust for remote area applications in situations where there are no communication technologies. Although the proposed system cannot be deployed to large systems as it is, but appropriate hardware upgrades and packaging with same proposed architecture will easily be deployed to large system for monitoring at a much lower cost and very high data monitoring standard.