Articles | Volume 17, issue 13
Research article
10 Jul 2024
Research article |  | 10 Jul 2024

Preparation of low-concentration H2 test gas mixtures in ambient air for calibration of H2 sensors

Niklas Karbach, Lisa Höhler, Peter Hoor, Heiko Bozem, Nicole Bobrowski, and Thorsten Hoffmann

Using electrochemical gas sensors for quantitative measurements of trace gas components in ambient air introduces several challenges, of which interference, drift and aging of the sensor are the most significant. Frequent and precise calibration as well as thorough characterization of the sensor helps to achieve reliable and repeatable results. We therefore propose the use of a simple, lightweight and inexpensive setup to produce hydrogen calibration gases with precisely known concentrations in ambient air. The hydrogen is produced by electrolysis with electric current monitoring, and the output can be set to any value between  3 and  11 µgH2min-1. With a dilution flow of 500 mL min−1, for example, this results in a concentration range from  70 up to  240 ppm, but concentrations significantly below or above this range can also be covered with accordingly modified dilution flows. This setup can be used not only for calibration, but also for thorough and long-term characterization of electrochemical gas sensors to evaluate sensitivity, zero voltage and response time over extended periods of time.

1 Introduction

A major challenge for electrochemical measurements of trace gas components in ambient air is the potential errors caused by interference, drift and aging of gas sensor electrodes (Pang et al., 2017; Roberts et al., 2017, 2012; Jasinski et al., 2018; Aiuppa et al., 2011). Frequent calibration and thorough characterization of the sensors are key to measuring correct concentrations and thus generating high-quality data (Kamionka et al., 2006; Hasenfratz et al., 2012; Tian et al., 2019; Korotcenkov et al., 2009). The environmental conditions at the measurement site can significantly change the response and sensitivity of the sensors (matrix effects) (Baron and Saffell, 2017; Pang et al., 2017; Lewis et al., 2016; Jasinski et al., 2018; Tian et al., 2019; Korotcenkov et al., 2009; Farquhar et al., 2021). The quality of measurements carried out with electrochemical sensors can therefore be significantly improved if the sensors are calibrated under ambient conditions directly before the measurement. Known varying influences on the measurement signal, such as humidity or temperature, can be partially corrected by characterization of the sensors beforehand and, therefore, the possibility to compensate for those influences afterwards. However, unknown perturbations can cause systematic errors that are difficult to detect and often lead to misinterpretation of the experimental data (Lewis et al., 2016; Roberts et al., 2017; Pang et al., 2017). More recently, artificial neural networks and machine learning methods have been used to convert the raw data into reliable concentration values, taking into account environmental parameters such as temperature, humidity and data from other gas sensors in the measurement environment (Wei et al., 2018; Cross et al., 2017; Zimmerman et al., 2018).

Standard gas mixtures in pressurized containers are an obvious option for regular calibration. However, the storage of hydrogen standard gas mixtures over longer periods of time can lead to changes in concentration, as was investigated for steel and aluminum canisters with hydrogen diluted with ambient air (Jordan and Steinberg, 2011). They found that the hydrogen concentration in aluminum canisters in particular can increase significantly in the first few months of storage. Storing gas samples and calibration mixtures in plastic bags (e.g. Tedlar bags) leads to even greater changes in concentration when stored for days to a few weeks (Schuette, 1967; Barratt, 1981). Especially for hydrogen, with its exceptionally high diffusion and permeation coefficient, plastic bags are not suitable over longer periods of time. Therefore, a method for the rapid, efficient and accurate production of hydrogen as a calibration gas at low cost is required. Electrolysis offers a simple method of producing high purity hydrogen with the ability to control the amount of hydrogen produced by controlling the electric current flowing through the electrolysis cell. Continuous production of hydrogen enables long-term performance evaluation (drift, sensitivity, zero voltage, response time) of sensors, and pulse-width modulation (PWM) enables automatic calibration.

