Monitoring of Solar Still Desalination System Using the Internet of Things Technique

In this work, a smart solar still prototype for water desalination is designed. It consists of a basic solar still, a solar preheater and a remote monitoring system based on the Internet of Things (IoT) technique. The monitoring system is developed and integrated into the hybrid solar still in order to control its evolution online, as well the quality of the freshwater provided by checking measured parameters such as pH. Thanks to the IoT technique, parameters collected by the monitoring system (e.g., air temperatures, relative humidity, etc.) are uploaded to the cloud for online remote monitoring. The users are notified by an SMS about the status of the system (e.g., water level in the basin, water in the tank, etc.), using an GSM module. The whole system, including the preheater, water pump, valve, sensors and an electronic board, is powered by a photovoltaic module of 75 Wp. The results showed that by adding a solar preheater system, the evaporation process is accelerated and, consequently, the daily yield is improved and reaches the value of 12.165 L/m2/day. The saline concentration of the tested ground water is 3.9 g/Kg (0.39%), and, after desalination, the salinity is 0.1 g/Kg (0.01%).


Introduction
Around the world, there are many regions of vast extent that have numerous favorable features but whose progress is mainly inhibited by a lack of freshwater [1]. This is the case in arid and semi-arid areas, where large-scale (LS) development has already occurred-for example, in parts of the Middle East and North Africa (MENA).
In [2], the authors improved the performance of solar still desalination via the hydrophobic condensation surface using cold plasma technology, and the calculations showed that the produced freshwater using a plasma coating increased by 25.7% compared to the uncoated system. A novel renewable-energy-based multigenerational system integrated with desalination and molten salt storage subsystems is developed in [3]. Different types of basins have been employed and shown in [4]. The difference between types of basins is due to the nature of the materials used, the geometric form, the type of transparent cover and the means of providing and driving output water. As reported in [5], the outdoor conditions of remote areas allow the best use of solar desalination. By minimizing the heat losses, the daily distilled water increases, which is due to the lower boiling point of saline water inside the solar still under vacuum conditions. In [6], an experimental system was developed and tested on a new absorber plate. A new active solar still was compared with a conventional system in terms of efficiency and water produced by using a hot water storage tank. In [7], experimental data were used to validate the simulated results. The authors studied the effect of different factors on the freshwater productivity and solar still efficiency. Recently, in [8], the authors developed a desalination dual membrane framework that was powered by solar energy for purifying saline water using ancient methods to produce clean water for drinking and irrigation. Moreover, a recent study was conducted using seawater as continuous input into a conventional single-slope solar still [9]. In this work, three kinds of absorbers were tested experimentally. It was found that the results of the absorber with 15 fins were better than those using the flat absorber. Another recent research work was undertaken to enhance a solar still's productivity using thermal process modeling [10]. It was found that the lower mass of water gives the highest daily productivity independently of the incident solar irradiation. In this work, a mathematical model was proposed to predict the performance of solar stills. A new design of a double-slope solar still was elaborated in [11].
In fact, a novel methodology has been established allowing the calculation of the yearly solar thermal energy that can be received by a double-slope still. It was found that this input energy is affected by many parameters, such as the inclination angle of the glass cover, basin length and surface azimuth angle. The results showed that the designed double-slope solar still will receive a yearly solar input energy of 97.67 GJ. Another study was conducted to analyze the performance of a tubular solar still with different configurations [12]. Three kinds of solar stills were assessed using a water depth of 1 cm. It was found that the tubular solar still with nano phase change material gave the best performance and highest yield.
The main objective of this work is to design a low-cost smart hybrid solar still water desalination prototype. In fact, there are many configurations of water desalination systems; in this work, we are motivated by the solar still due to its simplicity, ease of implementation and low cost with acceptable efficiency. A monitoring system has been developed for the online control of the desalination unit using IoT technique. The most important parameters controlled by the monitoring system is the quality and the amount of freshwater produced by the system. This paper is organized as follows: the materials and methods are given in Section 2. The results and discussion are presented in Section 3. The conclusion is presented in the last section, Section 4. Figure 1 shows a block diagram of the proposed hybrid solar still system; it consists mainly of:

•
A basic solar still that was fabricated with inner dimensions of 1 m × 1 m (effective area of 1 m 2 ) and the glass cover was tilted at 25 • with respect to the horizontal; • A solar heater for preheating water, which was designed with an area of 1 m 2 × 10 cm formed by copper tubes, as shown in the following diagram; • A monitoring system used for data acquisition and parameter control using the IoT technique; • A PV system of 75 Wp capacity was used for supplying different components of the system. Figure 2 shows a photo of the designed hybrid solar heater-solar still prototype. The main steps of the control process, implemented in the microcontroller, are summarized as follows: • Initially, the tank (containing salt water) is considered full (500 L) as well as the basin (100 L); • The water position in the basin is checked, which should be between two levels (L1 = 2 cm and L2 = 10 cm); if the position sensor indicates that the measured level is less than L1, the microcontroller activates the relay and the valve will be opened till the water level L2 is reached; then, the relay is activated automatically by sending a signal from the microcontroller; Energies 2021, 14, 6892 3 of 12

