Recent advances in g-C3N4 based gas sensors for the detection of toxic and flammable gases: a review

In recent years, many 2D nanomaterials like graphene, MoS2, phosphorene, and metal oxide nanosheets have been investigated for gas sensing applications due to their excellent properties. Amongst other 2D nanomaterials, graphitic carbon nitride (g-C3N4) has attracted significant attention owing to its simple synthesis process, tunable electronic properties, and exceptional physicochemical properties. Such remarkable properties assert g-C3N4 as a potential candidate for the next-generation high-performance gas sensors employed in the detection of toxic and flammable gases. Although several articles and reviews are available on g-C3N4 for their synthesis, functionalities, and applications for the detection of humidity. Few of them have focused their attention on gas sensing using g-C3N4. Thus, in this review, we have methodically summed up the recent advances in g-C3N4 and its composites-based gas sensor for the detection of toxic and flammable gases. Moreover, we have also incorporated the synthesis strategies and the comprehensive physics of g-C3N4 based gas sensors. Additionally, different approaches are presented for the enhancement of gas sensing/detecting properties of g-C3N4 based gas sensors. Finally, the challenges and future scope of g-C3N4 based gas sensors for real-time monitoring of gases have been discussed.


Introduction
The area of 2D nanomaterials has expanded been enormous since the discovery of graphene. Several researchers have investigated various interesting physical phenomena when the dimension of materials transforms from 3D to 2D. The exciting properties of 2D nanomaterials include quantum confinement, good flexibility, high transparency, and excellent mechanical strength that make them suitable for wide industrial applications [1][2][3][4]. Mono-layer and few-layered nanomaterials exhibit some exciting physics because of the quantum confinement effect than conventional bulk materials [5]. Very interestingly, a small variation in the atomic layers of 2D nanomaterials will result in a change in its physical properties. Therefore, it is imperative to control the growth parameters of 2D nanomaterials for their specific applications. Nevertheless, their sustainability and low massproduction restrict their applications, but these bottlenecks can be circumvented by utilizing some modified synthesis techniques.
On the other hand, metal oxides (for example, ZnO, SnO 2 , TiO 2 , V 2 O 5 , CuO, and NiO) have been extensively employed as gas sensors because of their good sensitivity, fast response/recovery time, tunable transport properties, low cost, compatibility with semiconductor circuits, and good selectivity [6][7][8][9][10][11][12][13][14][15][16]. These sensors have drawn in critical consideration in different fields, for example, air quality investigation, breath analysis, and monitoring of chemical residues in industries. The basic working principles of these chemiresistive sensors depend on the adsorption/desorption of target gas molecules on the surface of the sensor and the modifications in their resistance. In this direction, various types of chemi-resistive sensors have been 2. Synthesis of 2D g-C 3 N 4

and its composites
Several synthesis techniques have been reported on g-C 3 N 4 and its composites based on their different applications. In the context of the present review, a short description of the synthesis process of g-C 3 N 4 is reported in this section for the development of sensors used to detect toxic and flammable gases. The most widespread synthesis techniques and strategies of g-C 3 N 4 are briefly discussed in the following sections:

Sonication method
The sonication process is the simplest route for the preparation of g-C 3 N 4 and its composites. It involves the mixing of g-C 3 N 4 powders (grown by nitrogen-containing precursors such as urea, melamine) with appropriate metal or metal oxides in water or an organic solvent solution. Thereby, the formation of composites is possible so that metal oxide could disperse over the surface of g-C 3 N 4 throughout the mixing or stirring process. The nanocomposite is then retrieved after the complete evaporation of solvent or water under the heat treatment. For example, Li et al developed g-C 3 N 4 @Cs x WO 3 nanocomposites via ultrasonic-assisted strategy [65].
Similarly, Konstas et al synthesized g-C 3 N 4 /SrTiO 3 heterojunction by the sonication method [66]. In another study, Wen et al synthesized MoS 2 /g-C 3 N 4 by using ultrasonic dispersion in ethanol and utilized visible light irradiation for the removal of nitric oxide [67]. Yuan et al prepared g-C 3 N 4 /ZnO nanosheets via a simple precipitation-calcination method for photocatalytic application [68]. Thus, a good intermixing between g-C 3 N 4 and metal oxide and consequently their heterojunctions formation could be achieved with the use of ultrasonic wave energy. Moreover, other factors such as the mechanical stirring and particle motion in the ultrasonic field can alter the reprecipitation and dissolution.
2.2. Calcination method g-C 3 N 4 can be synthesized via thermal decomposition of several nitrogen-and carbon-rich organic precursors under a controlled environment [69]. Additionally, g-C 3 N 4 based composites can be obtained through the mixing of metal oxides with g-C 3 N 4 precursors in a crucible followed by heat treatment in the furnace. For example, Xiao et al synthesized g-C 3 N 4 nanosheets by calcination method and utilized them to detect CH 4 under UV-light irradiation [70]. For example, Ibrahim et al have grown g-C 3 N 4 using the calcination method for the detection of hydrogen gas [71]. They used urea as a precursor and then heated it to 550°C to obtain irregular layers of g-C 3 N 4 . In another study, SnO 2 -g-C 3 N 4 composite was synthesized via calcination of stannous chloride pentahydrate and melamine for 3 h at 500°C and utilized for acetone detection [30]. Recently, g-C 3 N 4 /ZnO composite was prepared through the precipitation-calcination technique for the detection of methane [60]. In this study, g-C 3 N 4 was synthesized by thermal reduction of urea in a tube furnace at different temperatures (250, 350, and 550°C for 2 h). Thereafter, g-C 3 N 4 was incorporated into other precursors such as sodium hydroxide and zinc nitrate hexahydrate solution to prepare g-C 3 N 4 /ZnO.