The purpose of this paper is to present a method for producing H2 test gas mixtures that has been specially developed for the calibration of H2 sensors. In particular, the ability to take a simple and robust calibration system into the field distinguishes the system presented here from existing technologies.

1.1 Electrolysis

In recent years, hydrogen has gained popularity as a form of chemical energy storage and as a substitute for fossil fuels, as it can be easily produced by electrolysis and converted back into electricity via fuel cells in times of high energy demand (Zhang et al., 2016; Tarhan and Çil, 2021; Wang et al., 2014). In a typical electrolysis cell, water is split into hydrogen and oxygen at a theoretical decomposition voltage of 1.23 V. However, due to overvoltage, the actual voltage required is much higher and the efficiency of electrolysis decreases (Carmo et al., 2013).

However, according to Faraday's first law of electrolysis, the amount of hydrogen produced depends only on the electric current flowing through the cell (Zeng and Zhang, 2010). Therefore, monitoring the electric current provides a measure of the amount of hydrogen being produced. By controlling the electric current, e.g. by PWM or adjusting the applied voltage, the amount of hydrogen produced can be controlled.

The current yield of the system describes the yield of the electrolysis by comparing the product quantity with the product quantity predicted according to Faraday's first law of electrolysis. A current efficiency of 100 % describes a perfect cell and allows the exact amount of hydrogen produced to be calculated by measuring the electric current flowing through the cell.

1.2 Calibration of electrochemical H2 sensors

Commercially available calibration gas mixtures are usually produced in pure (dry) nitrogen, which leads to considerable variations in the sensor response when these mixtures are used for the direct calibration of electrochemical sensors, which are then used for measurements in ambient air. Especially for electrochemical hydrogen sensors, the water content of the sampled gas is the most important influencing factor; this is not only because humidity is a highly variable component depending on the sampling location, but also because water molecules can influence the electrode surfaces or electrolyte concentrations and not least because water is a product of the reaction of the hydrogen measurement within the electrochemical cell itself (2H2+2O2-2H2O+4e-). A higher level of control offers the use of artificially humidified zero air or ambient air for mixing with hydrogen or standard calibration gas mixtures. There are two options here: either dynamic production, where mass flow controllers (MFCs) are used to dilute pure hydrogen or hydrogen / nitrogen mixtures with ambient air / humidified zero air (Benammar et al., 2020; Domanský et al., 1998), or batchwise production of calibration gases in, for example, Tedlar bags or pressurized cylinders (Korotcenkov et al., 2009; Karbach et al., 2022; Rüdiger et al., 2018). The first option is more demanding in terms of instrumentation but enables continuous measurement, while the second option is faster and cheaper but only allows for batched production of test gases. Another commonly used method is the calibration of the sensor by simultaneous measurement with a validated reference device (Malings et al., 2019).

In addition, the use of electrolysis with electric current monitoring could be applied for the controlled dynamic production, which allows for precisely known amounts of hydrogen being produced on demand as well as eliminating the need for a pressurized cylinder of hydrogen or MFCs in the laboratory, significantly reducing the cost and size of calibration equipment.

2 Materials and methods

The setup (see Fig. 1) consists of an electrolysis cell with 9 % acetic acid (AcOH) in deionized water as the electrolyte, a stainless-steel cathode and a platinum wire anode. A controllable lab bench power supply provides power. A high-resistance (33.3 Ω) shunt resistor in series with the electrolysis cell allows for an accurate current measurement with a microcontroller and appropriate analog-to-digital converter (ADC). The produced hydrogen is discharged via connected tubes that lead to a T-piece, where it is mixed with the dilution air (fresh ambient air, no hydrogen added) and directed to the sensor to be calibrated. The combination of electrodes reduces the cost of the setup drastically, as only one platinum electrode is needed. In all experiments, the hydrogen was diluted with a constant flow of 500 mL min−1 of fresh ambient air (note that ambient air has a slight background of 0.5 ppm H2; however, this is well below the ranges that were tested in this study). The hydrogen concentration was changed by adjusting the electric current flowing through the electrolysis cell. To measure the hydrogen concentration that is created by the system, an electrochemical “Alphasense H2-BF” sensor was used, which was calibrated by creating gas mixtures of differing concentrations by diluting pure hydrogen with the appropriate amount of fresh ambient air. These sensor readings were then used to calculate the current yield of the system.

