Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 8, No. 5, 1582-1593 2024 Publisher: Learning Gate DOI: 10.55214/25768484.v8i5.1874 © 2024 by the authors; licensee Learning Gate © 2024 by the authors; licensee Learning Gate * Correspondence: shhwang@kangwon.ac.kr Developing an internet of things system for hydrogen leak detection at hydrogen refueling stations integrating LoRa and global positioning system Ha-Jin Hwang1, Sung-Ho Hwang2* 1,2Department of Electronics, Information and Communication Engineering, Kangwon National University, Samcheok, South Korea; shhwang@kangwon.ac.kr. (S.H.H). Abstract: Developing a hydrogen leak detection system that can quickly detect even the smallest amount of hydrogen is extremely crucial in the hydrogen industry. Currently, hydrogen refueling stations use a fixed hydrogen leak detection system. This study develops a mobile hydrogen gas leak detection system for hydrogen refueling stations using s, global positioning system, and Internet of Things (IoT) equipment, including LoRa and Wi-Fi. A digital twin is implemented by linking hydrogen gas-sensing data at a location that is quickly required or suspected using Google Maps. A time-series database is used to store the hydrogen gas-sensing data, and the transfer delay of hydrogen gas-sensing data between the hydrogen equipment was measured. Therefore, we developed a prototype system that transmits, stores, and analyzes hydrogen gas-sensing data in real time using IoT equipment for hydrogen refueling stations. Keywords: Digital twin, Transfer delay, Global positioning system (GPS), Hydrogen refueling stations, Hydrogen sensor, Internet of Things (IoT). 1. Introduction The energy that can be harnessed from hydrogen is nearly three times the energy that can be extracted from one unit of gasoline. Hydrogen has an extremely low ignition energy (0.02 mJ) and is highly flammable over a wide range of concentrations (typically 4–75 vol. %), several times higher than gaseous fuels such as methane. The diffusion and rise rates of hydrogen are 3.8 and 6.0 times faster than those of natural gas, making leaks considerably catastrophic than other gaseous fuels. Owing to its ultrasmall molecular size, high diffusion coefficient, high explosive sensitivity, and high flame propagation speed, the containment and confinement of hydrogen gas is extremely challenging and requires careful design and preparation of the necessary infrastructure. Furthermore, hydrogen gas leaks cannot be detected by the human senses because the gas is odorless, colorless, and tasteless. Therefore, a system that can quickly and accurately detect, monitor, and quantify hydrogen gas leaks in real time is required. Therefore, it is critical to develop a hydrogen leak detection system that prevents hydrogen from reacting with air to form a potentially explosive mixture [1]. Currently, hydrogen refueling stations primarily use fixed hydrogen gas leak detection equipment, such as gas chromatography. Although the equipment is accurate, it has a slow response time and is expensive to install. Currently, other hydrogen gas detection equipment, such as compressors or dispensers, exists in fixed locations within the equipment. However, with hydrogen gas sensors and Internet of Things (IoT) equipment, hydrogen gas leaks can be detected when and where they are required. The latitude and longitude of the IoT device can be determined using a global positioning system (GPS). This study aims to develop an IoT system that is easy to move, inexpensive, and sufficiently fast to detect hydrogen gas leakage using a hydrogen sensor, LoRa, GPS, and IoT equipment. The exact 1583 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 8, No. 5: 1582-1593, 2024 DOI: 10.55214/25768484.v8i5.1874 © 2024 by the authors; licensee Learning Gate location of the IoT device is displayed on the digital using GPS and Google Maps. A network time protocol (NTP) server was deployed to perform time synchronization with the devices at the hydrogen refueling station. To evaluate the performance of the hydrogen gas leak detection system, we measured the transfer delay of the hydrogen gas-sensing data from the hydrogen sensor to the digital twin after time synchronization between the hydrogen devices. The remainder of this paper is organized as follows. First, Section 2 presents the related works. Section 3 presents the design and implementation of the developed system. Section 4 presents the experiment and results. Finally, Section 5 presents the conclusions. 2. Related Works To utilize hydrogen sensors, GPS, and IoT devices, a machine-to-machine communication system combining microcontrollers and wireless communication networks is required. For this purpose, a smart sensing system that detects and quantifies hydrogen gas leakage in real time and stores the hydrogen gas-sensing data in a database using a wireless communication network is required. In addition, it is necessary to transmit the location of the current IoT equipment using a wireless communication network and implement a digital twin that represents the current IoT equipment location and the hydrogen refueling station status in three dimensions to perform the overall monitoring of the hydrogen refueling station. A hydrogen gas leak detection system using the IoT can improve the safety of hydrogen refueling stations by analyzing and processing data from multiple installed hydrogen sensors. IoT improves the agility and flexibility of handling various events that may occur at a hydrogen refueling station [2]. Some IoT devices use a single board computer as the controller, whereas others rely on microcontrollers [3][4]. Table 1 presents a comparison of the Raspberry Pi 5B, ESP32 (ESP32 - D0WDQ6-V3), and Arduino Uno. For a single-board computer, the Raspberry Pi 5B is the most powerful member of the Raspberry Pi family; however, it consumes more power than other microcontrollers and does not support sleep mode. The Arduino Uno uses less power and supports sleep mode; however, it runs in 8-bit mode, has no operating system, and has a lower clock frequency than the other devices. The ESP32 (ESP32-D0WDQ6-V3) uses less power than the Raspberry Pi 5B, has a 32- bit processor, and uses a free real-time operating system (FreeRTOS) as its operating system. The Raspberry Pi 5B is not suitable for battery-powered IoT devices because it consumes considerable power, and the Arduino Uno has the worst performance. In this study, we used an ESP32 as the microcontroller. Table 1. Main features of raspberry Pi, ESP32, and Arduino uno [3]. Specification Raspberry Pi 5B ESP32 Arduino Uno Type Single-board Computer Microcontroller Microcontroller Operating system processor Raspberry Pi OS 64-bit FreeRTOS 32-bit None 8-bit Clock frequency input voltage 2.4GHz 5V 240MHz 3.3V 16MHz 5V IO Pins 40(PWR, GND, digital) 34(PWR, GND, digital, analog) 20(PWR, GND, digital, analog) Idle (or Active) Power consumption sleep mode 2.7W No 600mW Yes 225mW Yes Because hydrogen is highly flammable and difficult to detect, it is crucial to ensure rapid leak detection at hydrogen stations. Hydrogen sensors operate on the basis of principles such as thermal 1584 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 8, No. 5: 1582-1593, 2024 DOI: 10.55214/25768484.v8i5.1874 © 2024 by the authors; licensee Learning Gate conductivity, electrochemical reactions, and semiconductor-based sensing [5]. Table 2. Comparison of leak-detection technologies [5]. Technology Sensitivity Response time Environmental adaptability Maintenance Cost effectiveness Thermal conductivity Moderate (500 ppm– 4%) Moderate (<15 s) High Low Moderate Electrochemical Moderate (up to 4%) Moderate (<30 s) Moderate Moderate High Semiconductor High (1 ppm–2%) Fast (<2 s) Low High Low Thermal conductivity sensors utilize the differences between the thermal conductivities of hydrogen and air. Electrochemical sensors chemically react with hydrogen to produce a current that is directly proportional to the hydrogen concentration. This current indicates the presence of a leak. In contrast, sensors that rely on semiconductors change their electrical resistance in the presence of hydrogen. Therefore, the sensitivity of a hydrogen gas leak detection system is critical. To detect leaks quickly, hydrogen sensors must be able to detect very low levels of hydrogen. Typically, semiconductor-based sensor systems are characterized by their ability to detect hydrogen at concentrations as low as 1 ppm. Leak detection systems must work consistently and effectively under various environmental conditions; therefore, environmental adaptability is critical. Although thermal conductivity sensors are more durable and less affected by environmental changes, semiconductor sensors may require frequent calibration and may be more responsive to fluctuations in temperature and humidity. The efficiency of a sensor is determined by its maintenance requirements and operating life. Electrochemical sensors offer high sensitivity and fast responses; however, they tend to have a shorter operating life and need to be replaced more often than thermal conductivity sensors. The financial implications of installing and maintaining leak detection technology can significantly influence the decision-making process. Despite their vulnerability to environmental factors, semiconductor-based sensors are widely used because they are more cost-effective than other sensors. Based on these comparisons, it is clear that no individual technology outperforms the others in all aspects. Table 2 summarizes a comparison of each type of hydrogen sensor. Table 3. Differences in wireless technologies. Attribute Wi-Fi IEEE 802.15.4 LoRa NB-IoT Range throughput 15 m–100 m 54 Mbps–1.3 Gbps 30 m–100 m 20 kbps–250 kbps 2 km–20 km 10 kbps–50 kbps 1 km–10 km Up to 200 kbps Power consumption Medium Low Low Low Ongoing cost One-time One-time One-time Recurring Topology Star, Mesh Mesh Star Star The hydrogen sensor used in this study is not intended to be used in a stationary form, but rather in a mobile IoT device that measures the point of hydrogen leakage on demand. Therefore, semiconductor sensors with high sensitivity and fast response time are used. It is essential that various devices connected to a network operate for long periods, continuously collect precise data, communicate efficiently with other devices on the network, and display the collected data to users. To achieve these characteristics, it is crucial to choose the right network characteristics 1585 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 8, No. 5: 1582-1593, 2024 DOI: 10.55214/25768484.v8i5.1874 © 2024 by the authors; licensee Learning Gate and communication mode, considering parameters such as mobility, energy consumption, and coverage area. Table 3 summarizes the differences between the wireless technologies. After analyzing the advantages and disadvantages of various available communication technologies, LoRa and narrowband IoT (NB-IoT) are ideal options for long-distance and machine-to-machine communication. However, LoRa does not incur any additional costs after deployment, whereas the NB- IoT requires periodic payments to telecommunications companies. Conversely, IEEE 802.15.4 and Wi- Fi are ideal for short-range communication. In this study, for the wireless communication of the IoT for hydrogen refueling stations, we used LoRa, which has low power consumption, transmits sensing data over long distances, and requires no additional cost after installation. Wi-Fi is then used to receive the LoRa and forward it to a database and digital twin. A digital twin is required to display the exact equipment configuration and operational status of the hydrogen refueling station in three dimensions. To reduce costs, hydrogen refueling stations are attempting to reduce the number of employees. The owner of a hydrogen refueling station is an expert on the equipment configuration and operation of the station, but most employees who refuel hydrogen electric vehicles are non-experts. A digital twin that can intuitively understand the equipment configuration and operation status of a hydrogen refueling station is required, even for non-experts. In this study, we implemented a digital twin that supports a three-dimensional (3D) human–machine interface (HMI). The GPS is a satellite-based navigation system that provides position and time information under all weather conditions anywhere on or near the Earth and has an unobstructed line of sight to three or more GPS satellites. A GPS receiver uses the triangulation principle. The accuracy of the GPS is improved using differential GPS (DGPS) technology, which allows it to receive latitude, longitude, altitude, and time information; however, only latitude and longitude are used in this study. 3. System Design and Implementation The IoT system used for hydrogen gas leak detection is illustrated in Figure 1. The hydrogen sensor, GPS & LoRa transmitter, uses LoRa to transmit hydrogen gas-sensing data and location information about the latitude and longitude of the GPS. The LoRa receiver was configured using LoRa and Wi-Fi. It receives hydrogen gas-sensing data and GPS information from a hydrogen sensor, GPS & LoRa transmitter using LoRa. Additionally, it transmits hydrogen gas-sensing data and GPS information to the digital twin and database using Wi- Fi, through the access pointer. 1586 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 8, No. 5: 1582-1593, 2024 DOI: 10.55214/25768484.v8i5.1874 © 2024 by the authors; licensee Learning Gate Figure 1. Overall block diagram of an IoT system for detecting hydrogen gas leaks at hydrogen refueling stations. The access pointer sends the hydrogen gas-sensing data and GPS information to the digital twin and database. The digital twin configures the current equipment configuration and operation status of the hydrogen refueling station, similar to the actual equipment. If the IoT device is located outside the hydrogen refueling station, the latitude and longitude of the IoT device is displayed on the map, and if it is inside the hydrogen refueling station, the indoor location of the IoT device is manually set by a human. The digital twin was realized using Unity, a 3D simulation platform. Unity displays the received hydrogen gas-sensing data and GPS information of the equipment inside the hydrogen refueling station. The database used was InfluxDB, a time series database. The Database analyzes hydrogen gas - sensing data in real time and performs threat detection. The NTP server performs time synchronization with Korea Research Institute of Standards and Science (KRISS) first, and then with the hydrogen refueling station equipment. Wireshark verified that the data within the hydrogen refueling station were properly transferred. 4. Experiments and Results The hydrogen sensor, GPS & LoRa transmitter, is shown in Figure 2. It uses the LILYGO® T- Beam V1.1 SX1262 923 MHz development board, uses a battery 18650 of 3500 mAh, and operates at 3.3 V. The board supports ESP32 (ESP32-D0WDQ6-V3), LoRa, Wi-Fi, and GPS. For the hydrogen sensor, we used MQ-8. The output of the hydrogen sensor MQ-8 is 5 V, and the LILYGO® T-Beam V1.1 SX1262 923 MHz development board uses 3.3 V on the input pin; thus, we converted the 5 V output of the MQ-8 to 3.3 V using resistors of 1k ohm and 2k ohm. We used the 920–923 MHz ISM band, which is the LoRa frequency band used in Korea. 1587 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 8, No. 5: 1582-1593, 2024 DOI: 10.55214/25768484.v8i5.1874 © 2024 by the authors; licensee Learning Gate Figure 2. Hydrogen sensor, GPS & LoRa transmitter. Figure 3. LoRa receiver. The LoRa receiver is shown in Figure 3. It uses a LILYGO® T-Beam V1.1 SX1262 923 MHz development board and an 18650 battery of 3500 mAh. 1588 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 8, No. 5: 1582-1593, 2024 DOI: 10.55214/25768484.v8i5.1874 © 2024 by the authors; licensee Learning Gate Figure 4. Ethernet switch, access pointer, wireshark, and NTP Server In Figure 4, the access pointer is implemented using a Raspberry Pi 5B with a hotspot function. When another existing access pointer was used, the transfer delay varied significantly when packets were sent. The NTP server uses the Raspberry Pi 5B to perform time synchronization. Wireshark was used on a miniPC with a Windows 11 operating system, and the program version 4.2.6. The ethernet switch used was an IE 4000 from Cisco. The database in Figure 5 uses a desktop PC as hardware. We used the InfluxDB and Grafana time series databases. It shows a graph of the sensing data changing every second. Figure 5. Database. Figures. 6 and 7 show the results of 3D modeling of the equipment at the hydrogen refueling station using Blender. 3D modeling of the equipment in the hydrogen refueling station was performed based on the Piping & Instrumentation Drawing (P&ID) of the technical review and completion inspection documents. The parts that were not in the P&ID were surveyed and 3D modeled. The initial screen of the digital twin using Unity is shown in Figure 6. Using Google Maps, the location of the IoT equipment was displayed in Unity, as shown in Figure 6. A mouse and keyboard can be used to navigate 1589 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 8, No. 5: 1582-1593, 2024 DOI: 10.55214/25768484.v8i5.1874 © 2024 by the authors; licensee Learning Gate the hydrogen refueling station. Figure 7 shows the floor plan measurements. Unity's camera shows this in the top view. Unity used a desktop PC. The digital twin of the hydrogen refueling station receives real-time data and can be intuitively monitored. The data are displayed visually, which is easier to understand than the supervisory control and data acquisition (SCADA) HMI in a two-dimensional format. Essential information, such as hydrogen concentration, temperature, pressure, and flow, are displayed in a clear and intuitive manner. Figure 6. Digital twin. Figure 7. Display measurements from a hydrogen refueling station on a floor plan. 1590 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 8, No. 5: 1582-1593, 2024 DOI: 10.55214/25768484.v8i5.1874 © 2024 by the authors; licensee Learning Gate Figure 8. Transfer delay measurement range. The measurement range of the transfer delay is illustrated in Figure 8. The NTP server performs time synchronization with the hydrogen sensor, GPS & LoRa transmitter, LoRa receiver, and digital twin. After time synchronization, transmissions and receptions were performed between the devices. We obtained three transfer delays as shown in Figure 8 for 1000 s. Figure 9. Transfer delay between the hydrogen sensor, GPS & LoRa transmitter and LoRa receiver. 1591 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 8, No. 5: 1582-1593, 2024 DOI: 10.55214/25768484.v8i5.1874 © 2024 by the authors; licensee Learning Gate Figure 10. Transfer delay between the LoRa receiver and digital twin. Figure 9 shows the transfer delay between the hydrogen sensor, GPS & LoRa transmitter, and LoRa Receiver. They all used the LILYGO® T-Beam V1.1 SX1262 923 MHz development board. The LILYGO® T-Beam V1.1 SX1262 923 MHz development board is simple to configure and uses FreeRTOS, which means that the transfer delay variation is small. Figure 10 shows the transfer delay between the LoRa receiver and digital twin. This indicates that the transfer delay varied significantly. The operating system of the digital twin is Windows 11. Because Windows 11 runs multiple processes, the transfer delay varies significantly. In this experiment, we ran only the necessary processes on Windows 11 to perform the tests. Figure 11. Transfer delay between hydrogen sensor, GPS & LoRa transmitter and digital twin. 1592 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 8, No. 5: 1582-1593, 2024 DOI: 10.55214/25768484.v8i5.1874 © 2024 by the authors; licensee Learning Gate Figure 11 shows the overall transfer delays of the hydrogen sensor, GPS & LoRa transmitter, and digital twin. The average transfer delay shown in Fig. 11 is the result of adding the average transfer delay in Figure 9 to that in Figure 10. Table 4. Transfer delay between the equipment. Equipment Average Maximum Between hydrogen sensor, GPS & LoRa transmitter and LoRa receiver 436,942 (ms) 439,364 (ms) Between LoRa receiver and digital twin 209,239 (ms) 388,763 (ms) Between hydrogen sensor, GPS & LoRa transmitter and digital twin 646,181 (ms) 824,582 (ms) Table 4 lists the transfer delays for exact numbers. It shows the average and maximum transfer delays for each section. The average transfer delay between the hydrogen sensor, GPS & LoRa transmitter, and digital twin was 646,181 ms, with a maximum of 824,582 ms. Because the response time of the hydrogen gas sensor in Table 2 was at least 2 s, the transfer delay of the hydrogen gas detection system in this study was considered appropriate. 5. Conclusion Recently, significant progress has been made in the development of IoT-based smart gas detection technologies that can be used in various situations, including household LPG leak monitoring, air quality assessment, industrial gas leak detection, and vehicle pollution monitoring. However, IoT- enabled hydrogen gas leak detection systems are still in the early stages of development. Because the world is on the verge of transitioning to hydrogen as a fuel, it is crucial to create a sensing system that can efficiently detect and measure hydrogen. In this study, an ESP32 was used as the microcontroller of the IoT equipment, and LoRa was used as the wireless communication network. InfluxDB, a time series database, was used for the data logging and analysis. The digital twin of the hydrogen refueling station was built using Unity, and an NTP server was installed to perform time synchronization with Korea Research Institute of Standards and Science (KRISS), and then with the equipment of the hydrogen refueling station. Subsequently, the transfer delay was measured during transmission and reception between the hydrogen refueling station equipment. The overall transfer delay of the hydrogen gas-sensing data was 646,181 ms and 824, 582 ms on average. The shortest response time among the hydrogen gas sensors listed in Table 2 was more than 2 s; therefore, the transfer delay in this study was considered appropriate. In future research, we plan to collect data measured under various equipment and environments using the IoT and various sensors. Based on this, the digital twin of the hydrogen refueling station will simulate various scenarios to optimize performance and reduce downtime. Acknowledgments: This research was supported by "Regional Innovation Strategy (RIS)" through the National Research Foundation of Korea (NRF) funded by the Ministry of Education (MOE) (2022RIS-005) Copyright: © 2024 by the authors. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). References [1] Sourav Adithya and Ujwal Shreenag Meda, “A Review On The Development Of IOT Enabled hydrogen Sensing Systems,” ECS Transactions, Vol. 107, No. 1, pp. 4767-4789, April 2022. DOI:10.1149/10701.4767ecst https://creativecommons.org/licenses/by/4.0/ 1593 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 8, No. 5: 1582-1593, 2024 DOI: 10.55214/25768484.v8i5.1874 © 2024 by the authors; licensee Learning Gate [2] Gupta, P., Krishna, C., Rajesh, R. et al., “Industrial internet of things in intelligent manufacturing: a review, approaches, opportunities, open challenges, and future directions,” International Journal on Interactive Design and Manufacturing (IJIDeM), October 2022. DOI: 10.1007/s12008-022-01075-w [3] Jozsef Suto, “Codling Moth Monitoring with Camera-Equipped Automated Traps: A Review,” Agriculture, Vol. 12, No. 10, pp. 1-18, October, 2022. DOI: 10.3390/agriculture12101721 [4] Ali Imam Sunny, Aobo Zhao, et al., “Low-Cost IoT-Based Sensor System: A Case Study on Harsh Environmental Monitoring,” Sensors, Vol. 21, No. 1, pp. 1-12, December, 2020. DOI: 10.3390/s21010214 [5] Genovese M, Blekhman D, Fragiacomo P., “An Exploration of Safety Measures in Hydrogen Refueling Stations: Delving into Hydrogen Equipment and Technical Performance,” Hydrogen, Vol. 5, No. 1, pp. 102-122, February, 2024. https://doi.org/10.3390/hydrogen5010007 [6] Sunny AI, Zhao A, Li L, Kanteh Sakiliba S., “ Low-Cost IoT-Based Sensor System: A Case Study on Harsh Environmental Monitoring,” Sensors, Vol. 21, No. 1, 2021. https://doi.org/10.3390/s21010214