Hydrothermal method
The hydrothermal method has become a promising technology for developing nanocomposite materials [72].
Using this method, the crystallite size, morphology, and crystallinity of the materials could be improved due to the process being executed at relatively lower temperatures. Additionally, there are some other parameters such as pressure, reaction temperature, pH, additives, types of solvent, aging time, and precursor composition that control the surface chemistry and play a vital role in the synthesis process. Importantly, this method utilizes simple instruments (autoclave) and processes that are environmentally friendly.

Sol-gel method
The sol-gel is a simple and extensively used technique for the synthesis of nanomaterials. In this method, the precursors are mixed in a solvent and followed by stirring at a low temperature. Thereafter, a sol is obtained in the form of suspended particles. An agglomeration of colloidal particles with time results in the formation of a gel. These gel-like structures further experience the hydrolysis and condensation reaction that lead to the development of metal hydroxide [73]. Consequently, the new bonds of oxygen bridges are formed via hydrolysis-polycondensation reactions and followed by the annealing process to form g-C 3 N 4 .

Microwave method
The synthesis of nanomaterials by utilizing the microwave method has become very popular due to the homogenous heating of precursors at a faster speed. This method has penetration properties that enable uniform heating of the reaction solution. As a result, the development of crystallites with narrow size distribution occurs attributed to the consistent nucleation and rapid crystal growth [74]. Moreover, the interface energy between the consisting phases decreases due to the thermal treatment of desired materials, which further allows the photogenerated electrons to flow easily through the interface [75,76]. Hence, a microwave method can provide good contact between the two semiconductor materials. The g-C 3 N 4 is unstable as an organic polymer in nature and decomposes at higher temperatures. Thus, the semiconductor which is coupled to the g-C 3 N 4 will activate oxygen and hence, increase the decomposition of g-C 3 N 4 [77]. For example, Shorie et al prepared g-C 3 N 4 quantum dots via microwave-assisted solvothermal technique for the removal of Hg 2+ ions from aqueous solutions [78]. In another study, a one-step microwave reduction technique was utilized for the synthesis of WO 3 /g-C 3 N 4 composite having WO 3 cluster particles distributed on g-C 3 N 4 for ethanol detection [79]. The ensuing advantages and disadvantages of all the above-mentioned synthesis techniques of g-C 3 N 4 are compared in table 2.
The combination of two basic structures like tri-s-triazine (C 6 N 7 ) rings and s-triazine (C 3 N 3 ) rings, for the most part, frames the precise engineering of C 3 N 4 [80]. Generally, the synthesis of g-C 3 N 4 nanomaterials can be achieved by thermal condensation with nitrogen-rich precursors (melamine, urea, cyanimide, thiourea, and dicyanamide) [71,81]. The formation of C 6 N 7 and C 3 N 3 rings mainly depends on the reaction process [82]. Zhang et al synthesized g-C 3 N 4 using thiourea or urea as a precursor and found that the synthesis has predominantly occurred via nucleophilic addition, polycondensation, and polymerization steps [83]. During the synthesis process, it was observed that the urea or thiourea molecules were initially transformed to melamine through additional and condensation reactions. However, the dicyandiamide molecules were converted to melamine [84]. Under the increasing temperature, the C 6 N 7 rings were formed by rearrangement of melamine, and that was further polymerized into g-C 3 N 4 nanomaterials. Hence, the thermal polymerization of urea, cyanamide, melamine, dicyandiamide, or thiourea at different temperatures (450°C-550°C) leads to the synthesis of g-C 3 N 4 [85,86].
Besides, noble nanoparticles such as Pd, Au, Pt can be coated with g-C 3 N 4 for gas sensing applications. For example, Li et al had grown Au/g-C 3 N 4 using a two-step process [87]. In this method, firstly, bulk g-C 3 N 4 was synthesized using melem hydrate fibers (as a template) via polycondensation, and thereafter, the bulk g-C 3 N 4 crystals were heated at 600°C to form porous g-C 3 N 4 . Later on, the formation of Au nanoparticles@porous g-C 3 N 4 fibers towards the detection of NO 2 gas was achieved using the systematic addition of chloroauric acid, and sodium citrate dehydrates, under the irradiation with a halogen lamp. Similarly, Ibrahim et al have grown irregular layers of g-C 3 N 4 by the calcination of urea (as a precursor) at 550°C [71]. After that, Pd nanoparticles (ammonium tetrachloropalladate as a precursor) were integrated with the g-C 3 N 4 matrix to improve the sensing response towards hydrogen gas.
Metal sulfide can be combined with g-C 3 N 4 to enhance the sensing response. Recently, Sun et al had developed g-C 3 N 4 using the thermal polymerization process of urea for 4 h at 550°C and then ultrasonicated the solution for 30 min [64]. Thereafter, SnS 2 was synthesized on g-C 3 N 4 nanosheets by solvothermal technique for 12 h at 180°C with the help of thioacetamide and stannous chloride (as a precursor) to acquire a g-C 3 N 4 /SnS 2 mixture for NO 2 gas sensing. During the synthesis process, the different concentrations of g-C 3 N 4 (5, 10, and 15 wt%) were taken in the SnS 2 matrix. The preparation process of g-C 3 N 4 /SnS 2 heterostructures can be seen in the schematic diagram ( figure 1(a)). It was noticed that the SnS 2 microsphere was well-dispersed on the loosely integrated hierarchical nanosheets, as shown in figure 1 In another report, Meng et al reported g-C 3 N 4 nanosheets sensitized ZnO-rGO composites for ethanol sensing [88]. The electrostatic self-assembly and ultrasonic dispersion method were adopted to synthesize the 2D graphene oxide (GO)-hybridized g-C 3 N 4 composite. Afterward, a hydrothermal process was used to coat ZnO nanoparticles on GO/g-C 3 N 4 , and subsequently, GO was reduced into rGO (figure 2(a)). The SEM image of the final product can be seen in figure 2(b). Tian et al have grown Pt/ZnO/g-C 3 N 4 composite for detection towards NO 2 and ethanol [89]. The schematic diagram of the growth process for Pt/ZnO/g-C 3 N 4 composite is shown in figure 2(c). Pyrolysis of dicyandiamide led to the growth of bulk g-C 3 N 4 after exposure for 4 h at 520°C. Later on, bulk g-C 3 N 4 was thermally exfoliated and formed g-C 3 N 4 nanosheets after 8 h of heat treatment at 500°C in a vacuum furnace. The SEM image of ZnO nanorods fabricated on g-C 3 N 4 nanosheets is shown in figure 2(d).
The usage of metal oxide/g-C 3 N 4 composite-based gas sensors has been extensively investigated. For instance, Wang et al developed a ZnO/g-C 3 N 4 composite for the recognition of NO 2 gas [89]. In this process, the calcination (dicyandiamide at 550°C) and hydrothermal methods were used to synthesize g-C 3 N 4 , and ZnO, respectively. They dispersed bulk g-C 3 N 4 in 30 ml of DI water and ultrasonicated for 2 h. Then, 100 mg of synthesized ZnO powder was incorporated into the above solution and appropriately dissolved. Eventually, the final product was calcined for 2 h at 400°C to achieve ZnO/g-C 3 N 4 having 5, 10, and 15 wt% concentration of g-C 3 N 4 .
Additionally, the exfoliated g-C 3 N 4 /graphene composite can be synthesized via the probe sonication method, where graphene powder is a precursor. Ta et al constructed an Ag@rGO/g-C 3 N 4 layered structure through three stage-process for detecting NO 2 [90]. Firstly, melamine was heated at 550°C for 4 h under an ambient atmosphere to produce g-C 3 N 4 . Then following the Hummers' method, the formed rGO and g-C 3 N 4 were combined in distilled water and subsequently stirred and ultrasonicated for 3 h. In the last stage, the addition of AgNO 3 (source of Ag) and NaBH 4 (a reducing agent) in the above solution produced Ag@rGO/g-C 3 N 4 composite.