To further reduce costs, a setup consisting of two stainless-steel electrodes was also tested. With this setup, the current yield stabilized after  12 h but was well below 100 %, which prevented its use as a primary calibration standard.

Figure 1Photograph of the experimental setup of the electrolysis cell.


3 Results

Figure 2 shows both the measured H2 concentration and the theoretical H2 concentration calculated using Faraday's first law of electrolysis, as well as the corresponding current yield. The sensor was calibrated with calibration gases prepared by introducing precisely known amounts of hydrogen into a known volume of ambient air in a Tedlar bag. This gas mixture was measured directly after preparation to avoid changes in the concentration of the calibration mixture. The calibration yielded a good coefficient of determination (R2) and was reproducible. The raw data for a calibration run can be seen in Fig. 3. Figure 3 contains the calibration equation with the coefficient of determination of the calibration.

Figure 2Plot of the measured H2 concentration in red (as calibrated with the external calibration shown in Fig. 3), the theoretical H2 concentration as calculated with Faraday's first law of electrolysis in blue and the current yield in green.


Figure 3(a) Time series of the measured voltages (raw data) during calibration. (b) Plot of the averaged voltages measured during the corresponding calibration plotted against the concentration of the calibration gas mixture. The linear fit equation, as well as the coefficient of determination, is given in the plot.


As can be seen in Fig. 2, after changing the electric current flowing through the electrolysis cell, the concentration at the outlet did not change instantaneous (like the measured electric current), but instead needed time to adjust to the correct value. This limits the number of concentration changes that this system can produce in a certain amount of time. Repeatability tests have been conducted with new cathodes and fresh electrolyte. The tests revealed that after an initial run-in phase of about 2 h, the system always approaches a current yield of 1.0, which expresses that the H2 output that is predicted by Faraday's first law of electrolysis and the measured H2 output are exactly the same. This shows that the true hydrogen output can consistently be derived from the measured current, allowing us to accurately produce hydrogen standard mixtures. A more detailed description of repeatability experiments is given in the Supplement.

4 Discussion

Figure 2 and Table 1 show that the current yield is close to unity over the entire concentration range tested. This shows that the actual performance of the electrolytic cell is close to what is predicted by Faraday's first law of electrolysis. Thus, this type of calibration setup can be used not only to produce hydrogen gas mixtures at low concentrations over several days, but also to directly calculate the concentration of the gas mixture by measuring the current and applying Faraday's first law of electrolysis. This setup can therefore be used as a primary standard for the calibration of hydrogen sensors.

Table 1Raw data of the measured electric current flowing through the electrolysis cell, measured hydrogen concentration (as calibrated with the external calibration) and corresponding current yield. The respective errors are 1 standard deviation of the measured data. The error of the theoretical concentration is given by the error of the current measurement.

Download Print Version | Download XLSX

The production of calibration gases with precisely known concentrations is also possible by other means, including those used in this work for the reference calibration of the H2 sensor. However, these methods are prone to errors caused by inaccurate or incorrect working procedures and only allow the calibration gases to be produced in batches. In addition, the high diffusion coefficient of hydrogen makes it necessary to prepare the calibration gas immediately before the measurement to avoid the loss of hydrogen by diffusion through the Tedlar bag. If a continuous supply of calibration gas is required, it is usually necessary to use mass flow controllers to dilute pure hydrogen with ambient air. However, this involves considerable costs and equipment (MFCs, gas cylinders, pumps, etc.). Using an electrolysis cell with accurate monitoring of the electrical current reduces the instrumentation to a low-cost power supply, a microcontroller, some resistors and the electrolysis cell itself, which consists of a platinum wire anode and a stainless-steel cathode immersed in  9 % acetic acid. The hydrogen produced can then be fed into the gas flow using a simple T-piece.