•
The water level in the tank is verified; if the level is less than L3 = 500 L, the microcontroller sends a signal to start the water pump, till the L3 is reached; • The Wi-Fi module is programmed to send the measured parameters to the cloud every 5 min, via the IoT technique [13]; • If the system stops, an anomaly occurs or no distiller water is produced, the user is alerted by a simple SMS via a phone.   The main steps of the control process, implemented in the microcontroller, are summarized as follows:


Initially, the tank (containing salt water) is considered full (500 L) as well as the basin (100 L);  The water position in the basin is checked, which should be between two levels (L1 = 2 cm and L2 = 10 cm); if the position sensor indicates that the measured level is less than L1, the microcontroller activates the relay and the valve will be opened till the water level L2 is reached; then, the relay is activated automatically by sending a signal from the microcontroller;  The water level in the tank is verified; if the level is less than L3 = 500 L, the microcontroller sends a signal to start the water pump, till the L3 is reached;  The Wi-Fi module is programmed to send the measured parameters to the cloud every 5 min, via the IoT technique [13];  The main steps of the control process, implemented in the microcontroller, are summarized as follows: • Initially, the tank (containing salt water) is considered full (500 L) as well as the basin (100 L); • The water position in the basin is checked, which should be between two levels (L1 = 2 cm and L2 10 cm); if the position sensor indicates that the measured level is less than L1, the microcontroller activates the relay and the valve will be opened till the water level L2 is reached; then, the relay is activated automatically by sending a signal from the microcontroller; • The water level in the tank is verified; if the level is less than L3 = 500 L, the microcontroller send signal to start the water pump, till the L3 is reached; • The Wi-Fi module is programmed to send the measured parameters to the cloud every 5 min, via th IoT technique [13]; • If the system stops, an anomaly occurs or no distiller water is produced, the user is alerted by a sim  Figure 3 shows the scheme of the developed monitoring system. The different constituents are as follows:

Monitoring and Displaying Solar Still Desalination Parameters
• Sensors (ambient temperature, relative humidity, inside temperature, water temperature, water level and amount of distilled output water); • Actuators (valve and water pump); • Liquid crystal display (LCD) permits us to visualize the measured data; • A low-cost microcontroller (Arduino Mega 2560) is used to control and monitor different parameters inside and outside the solar still desalination unit. The parameters monitored are Ta, Tstill, RH, Tw, WL and Wd (daily amount of output distilled water). ature, water level and amount of distilled output water);  Actuators (valve and water pump);  Liquid crystal display (LCD) permits us to visualize the measured data;  A low-cost microcontroller (Arduino Mega 2560) is used to control and monitor different parameters inside and outside the solar still desalination unit. The parameters monitored are Ta, Tstill, RH, Tw, WL and Wd (daily amount of output distilled water). The different steps of the control process are as follows:


Step #1: Initialization and loading of reference parameters (Tref, RHref and WLref), which are based on experimental thresholds.  Step #2: Measuring real parameters (Ta, Tstill, RH, Tw, WL and Wd).  Step #3: Sending signal to the actioners by activating the corresponding relay: -Water pump: start filling the tank. -Valve: start filling the solar basin.

Webpage Development
In order to upload and collect measured data and images showing a drop of water on the surface of the still, a Wi-Fi camera (e.g. ESP32) and a Wi-Fi (e.g. NodeMCU) have been used. The webpage was designed for the visualization of the phenomenon of water evaporation. Figure 4 presents a block diagram for uploading the measured data and images onto the webpage using the IoT technique [14]. The different steps of the control process are as follows:

•
Step #1: Initialization and loading of reference parameters (Tref, RHref and WLref), which are based on experimental thresholds.

•
Step #3: Sending signal to the actioners by activating the corresponding relay: -Water pump: start filling the tank. -Valve: start filling the solar basin.

Webpage Development
In order to upload and collect measured data and images showing a drop of water on the surface of the still, a Wi-Fi camera (e.g., ESP32) and a Wi-Fi (e.g., NodeMCU) have been used. The webpage was designed for the visualization of the phenomenon of water evaporation. Figure 4 presents a block diagram for uploading the measured data and images onto the webpage using the IoT technique [14]. The page configuration has been designed using Hyper Text Markup Language (HTML) and, for an adequate environment, a Cascading Style Sheet (CSS) was used. For creating a dynamic environment, JavaScript was used. The Firebase conceived by Google was used to host the webpage and database management.  The page configuration has been designed using Hyper Text Markup Language (HTML) and, for an adequate environment, a Cascading Style Sheet (CSS) was used. For creating a dynamic environment, JavaScript was used. The Firebase conceived by Google was used to host the webpage and database management.