Gas sensing mechanism of g-C 3 N 4 based sensors
This section highlights state of art in toxic and flammable gas detection using g-C 3 N 4 and its composite-based sensors. The g-C 3 N 4 nanosheets can be considered as a principle part of a gas sensor and surface modifier when incorporate with other nanomaterials.
Firstly, the sensing mechanism of a pure g-C 3 N 4 based sensor for the detection of toxic and flammable gases has been reviewed. Moreover, high adsorption energy and unique surface morphology of g-C 3 N 4 promote the high sensing response. The excellent charge transfer properties of g-C 3 N 4 during the interaction of different target gas molecules appreciably rely on the kind of conductivity. For example, Li et al investigated the sensing characteristics of nanoporous carbon nitride fibers towards the detection of NO 2 gas [87]. The gas sensing behavior towards reducing and neutral gas is elucidated in the schematic diagram in figure 3. It is proposed that the sensing mechanism can be understood via the self-protonation of g-C 3 N 4 nanosheets. After self-protonation of g-C 3 N 4 occurs, the process of oxidation takes place. Very interestingly, after the pretreatment effect of g-C 3 N 4 with H 2 SO 4 , it is observed that the protonation of p-type g-C 3 N 4 increases drastically.
Further, high-temperature annealing of g-C 3 N 4 leads to changes from SO 4 2− to SO 3 . To acquire the electron acceptors like oxygen-containing groups (for example, C=O and O=C-OH) on the g-C 3 N 4 surface, an oxidation process is needed. Thus, more positive charges are accumulated on the surface due to electron acceptors. For example, the resistance of the surface decreases when p-type g-C 3 N 4 interacts with NO 2 or other similar gases, which withdraw electrons. The reduced resistance demonstrates enhanced p-doping of g-C 3 N 4 . Carbon nitrides, in general, contain amino groups that tend to attract oxygen molecules [33]. When NO 2 molecules interact with amino groups in g-C 3 N 4 , they capture more electrons because of higher electronegativity as compared to carbon atoms. Thereafter, the process of charge transfer takes place from the N atom of g-C 3 N 4 to that of NO 2 gas. Consequently, positive charge vacancy is created in g-C 3 N 4 , which leads to more p-type conductivity in g-C 3 N 4 . Afterward, NO 2 will react with the H 2 O molecules in the atmospheric air and form HNO 3 . As a consequence, this reaction could protonate g-C 3 N 4 in the course of the adsorption process. In contrast, the surface resistance increases because of diminished p-doping in g-C 3 N 4 during the interaction of reducing gases (acetone, ammonia) with g-C 3 N 4 . However, the charge scattering effect becomes dominant due to physisorbed molecules at the surface of g-C 3 N 4 under the exposure of neutral gas (hexane or ether). Therefore, the overall resistance of the surface of g-C 3 N 4 increases by the charge scattering effect. Hence, the large pore area, pore-volume, and surface area of pure g-C 3 N 4 are responsible factors for improving the sensing response [29,58,60,91]. Nevertheless, g-C 3 N 4 could be combined with metal and metal oxide to further enhance gas sensing properties. The gas sensing mechanism of g-C 3 N 4 /metal oxide/2D nanomaterials-based composite has been illustrated in the next section. There are several reports on g-C 3 N 4 /metal oxide composite-based gas sensors. For instance, Meng et al developed a ternary nanocomposite based on ZnO/rGO/g-C 3 N 4 for ethanol sensing [88]. Their sensor exhibited an excellent response of about 178 (R a /R g ) towards 100 ppm ethanol at 300°C along with a detection limit lower than 500 ppb, which was around 9-folds and 2-folds greater than pure ZnO and ZnO/rGO samples, respectively. Figure 4(a) shows the repeatability measurement of ZnO/rGO/g-C 3 N 4 nanocomposites-based sensors and exhibited almost the same responses for three consecutive cycles towards 100 ppm ethanol at 300°C . They also performed the selectivity test for various gases (100 ppm concentration for each gas) with the sensor at 300°C, as shown in figure 4(b). Surprisingly, the sensor displayed high selectivity to ethanol compared to other interfering gases. Their sensors (both pure ZnO and nanocomposite) were also tested for long-term stability (up to 14 days) under the same operating conditions and indicated that the sensor based on ZnO/rGO/g-C 3 N 4 nanocomposite revealed high stability with slight fluctuations at temperatures >150°C ( figure 4(c)). These ternary composites-based sensors showed a higher gas sensing response to ethanol due to its small size, the high catalytic activity of g-C 3 N 4 , and excellent electron conductivity. The gas sensing mechanism of the ZnO/rGO/g-C 3 N 4 nanocomposite-based sensor has been explained in figure 4(d). The small size effect of ZnO contributes to the sensitization. Interestingly, when the morphology of ZnO was transformed from bulk sheet to nanoparticles (less than 20 nm), the sensing response was increased drastically. The significant change in the resistance occurred for sensing film when the depletion layer enclosed the complete particle and formed fully depleted throughout the interaction with gas molecules. Besides, the excellent electron conductivity of rGO additionally assists with more detection capabilities. Moreover, the development of p-n heterojunctions at the interface of ZnO and rGO prompts the expulsion of more electrons from the conduction band of ZnO. Thus, the total resistance of nanocomposite is modified to a large extent. Apart from this, the sensitivity was enhanced by the homogenous coating and electronic sensitization mechanism of g-C 3 N 4 . They also described that the existence of N-atoms imparts more electrons for g-C 3 N 4 that increase an electron density in the sensing film. Under high-temperature operation, the electron-hole pair generation improved due to the wide band-gap of g-C 3 N 4 . As a consequence, electron movement from the conduction band transforms the O 2 molecules to oxygen ions species (O 2 − , O − , and O 2− ). On the other hand, the 2D/2D heterojunction interface between rGO and g-C 3 N 4 allows more electrons to drift to the ZnO and does not reduce the resistance instantly. Thus, an appreciable change in the resistance is registered during the interaction with the target gas resulting in more sensitivity. The enhanced sensing response of ZnO/rGO/g-C 3 N 4 nanocomposite-based sensor towards ethanol was mainly attributed to the combined effects of the small size of ZnO, excellent electron conductivity of rGO, p-n heterojunctions effect between ZnO and rGO, and improved electron-hole generation due to the wide band-gap of g-C 3 N 4 under high-temperature operation [88,92]. Recently, Sun et al developed a 2D/2D heterojunction based on a g-C 3 N 4 /SnS 2 sensor to support the detecting execution of SnS 2 towards the NO 2 detection at room temperature [64]. Their pristine SnS 2 sensor was inefficient while operating at room temperature.
Interestingly, the g-C 3 N 4 /SnS 2 -based sensor showed a high response (503%) and a small recovery time (166 s) to 1 ppm NO 2 at room temperature. For repeatability measurements, the sensor based on 10% g-C 3 N 4 /SnS 2 was studied for 1 ppm NO 2 gas up to 4 cycles ( figure 5(a)). Interestingly, the results for all cycles were almost the same, and the sensor exhibited identical sensing response and recovery time. A selectivity measurement was performed for several gases to investigate further the performance of the 10% g-C 3 N 4 /SnS 2 based gas sensor, as shown in figure 5(b). Their sensor showed high selectivity towards NO 2 gas in comparison to other gases (C 2 H 5 OH, CH 4 , CO, NH 3 , and H 2 S) for 1 ppm concentration at room temperature. Moreover, the 10% g-C 3 N 4 /SnS 2 based sensor was investigated for long-term stability up to 3 months. Their sensor showed minor fluctuations in sensing response (526±31%) as well as recovery time (161±12 s) which means that the sensor had appreciable long-term stability ( figure 5(c)). The sensing mechanism was explained using the band diagram of g-C 3 N 4 and SnS 2 , displayed as the band alignments before and after contact between both nanomaterials in figure 5(d). The work function of g-C 3 N 4 (4.34 eV) is smaller as compared to SnS 2 (5.02 eV) which means the Fermi level of g-C 3 N 4 is higher than SnS 2 . When both materials are combined together, the electron moves from g-C 3 N 4 to SnS 2 until the Fermi level aligns to the same energy state. As a consequence, the formation of 2D/2D heterojunctions occurs at the interface of g-C 3 N 4 and SnS 2 . Thus, the development of a large interfacial area at the interface of both nanomaterials makes it easier for electron movement from g-C 3 N 4 and SnS 2, which enhances electron transfer at the 2D/2D heterojunctions (due to face-to-face contact of heterojunctions). This enhanced electron transfer process in heterojunctions further boosts carrier mobility. On that account, the g-C 3 N 4 /SnS 2 based sensor showed good recovery during the exposure of NO 2 . Besides, the enhanced electron transfer process will lead to the accumulation of more electrons in SnS 2 and hence, decreases the resistance of SnS 2 . Thus, the reduction in the resistance of SnS 2 is more favorable for NO 2 sensing at room temperature with high sensing response [93]. Additionally, the presence of a large specific surface area in the g-C 3 N 4 /SnS 2 heterostructures provides more reaction sites for incoming NO 2 gas molecules during the adsorption/ desorption process. Moreover, the combination of both these nanomaterials (g-C 3 N 4 and SnS 2 ) can diminish the activation energy needed in NO 2 desorption and decrease the recovery time. More prominently, the enhanced specific surface area of these 2D/2D heterostructured microflowers allows more adsorption of NO 2 gas. These combined effects improved the sensing response towards NO 2 gas at room temperature.  test, (b) selectivity test, and (c) long-term stability (up to 3 months) of 10% g-C 3 N 4 /SnS 2 to 1 ppm NO 2 at room-temperature (d) Band diagrams of g-C 3 N 4 /SnS 2 based sensor before and after equilibrium and their corresponding sensing mechanism. Reproduced from [64], © IOP Publishing Ltd. All rights reserved.