The calibration setup presented in this paper is comparatively inexpensive but still of similar quality to manual batch calibration with Tedlar bags. The complete setup is extremely lightweight ( 300 g with battery as the power source), so a mobile calibration station is possible. Such a mobile calibration station would allow for calibrating sensors directly in the field before measurement, using ambient air as a dilution medium. This would significantly reduce matrix effects as changes in ambient parameters (T, p, RH, concentration of other trace gases, etc.) between calibration and measurement would be minimized.

Other gases like Cl2, CO, H2S, N2, NO, O2, O3, AsH3 and SbH3 (see review of Barratt, 1981, and Hsu et al., 2015) may also be produced via electrolysis and therefore be used for the calibration of gas sensors and the production of gas mixtures with precisely known concentrations. However, it is strongly advisable to determine the current yield of the specific setup (chemicals, electrodes, applied voltage, electrolyte, etc.) prior to calibration to avoid systematic errors in the measurements due to wrong calibration. A correction factor can then be used to account for the non-ideality of the electrolysis.

5 Conclusions

In summary, the system presented here can accurately generate and reproduce a stable flow of gas mixtures of known concentrations over several days using ambient air as a dilution medium. In combination with the small size and low weight of the system, this enables the calibration of hydrogen sensors in the field, reducing the influence of matrix effects on the accuracy of the sensor. The system is inexpensive to assemble and easy to maintain, allowing frequent calibration without much manual effort, which is the key to reliable measurement results. The design could also be further improved with a fixed voltage source (e.g. a battery) in combination with pulse-width modulation (PWM), with the aim of being able to control the current flowing through the electrolytic cell more easily. This would further reduce the size and weight of the system and allow for automatic calibration of the sensors by adjusting the current flow after a predefined period of time.

Code availability

The code is available in the Supplement.

Data availability

Raw data are available at (Karbach et al., 2024).


The supplement related to this article is available online at:

Author contributions

NK and TH conceived and designed the experiments; NK and LH performed the experiments; NK, LH, and TH analyzed the data; all authors participated in writing the manuscript.

Competing interests

The contact author has declared that none of the authors has any competing interests.


Publisher’s note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. While Copernicus Publications makes every effort to include appropriate place names, the final responsibility lies with the authors.


The authors thank Siegfried R. Waldvogel (Johannes Gutenberg University Mainz) for supplying the platinum wire to conduct the experiments.

Financial support

This research has been funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – TRR 301 – Project-ID 428312742 and Project HO 1748/23-1, and from TeMaS (Terrestrial Magmatic Systems, a collaborative effort of the Universities of Mainz, Frankfurt and Heidelberg).

This open-access publication was funded by Johannes Gutenberg University Mainz.

Review statement

This paper was edited by Thomas Röckmann and reviewed by Olivier Duclaux and Giuseppe Etiope.


Aiuppa, A., Shinohara, H., Tamburello, G., Giudice, G., Liuzzo, M., and Moretti, R.: Hydrogen in the gas plume of an open-vent volcano, Mount Etna, Italy, J. Geophys. Res., 116, B10204,, 2011. 

Baron, R. and Saffell, J. R.: Amperometric Gas Sensors as a Low Cost Emerging Technology Platform for Air Quality Monitoring Applications: A Review, ACS Sensors, 2, 1553–1566,, 2017. 

Barratt, R. S.: The Preparation of Standard Gas Mixtures, Analyst, 106, 817–849,, 1981. 