Mobile Application
By using the NodeMCU ESP8266 module and Expo React-Native, we developed an application for a mobile phone that allows the visualization of different data issued from solar still desalination unit parameters remotely. The use of a GSM module with Arduino allows notification for users about the status of the solar still desalination unit. Figure 5 provides a block diagram of this application. The page configuration has been designed using Hyper Text Markup Language (HTML) and, for an adequate environment, a Cascading Style Sheet (CSS) was used. For creating a dynamic environment, JavaScript was used. The Firebase conceived by Google was used to host the webpage and database management.

Mobile Application
By using the NodeMCU ESP8266 module and Expo React-Native, we developed an application for a mobile phone that allows the visualization of different data issued from solar still desalination unit parameters remotely. The use of a GSM module with Arduino allows notification for users about the status of the solar still desalination unit. Figure 5 provides a block diagram of this application.

Stand-Alone Photovoltaic System
An autonomous photovoltaic (PV) system has been used to supply the different sensors of the desalination unit, including the water pump and the electronic board. It comprised one PV module (75 Wp) connected to one battery 12 V/200 Ah, a solar charge regulator (12 V/20 A), a voltage regulator and a DC-DC buck converter (in = 7-12 V and out = 5 or 3.3 V). Figure 6 presents the block diagram of the PV system used to supply the electronic board and microcontroller used for monitoring the solar still desalination unit.

Stand-Alone Photovoltaic System
An autonomous photovoltaic (PV) system has been used to supply the different sensors of the desalination unit, including the water pump and the electronic board. It comprised one PV module (75 Wp) connected to one battery 12 V/200 Ah, a solar charge regulator (12 V/20 A), a voltage regulator and a DC-DC buck converter (in = 7-12 V and out = 5 or 3.3 V). Figure 6 presents the block diagram of the PV system used to supply the electronic board and microcontroller used for monitoring the solar still desalination unit.

Results and Discussion
To study the performance of the designed solar still desalination prototype, different experiments were performed.

Data Visualization Monitoring
A monitoring system was developed to visualize the measured parameters online. The graphic interface of the main webpage designed for the smart solar desalination unit is presented in Figure 9a. Figure 9b shows the data posted on the webpage, collected from the solar desalination unit. The uploaded data are the real-time values of Ta, Tstill, Tw1 and Tw2 recorded on 18th February 2021.

Warning SMS
A phone application was developed to check the status of the desalination unit. Thus, users can be notified by an SMS if any problem arises. An example of a warning SMS notification informing the user that the tank of salted water is empty is illustrated in Figure 10.

Mobile Application
A photo of the mobile application is presented in Figure 11. This application can help users to control the collected parameters of the desalination unit remotely. Figure 11. The main Android app screen for the designed smart solar still desalination unit. Figure 12a presents the evolution of the hourly output water versus time for different water depths. The maximum yield of distilled water is obtained for a water depth of 2 cm. Figure 12b displays the variation in the yield of the solar still for diverse depths. It can be noted from the curve that the maximum yield is obtained at the minimum depth, which is due essentially to the fast evaporation process. The effect of coupling a solar heater on the yield of the solar still was analyzed, as shown in Figure 12c. It can be observed from the experimental result that the yield of the hybrid solar heater-solar still is notably better than that of a simple solar still.

Effects of Different Parameters on the Yields of Distilled Output Water
It was found that the efficiency of the designed prototype (hybrid solar heater-solar still) is higher than a conventional double-slope solar still for the same basin conditions.

Mobile Application
A photo of the mobile application is presented in Figure 11. This application can help users to control the collected parameters of the desalination unit remotely.

Mobile Application
A photo of the mobile application is presented in Figure 11. This application can help users to control the collected parameters of the desalination unit remotely. Figure 11. The main Android app screen for the designed smart solar still desalination unit. Figure 12a presents the evolution of the hourly output water versus time for different water depths. The maximum yield of distilled water is obtained for a water depth of 2 cm. Figure 12b displays the variation in the yield of the solar still for diverse depths. It can be noted from the curve that the maximum yield is obtained at the minimum depth, which is due essentially to the fast evaporation process. The effect of coupling a solar heater on the yield of the solar still was analyzed, as shown in Figure 12c. It can be observed from the experimental result that the yield of the hybrid solar heater-solar still is notably better than that of a simple solar still.