Techniques for improvement of the gas-sensing performance of g-C 3 N 4 based sensors
As discussed in the previous section, the 2D g-C 3 N 4 nanosheets have already registered their presence in the area of gas sensors by monitoring numerous toxic and hazardous environmental gases. These nanosheets can be considered reliable gas sensors attributed to their excellent structural as well as electronic properties. However, the fabrication of high-performance gas sensors using a pure form of g-C 3 N 4 still has some unresolved challenges due to its incomplete recovery and poor sensing response, which limits its practical uses. On that record, different methods have been adopted by researchers to boost the sensitivity and selectivity of g-C 3 N 4 based gas sensors. There are some efficient approaches such as doping, functionalization of noble nanoparticles, and nanocomposite of different material with g-C 3 N 4 to improve the gas sensing performance as listed below:

Doping
Introducing defects such as semiconductor, graphene, and metals into g-C 3 N 4 could restructure the morphology of g-C 3 N 4 in different forms (nanorods, nanosheets, mesoporous structure, and hierarchical structures). These morphologies and structures greatly influence the electronic, physical, and chemical properties of g-C 3 N 4 and its applications. Moreover, it has been observed that the doping of metallic and nonmetallic elements in the bulk form of g-C 3 N 4 creates a defects state in the forbidden band which reduces the bandgap energy [94]. Additionally, g-C 3 N 4 nanosheets are extensively used as gas sensors owing to their high adsorption capability, non-toxicity, cost-effectiveness, and excellent electrical conductivity. It was noticed that the transition metal dopants substantially affect the adsorption capability of target gas molecules when embedded with g-C 3 N 4 . This effect is caused by the presence of more active sites on the g-C 3 N 4 surface and with high adsorption energies due to which, the gas sensing properties of g-C 3 N 4 can be improved.
For example, Zhang et al investigated metal-doped g-C 3 N 4 for highly sensitive NO 2 sensors by using density functional theory (DFT) calculations [95]. They considered several metal-doped (V-, Ag-, Ti-, Au-, Pd-, Co-, Pt-, Cr-, Mn-, Cu-, Na-, Fe-, Li-, K-) g-C 3 N 4 sheets. It was found that the NO 2 , CO, N 2 , CO 2 , NH 3 gas molecules adsorbed on metal-doped g-C 3 N 4 through chemical bonds. Charge transfer complexes arose when the chemisorbed gas molecules interacted with metal-doped g-C 3 N 4 . As a consequence, different charges were transferred from metal-doped g-C 3 N 4 to gas molecules. Later on, pure and metal-doped g-C 3 N 4 sheets were investigated as prime captures for specific gas molecules as per the adsorption energy, the density of states, and isosurface of electron density difference (displayed in figures 6(a)-(e)). Among all metal-doped g-C 3 N 4 sheets, K-, Na-, Ag-, and Li-doped g-C 3 N 4 were considered sensitive towards NO 2 gas. Moreover, it was found that the adsorption energies between NO 2 gas and K-, Ag-, Li-, and Na-doped g-C 3 N 4 were remarkably higher than those of the other target gas molecules (CO 2 , CO, NH 3 , and N 2 ). The positive shifts of the density of state and formation of new electron states at Fermi level for NO 2 gas molecules/Ag-, K-, Na-, and Li-doped g-C 3 N 4 validated the outstanding selectivity of Ag-, K-, Na-, and Li-doped g-C 3 N 4 for NO 2 gas [95]. In addition to this, charge transfer results further indicate the presence of chemical interactions between NO 2 and K-, Ag-, Li-, Nadoped g-C 3 N 4 .
Similarly, Zhou et al studied the adsorption behavior of CO 2 on the surface of g-C 3 N 4 with W-, Mo-, and Cr-elements using the DFT calculations [96]. Their results suggested that the conductivity of systems was highly enhanced by W-, Mo-, and Cr-doping. Thereafter, they established the E ads as: Cr (E ads = −0.18 eV) < W (E ads = −1.1 eV) < Mo (E ads = −1.2 eV). Thus, it can be summarized that the interaction energy between CO 2 and Mo-doped g-C 3 N 4 based system is quite negative (Mo (E ads = −1.2 eV)) as compared to other systems (Cr (E ads = −0.18 eV) and W(E ads = −1.1 eV)). Recently, Zhu et al investigated the adsorption of CO 2 gas molecules on pure g-C 3 N 4 and B-doped g-C 3 N 4 by utilizing DFT computations [97]. Their results revealed that the B-doped g-C 3 N 4 system is more selective towards the CO 2 gas molecules than the pure g-C 3 N 4 . In another study, Sethuraman et al synthesized Nb-doped urea blended melamine derived g-C 3 N 4 (200Nb-UMCN) nanosheets [98]. In this synthesis approach, they used a 5:1 ratio of urea and melamine doped with different amounts of Nb precursor (100, 200, and 300 mg) followed by pyrolysis at 550°C for 3 h. Thereafter, the sensors based on Nbdoped UMCN were used for the detection of NH 3 at room temperature. However, they noticed that the sensor based on 200 Nb-UMCN showed higher sensitivity (76%), fast response (6 s), and recovery time (29 s) as compared to other fabricated sensors towards 50 ppm NH 3 at room temperature. Therefore, the metal-doped g-C 3 N 4 can be considered as a favorable candidate for the detection of particular gas molecules.