Benammar, M. A., Ahmad, S. H. M., Abdaoui, A., Tariq, H., Touati, F., Al-Hitmi, M., and Crescini, D.: A Smart Rig for Calibration of Gas Sensor Nodes, Sensors-Basel, 20, 2341,, 2020. 

Carmo, M., Fritz, D. L., Mergel, J., and Stolten, D.: A comprehensive review on PEM water electrolysis, Int. J. Hydrog. Energ., 38, 4901–4934,, 2013. 

Cross, E. S., Williams, L. R., Lewis, D. K., Magoon, G. R., Onasch, T. B., Kaminsky, M. L., Worsnop, D. R., and Jayne, J. T.: Use of electrochemical sensors for measurement of air pollution: correcting interference response and validating measurements, Atmos. Meas. Tech., 10, 3575–3588,, 2017. 

Domanský, K., Baldwin, D. L., Grate, J. W., Hall, T. B., Li, J., Josowicz, M., and Janata, J.: Development and Calibration of Field-Effect Transistor-Based Sensor Array for Measurement of Hydrogen and Ammonia Gas Mixtures in Humid Air, Analytical Chemistry, 70, 473–481,, 1998. 

Farquhar, A. K., Henshaw, G. S., and Williams, D. E.: Understanding and Correcting Unwanted Influences on the Signal from Electrochemical Gas Sensors, ACS Sensors, 6, 1295–1304,, 2021. 

Hasenfratz, D., Saukh, O., and Thiele, L.: On-the-Fly Calibration of Low-Cost Gas Sensors, in: Wireless Sensor Networks, edited by: Picco, G. P. and Heinzelman, W., Springer Berlin Heidelberg, Berlin, Heidelberg, 228–244,, 2012. 

Hsu, G.-S. W., Hsia, C.-W., and Hsu, S.-Y.: Effects of electrode settings on chlorine generation efficiency of electrolyzing seawater, J. Food Drug Anal., 23, 729–734,, 2015. 

Jasinski, G., Dmitrzak, M., and Jasinski, P.: Evaluation of the Commercial Electrochemical Gas Sensors for the Monitoring of CO in Ambient Air, in: 15th International Conference on Optical and Electronic Sensors (COE), Warsaw, Poland, 18–20 June 2018, IEEE, 1-4,, 2018. 

Jordan, A. and Steinberg, B.: Calibration of atmospheric hydrogen measurements, Atmos. Meas. Tech., 4, 509–521,, 2011. 

Kamionka, M., Breuil, P., and Pijolat, C.: Calibration of a multivariate gas sensing device for atmospheric pollution measurement, Sensor. Actuat. B-Chem., 118, 323–327,, 2006. 

Karbach, N., Bobrowski, N., and Hoffmann, T.: Observing volcanoes with drones: studies of volcanic plume chemistry with ultralight sensor systems, Sci. Rep.-UK, 12, 17890,, 2022. 

Karbach, N., Höhler, L., Hoor, P., Bozem, H., Bobrowski, N., and Hoffmann, T.: Rawdata for: Preparation of low-concentration H2 test gas mixtures in ambient air for calibration of H2 sensors, Karbach et al., 2024 (1.0), Zenodo [data set],, 2024. 

Korotcenkov, G., Han, S. D., and Stetter, J. R.: Review of electrochemical hydrogen sensors, Chem. Rev., 109, 1402–1433,, 2009. 

Lewis, A. C., Lee, J. D., Edwards, P. M., Shaw, M. D., Evans, M. J., Moller, S. J., Smith, K. R., Buckley, J. W., Ellis, M., Gillot, S. R., and White, A.: Evaluating the performance of low cost chemical sensors for air pollution research, Faraday Discuss., 189, 85–103,, 2016. 

Malings, C., Tanzer, R., Hauryliuk, A., Kumar, S. P. N., Zimmerman, N., Kara, L. B., Presto, A. A., and R. Subramanian: Development of a general calibration model and long-term performance evaluation of low-cost sensors for air pollutant gas monitoring, Atmos. Meas. Tech., 12, 903–920,, 2019. 