Effects of Different Parameters on the Yields of Distilled Output Water
It was found that the efficiency of the designed prototype (hybrid solar heater-solar still) is higher than a conventional double-slope solar still for the same basin conditions.  Figure 12a presents the evolution of the hourly output water versus time for different water depths. The maximum yield of distilled water is obtained for a water depth of 2 cm. Figure 12b displays the variation in the yield of the solar still for diverse depths. It can be noted from the curve that the maximum yield is obtained at the minimum depth, which is due essentially to the fast evaporation process. The effect of coupling a solar heater on the yield of the solar still was analyzed, as shown in Figure 12c. It can be observed from the experimental result that the yield of the hybrid solar heater-solar still is notably better than that of a simple solar still.

Effects of Different Parameters on the Yields of Distilled Output Water
The water sample analyzed has a pH within the safe limit of 6.5 to 8.5 standard values [15]. The permissible limit for EC is 300 µS cm −1 . The EC of the used sample before desalination is 7550 µS/cm, which is higher than the standard value, and, after desalination, the electrical conductivity is 384 µS/cm [15]. This shows that the EC value of water sample, after desalination, is reduced considerably and is almost close to the ordinary home water at Madinah City. Concerning the TDS, before treatment, the TDS value is 3770 (mg/L), and after desalination, it is 210 (mg/L). This shows that the TDS value of water after desalination is close to the permissible value, which is 350 mg/L [15,16]. The salinity of the tested groundwater is 0.39%, corresponding to 3.9 g/kg. After desalination, the salinity is 0.01%, corresponding to 0.1 g/kg.  It was found that the efficiency of the designed prototype (hybrid solar heater-solar still) is higher than a conventional double-slope solar still for the same basin conditions. The daily yield produced by the double-slope solar still is 9.73 L/m 2 /day, while the hybrid solar heater-solar still produces around 12.165 L/m 2 /day. To check the water quality, some physical-chemical parameters, such as the concentration of hydrogen ions (pH), electrical conductivity (EC), total dissolved solids (TDS) and salt in the groundwater (before and after desalination), are measured. The test results are listed in Table 1. A comparison was made with mineral water (Nestle) and ordinary home drinking water. The results show that the groundwater after desalination has almost the same values of chemical parameters as mineral water (Nestle) and ordinary home drinking water. The water sample analyzed has a pH within the safe limit of 6.5 to 8.5 standard values [15]. The permissible limit for EC is 300 µS cm −1 . The EC of the used sample before desalination is 7550 µS/cm, which is higher than the standard value, and, after Energies 2021, 14, 6892 10 of 12 desalination, the electrical conductivity is 384 µS/cm [15]. This shows that the EC value of water sample, after desalination, is reduced considerably and is almost close to the ordinary home water at Madinah City. Concerning the TDS, before treatment, the TDS value is 3770 (mg/L), and after desalination, it is 210 (mg/L). This shows that the TDS value of water after desalination is close to the permissible value, which is 350 mg/L [15,16]. The salinity of the tested groundwater is 0.39%, corresponding to 3.9 g/kg. After desalination, the salinity is 0.01%, corresponding to 0.1 g/kg.

Cost Calculation of Solar Stills
The unit cost of the desalination of saline water (UCdw) is the ratio of the total annual cost (TAC) of the passive solar still per unit area and the average annual productivity in liters (M yearly ) of the solar still per unit area [17]. The costs of different types of solar stills are given in Table 2.
where TAC depends principally on the present capital cost (Cs), on the number of clear days in a year and on the average daily distillate output per unit area [17]. In Table 2, we show that the double-slope solar still [18] has the lowest cost of desalination (0.007 US$/L). The proposed hybrid solar heater-solar still presents a cost that is slightly greater than that of the conventional double-slope solar still but a better cost compared to the other types of solar still and gives the best average annual productivity in liters (1800 L/m 2 ).

Conclusions
A smart solar still water desalination prototype has been designed and verified experimentally at Madinah City, Saudi Arabia. It has been demonstrated that the proposed hybrid solar heater-solar still water desalination system outperforms the solar still with two slopes. The evaporation process of saline water has been significantly accelerated, consequently improving the daily yield, which reached a maximum value of 12.165 L/m 2 /day, and the quality of distilled water complies with World Health Organization standards.
A low-cost monitoring system has been developed and integrated with the hybrid solar still system. Thanks to the IoT technique, measured data have been posted online for the real-time and remote monitoring of the considered system. The PV system incorporated into the proposed prototype is used to supply the components of the solar still unit, like as sensors, electronic boards and water pump.
Users can monitor and check their system remotely from their offices or homes, if we suppose that such systems are installed in remote areas. The proposed prototype could be generalized for large-scale solar desalination plants.

Conflicts of Interest:
The authors declare no conflict of interest.