Surface functionalization
The efficient properties of 2D-g-C 3 N 4 nanomaterials can be very well utilized and further explored using the process of surface functionalization (primarily using noble nanoparticles such as Au, Pd, and Pt) [27,99]. These noble nanoparticles show high catalytic activity towards the incoming oxygen molecules. During the interaction of oxygen molecules with noble nanoparticles, the oxygen molecules are catalytically activated and converted into oxygen atoms. Therefore, these oxygen atoms are dispersed over the sensor surface and capture electrons from the conduction band of g-C 3 N 4 to create chemisorbed oxygen ions. This phenomenon is known as the spill-over effect [57,100]. When gas molecules are exposed to these chemisorbed oxygen ions on the surface of the sensor, they react with it and liberate the electrons which return to the conduction band of g-C 3 N 4 . Moreover, these noble metal nanoparticles provide more active sites to the incoming gas molecules, which results in the further enhancement in the sensing response at lower working temperatures. These functionalized noble metal nanoparticles on g-C 3 N 4 nanosheets stimulate the adsorption/desorption behavior for incoming oxygen molecules. The different applications of g-C 3 N 4 in gas sensing can be studied in detail by functionalizing it via different chemical and physical routes. The surface functionalization enables the device to be more selective towards particular gas molecules.
Tian et al synthesized ZnO nanorods on the surface of exfoliated g-C 3 N 4 nanosheets by using microwaveassisted hydrothermal technique [89]. Thereafter, they deposited Pt nanoparticles and obtained Pt/ZnO/g-C 3 N 4 nanostructures as displayed in the TEM image ( figure 7(a)). Their sensor based on Pt/ZnO/g-C 3 N 4 nanostructures showed enhanced sensitivity, fast response/recovery time, and good selectivity towards NO 2 and ethanol. The transient response curve indicates that the Pt/ZnO/g-C 3 N 4 nanostructures are concentration-dependent for NO 2 in figure 7(b). Thereafter, they observed good selectivity for Pt/ZnO/g-C 3 N 4 nanostructures sensor towards NO 2 and ethanol for 10 ppm NO 2 at different temperatures ( figure 7(c)). Gas sensing response was explained by excellent charge carriers transport and improved electron-hole pair separation of Pt/ZnO/g-C 3 N 4 nanostructures (figures 7(d)-(e)).
The energy band diagram and the flow direction of charge carriers (electrons and holes) can be seen in figure 7(d). When air interacts with the Pt/ZnO/g-C 3 N 4 nanostructures, the chemisorbed oxygen ions are formed on the Pt nanoparticles of ZnO due to the electron's movement. This leads to the formation of a large number of oxygen ions on the sensor's surface. However, when reducing gases (like e.g. ethanol) are exposed to the sensor's surface, then these oxygen ions react with the ethanol and releases electrons to form an electron accumulation layer. Therefore, the resistance of the sensor based on Pt/ZnO/g-C 3 N 4 nanostructures is sharply reduced. In contrast, exposure of NO 2 on the sensor's surface will lead to more extraction of electrons from the conduction band of ZnO, which leads to the formation of an electron depletion layer on the surface. As a result, the resistance of the sensor is considerably increased. Thus, the sensing response of the Pt/ZnO/g-C 3 N 4 nanostructures-based sensor increased for both NO 2 and ethanol. In another report, Ibrahim et al fabricated a Pd/g-C 3 N 4 gas sensor for enhancing the sensitivity to hydrogen [71]. They utilized ammonium tetrachloropalladate as a precursor of Pd metal nanoparticle along with a reducing agent. The fabrication steps for Pd/g-C 3 N 4 based sensor via screen printing technique are shown in figure 8(a). The Pd nanoparticles can be clearly seen in the TEM image of Pd/g-C 3 N 4 ( figure 8(b)). Therefore, they identified the H 2 gas utilizing a Pd/g-C 3 N 4 based sensor and observed an increase in the sensitivity with the gas concentration, as displayed in figure 8(d). Furthermore, the gas sensing mechanism of Pd/g-C 3 N 4 based hydrogen gas sensor was explained by the catalytic activity of Pd nanoparticles on the sensor surface ( figure 8(c)).
Raghu et al fabricated Pd nanoparticle dispersed g-C 3 N 4 composite (Pd/g-C 3 N 4 ) as a room-temperature hydrogen sensor [63]. They synthesized g-C 3 N 4 using pyrolysis of melamine, and subsequently, Pd nanoparticles were dispersed on g-C 3 N 4 via polyol reduction technique. Their sensor was found to be highly sensitive (99.8%) and with a response time∼of 88 s towards 4% H 2 gas at room temperature. In another study, Karthik et al developed g-C 3 N 4 decorated TiO 2 nanospheres composites thin films by spray pyrolysis technique [58]. Thereafter, pure and composite forms of both nanomaterials-based sensors were performed for the detection of different concentrations (0-1500 ppm) of CO 2 and H 2 S gas. It was observed that the sensor based on 10 wt% g-C 3 N 4 decorated TiO 2 composite exhibited higher sensing response (88%) and good stability (only decreased 2.5% of initial response) under the exposure of CO 2 (1500 ppm) at 450°C. The enhanced sensing response was explained by combined effects of high conductivity (due to the presence of g-C 3 N 4 ), high porosity (15.7 nm), large surface area (108.5 m 2 g −1 ), and interconnection between TiO 2 spheres and g-C 3 N 4 nanosheets.