Pang, X., Shaw, M. D., Lewis, A. C., Carpenter, L. J., and Batchellier, T.: Electrochemical ozone sensors: A miniaturised alternative for ozone measurements in laboratory experiments and air-quality monitoring, Sensor. Actuat. B-Chem., 240, 829–837,, 2017. 

Roberts, T. J., Lurton, T., Giudice, G., Liuzzo, M., Aiuppa, A., Coltelli, M., Vignelles, D., Salerno, G., Couté, B., Chartier, M., Baron, R., Saffell, J. R., and Scaillet, B.: Validation of a novel Multi-Gas sensor for volcanic HCl alongside H2S and SO2 at Mt. Etna, B. Volcanol., 79, 36,, 2017. 

Roberts, T. J., Braban, C. F., Oppenheimer, C., Martin, R. S., Freshwater, R. A., Dawson, D. H., Griffiths, P. T., Cox, R. A., Saffell, J. R., and Jones, R. L.: Electrochemical sensing of volcanic gases, Chem. Geol., 332–333, 74–91,, 2012. 

Rüdiger, J., Tirpitz, J.-L., de Moor, J. M., Bobrowski, N., Gutmann, A., Liuzzo, M., Ibarra, M., and Hoffmann, T.: Implementation of electrochemical, optical and denuder-based sensors and sampling techniques on UAV for volcanic gas measurements: examples from Masaya, Turrialba and Stromboli volcanoes, Atmos. Meas. Tech., 11, 2441–2457,, 2018. 

Schuette, F. J.: Plastic Bags for Collection of Gas Samples, Atmos. Environ., 1, 515–519,, 1967. 

Tarhan, C. and Çil, M. A.: A study on hydrogen, the clean energy of the future: Hydrogen storage methods, Journal of Energy Storage, 40, 102676,, 2021. 

Tian, B., Hou, K. M., Diao, X., Shi, H., Zhou, H., and Wang, W.: Environment-Adaptive Calibration System for Outdoor Low-Cost Electrochemical Gas Sensors, IEEE Access, 7, 62592–62605,, 2019. 

Wang, M., Wang, Z., Gong, X., and Guo, Z.: The intensification technologies to water electrolysis for hydrogen production – A review, Renewable and Sustainable Energy Reviews, 29, 573–588,, 2014. 

Wei, P., Ning, Z., Ye, S., Sun, L., Yang, F., Wong, K. C., Westerdahl, D., and Louie, P. K. K.: Impact Analysis of Temperature and Humidity Conditions on Electrochemical Sensor Response in Ambient Air Quality Monitoring, Sensors-Basel, 18, 59,, 2018. 

Zeng, K. and Zhang, D.: Recent progress in alkaline water electrolysis for hydrogen production and applications, Prog. Energ. Combust., 36, 307–326,, 2010. 

Zhang, F., Zhao, P., Niu, M., and Maddy, J.: The survey of key technologies in hydrogen energy storage, Int. J. Hydrogen Energ., 41, 14535–14552,, 2016. 

Zimmerman, N., Presto, A. A., Kumar, S. P. N., Gu, J., Hauryliuk, A., Robinson, E. S., Robinson, A. L., and R. Subramanian: A machine learning calibration model using random forests to improve sensor performance for lower-cost air quality monitoring, Atmos. Meas. Tech., 11, 291–313,, 2018. 

Short summary
The system presented here can accurately generate and reproduce a stable flow of gas mixtures of known concentrations over several days using ambient air as a dilution medium. In combination with the small size and low weight of the system, this enables the calibration of hydrogen sensors in the field, reducing the influence of matrix effects on the accuracy of the sensor. The system is inexpensive to assemble and easy to maintain, which is the key to reliable measurement results.