Microsoft Word - ETASR_V12_N4_pp8990-8995 Engineering, Technology & Applied Science Research Vol. 12, No. 4, 2022, 8990-8995 8990 www.etasr.com Loquero et al.: CYANanobot: Miniaturized Boat-Assisted Data Acquisition for Automated Cyanide … CYANanobot: Miniaturized Boat-Assisted Data Acquisition for Automated Cyanide Monitoring in Wastewater Using Optical Nano-Sensors Jorich S. Loquero CYANanobot Research Project Caraga State University Butuan City, Philippines jorichloq@gmail.com Alexander T. Demetillo Ctr. for Ren. Energy, Automn, & Fab. Techs, Caraga State University Butuan City, Philippines atdemetillo@carsu.edu.ph Ian Benedict Pongcol CYANanobot Research Project Caraga State University Butuan City, Philippines ianbenedict.pongcol@gmail.com Jamiela M. Sakuddin CYANanobot Research Project Caraga State University Butuan City, Philippines jsakuddin@gmail.com Ronieto N. Mendoza Ctr. for Ren. Energy, Automn, & Fab. Techs, Caraga State University Butuan City, Philippines ronmendoza.ece@gmail.com Rudolph Joshua U. Candare CYANanobot Research Project Caraga State University Butuan City, Philippines rucandare@carsu.edu.ph Ydron Paul C. Amarga CYANanobot Research Project Caraga State University Butuan City, Philippines ydron.paul@gmail.com Gerome L. Amper CYANanobot Research Project Caraga State University Butuan City, Philippines glamper@carsu.edu.ph Rey Y. Capangpangan College of Science and Environment Mindanao State University Naawan, Philippines reycapangpangan@gmail.com Received: 11 May 2022 | Revised: 4 June 2022 | Accepted: 6 June 2022 Abstract-Cyanide contamination in water and wastewater is ubiquitous, particularly in gold mining industries, where cyanide is commonly used to extract gold. It is constantly being monitored by collecting samples which are analyzed in the laboratory using traditional cyanide analysis, which requires complicated instrumentation, skilled analysts, and expensive equipment. Using the gold nanoparticle (AuNP)-decorated paper-based sensor employing Whatman Filter Paper (WFP) as a substrate, an automated process for cyanide monitoring with the aid of an assembled and improvised remotely controlled miniature boat was developed. The technology is equipped with a filtration system with automated water sample collection and preparation with an automatic paper sensor dispenser. Images of the collected wastewater samples are taken at different time intervals and are analyzed on their respective color spaces based on 8 mathematical models, each predicting the cyanide level of the water sample. The predictions are compared to the actual Ion- Selective Electrode (ISE) measurement, and Root Mean Square Error (RMSE) values were calculated. The predictions at 165s using the Hue, Saturation, Value (HSV) color space exhibited the highest R 2 of 0.85 and the lowest RMSE of 3.80 parts per million (ppm) with an average error of 3.40ppm. The predictions are sent to a database using Global System for Mobile Communications (GSM). The results suggest that the CYANanobot technology facilitates fast analysis time, circumvents the frequent instrument calibration, reduces operating costs, minimizes exposure to toxic cyanide-containing samples, and reduces person-to-person interaction. Keywords-cyanide; gold nanoparticle (AuNPs)-decorated paper-based sensor; remote-controlled boat; automated cyanide monitoring; image processing; GSM I. INTRODUCTION Issues of cyanide contamination in water and wastewater are ubiquitous, mainly in gold mining industries, where cyanide is commonly used to extract gold [1]. Typically, cyanide mining waste materials are contained in the tailings pond, where necessary treatment is done [2]. Monitoring the free cyanide concentration is conducted by collecting water samples and analyzing them in the laboratory using optical methods, electrochemical methods, mass spectrometry, gas chromatography, titrimetric methods, or amperometric procedures [3-5]. All these methods require skilled personnel to do the analysis on-site, however, restricted by the new normal brought by the COVID-19 pandemic, automation of this process in the mining industry is deemed necessary. Likewise, the conventional cyanide analysis, which requires additional sample preparation, apart from sample collection, needs to be revitalized using a sensitive, low-cost, and fast analysis using a paper-based nano-sensor [6]. Corresponding author: Jorich S. Loquero Engineering, Technology & Applied Science Research Vol. 12, No. 4, 2022, 8990-8995 8991 www.etasr.com Loquero et al.: CYANanobot: Miniaturized Boat-Assisted Data Acquisition for Automated Cyanide … Reliable cyanide detection was demonstrated by using the developed gold nanoparticle (AuNP)-decorated paper-based sensor using WFP. The sensor can give semi-quantitative detection as low as 0.05ppm, causing discoloration of the sensor from reddish-purple to white due to the formation of the water-soluble gold-cyano complex, which is known to be dependent on the amount of CN- in the sample [7]. Smartphones to capture images and analyze the chemical concentration [8-11], a paper-based sensing chip [12] and electrochemical sensor [13] have been used to quantify the color changes of paper sensors. This research seeks to automate cyanide monitoring of wastewater in a mining site using the developed Whatman Filter Paper- Gold Nanoparticles (WFP-AuNPs) sensor from on-site wastewater sample collection and preparation. Automated CN detection is conducted using the WFP-AuNPs sensor through digital image-based colorimetry, subsequent collection and analysis of data, and data storage. Console- operated software and computer vision algorithms were introduced to provide a qualitative, quantitative, and reproducible readout at a low cost for flexibility and an easy quantification system. Also, an Internet of Things (IoT)-based system was employed to transmit the acquired cyanide concentration data, other water parameters, and location, offering advantages over traditional methods [14-18]. The module was assembled in an improvised miniature boat that can be controlled remotely to traverse from one monitoring point to another within the sampling site. This remote access capability saves operating time and resources. The waterproof casing of the boat protects the assembly from external disturbances such as rain and winds. This study enables a more feasible and faster analysis, decreased human exposure and labor risk, and improves working efficiency. II. SYSTEM ΜODEL Figure 1 indicates the system overview of the study. The system architecture shows the details of the system components and operation. Fig. 1. System οverview. III. ΜETHODOLOGY AND FLOWCHART This section presents the workflow and procedures conducted in the study, as shown in Figure 2. Boat navigation and movement to predetermined sampling sites are conducted with a remote-control system. The user handles the transmitter, and the receiver is placed on the boat. When the boat arrives at the site where the user wants to test, the user flips a switch that triggers the start of the sensor module. The location coordinates are also sent to the microprocessor. The sensor module is responsible for the automated cyanide level testing process. It uses a microprocessor that is serially connected to a microcontroller that controls water sampling, water preparation, water dispensing, triggering the analyzer module, data transmission, and water discharge, in that order, through a plurality of pumps and motors, a camera, and a GSM module. The sensor module and analyzer module comprise the sensing system. Fig. 2. System architecture and flow. IV. HARDWARE, SOFTWARE, AND SYSTEM INTEGRATION A. Navigation System The miniature boat was shaped into a monohull structure using 1-inch styrofoam frames, smoothed and coated with glazing putty, fiber cloth, and body filler. The mini-boat was tested for its buoyancy and its navigational control. The buoyancy test was conducted in a private beach resort by gradually adding loads to the boat. The navigation system used is an FS-I6 2.4GHz 6-channel RC Transmitter as its controller bind with an FS-I6 2.4GHz 6-Channel Receiver. The Receiver was connected to two 150A brushless waterproof Electronic Speed Controllers (ESCs) that control two brushless motors, each attached with motor thrusters at different channels. Another receiver channel was connected to the microcontroller of the sensor module to trigger the automated cyanide level testing at the chosen sample site. Engineering, Technology & Applied Science Research Vol. 12, No. 4, 2022, 8990-8995 8992 www.etasr.com Loquero et al.: CYANanobot: Miniaturized Boat-Assisted Data Acquisition for Automated Cyanide … B. Sensor Module The sensor module was framed to maximize space while using local materials. Its layout is shown in Figure 3. When the microprocessor of the sensor module, a Raspberry Pi 4, receives the trigger signal from the navigation system, the microprocessor sends a trigger signal serially to the Arduino Mega 2560 microcontroller. The microcontroller then starts the automated cyanide level testing process. A 3D printed built-in filtration module placed on the rear of the boat, fully submerged to the water source during testing, is connected to the water sampling system and contains a peristaltic pump and a beaker, through a silicon tube, as shown in Figure 4. After priming the tube, the pump then dispenses 50ml of water sample to the beaker. Fig. 3. Layout of the sensor module. Fig. 4. Front view of the sensor module. The pH of the collected water sample is then measured. As the previous laboratory pH test result on the water sample indicated a pH level below 11 and the minimum pH level required for cyanide testing is 11, a consistent volume of 1.5ml of Sodium Hydroxide (NaOH) is added to the water sample. The solution was mixed with the water sample by pumping air using a diaphragm pump. The slider system in Figure 4 is a rack and pinion attached to a platform and a ball-bearing slider controlled by the stepper motor in Figure 2. Figure 5 shows the slider system’s positions at different stages in the testing process. First, the slider system retracts to the position shown in Figure 5(a), aligning the oblong-shaped hole in the platform to the paper sensor holder cartridge. The paper sensor holder cartridge contains two stacks of paper sensor holders, cylinders trimmed by a spherical cap, as shown in Figure 6, with circular AuNPs-integrated paper sensors in each holder. The paper sensor holders are 3D printed using black polyethylene terephthalate glycol (PETG) to capture the edges of the paper sensors better as it turns white. These are stored in a cartridge with 3 segments, 2 are stacked with paper sensor holders, and the middle segment contains no paper sensor holders but has a hole in the base, as shown in Figure 7. The cartridge also has a servo motor attached with a semicircle wiper with a hole that can fit a paper sensor holder. As the wiper moves from left to right and vice versa, a single paper sensor holder falls into the wiper hole and gets pushed into the hole on the base of the middle segment of the cartridge. The hole is aligned to the hole in the platform in a position demonstrated in Figure 5(a). With a paper sensor holder, the platform is positioned as illustrated in Figure 5(b). A silicon tube connected to the dispensing peristaltic dispenses 1ml of the prepared water sample to the paper sensor holder. (a) (b) (c) (d) Fig. 5. The slider system positioned at different stages in testing. (a) Platform aligned cartridge, (b) platform at dispensing tube, (c) platform at imaging station, (d) platform at dispensing area. Fig. 6. A paper sensor holder. Fig. 7. Paper sensor holder cartridge. The platform moves into the position shown in Figure 5(c). The image acquisition chamber in Figure 3 is spray-painted with black paint to block the ambient light that might affect the lighting during the data gathering from entering the box. Since the box was completely black and dark, a LED light strip with Engineering, Technology & Applied Science Research Vol. 12, No. 4, 2022, 8990-8995 8993 www.etasr.com Loquero et al.: CYANanobot: Miniaturized Boat-Assisted Data Acquisition for Automated Cyanide … a diffuser was installed inside the box to ensure consistent lighting during the data gathering process. These light sources are turned on before the platform arrives at the spot aligned to the camera. Temperature and humidity are also recorded and trigger the analyzer module. After receiving the predicted cyanide level, the light source is turned off and the data acquired from the process (cyanide level, pH, temperature, humidity, and location coordinates) are saved in the internal storage of the microprocessor and sent through SMS and to the IoT analytics platform Thingspeak. A line graph is shown for each parameter, with each point showing the value and the time the value was received. The platform moves into a position described in Figure 5(d), where the paper sensor holders and water are dispensed. Another pump pumps the water from the discharging container back to the water source. The user then moves to the next sampling site. Before the 50ml water sample is collected at the second site, the tubes and beakers are rinsed by repeatedly intaking and discharging water from the water source 3 times. This is done by introducing the water from the second site to the sensor module. C. Analyzer Module An algorithm was designed to predict the cyanide level using images taken of the paper sensor at specific time intervals. Figure 8 shows the algorithm. Fig. 8. Analyzer module algorithm. Eight mathematical models were tested in this study. Each model has a specific time interval and color space. The model names are 135sec_HSV, 165sec_HSV, 195sec_HSV, 240sec_HSV, 270sec_Lab, 315sec_HSV, 555sec_HSV, and 555sec_Lab. A reference image was taken immediately as the paper sensor holder was pushed to the image acquisition chamber. This reference image was used for all models. At the time specified by the model name, an image will be taken and stored in the internal storage of the Raspberry Pi 4. A total of 8 images were captured, including the reference image, as the last two models use the same time interval. The stored images were used by a circle detection algorithm. This python script detects a paper sensor in the picture after applying a mask on the image using Circle Hough Transform. The circle was then cropped, and the Region Of Interest (ROI) was identified. An example is shown in Figure 9. (a) (b) (c) Fig. 9. Detection of paper sensors in the image. (a) Raw image, (b) binary mask, (c) the masked image. Each paper sensor image’s Mean Pixel Intensity (MPI) was extracted in different color spaces. The extracted values for the images taken after the time duration in specific color space were then subtracted with the reference image’s MPI in the same color space. The resulting value shows the change of MPI of the paper sensor after the time interval. The 8 MPI values were then fit to their corresponding mathematical model resulting in a prediction of the cyanide level of the water sample. The predictions were then sent to the microprocessor of the sensor module for storage and sending. The predicted cyanide level was also compared to the actual cyanide concentration measured using an Ion-Selective Electrode (ISE). V. RESULTS AND DISCUSSION A. Navigation System The navigation system was tested in a pool near the campus. The boat's buoyancy was tested by gradually adding load while the boat was afloat. About 80kg can be safely carried by the boat. Fig. 10. Buoyancy and stability test of the mini-boat. Engineering, Technology & Applied Science Research Vol. 12, No. 4, 2022, 8990-8995 8994 www.etasr.com Loquero et al.: CYANanobot: Miniaturized Boat-Assisted Data Acquisition for Automated Cyanide … The remote-control system was also tested in the private pool. The boat was smoothly navigated with the controls. The expected speed power from the motors was delivered. Overall, the remote-control testing has been successful, particularly the differential method. For two consecutive weeks, the team conducted the actual testing in a mining tailing pond. The boat floated adequately with all the loads (batteries, sensor system, and other electronic devices.). The transmitter used was the FSi6 transmitter, a 2.4GHz radio system with 6 channels. CH 1 and 2 were dedicated to the two motors, while CH 6 was set for the toggle switch to trigger the sensing system. The remote control controlled the boat smoothly for a distance of 50m-100m. Fig. 11. Navigation system actual testing in a mining tailing pond. B. Sensing System The CYANanoBot System was deployed for the actual testing. The system was tested many times in a day, repeatedly conducting water sample collection, water sample preparation, image capturing, paper sensor detection, color extraction, cyanide concentration prediction, water sample discharge, and data transmission. The 8 mathematical models were used to identify the time intervals that needed to be taken. After this, the paper sensor responses were detected and their color values were extracted. Then, using the image, the model, and the features needed in the model, the cyanide concentration was predicted using the model and the result was compared with the actual concentration measured with an ISE. A total of 18 samples were collected on-site. Figure 12 shows the Quantile-Quantile (Q-Q) plots of the two best models and their respective R2. The predictions at 165s using the HSV color space exhibited the highest R2 of 0.85 and the lowest RMSE of 3.80ppm with an average error of 3.40ppm. This model also showed the lowest prediction error, with the true value at 31.5ppm and its prediction at 31.4ppm. However, its maximum error is 5.9ppm. The model for 195s in HSV has the second-highest R2 of 0.67 but its RMSE is 6.41ppm. The 240s model using the HSV color space exhibited the highest RMSE of 26.97ppm. The current study has lower R2 than the results of the reviewed literature, but the conducted tests concerned larger cyanide concentration values (12.6ppm to 41.1ppm) compared to studies that detected 0ppm to 1ppm with RMSE of 0.06ppm [10], 0 parts per billion (ppb) to 4ppb [11], and 0ppm to 20ppm [12]. Figure 13 shows the visualization of the transmitted data in Thingspeak. Fig. 12. Q-Q Plot of two models during on-site testing. Fig. 13. Data visualization in Thingspeak. VI. CONCLUSION AND FUTURE WORK In this study, a boat-assisted cyanide monitoring device focused on the use of AuNPs-integrated paper sensors through digital colorimetry was developed. The boat was successfully built, it is well-balanced and spacious. The remote-control system has been successfully installed in the system. Regarding the sensing system, it is effectively working with the automated procedures of intake, discharge, dispensing, imaging, detection, extraction, and sending of the acquired data. Based on the results of the models, the image taken at 165s in the HSV color space is the most promising in predicting the cyanide concentration of the water sample on-site as only one model Engineering, Technology & Applied Science Research Vol. 12, No. 4, 2022, 8990-8995 8995 www.etasr.com Loquero et al.: CYANanobot: Miniaturized Boat-Assisted Data Acquisition for Automated Cyanide … will be chosen for the final deployment. This time interval, 165s, against other model time intervals, such as 315 and 555s, is favorable as the image of the paper sensor can be taken at a lesser time reducing the risk of sample degradation and lessening the idle time of the bot in the sampling site. Instead of manually retrieving water samples and testing cyanide concentration using ISE, the bot can reduce person-to-person interaction, reduce testing time, avoid frequent calibration of the electrodes, and reduce operating costs as paper sensors are inexpensive. However, trained personnel are highly necessary for using and maintaining the system. For future work, more tests for the model at a broader range of concentration are recommended along with other possible methods of acquiring color intensities of the paper sensors instead of a camera, consideration for confounding factors in the model, and implementing an autonomous navigation system. ACKNOWLEDGMENT The authors would like to thank the Science for Change Program of the Department of Science and Technology (S4CP- DOST) for the funding support for this project, the partner industry APEX Mining Co. Inc. (AMCI), for their invaluable support and shared knowledge in forming the concepts and theories of this project, and the Caraga State University-Main Campus. REFERENCES [1] B. C. Nyamunda, "Water Quality," in Water Quality, H. Tutu, Ed. IntechOpen, 2017. [2] D. Stapper, K. Dales, P. Velasquez, and S. Keane, "Best Management Practices for Cyanide Use in the SmallScale Gold Mining Sector," PlanetGOLD Programme, 2021. [3] J. Ma and P. K. Dasgupta, "Recent developments in cyanide detection: A review," Analytica Chimica Acta, vol. 673, no. 2, pp. 117–125, Jul. 2010, https://doi.org/10.1016/j.aca.2010.05.042. [4] C. Anning, J. Wang, P. Chen, I. Batmunkh, and X. Lyu, "Determination and detoxification of cyanide in gold mine tailings: A review," Waste Management & Research, vol. 37, no. 11, pp. 1117–1126, Nov. 2019, https://doi.org/10.1177/0734242X19876691. [5] C. A. Johnson, "The fate of cyanide in leach wastes at gold mines: An environmental perspective," Applied Geochemistry, vol. 57, pp. 194– 205, Jun. 2015, https://doi.org/10.1016/j.apgeochem.2014.05.023. [6] A. T. Singh, D. Lantigua, A. Meka, S. Taing, M. Pandher, and G. Camci-Unal, "Paper-Based Sensors: Emerging Themes and Applications," Sensors, vol. 18, no. 9, Sep. 2018, Art. no. 2838, https://doi.org/10.3390/s18092838. [7] M. L. Budlayan et al., "Gold nanoparticles-decorated paper-based sensor for rapid cyanide detection in water," Advances in Natural Sciences: Nanoscience and Nanotechnology, vol. 12, no. 2, Feb. 2021, Art./ no. 025007, https://doi.org/10.1088/2043-6262/abffc7. [8] A. İncel, O. Akın, A. Çağır, Ü. H. Yıldız, and M. M. Demir, "Smart phone assisted detection and quantification of cyanide in drinking water by paper based sensing platform," Sensors and Actuators B: Chemical, vol. 252, pp. 886–893, Nov. 2017, https://doi.org/10.1016/j.snb.2017. 05.185. [9] L. Lvova et al., "Smartphone coupled with a paper-based optode: Towards a selective cyanide detection," Journal of Porphyrins and Phthalocyanines, vol. 24, no. 05n07, pp. 964–972, May 2020, https://doi.org/10.1142/S1088424620500091. [10] M. Cherbuin, F. Zelder, and W. Karlen, "Quantifying cyanide in water and foodstuff using corrin-based CyanoKit technologies and a smartphone," Analyst, vol. 144, no. 1, pp. 130–136, Dec. 2018, https://doi.org/10.1039/C8AN01059E. [11] M. L. Firdaus et al., "Smartphone Coupled with a Paper-Based Colorimetric Device for Sensitive and Portable Mercury Ion Sensing," Chemosensors, vol. 7, no. 2, Jun. 2019, Art. no. 25, https://doi.org/ 10.3390/chemosensors7020025. [12] H. Singh, G. Singh, D. K. Mahajan, N. Kaur, and N. Singh, "A low-cost device for rapid ‘color to concentration’ quantification of cyanide in real samples using paper-based sensing chip," Sensors and Actuators B: Chemical, vol. 322, Nov. 2020, Art. no. 128622, https://doi.org/ 10.1016/j.snb.2020.128622. [13] S. Smith et al., "Development of paper-based electrochemical sensors for water quality monitoring," in Fourth Conference on Sensors, MEMS, and Electro-Optic Systems, Skukuza, South Africa, Feb. 2017, pp. 110– 115, https://doi.org/10.1117/12.2244290. [14] A. T. Demetillo, R. Y. Capangpangan, M. C. Bonotan, J. P. B. Lagare, and E. B. Taboada, "Real-time Detection of Cyanide in Surface Water and its Automated Data Acquisition and Dissemination System," Nature Environment and Pollution Technology, vol. 19, no. 1, pp. 395–402, 2020. [15] N. Geetha, "IoT based smart water quality monitoring system," International Journal of Nonlinear Analysis and Applications, vol. 12, Special Issue, pp. 1665–1671, Jan. 2021, https://doi.org/10.22075/ijnaa. 2021.5853. [16] S. Zafar, G. Miraj, R. Baloch, D. Murtaza, and K. Arshad, "An IoT Based Real-Time Environmental Monitoring System Using Arduino and Cloud Service," Engineering, Technology & Applied Science Research, vol. 8, no. 4, pp. 3238–3242, Aug. 2018, https://doi.org/10.48084/ etasr.2144. [17] A. T. Demetillo and E. B. Taboada, "Real-Time Water Quality Monitoring For Small Aquatic Area Using Unmanned Surface Vehicle," Engineering, Technology & Applied Science Research, vol. 9, no. 2, pp. 3959–3964, Apr. 2019, https://doi.org/10.48084/etasr.2661. [18] R. Govindarajan, S. Meikandasivam, and D. Vijayakumar, "Performance Analysis of Smart Energy Monitoring Systems in Real-time," Engineering, Technology & Applied Science Research, vol. 10, no. 3, pp. 5808–5813, Jun. 2020, https://doi.org/10.48084/etasr.3566.