g-C 3 N 4 nanocomposites
It has been investigated that g-C 3 N 4 /metal oxide composite-based gas sensors exceptionally enhance the sensing response due to its fast charge transport, high catalytic activity, and combined effects of g-C 3 N 4 and metal oxide. For example, metal oxide coated on g-C 3 N 4 (e.g. Fe 2 O 3 /g-C 3 N 4 , and SnO 2 /g-C 3 N 4 ) has shown the creation of local heterojunctions that exhibited good sensing response towards gas molecules [29,57,58,61,62,101].
Hang et al prepared g-C 3 N 4 nanosheets to enhance the gas detecting capabilities of graphene [102]. They adopted a proton-enhanced liquid-phase exfoliation method to exfoliate the g-C 3 N 4 nanosheets (NS-CN) from bulk powder. The different amount (0%-90%) of as-prepared g-C 3 N 4 was incorporated in graphene solution and then ultrasonicated to form a graphene/g-C 3 N 4 nanocomposite (G/NS-CN). AFM images of exfoliated NS-CN on SiO 2 substrate and the height profile of the nanosheets are displayed in figure 9(a). SEM images of G/20% NS-CN demonstrate the successful fabrication of exfoliated NS-CN ( figure 9(b)). Surprisingly, it was found that the G/NS-CN composite-based sensor exhibited a higher sensing response as compared to pure graphene sensor under similar operating conditions, as depicted in figures 9(c)-(d). However, it was also observed that only an optimum amount as the weight ratio of NS-CN/graphene was responsible for increased sensing response. They noticed that the sensor based on 15 wt% of NS-CN showed a higher sensitivity to NO 2 gas. Figure 9(e) displayed the schematic diagram of the sensing mechanism of G/NS-CN and their respective band diagram.
Very recently, Absalan et al have synthesized Pd/SnO 2 /porous g-C 3 N 4 with different content of g-C 3 N 4 and Pd using the hydrothermal technique for the detection of CO gas [100]. The FESEM and TEM results indicated that the porous g-C 3 N 4 nanosheets enabled the large surface area for the deposition of SnO 2 nanoparticles and the creation of a heterogeneous nanocomposite ( figure 10(a)). Only 5%Pd/SnO 2 /5%g-C 3 N 4 based composite sensor among different weight ratios of Pd/SnO 2 /g-C 3 N 4 showed the superior CO sensing performance like short response/recovery times and high response at 125°C (figures 10(b)-(c)). The long-term stability of 5%Pd/SnO 2 /5% g-C 3 N 4 based sensor was measured for 1000 ppm CO at 125°C up to 15 days ( figure 10(d)). These results suggested a minor drop in the sensing response over a period of 15 days. Their sensor was further analyzed for repeatability test for 1000 ppm CO at 125°C for 4 cycles as shown in figure 10(e). Interestingly, the sensing response of the sensor for all 4 cycles was almost the same and revealed its repeatable characteristics. Furthermore, the effect of relative humidity (15%-85%) on sensing response was evaluated for 5%Pd/SnO 2 /5%g-C 3 N 4 sensor towards 1200 ppm CO at 125°C (figure 10(f)). It was noticed that the sensing response remained almost constant throughout the different ranges of relative humidity. However, a slight decrease in the response was observed due to the adsorption of a small amount of water molecules on the surface of the sensor, which further blocks the oxygen molecules [103]. In addition to these, their sensor was highly selective for CO as compared to other interfering gases (ethanol, acetone, CH 4 , CO 2 , HCHO, and NH 3 ) under the same operating conditions ( figure 10(g)). Additionally, The improved gas sensing performance of the nanocomposite-based sensor was described by the spill-over effect of Pd nanoparticles, the large surface area of porous g-C 3 N 4 , and the formation of heterojunctions between g-C 3 N 4 and SnO 2 , as shown in figures 10(h)-(i).
Very recently, Akhtar et al have synthesized pure CuO and g-C 3 N 4 /CuO nanocomposites (with a different weight ratio of g-C 3 N 4 and CuO) via hydrothermal route for the detection of various volatile organic compounds (VOCs) [104]. When different VOCs are exposed on the 4 wt% g-C 3 N 4 /CuO (S-3) nanocomposite based sensor, the highest sensing response (143.7 to 1000 ppm towards acetone) as well as selectivity (approx. 14.37 towards 1000 ppm acetone/1000 ppm ammonia) was achieved. Moreover, their sensor (S-3) showed a fast response (17 s) and recovery time (24 s) for 1000 ppm of acetone. They suggested that the decoration of CuO nanoparticles on g-C 3 N 4 sheets increased the specific surface area of the nanocomposite, which could be a possible reason for enhanced sensing response. Li et al prepared g-C 3 N 4 /ZnO composite via the precipitationcalcination method, where g-C 3 N 4 nanosheets were decorated on petals of ZnO flower-like structure [60]. Then their pure and composite sensor was investigated for the detection of CH 4 . Interestingly, it was noticed that g-C 3 N 4 /ZnO-based sensor (CNZ-3 contains 3wt% g-C 3 N 4 in ZnO) exhibited higher sensing response (11.9) as compared to pure ZnO sensor (5.3) towards 1000 ppm CH 4 at 320°C. Moreover, their CNZ-3 sensor showed a fast response (15 s)/recovery time (28 s) and excellent long-term stability. The improved sensing response was due to the presence of pore structure, large surface area, and formation of g-C 3 N 4 /ZnO n-n junction. In another study, Chu et al prepared g-C 3 N 4 -WO 3 composite via hydrothermal route for the detection of acetone [29]. Their results suggested that the incorporation of optimum content of g-C 3 N 4 into WO 3 would improve the sensing response as well as selectivity to acetone. They found that the 2 wt% g-C 3 N 4 -WO 3 composite-based sensor showed a good sensing response (58.2) towards 1000 ppm acetone at 310°C. A summary of some of the investigations on gas sensing properties based on g-C 3 N 4 based nanocomposites is listed in table 3.

Conclusion and future perspectives
The current technological signs of progress have set up a new direction to develop high-performance g-C 3 N 4 based gas sensors. However, these advancements are as yet in their developing stage, and a lot of examination and research is expected to advance them to a stage where they can be deployed as commercial sensors. Regardless of the ideal properties of g-C 3 N 4 for developing superior gas sensors, the pre-eminent challenge to transform them into practical proof-of-concept applications still remains to be addressed. Therefore, an attentive expansion in synthesis techniques is needed to explore the entire potential of g-C 3 N 4 based gas sensors.
In this review, a brief summary of g-C 3 N 4 based gas sensors has been presented for the detection of toxic and flammable gases. The g-C 3 N 4 has a large specific surface area (provides more active sites to gas molecules), high porosity, excellent catalytic activity, and can combine easily with metal oxide. These properties enable improvement in gas sensing performance. It is noticed that most of the g-C 3 N 4 used for sensing application were Figure 10. (a) The FESEM images of 5%Pd/SnO 2 /5% g-C 3 N 4 (b) sensing response of Pd/SnO 2 /g-C 3 N 4 based sensors with various amounts of Pd and g-C 3 N 4 to 1000 ppm CO under different working temperature (c) normalized response of different sensors versus CO concentration at 125°C (d) long-term stability, and (e) repeatability measurement of 5%Pd/SnO 2 /5%g-C 3 N 4 based sensors towards 1000 ppm CO at 125°C (f) relative humidity test of 5%Pd/SnO 2 /5%g-C 3 N 4 based sensors towards 1200 ppm CO at 125°C (g) selectivity histogram of 5%Pd/SnO 2 /5% g-C 3 N 4 based sensor for 1000 ppm CO and 4000 ppm concentration of different gases at 125°C (h)-(i) schematic representation for energy band diagram of n-SnO 2 /n-C 3 N 4 heterojunction and CO sensing mechanism. Reprinted from [100], © 2019 Elsevier B.V. All rights reserved. prepared by the pyrolysis method. Moreover, several other techniques (arc deposition, laser ablation, ion beam deposition, chemical vapor deposition, sputtering, and microwave plasma) could be employed for the synthesis of g-C 3 N 4 . In addition to this, numerous surface modifications and composites with g-C 3 N 4 are still to be investigated for the detection of various gases. In order to improve the selective detection, limit of detection, and sensitivity of g-C 3 N 4 based gas sensor, the optimum amount of dopant concentrations/different composites/ functionalized noble nanoparticles should be incorporated in the pure g-C 3 N 4 . There are various other materials (ZIFs, COFs, MOFs, conducting polymers, CNTs, and MoS 2 ) that can be combined with g-C 3 N 4 to form nanocomposite-based gas sensors. Moreover, gas sensing can be performed under the irradiation of visible light because of the semiconducting nature of g-C 3 N 4 , which is also a significant advantage of using it. Till now, there are only a few reports available on UV-activated gas sensing by g-C 3 N 4 based sensors. Very interestingly, g-C 3 N 4 can be deposited on flexible substrates such as polyimide or polyethylene terephthalate that may be used for the fabrication of wearable gas sensors for real-time monitoring of gas molecules in the ambient environment. Thus, such types of organic semiconductors like g-C 3 N 4 will have enormous possibilities for fabricating low-cost, portable, high-performance, and IoT integrated gas sensing devices for the detection of toxic and flammable gases.