Conducting Polymer Based Ammonia and Hydrogen Sulfide Chemical Sensors and Their Suitability for Detecting Food Spoilage

Food security is critical for the sustainability of society. The spoilage of stocked food is an ongoing problem that causes significant losses to the global economy. Novel portable analytical platforms that provide timely information on the condition of food stock can support informed decision‐making on the safety of food consumption as well as on maximization of food storage lifetime. Ammonia (NH3) and hydrogen sulfide (H2S) are two of the major harmful gases that are produced due to bacteria activity during the food spoilage process. The timely detection of these gases in food stocks has vital importance to human health. In this review article, the recent progress of conducting polymer based NH3 and H2S gas sensors including sensor device prototypes, their sensing mechanisms, materials and methodologies for sensor fabrication, and their suitability for the development of consumer electronic devices for food spoilage detection are highlighted.


Introduction
Food is an essential need of human life and the suitability of food for human consumption is of critical importance. The production of food, its transportation, storage, and consumption constitute a systematic supply chain process and food spoilage may occur either during production, transportation and shelflifetime or during consumer storage-lifetime. Food spoilage is a critical global issue and there is a necessity to develop devices for monitoring food quality and its safety for consumption. [1] If food spoils before its specified expiry time, it may cause serious due to food spoilage processes. The interdigitated (IDT) sensor in Figure 1 symbolizes various types of sensors used in the early detection of food spoilage and the sensed signal is processed by a dedicated microcontroller-based system and the results are transferred to a consumer's mobile phone with a recommendation about whether the food is safe to consume. This can be easily extended to a cloud-based system for tracking, monitoring and improving food packaging and shelf-lifetime. Such an integrated sensor system could be implemented in a future sensing network at mega food markets and retailer shops to monitor food quality and food security.
There are different types of food sensors based on various techniques including conductometry, visual spectrometry, ultraviolet spectrometry, infrared, and Raman spectrometry that have been used for detecting food spoilage at very early stages. The materials used for developing these sensors include inorganic materials as well as organic materials, where conducting polymer-based organic materials play a vital role in food sensing technology. One of the main requirements for consumer-end food spoilage detection sensors is flexibility in order to integrate them into the smart food-packing material without much modification to the package. Therefore, we initially investigate flexible sensors for food spoilage detection. Metal-organic frameworks (MOF) are another class of synthetic materials [10] that are currently being investigated for developing highly sensitive gas sensors and their suitability and applicability in food spoilage sensing will also be briefly discussed in this review. Then conducting polymer-based NH 3 and H 2 S sensors from the recent literature are reviewed and compared with the goal of identifying their suitability for developing consumer-end devices capable of detecting the early-stages of food spoilage.
The percentage sensor response of resistive gas sensors is defined as ((R g − R a )/R a ) × 100% [11] where R g is the resistance of the sensor under target gas and R a is the resistance under atmospheric air however, in some literature authors have reported the sensor response as R g /R a . The response time is the time taken to change the sensor output from R a to 90% of R g and the recovery time is the time taken to change the sensor output from R g to 10% of R g . Sensitivity is the gradient of the graph of sensor response vs concentrations of the analyte or the change in response per unit change in concentration of the analyte. The ideal values for response and recovery times, limit of detection (LoD) and sensor response are dependent on whether they are used by the consumer, wholesaler, retailer, transporter, or the producer. Best values for sensor sensitivity, LoD, response time and recovery time are all dependent on the sector where it is being used and the food under investigation. [12] The recommended response time for a consumer device according to Nielson [13] is 10 s however, in this review we have considered sensors with response times up to 30 s are suitable for food spoilage detection devices to be used by the customers. Section 2 of this review provides an overview of flexible sensors for food spoilage detection and integration of flexible sensors into food packaging systems. This is followed by a brief review on the application of metal organic frameworks (MOFs) for food spoilage sensors in Section 3. Detailed reviews of polyaniline and poly pyrrole based NH 3 sensors are outlined in Section 4 followed by H 2 S sensors in Section 5. Section 6 discusses the advantages and disadvantages of different materials and methods used by various sensors which is then followed by the conclusion section.

Flexible Sensors for Food Spoilage Detection
Flexible gas sensors based on conductive polymer films have emerged as wearable sensing devices due to their high transparency, tunable physical properties, ease of fabrication, and capability to be micropatterned with inkjet printing techniques at room temperature. [14][15][16] Extensive research has been carried out to improve the sensitivity of gas sensors, in particular to detect low levels of the analyte. This has been achieved through the synthesis of various nanostructured conductive polymers in the form of tubes, rods, wires, fibers, and physical mixing of conductive polymers with conductive nanomaterials such as graphene, carbon nanotubes, and silver nanowires. Carbon nanotubes (CNTs) and nanowires have demonstrated stable room-temperature NH 3 sensing performance in film-based flexible electronic gas sensors. [17][18][19][20] Printing is a simple and easy to use technique that has been applied in depositing thin films of conductive polymers and their nanocomposites for the fabrication of electronic devices. [21] In comparison to other sensor fabrication methods, printing has many advantages such as ease of use, low-cost, rapid prototyping, and the ability to print on flexible substrates including plastic, paper, fabric and other flexible material. Screen-printing or inkjet printing can also be used to print nanocomposite sensitive layers and patterned electrodes. [8] The integration of nanomaterial based sensors and wireless communication networks has become a powerful approach for gas sensing because of the enhanced sensitivity, remote accessibility and lower cost. There are several wireless technologies including radio-frequency identification (RFID), Bluetooth, and near field communication (NFC) exists in the market. RFID is a promising tool to develop portable, battery-free, low-cost, passive gas sensors where wireless capability has been applied to the incorporation of gas sensors to inspect food quality. [22] An RFID tag-fabricated on a flexible substate has been reported by Escobedo et al. as a multi-gas sensor for the detection of ammonia, carbon dioxide, oxygen, as well as humidity, while NFC technology was used to transfer data to a smartphone as shown in Figure 2. [23]

Wireless and Smartphone-Based Sensors
Hand-held electronic devices such as smartphones are gaining more attention in conducting real-time testing in healthcare, environmental and food quality monitoring due to beneficial properties such as being powerful, portable, reliable, and available to the general public. [9,24,25] Many routine laboratory tests require bulky instrumentation and trained personnel. Therefore, the main requirements of hand-held devices are low-cost, time efficiency and the ability to be used by the consumer. Smartphones with disposable sensors have the potential to bypass the professional laboratory testing with rapid on site analysis which can be done by anyone anywhere. [26,27] The use of smartphone-based sensors has greatly improved the scope of portable devices as point-of-care devices and food condition evaluation devices. [24,28] The rapid technological advances in smartphones allows them to implement software that works in tandem with a sensor for measurement and detection by taking advantage of a fast digital camera, multicore processor, visual display, battery and intuitive user interface. The phone and software can in principle process incoming data from sensors into meaningful information for the user and/or transmitted via Wi-Fi, Bluetooth, cellular data service etc., to cloud databases. [22] Various flexible sensors based on nanowires have been developed not only because of their electrical properties, but also due to their stability under bending, compression, and conformation into arbitrary shapes. Flexible nanowires have been applied to fabricate flexible strain devices, highly sensitive chemical sensors, and highly efficient energy generators. [29] Furthermore, nanowires because of their high surface-to-volume ratio enables the fabrication of high performance, rapid response and lowpower sensors. Tang et al. reported a fully integrated wireless system (smartphone-enabled sensor) based on an impedance response to measure NH 3 . [30] Polyethylene terephthalate (PET) substrates were utilized to fabricate conducting polymer nanowires using a capillary filling method as shown in Figure 3. A soft nano mold of parallel directional nanogrooves was fabricated on a Polydimethylsiloxane (PDMS) substrate using thermal nanoimprint lithography (NIL). The nanogrooves turned into parallel nanochannels after bonding to a plasma-treated PET substrate. The nanochannels were filled by introducing a few drops of poly (3,4-ethylenedioxythiophene):poly(styrenesulfonate) (PEDOT:PSS) at the edges of the nanochannels. The surface affinity of PET was improved via O 2 plasma treatment resulting in the enhancement of adhesive strength between the deposited films and the PET substrate. The PDMS mold was gently removed from the PET after evaporating the solvent, leaving ordered nanowires on the flexible substrate. A flexible chemiresistor gas sensor containing parallelly aligned nanowires was successfully fabricated through the deposition of the interdigitated electrodes (IDE) by evaporation at low pressure through a designed shadow mask. The prepared nanowires with robust flexibility and mechanical durability represented a facile, highly selective, and low power NH 3 sensor with a limit of detection (LoD) down to 100 ppb. In addition, a watch-type device was developed using a flexible printed circuit board (FPCB) to determine the sensor impedance and transfer the data by Bluetooth. This smartphone-integrated system can be applied as a portable sensor to detect trace levels of NH 3 found in food spoilage for rapid screening in daily life. [30] Li et al. presented devices based on pristine PEDOT:PSS films incorporated with silver nanowires (AgNWs) that is highly responsive to humidity but showed low sensitivity to ammonia are shown in Figure 4a. [15] On the contrary, the DMSO doped PEDOT:PSS sensors exhibited significantly improved sensitivity to NH 3 and nearly complete insensitive to humidity changes. The combination of AgNWs in the DMSO doped PEDOT:PSS film enhanced the sensitivity to ammonia. However, the insensitivity of the sensor to humidity changes was maintained. The PEDOT:PSS films were prepared through spin coating the PEDOT:PSS solution (containing 5% DMSO) onto the PET substrate followed by drying. The AgNW/ PEDOT:PSS composite films were prepared through spin coating an AgNW dispersion in IPA on the flexible PET substrate before depositing PEDOT:PSS. The PEDOT:PSS films showed a high sensitivity for detecting humidity due to the formation of H 3 O + PSS(SO 3 ) − after diffusion of H 2 O into the films. After introducing H 2 O to the PEDOT:PSS film, the distance between adjacent conducting PEDOT-rich domains increase and charge carrier transport decreases because of film swelling  Figure 4a). However, the DMSO doped PEDOT:PSS films demonstrated low sensitivity to humidity because of the dissociation between the PEDOT and PSS chains obtained from nitration of polar DMSO with both the negatively-charged PSS chains and the positively-charged PEDOT (Figure 4b). The conductivity of the PEDOT:PSS film decreases after adsorption of electron-donating NH 3 , which interacts with holes in the film, causing a decrease in the charge carrier mobility in the PEDOT domains. [15] The conductivity of the pristine PEDOT:PSS film is determined by the resistive PSS regions because the PEDOT is surrounded by PSS, resulting in low sensitivity to NH 3 . The DMSO-doped PEDOT:PSS films represent highly sensitive sensors for detecting NH 3 molecules in the lower limit of detection because of having larger PEDOT-rich domains. The combination of AgNWs and DMSO doped PEDOT:PSS films influenced the film's conductivity through the localized interfaces between the AgNWs and PEDOT domains. The contact resistance between the AgNWs and the PEDOT:PS was increased through the absorption of NH 3 molecules, causing a significant impact on the overall conductivity and enhancing the sensitivity to NH 3 . Finally, the fabricated sensors using different PEDOT:PSS polymers were integrated and incorporated with a near field communication (NFC) chip as a flexible system to detect both NH 3 and humidity. The schematic representations of these sensor fabrication processes are illustrated in Figure 4c. [15]

Smart Packaging
Intelligent/smart packaging can monitor the quality of food in real-time with various types of sensors including optical, colorimetric, chemical, and electrical. They provide information about food properties such as storage conditions, composition, and bacterial growth. [9] Gas indicators (GIs) are the most critical parts in smart packaging for the detection of biogenic amines, hydrogen sulfide (H 2 S) and carbon dioxide (CO 2 ) in order to evaluate meat spoilage. [31] Multifunctional sensors with the ability to detect ammonia and biogenic amine analytes resulting from the microbial decarboxylation of amino acids are needed to monitor meat and fish freshness, food pathogens, and contaminants. Ethylene sensors can be used for condition monitoring of the fruit ripening process, whereas carbon dioxide and oxygen sensors can be used as leak indicators. [32] GIs sensors are used often as a tablet, label, or a printed layer of a polymer film in the packaging.
Ma et al. reported a wireless highly sensitive polyaniline (PANI) based amine gas sensor with smartphone integration for food spoilage detection. [33] A nanostructured polyaniline film was polymerized using iron (III) p-toluene sulfonate hexahydrate as the dopant. The biogenic amines such as putrescine and cadaverine released from food spoilage results in a de-doping process in the conducting polymer film. Therefore, the resistivity of polyaniline increases remarkably in the presence of ammonia, putrescine and cadaverine. The incorporation of a highly resistive gas sensor based on PANI with near field communication (NFC) technology has emerged as a convenient smart mobile phone sensor. Micropatterns of the hydrogel were printed on NFC tags, where the resistance of PANI increases in the presence of amine gas. This PANI sensor acts as the resistive element of a tunable oscillator circuit on the NFC tag and when in the low resistance state (at low analyte concentrations) the oscillator turns off the NFC tag. Once the sensor resistance reaches the designated value (at analyte concentrations above the threshold value), the oscillator turns on and the NFC tag sends an alarm to the smart mobile phone (Figure 5). Therefor the PANI sensor acts as a digital switch which is dependent on the level of analyte. [33] Since this is a flexible sensor, it can easily be integrated into packaging material for food condition monitoring. . Schematic construction steps of a watch-type device using a flexible printed circuit board (FPCB) to determine trace NH 3 in food spoilage screening. Reproduced with permission. [30] Copyright 2019, American Chemical Society. The combination of a radio frequency identification (RFID) silicon chip and printed polymer sensors provides cost-effective smart packaging with internet-of-things (IoT) connectivity. The RFID silicon chip performs sensor signal acquisition, wireless energy harvesting, data processing and transmission through standard wireless interfaces. The printed polymer sensors can then be customized according to the packaging requirements. A 13.56 MHz chip with a multi-sensor interface was designed to prove the feasibility of the above concept. [34] The same conducting polymer PEDOT: PSS was used to fabricate ammonia sensors and anti-open sensors (special sensors to detect whether the package is opened or not) through printing processes. The flexible smart packaging is employed via integrating the RFID chip and the sensors onto a packaging film. A smartphone with appropriate software can then monitor product quality as well as the integrity of the packaging. [34] A polyaniline microdevice has also been prepared through oxidative polymerization, followed by deposition on a printed circuit board and finally fabrication of the sensor on an interdigitated electrode array to detect ammonia gas. [35] The humidity impact and ammonia sensitivity of this chemiresistive sensor was compared with a commercial gas sensor (Taguchi Model 826). The relationship between the response time of the sensor and ammonia gas concentration was found to be linear in the operating range (50-150 ppm) at room temperature. The results were also reliable under various humidity conditions. This sensor takes advantage of high sensitivity, flexibility, easy fabrication, low power consumption, rapid response and low cost in comparison with other polymer-based devices to evaluate meat spoilage. [35] A polyaniline/Zn-porphyrin (PANI/Zn-tpps4) composite has been reported in a flexible sensor for monitoring meat freshness in packaging. The PANI/Zn-tpps4 composite was synthesized via an electrodeposition process and applied as an ammonia sensor as shown in Figure 6. [36] The strong π-π conjugated system, due to the combination of the quinone ring of the PANI chain and the sulfate radical of the Zn-tpps4 molecule, was responsible for the outstanding sensing platform which demonstrated a rapid response compared to a pure PANI film. The enhanced sensor performance was due to the Zn-tpps4 molecules acting as a bridge to facilitate electron transfer from the ammonia molecules to the PANI molecular chains. As ammonia is one of the gases produced in the process of meat spoilage, this sensor is a good candidate for evaluating meat freshness. [36]

Metal-Organic Framework Sensors
Metal-organic frameworks (MOFs) are a novel class of porous crystalline materials which were discovered in the early 1990s. [37] MOFs have shown great potential as gas sensors because of their large specific surface area, high porosity, large pore volume, flexibility and high thermal stability due to the presence of strong covalent bonds (e.g., CH, CC, CO, and MO). [38,39] MOF structures are synthesized through the self-assembly of metallic clusters and organic molecules. In the MOF structure, metallic clusters act as nodes. Conductive polymers can be employed to act as linkers between the nodes through coordination bonding networks via 1D, 2D, and 3D. [40] Various synthesis approaches can be used such as hydrothermal, sonochemical, mechanochemical, and electrochemical, which can result in different geometries of MOF crystals (e.g., monoclinic, triclinic, trigonal, orthorhombic, tetragonal, hexagonal, or cubic). Owning to their ultrahigh porosity, extremely high surface area, uniform structure, tunable composition and pore size, and easy-to-functionalize surface, [41] MOFs have been investigated in different fields including sensing, [39,40,42,43] chemical separation, [44][45][46] catalysis, [47][48][49] semiconductors, [50,51] and bioimaging. [52][53][54][55] MOF sensors are based on different sensing mechanisms such as electron and charge transfer, energy transfer, tautomerization of ligands, coordination between the analyte and the metal site and hydrogen-bonding between the host and guest molecules which result in various detection platforms include electronic signals and turn-on/turn-off fluorescence responses. [56] MOF materials have been studied for their use in the food industry and they have been shown to be effective in removing hazardous substances from food. However, there are not enough studies conducted on their toxicity. [57] MOFs are less in demand for conductivity-based applications because most of them are not considered as electrically conductive materials. However, there have been some MOF-based high performance electrochemical sensors reported for the determination of specific gas concentrations, biomolecules, and pharmaceuticals. MOFs are considered as attractive candidates for enhancing the performance of electrochemical sensors due to their inherent features including their capability to encapsulate proteins, enzymes, and nanomaterials. The porosity and flexibility of MOFs facilitate the diffusion of analyte molecules into their pores, allowing for shape and size selectivity. MOFs with pendent functional groups can be fabricated with aptamers and antibodies which can significantly enhance the selectivity of electrochemical sensors. [57] Moreover, conductive MOFs based on through-bond, extended conjugation, guest promoted, through-space approaches have been reported. [58] The throughbond approach is based on the provision of continuous coordination/covalent pathways between the metal clusters and ligands that can enhance efficient charge transport. In extended conjugation, transition metals pair with ligands containing chelation function groups such as ortho-diols, diamines, and dithiols which result in large delocalized systems. [59] The π−π interactions between organic moieties can form through-space charge transport pathways. The 'host−guest' interactions and the inherent porosity of MOFs play a critical role in the 'guestpromoted' approach. [58] The unique structures and properties of MOFs offer highly sensitive sensing capabilities for MOF-based food sensors. This section will review recent advances in MOFbased electrochemical gas sensors that have been utilized for food spoilage detection.
A polyaniline/copper ferrite (PANI/CuFe 2 O 4 ) composite was prepared as a high-performance NH 3 sensor with high selectivity where it displayed a response of 27.37%, at a concentration of 5 ppm. [60] Recently, nanocomposite hollow spheres have received great attention due to their enhanced electrical and optical properties, demonstrating multifaceted applications in drug delivery, optoelectronics, controlled release, catalysis, and gas sensors. [61][62][63] A hollow NiO sphere-PANI composite demonstrated enhanced sensing performance compared to a PANI polymer and the authors have attributed this to the large surface area of the hollow spheres and the π-π hyperconjugation between NiO and PANI. [64] The NiO-CuO hollow spheres used to fabricate the NiO-sphere-PANI were prepared through a solvothermal reaction, calcination and in situ chemical oxidation polymerization. The sensing mechanism for the detection of ammonia using the hollow NiO sphere-PANI composite is based on protonation and deprotonation. Initially PANI exists in the emeraldine salt state, which is conductive and protonated. NH 3 reacts as an electron donator with the NH group of PANI, forming NH 4 + which causes the reversible transformation of the emeraldine salt (ES) in PANI to the emeraldine base (EB) form (Figure 7a). [64] As shown in Figure 7b, the adsorption of electron donating ammonia on the sensor caused a decrease in the amount of holes, resulting in a sharp increase in resistance. The enhanced gas sensing performance of the hollow-NiO-PANI composite compared to PANI is mostly attributed to the larger specific surface area of the hollow structure, which provides higher adsorption capacities. Furthermore, a π-π heterojunction is formed at the interface between NiO and PANI, resulting in hole transport from PANI to NiO. Hu et al. claims that the formation of a hole depletion layer (HDL) on the PANI edge and the hole accumulation layer (HAL) on the NiO edge at the equilibrium state increases the initial resistance and provides higher sensitivity for gas sensing (Figure 7c). [64] A PPY/Zn 2 SnO 4 nanocomposite sensor was reported as a highly sensitive ammonia sensor by Zhang et al. [65] PPY, holes, and protonic acid serve as p-type nanomaterial, charge carrier, and doping agent, respectively, in this study. A protonic acid (such as HCl) is commonly used in the doping of conductive polymers. In the doping process, a positively charged proton from the acid is transferred to a PPY chain. When this doped PPY chain is exposed to NH 3 , the additional proton in the PPY chain is taken by the NH 3 molecule causing a decrease in hole concentration in p-type PPY and hence an increase in the resistance of PPY (Figure 8a). [65] The 3D nanostructure of the PPY/Zn 2 SnO 4 nanocomposite with high specific surface area provides more active sites for the reaction where the adsorption and desorption of ammonia molecules into the PPY layer becomes easier. Figure 8b shows the deprotonation/protonation process of the PPY/Zn 2 SnO 4 composite in the presence of NH 3 and dry air respectively. As shown in Figure 8c, the holes of PPY transfer to Zn 2 SnO 4 and neutralize the free electrons, which causes positive charges in Zn 2 SnO 4 . Simultaneously, negative charges in PPY emerge because of the diffusion of free electrons from Zn 2 SnO 4 into the PPY to neutralize the holes, causing a depletion layer between PPY and Zn 2 SnO 4 . [66,67] The interaction of these p-n heterojunctions in the nanocomposite with ammonia at the interfaces of PPY nanospheres and Zn 2 SnO 4 hollow spheres leads to broadening of the depletion region which increased the resistance. [65] Li et al. reported an NH 3 sensor based on a WO 3 hollow spheres@ PANI hybrid on flexible PET films which was synthesized via a hydrothermal method and subsequent in situ chemical oxidative polymerization. [68] The large surface area and formation of a p-n heterojunction between the WO 3 hollow spheres and PANI promotes the gas sensing performance, achieving excellent NH 3 selectivity against benzene, toluene, acetone, ethanolamine, CO, SO 2 , and NO 2 with a lower LoD.
The triboelectric nanogenerator (TENG) was discovered by Wang et al. in 2012, as a reliable and easy to fabricate energyharvesting device. [69,70] They synthesized a self-powered Ti 3  MXene and MOF-derived CuO, TENG based on polytetrafluoroethylene (PTFE) and latex to determine ammonia gas concentrations with an excellent response voltage (V g /V a = 24.8 @ 100 ppm) at ambient temperature. [71] The TENG consists of a positively charge latex film, a negatively charged PTFE film and two Cu electrodes attached to the outer surface of the triboelectric materials as electrodes. The fabricated sensor is attached to the electrodes as a variable resistor in response to NH 3 gas (Figure 9a). In the initial state, the triboelectric potential between the PTFE film and latex is zero (step i). At first contact, the latex and PTFE surfaces become positively and negatively charged, respectively (step ii). When the two electrodes are released it causes the external current through the sensor to flow in one direction (step iii). As the charge accumulation reaches a charge balance between the two layers, no current flows in the external circuit (step iv) when fully released. When the triboelectric layers are pressed again, the external current flows through the sensor in the opposite direction (step v). When the two layers touch each other, the flow of electrons from PTFE to the latex becomes zero (Figure 9b).
CuO acts as a p-type semiconductor material with holes as the main charge carriers and can be used for the detection of ammonia gas. In air, atmospheric oxygen molecules adsorb onto the surface of CuO, the oxygen molecule (O 2 ) traps electrons to form a negative oxygen ion (O 2 − ). This leads to a rise in hole concentration and a decrease in resistance (Figure 9c). Ti 3 C 2 T x MXene with many functional groups such as -O and -OH on its surface can combine with ammonia gas leading to electron transfer from the adsorbed gas to MXene, which results in increased resistance in MXene ( Figure 9d). With CuO on the surface and the hexagonal symmetry of MXenes provides many gaps and contact points for the surface adsorption of ammonia gas.
The above examples show that MOFs are a promising candidate material for NH 3 sensing and therefore could be used in food spoilage detection applications. However the toxicity of MOFs needs to be investigated further. [57]

Ammonia Gas Sensors
As described in Section 1, food spoilage is mainly caused by microbiological activity which produces total volatile basic Nitrogen (TVB-N). This may include ammonia, dimethylamine (DMA), and trimethylamine (TMA) due to amino-acid decomposition. [35] Therefore, detecting ammonia in a packaged food sample provides a measure of bacteria activity and hence a good indication of food spoilage. The range of ammonia concentration as a marker to detect food spoilage depends on how soon one needs to detect food spoilage. Because NH 3 gas continue to be emitted by micro-bacterial activities within the food package the sooner it can be identified the better so as to inform the customer about the spoilage condition. Yuan et al. reported that a detection level of less than 100 ppb is suitable for food spoilage detection while an upper limit of 20 ppm would be enough to detect spoiled food. [72] Therefore, the target range for NH 3 sensors is considered as 10 ppb to 20 ppm in this review.
Ammonia gas sensing has been a hot research topic for many decades and there are different approaches to sensing depending on the use, target industry, or application Figure 7. a) Reaction of PANI and NH 3 . b) Schematic representation of sensing mechanism. c) Energy band diagrams of the h-NiO-PANI p-p heterojunction. Reproduced with permission. [64] Copyright 2021, Elsevier. environment. There have been several promising NH 3 sensors reported based on inorganic and organic materials. [73][74][75][76][77][78] There are good room temperature Cu based NH 3 sensors where Mahnaz et al. presented a sensor with responses of 11% at 50 ppm of NH 3 and 36.46% at 6 ppm of NO 2 . [79] Faegheh et al. presented a sensor with responses of 4.34% at 99 ppm of NH 3 and 7.3% at 6 ppm of NO 2 . [11] Conducting polymer-based sensors have become popular for ammonia sensing at room temperature and it is one of the main focus areas of this article. However, it is worth looking at non-conducting polymer-based ammonia sensors to compare and understand the advantages and disadvantages of conducting polymer-based sensors for the same purpose.
Perovskites are one of the inorganic materials used for gas sensing applications and perovskite structured CsPbX 3 (where X can be Cl, Br, or I) quantum dots (QDs) such as CsPbBr 3 has been demonstrated as an ideal candidate for making QDs to sense NH 3 . [73] With this approach it was shown that ammonia can dramatically increase the photoluminescence of purified QDs. The sensor can measure ammonia concentrations from 25 to 350 ppm with a detection limit of 8.85 ppm at room temperature. The turn-on mode response time is approximately 10 s and the recovery time is 30 s. [73] Inorganic-organic hybrids of perovskite material based sensors have also shown promising performance as ammonia sensors. [80,81] A (CH 3 NH 3 )PbBr 3-x I x perovskite thin film sensor showed a resistance change response (R air /R gas ) of 7.5-29.7 for 50-500 ppm of ammonia with a recovery time of less than 20 s. [81] A perovskite ethylenediamine lead iodide chloride sensor also demonstrated a very good response (δR) in the range of approximately 1.35 × 10 10 to 1.675 × 10 10 Ω against ammonia concentrations in the range of 50-125 ppm. [80] Photoluminescence is one of the key properties Figure 8. a) Role of PPY in ammonia gas sensing, b) the deprotonation/protonation mechanism caused by the adsorption/desorption of ammonia molecules on PPY/Zn 2 SnO 4 nanocomposite, c) p-n heterojunction between PPY and Zn 2 SnO 4 . Reproduced with permission. [65] Copyright 2018, Elsevier.
used to measure the response in some ammonia sensors and it has been used to develop a sensor which does not need any external device to visually indicate the ammonia concentration. A paper-based perovskite halide (CH 3 NH 3 PbI 3 ) sensor has been developed to change its color in response to an ammonia concentration of 10 ppm. [82] It showed a visual response after 10 s at an ammonia concentration of 10 ppm and the response time dropped exponentially to 3 s for a concentration of 30 ppm. It also displays good selectivity as there is an insignificant photoluminescence response for CH 4 , N 2 O, and CO 2 even after an exposure time of ≈15 min at concentrations of 500 ppm. [82] The same material was also used to develop an electrical readout sensor for ammonia with a percentage sensitivity of ≈55% for 1 ppm of ammonia in air or in an inert gas. [83] This paper-based perovskite halide sensor recorded a one order of magnitude change in current response for an ammonia concentration of 10 ppm. It also has very good selectivity at low concentrations of ammonia (<10 ppm) as it displays less than 10% sensitivity for ethanol, acetone, methanol, trichloro ethaline, and isopropyl alcohol in comparison to ≈90% sensitivity for NH 3 . [83] Metal and metal oxide based sensors have proven to be highly sensitive and selective for ammonia sensing. [74][75][76][84][85][86][87][88][89][90] Zinc and zinc oxide composites, in particular have demonstrated good characteristics for ammonia sensing. An ammonia sensor based on ZnPt(CN) 4 demonstrated that 50 ppm of ammonia could be clearly identified using photoluminescence measurements. In addition, the reaction between ZnPt(CN) 4 and ammonia could be measured using Raman spectroscopy. [86] Since it does not display any luminescence change for EtOH, acetonitrile, acetone, toluene, tetrahydrofuran, chloroform, or dimethyl sulfide, the selectivity in a mixed gaseous environment can be considered good. The authors believe the reason behind this is the reactivity between the Zn nodes and NH 3 in ZnPt(CN) 4 . However, it is reported that some N-doners such as pyridine causes a quenching effect in luminescence. [86] The ability to easily make nanostructured ZnO has made it a promising material for use in gas sensing nano-sensors. [91] A 2D ZnO nanoflake structure based ammonia gas sensor was reported to exhibit an 80% response within 15 s with a recovery time less than 15 s over the range of 0.6-3 ppm of NH 3 . [89] However, it needs to be operated around 250 °C and therefore it is not a good fit for food spoilage sensing though it fits well for high temperature ammonia sensing applications in other industries. A multilayer ZnO sensor fabricated by successive ionic layer adsorption method demonstrated a very high response value of 215% for 50 ppm of ammonia with a response time of 8 s and recovery time of 37 s. This sensor works at high temperature (200 °C) and therefore is not suitable for food spoilage detection even though it has a low detection limit of 1 ppm. [88] An Ag/ZnO flower and nano-ellipsoids based sensor showed a percentage response of 29.5%, which is comparatively higher than similar thick film sensors made with other ZnO composites. [87] This sensor works in the high temperature range (150 °C) and again is not suitable for room temperature operations. It also Figure 9. a) Schematic representation of self-powered NH 3 sensor driven by TENG. b) The processing mechanism of TENG. c) Composite structure of MXene and CuO. d) The NH 3 response mechanism of CuO. Reproduced with permission. [71] Copyright 2021, American Chemical Society.
reported that both the response time and recovery time of this Ag/ZnO nano-rod sensor are longer compared to the respective parameters of pure ZnO nano-rod sensors. [87] Mn 3 O 4 is another material used to fabricate ammonia gas sensors. [74,76] It has been reported that a 1% Ba doped Mn 3 O 4 thin film ammonia sensor shows a linear response from 20 to 50 ppm with high sensitivity at an optimum operating temperature of 400 °C. [76] Mn 3 O 4 functionalized with Fe 2 O 3 and ZnO sensors demonstrated detection limits of 2.3 and 2.0 ppm, respectively at an optimum operating temperature of 300 °C. [74] Indeed, this is one of the significant drawbacks of using metal oxide sensors for gas sensing that they need to be operated at high temperature to ensure good sensitivity.
Carbon nanotube (CNT), metal and metal oxide composites were also investigated for ammonia sensing in the recent past. [85,[92][93][94][95] A zinc oxide multiwall-carbon nanotube (ZnO-MWCNT) composite was fabricated by chemical spray pyrolysis of MWCNT in an N-methyl pyrrolidone (NMP) suspension on a ZnO thin film at 200 °C where this sensor displayed a response (R g /R a ) of 1.022 at an ammonia concentration of 10 ppm. [85] Another attempt was made by mixing WO 3 and MWCNT in different ratios from 0-100% and the optimum ammonia gas sensing response was obtained at 5% MWCNT and 95% WO 3 , where the reported response (δR/R a ) is approximately 350% at 60 ppm of NH 3 with an LoD of 6 ppb at room temperature. [92] The WO 3 /MWCNT mixing and sensor fabrication procedure is explained elsewhere. [96] A capacitive response sensor was made using a composite material of NiCo 2 O 4 /MWCNT and the reported maximum sensing capacitance was 25.7 pF for 100 ppm of NH 3 compared to ≈24.7 pF in air. [93] However, this sensor had very poor recovery and repeatability characteristics.
All the above sensor types are primarily inorganic material based NH 3 sensors. Most sensors demonstrated very good NH 3 sensing performance but are not suitable for room temperature operations and often involved complex fabrication procedures. Therefore, it is necessary to investigate easy to fabricate NH 3 sensors where the operating temperature range is compatible with the food storage temperature range.

Polyaniline-Based Ammonia Sensors
Polyaniline (PANI) is one of the most popular conducting polymers that has been used in developing sensor-substrates for measuring NH 3 under ambient conditions. [97][98][99][100][101][102] Its good electrical and mechanical properties, adhesion capability, flexibility, reversible redox chemistry, ease of fabrication, low-cost, and room temperature stability make PANI an ideal material for nano-sensor fabrication. The inherent nano-surface morphology of PANI that is easily enhanced by different surface modification techniques provides a route to fast response times and high sensitivity. [99] Qin et al. reported a highly sensitive NH 3 sensor using a pork floss-like loose three-dimensional nanocomposite of polyaniline and Zinc Titanium layered double hydroxides (PANI/ ZnTi-LDHs). [103] The ZnTi-LDHs were hydrothermally prepared using a Teflon-lined autoclave for 24 h at 130 °C, then cooled naturally and finally dried at 60 °C. The PANI/ZnTi-LDHs composite was then prepared by chemical oxidative polymerization of the aniline monomer in the presence of ZnTi-LDHs. Figure 10 shows the schematic representation of the preparation of PANI/ZnTi-LDHs. The nanocomposite was spin coated onto an Al 2 O 3 substrate with pre-deposited interdigitated Pt electrodes of 100 nm thickness.
The measured resistance changes upon exposure to different concentrations of NH 3 by ZnTi-LDHs are shown in Figure 11a and compared with the resistance change of PANI in Figure 11b and PANI/ZnTi-LDHs in Figure 11c. The magnitude of variation of resistance for ZnTi-LDHs is in the range of 120-60 MΩ and for PANI it is in the range of ≈5-85 MΩ. However, the PANI/ZnTi-LDHs sensor resistance change is in the range of ≈5-700 MΩ and the authors have attributed this significant improvement to the appropriate coverage of PANI on the pork floss-like architecture of ZnTi-LDH nanosheets. The high volume of PANI on the 3D structure of ZnTi-LDHs yields a high number of p-n junctions which can participate in the reaction when exposed to NH 3 . This is also responsible for the rapid response and recovery times. The PANI/ZnTi-LDHs sensor also demonstrates two linear response concentration ranges as shown in Figure 11d. [103] The PANI/ZnTi-LDHs sensor exhibited a low LoD of 200 ppb with a response of 39.52% at 50 ppm NH 3 . [103] The linear range is 1-50 ppm and this type of NH 3 sensor is highly suitable for the early detection of food spoilage. It shows a very high selectivity for NH 3 against other gases including methane, hydrogen, ethanol, isopropanol, methanol, and acetone. The reason behind this high selectivity is the way NH 3 reacts with PANI, where the deprotonation effect converts PANI from emeraldine salt state to emeraldine base state, which causes a reduction in electrical conduction. It also has a very quick response time of less than a second at 5 ppm and less than three seconds at 50 ppm NH 3 .
Glass microfiber based paper has been used as the supporting substrate in another study where they drop-casted PSS [poly(sodium 4-styrenesulfonate)] onto the glass microfiber paper and then polymerized aniline on the support. [104] It shows a measurement range of 10-100 ppm with an LDL of 125 ppb. The sensor is flexible, but the response and recovery times are longer (2 and 3.5 min, respectively) for real life food sensing applications. Another flexible NH 3 sensor using PANI/Ge was proposed by Li et al., [98] but it also has longer response and recovery times as indicated in Table 1.
A PANI/CeO 2 nanocomposite flexible sensor has been developed by Liu et al. for trace level NH 3 detection. [105] There they used a flexible polyimide (PI) sheet as the supporting substrate where gold interdigitated electrodes (IDEs) were deposited using electron beam evaporation through a stainless steel mask followed by a 10 min oxygen plasma treatment to improve the hydrophilicity of PI/IDE. Then the PANI/CeO 2 layer was deposited on top as shown in Figure 12. The prepared PI/IDE sensor substrate was pretreated with polycationic poly(diallyldi methylammoniumchloride) (PDDA) aqueous solution (1%) and polyanionic PSS aqueous solution (2mg mL −1 ). Polyaniline and CeO 2 depositions were carried out on this pretreated substrate to make the NH 3 sensor and the sensing parameter measured was resistance. It reported a sensitivity of 3.994% ppm −1 of NH 3 with an LoD of less than 16 ppb. Though this sensor is very sensitive, it has a 360 s response time and a 1020 s of recovery time. [105] Therefore it is not recommended for quick response type food spoilage monitoring applications, but may be adopted for continuous monitoring of NH 3 levels in food.
Another flexible room temperature ammonia sensor developed by Li et al. used polyethylene terephthalate (PET) as a flexible membrane to support PANI/WO 3 hollow spheres. [68] Figure 13 shows a preparation flow diagram of the WO 3 hollow spheres wrapped by PANI (PAWHs) and the formation schematic of the flexible sensor. They synthesized WO 3 using a single-step hydrothermal method where the product was annealed at 500 °C for three hours in a muffle furnace at 2 °C min −1 heating rate to obtain WO 3 hollow spheres. This was then followed by an in situ chemical oxidative polymerization to obtain PAWHs and deposit them on the PET substrate. The sizes and hollow nature of the WO 3 spheres have been verified using SEM and TEM/HRTEM. The average shell thickness that Figure 11. Dynamic response measurement of PANI/ZnTi-LDHs sensor. Measured resistances for different NH 3 concentrations a) ZnTi-LDHs, b) pure PANI, c) PANI/ZnTi-LDHs, and d) comparative sensor responses. Reproduced with permission. [103] Copyright 2018, Elsevier. was reported is 300 nm and the average diameter of a WO 3 hollow sphere is 1.2 µm. The average thickness of the PANI layer deposited on the hollow WO 3 sphere was 15.7 nm and it was confirmed that there were no gaps between PANI and WO 3 . They fabricated different sensors with 2%, 5%, 10%, 20%, and 30% of WO 3 and found that the 10% WO 3 gave the best performance as an ammonia sensor. The range of the sensor is 0.5-100 ppm and the limit of detection (LoD) varied over the range of 1.67-500 ppb depending on the WO 3 percentage. The best response and recovery times of the sensor are 136 and 130 s, respectively. [68] With a very low detection limit, this sensor is suitable for food spoilage detection, but due to the longer response and recovery times it is recommend for continuous monitoring of food spoilage. Yu et al. developed an ammonia gas sensor that produces a specific resonating frequency in response to contact with ammonia in the measured environment. [106] The sensor fabrication is based on a interdigitated electrode (IDE) structure on a printed circuit board (PCB). The IDE has an electrode area of 5 mm × 4.5 mm with a width and gap of 200 and 150 µm, respectively. The PANI was deposited by drop coating and then air drying at room temperature for one hour. One of the IDE terminals has a crystal oscillator of known frequency (9 MHz in this case) in series. The resonating frequency of the PANI coted  IDE in response to NH 3 is superimposed on the crystal's natural frequency. This sensor has the advantage of direct digital interfacing capability as the output signal has a frequency component. It is reported that the sensor is capable of measuring NH 3 concentrations between 20 and 1200 ppm where the frequency shift is 1500 Hz. This IDE structured PANI sensor serially connected with a quartz crystal has a very quick response time of 5 s and a recovery time of 152 s. [106] With these performances the sensor is suitable for quick detection of NH 3 produced from food samples due to food spoilage. However, the recovery time is a little longer than what is required for commercial application. Zhang et al. presented a sensor fabricated by dynamic liquid phase deposition of nanostructured PANI on the inner surface of a glass tube substrate, which provided a very low LoD of 0.1 ppm and a very high response rate of 877% at 3 ppm NH 3 . [107] They used camphor sulfonic acid (CSA) and titanium dioxide to dope the aniline monomer for subsequent deposition of nanostructured PANI inside the glass tube. They developed a dynamic liquid phase deposition method (DLPD) because the static method of deposition mentioned in the literature for flat surfaces did not work well for capillary tube substrates. This DLPD method was used to successfully deposit a PANI-CSA/TiO 2 layer on the inner surface of the capillary tube. Their results show that 1 and 1.5 mm capillary tubes have the best responses while the 1 mm tube shows a better recovery time of 85 s versus 175 s for the 1.5 mm diameter tube. The authors have not explained why the 1.5 mm diameter tube has longer recovery time, but it may be due to aerodynamic effects caused by the length to diameter ratio of tubes. Even though this NH 3 sensor has a very high response, the response and recovery times make it unsuitable as a practical food spoilage sensor for consumer testing equipment. Kulkarni et al. reported on PANI-WO 3 nanocomposites fabricated by chemical oxidative polymerization. [108] The sensor exhibited a range of 5-100 ppm NH 3 and a response of 158% at 100 ppm. It recorded response and recovery times of 39 and 377 s at 100 ppm NH 3, respectively while also demonstrating very good selectivity and reproducibility. Though it shows a response time that is marginally acceptable for food spoilage sensing applications, the recovery time is problematic for this application. PANI modified hydroxylated single-walled carbon nanotubes were reported by Chen et al. for ammonia sensing. [109] This sensor also used an in situ chemical oxidative polymerization method to fabricate the hydroxylated single wall carbon nanotube (SWCNTs-OH)/PANI nanocomposites which were deposited on gold IDT electrodes on a silicon substrate. Figure 14 shows the schematic representation of making SWCNTs-OH/ PANI nanocomposite while Figure 15 shows the fabricated IDT sensor (Figure 15a) as well as the schematic representation of the adsorption process of NH 3 molecules on SWCNTs-OH/ PANI (Figure 15b). The authors explain that the hydroxylated SWCNTs have more protons available for NH 3 to interact with and hence the change in resistance is higher than that of PANI or SWCNTs/PANI based sensors. The fabricated sensor has been tested for other gasses such as methane, formaldehyde, ethanol, benzene, and acetone and shows very good selectivity for NH 3 . This sensor recorded a sensitivity of 200% at 100 ppm and a measurement range of 25-800 ppm. The response time is 81 s and recovery time is 149 s. The sensitivity and range are favorable, but similar to the previous sensor, this one also suffers from longer response and recovery times that are not suited to food spoilage measurements.
An Au-loaded mesoporous In 2 O 3 nanospheres/PANI nanohybrid core-shell structure assembled on a polyethylene phthalate (PET) substrate reported a measurement range of 0.5-100 ppm with an LOD of 500 ppb and a response of 46% at 100 ppm. [110] Although the fabrication process is a little complicated, it showed a promising response rate for NH 3 where the response and recovery times are 118 and 144 s, respectively. A PANI-modified WO 3 nanoplates NH 3 sensor is reported by Fan et al. [111] with a measuring range of 0.5-100 ppm. A ceramic tube was used as the substrate and the response rate is 35% Figure 15. a) Fabricated IDT sensor and b) schematic representation of the NH 3 molecules on SWCNTs-OH/PANI. Reproduced with permission. [109] Copyright 2019, Elsevier. This sensor was reported to have a very low LoD of 3 ppb and is therefore suitable for highly sensitive measurements. A PANI/ Zn-porphyrin is reported by Cai et al. [36] with a measurement range of 50-500 ppm and an LoD of 1.17 ppm. The response rate is more than 200% at 500 ppm and it increases with the flexing angle of this sensor to more than 300% when at an 80° flexing angle. All these three sensors have a good range and LoD values and quick response time. However, all of them suffer from long recovery times where they are longer than what is suitable for a consumer device for the purpose of food spoilage detection.
Wu et al. reported an interesting fabrication method for a flexible single yarn which they used to make the sensing element. [112] An electrospinning method was employed to fabricate a polyacrylonitrile uniaxially aligned coaxial nanofiber (PAN-UANY) yarn after which PANI was deposited on it. Ag/Pd IDT electrodes (13.4 mm × 7 mm) were deposited on a ceramic substrate and then the PANI/PAN-UANY was transferred onto the IDT to make the NH 3 sensor. This sensor displays very quick response and recovery times of 9 and 37 s, respectively at an ammonia concentration of 200 ppm. The measurable range is 10-2000 ppm and the LoD is 10 ppm. These parameters make this sensor a very good candidate for food spoilage detection. Zhang et al. reported a very fast responding PANI based NH 3 sensor with response and recovery times of 5 s each with a measurement range of 0.25-100 ppm. [113] They fabricated a PANI/ Eu +3 thin film on the inner wall of pre-treated glass capillary tube with a 435% response at 0.25 ppm NH 3 . Therefore, this sensor is also a very good candidate for food spoilage detection, however, the need for extra equipment (peristaltic pump) to force air through the capillary tube make it non-viable as a consumer electronic device.
Kulkarni et al. developed a flexible hybrid PANI/WO 3 sensor and reported an LoD of 1 ppm and a range of 1-100 ppm with a response of 121% at 100 ppm of NH 3 . [97] The response time reported was 30 s and it is marginally acceptable for a consumer food quality measurement device, but the recovery time of 170 s make this sensor not very appealing for the intended application. However, the flexible nature of the fabricated sensor is well aligned with food packaging requirements as a flexible sensor can easily be integrated into food wrapping foils. In addition to measuring the resistance variation of the sensor in response to NH 3 , they performed an impedance spectroscopy measurement as well and found that the resistive and capacitive components of the equivalent circuit demonstrate a clear variation that can be corelated to the gas concentration.
Das and Sarkar presented a simple single-pot preparation method for a ZnO/PANI nanocomposite NH 3 sensor. [114] The sensor exhibited an LoD of ≈10 ppm and a range of 20-100 ppm with a response rate of 130% at 100 ppm. They also checked the specificity of the sensor and found that its response was very low for ethanol and methanol gases. The response and recovery times recorded at 100 ppm were 21 and 61 s, respectively, making this an ideal candidate sensor for food spoilage detection. Another reasonably fast response sensor was reported by Liu et al., with response and recovery times of 46 and 54 s, respectively. [115] They developed a porous nanosphere SnO 2 / Zn 2 SnO 4 nanohybrid based PANI flexible sensor where the SnO 2 /Zn 2 SnO 4 nanohybrid synthesis was adopted from elsewhere. [116] This sensor displays an LoD of 500 ppb and has a range of 0.5-100 ppm with a 20.4% response at 100 ppm NH 3 . With these characteristics, this sensor is a marginal candidate for food spoilage detection.
PANI/PVDF (polyvinylidene fluoride) sensors have been reported by several groups. [117][118][119] Yang et al. presented a flexible porous PANI/PVDF composite film sensor with a 200 ppb LoD and a range of 200 ppb to 5 ppm for NH 3 gas detection. It has a response time of 174 s and a recovery time of 235 s. [117] The fabrication method is straight forward as depicted in Figure 16. Dawu Lv et al. reported another NH 3 sensor with sub-ppm level LoD and a 100 ppb to 10 ppm detection range. [118] This sensor fabrication method is similar to the method described by Yang et al. [117] with an additional step of adding PSS (polystyrene sulphonic acid) after adding APS (ammonium peroxydisulfate) which results in the deposition of PSS on the PANI/PVDF flexible film. This sensor has response and recovery times of 160 and 400 s, respectively. It showed a 70% response rate at 1 ppm concentration, which is a significantly large response for such a low concentration. Both PVDF-based PANI sensors for NH 3 detection had similar longer response and recovery times which make them unsuitable for consumer electronics devices where they need very fast response and recovery times. However, another PVDF sensor developed by the same group of researches using MWCNT-PANI/PVDF reported a response time of 76 s and a recovery time of 26 s. [119] This sensor added Figure 16. Schematic representation of PANI/PVDF sensor fabrication. Reproduced with permission. [117] Copyright 2020, Elsevier. multiwall carbon nanotubes onto the PVDF substrate and then followed the same procedure presented previously. [117] It demonstrated a 32% response at 10 ppm. In the meantime, the LoD was 100 ppb with a detection range of 100 ppb to 10 ppm. Though this sensor has a fast recovery time, its response time is comparatively longer.
Abdulla et al. reported a trace-level NH 3 gas sensor fabricated using surface-engineered Ag nanoclusters on PANI/ MWCNTs. [120] They claimed that other sensors based on PANI/ MWCNTs that were reported previously suffered from long response recovery times due to poor electron transfer rates in the PANI/MWCNT backbone. Therefore, in their research they proposed to increase the electron transfer rate by introducing metal nanoparticles on the PANI/MWCNT surface. They introduced Ag nanoclusters on the conventional PANI/MWCNT backbone and Figure 17a shows the schematic representation of the possible interaction of NH 3 gas molecules on the Ag nanocluster/PANI/MWCNTs while Figure 17b shows the interactions of NH 3 gas molecules on different active sites on the Ag nanocluster/PANI/MWCNTs nanocomposite. The sensor fabrication was done using a single-pot surfactant-free method with controlled integration of Ag nanoclusters into the PANI/ MWCNT matrix. They have verified the controlled integration of the Ag nanocluster into PANI/MWCNT backbone by structural and morphological characterization. The paper reported a super-fast response and recovery time of 5 and 4 s, respectively with this sensor. The LoD is 100 ppb and the detection range is 2-10 ppm with a response rate of 26% at 2 ppm NH 3 . These measurements were carried out in the RH range of 60-95% and the authors attributed the high speed and the large resistance change to the high RH value. They postulated that the water molecules between the NH 3 gas molecules and the PANI/ MWCNT matrix accelerate the electron transfer rate as shown in Figure 17b. This sensor is a good candidate for detecting food spoilage in supermarkets.
A sensor developed by Akbar et al. using PANI/CdS nanoparticles has a detection range of 20-100 ppm, a very high response rate of 250% at 100 ppm NH 3 with a response and recovery time of 58 and 104 s, respectively. [121] Apart from the longer recovery time, all other parameters look favorable for this sensor to be considered as a food spoilage detector. Li et al. reported a PANI/SnO 2 sensor with an LoD of 200 ppb and a detection range of 10-200 ppm with a response rate of 29.8% at 100 ppm NH 3 . [101] However, the longer response and recovery times of 125 and 167 s, respectively makes this sensor unsuitable for monitoring food spoilage. Kanaparti and Sing reported an interesting solvent free fabrication of a PANI sensor on a paper substrate at room temperature. [122] They compressed PANI powder to make a pencil and then used it to draw on paper to make functionalized PANI paper. They then formed electrodes on this functionalized PANI paper using a silver ink pen to make the sensor. The range of this sensor was reported from 200 ppb to 3.15 ppm with an LoD of 180 ppb and a response rate of 20.5% ppm −1 which makes it appealing for detecting early-stage food spoilage. However, they did not mention response and recovery times, which makes it impossible to determine its the suitability for the intended application.
Li et al. presented a PANI/WO 3 flower-like nanocomposite structure based NH 3 sensor with a very fast response time of 13 s and a recovery time of 49 s. [123] This sensor was fabricated on a flexible PET support using an in situ chemical oxidation polymerization method. The electrodes were gold IDT covering an area of 8.5 mm × 6 mm, where the width of the fingers was 200 µm and the separation was 300 µm. The sensor reported a response (R g /R a ) of 20.1 for 100 ppm NH 3 with a measurement range of 0.5 ppm to 100 ppm and an LoD of 500 ppb. The response shown by this sensor is extremely large [equal to 1910% for s = (R g − R a )/R a ) × 100] and they explained this using a schematic representation of how the PANI depletion layer grows upon contact with NH 3 and is shown in Figure 18. The field emission scanning electron microscopy images illustrate the porous nature of the PANI/WO 3 nanostructure and the authors attributed the very high sensitivity primarily to a large increase in the surface area available to react with NH 3 . They also highlighted the role of the p-n heterojunction formed at the interface between p-type PANI and n-type WO 3 . Figure 18b shows the increase in the depletion layer within PANI and the decrease in the width of the conducting channel because of exposure to NH 3 . At the same time the WO 3 layer exhibited a decrease in the depletion layer but, as shown in Figure 18a the increase in the depletion region in PANI is greater than the decrease of the depletion layer in WO 3 . The result is an overall increase of the depletion layer which causes a higher resistance when NH 3 is present. The quick response and recovery times and the range make this an appealing sensor for food spoilage detection.
A 3D PANI/conductive organic sulfonic acid co-doped bacterial cellulose sensor was proposed by Yung et al. [124] This sensor displays super-fast response and recovery times of 10.2 and 8.6 s, respectively for 100 ppm NH 3 with a detection range of 10-150 ppm and an LoD of 200 ppb. They used Acetobacter xylinum to grow a bacterial cellulose (BC) film under controlled conditions where this film was used as the backbone for the sensor. The doping agents used were dodecyl benzene sulfonate acid (DBSA) and poly(2-acrylamid o-2-methyl-1-propanesulfonic acid) (PAMPS). This BC nanofiber film was subjected to in situ chemical oxidation to fabricate the BC/PANI-DBSA/PAMPS nanocomposite film. They characterized the morphology of the sensing film with SEM and confirmed that the PANI layer had grown around the bacterial cellulose fibers, which provided a highly porous 3D PANI network to react with NH 3 . The reported super-fast reaction and recovery times were attributed to this nano-porous physical network. The sensing speed, range, and LoD are promising for a food spoilage detection sensor, but the main concern is the BC network used to make the three-dimensional porous network. Though acetobacter xylinum is not a pathogenic substance, [125] including it inside a food package could cause contamination unless it is fully deactivated after making the BC/PANI-DBSA/PAMPS nanocomposite film. Table 1 summaries recent PANI based NH 3 sensors with their key performance parameters for comparison.

Polypyrrole-Based Ammonia Sensors
Polypyrrole (PPY) is another promising conducting polymer which is easily fabricated and offers stability against environmental factors. PPY and its composites have been used for developing gas sensors in the past with convincing results. [135] Therefore it is worth summarizing recent developments in PPY-based NH 3 gas sensors, which can be adopted to detect NH 3 gas emissions by bacteria activity in packaged food.
Tang et al. demonstrated an NH 3 sensor that was fabricated by electrodepositing a thin layer of PPY on chemical vapor deposition (CVD) grown graphene which exhibited a range of 1-5 ppm and an LoD of 1 ppm. [136] It displayed a sensitivity of 1.7% at 1 ppm of ammonia and the response and recovery times recorded were 2 and 5 min, respectively. They deposited a 90-nm thick SiO 2 layer on top of an Si substrate and then Ti and Au layers of 5 and 50 nm, respectively, were deposited by photolithography on top of the SiO 2 layer as electrodes. Graphene was grown on a Cu foil by a CVD method and later transferred on to the electrodes by using polymethyl methacrylate (PMMA) as a mechanical support. The fabrication process involved integrating the sensor into a standard IC package with wire bonding for terminals. This makes interfacing the sensor with external instrumentation easy. This kind of sensor for detecting food spoilage is possible, but the range is too small and may quickly saturate with rapidly spoiling food. Furthermore, the response and recovery times are also much longer than what is expected for a consumer device. Figure 18. a) Energy band structure of PANI/WO 3 in air without NH 3 (left) and with NH 3 (right). b) Schematic illustration of PANI/WO 3 hybrid sensor under exposure to NH 3 . Reproduced with permission. [123] Copyright 2017, Elsevier. SiO 2 and silicon nanowires have been used by some research groups to develop the backbone for PPY deposition in the process of developing NH 3 sensors. [137,138] A flexible ammonia sensor fabricated on a silk fiber backbone was presented by She et al. [137] They deposited PPY with the support of silica nanospheres on the pre-treated silk fibers by chemical oxidative polymerization. The fabrication process of the silk fiber based NH 3 gas sensor and how the silk fibers were separated and how the PPY/silica nanospheres layer was deposited are illustrated in Figure 19. The SEM images show that the pre-treated silk fibers have less than 10 µm diameter and the PPY/silica nanospheres have diameters in the range of 10-20 µm. This confirms the formation of a silica nanosphere assisted PPY layer on the surface of silk fibers where the distance between the silk fibers provides a path for the gas to enter as well as leave the sensor space. They also deposited PPY/silica nanospheres on a sponge instead of silk fiber for comparison reasons and found that the sponge-based sensor had a response less than 50% of the PPY/silica nanosphere sensor. The sensor displayed a response to a wide range of NH 3 concentrations from 1 to 225 ppm and an LoD of 1 ppm with a response of 73.25% at 100 ppm NH 3 . [137] The response and recovery times recorded were 24 and 69 s, respectively which are considerably fast for food spoilage detection applications. Qui et al. developed a loosely woven silicon nanowire array using a metal-assisted chemical etching process followed by a chemical polymerization process to deposit the PPY shell over the freestanding silicon nanowires. [138] This sensor exhibited a very low LoD of 130 ppb and a detection range of 1-10 ppm. The sensitivity reported was ≈1000% at 10 ppm with response and recovery times of ≈4 and ≈20 s, respectively. All these performance parameters suggest that the PPY/silica nanosphere sensor is a very good candidate sensor for a consumer product to detect food spoilage.
An interesting NH 3 sensor using PPY on filter paper was demonstrated by Majumdar et al. [139] The doping agents used were camphor sulfonic acid (CSA) and p-toluene sulfonic acid (PTSA). They soaked the filter paper samples in FeCl 3 /CSA/ PTSA solution and dried it at room temperature. Then the samples were placed on a sample holder and exposed to pyrrole monomer for an hour to deposit PPY on the filter paper. This simple fabrication process was followed by directly pasting two parallel Cu electrodes using conductive glue to complete the sensor. The fabricated sensor was flexible and showed a 10-100 ppm detection range, an LoD of 5.2 ppm, a response of 84.5% at 100 ppm NH 3 with response and recovery times of 52 and 79 s, respectively. This sensor performances could be further improved by replacing the pasted electrodes on the PPY layer with an IDT electrode pair that was printed or vacuum deposited. The LoD and range are appropriate for food spoilage detection application however, the response and recovery times are bit beyond the expected values.
Another NH 3 sensor was developed using PPY bimetallic oxide composites with V 2 O 5 and MnO 2 as reported by Malook et al. [140] The fabrication processes of V 2 O 5 and MnO 2 were a little complex and have been explained elsewhere. [141] In this work, they used different percentages of V 2 O 5 and MnO 2 with PPY to make different sensors and found that the PPY/4%V 2 O 5 /5%MnO 2 composite provided the best results. They reported a measurement range of 5-60 ppm with an LoD of 5 ppm where the response is 45.67% at 20 ppm NH 3 . This is also a room temperature sensor with response and recovery times of 74 and 76 s, respectively.
Graphene and reduced graphene oxide have been used by several research groups to prepare sensors for NH 3 measurements. [142][143][144][145][146][147] Tang et al. reported an NH 3 sensor composed of PPY and reduced graphene oxide fabricated using electropolymerization and used an SiO 2 /Si substrate with an IDE printed on it. [142] The substrate is wire bonded to a standard IC package for easy interfacing. The images of the IDE with PPY/reduced graphene oxide shows a totally random pattern of deposition on the IDEs. This suggests that the deposition density depends on the operational parameters of the deposition process such as temperature, time, monomer concentration and current etc. and tight control of these parameters is needed for repeatability. They reported a sensor with a range of 1-4 ppm and an LoD of less than 1 ppm. This sensor has a response of 6.1% at 1 ppm NH 3 , a response time of 60 s and a recovery time of 300 s. Qin et al. reported another PPY/reduced graphene oxide NH 3 sensor with an LoD of 330 ppb and a range of 1-5 ppm. [143] Their sensor response at 5 ppm was 1010% with response and recovery times of 5 and 20 s, respectively. They used an in situ chemical oxidative polymerization method to deposit PPY on the 3D reduced graphene oxide. The main reason behind this very high response value can be attributed to the 3D structure of the reduced graphene oxide. Chetan et al. demonstrated an NH 3 sensor based on PPY/reduced graphene oxide/MWCNT/ZnO with a very fast response time of 2 s. [144] Though there was no specific value given for the recovery time, it looks very similar to the response time from the response data they presented. All these sensors using reduced graphene oxide measured the resistance (or conductivity) as the dependent variable in response to NH 3 exposure. The latter two show very high sensitivities and very fast response times. The displayed ranges of the first two sensors and the LoD of the third sensor are not suitable for food spoilage detection work. Shoeb et al. proposed a graphene/Ag-Ag 2 O/PPY nanocomposite sensor where they used graphene oxide pre-prepared through a modified Hummer method which was reduced with aqueous ammonia. [145] They measured the DC conductivity of the sensor against NH 3 exposure and reported that the response is 40 times higher than that of pristine PPY. The response is 29.1% at 1000 ppm NH 3 , where the response and recovery times are reasonable, but the exact measurement range was not provided. Qin et al. reported an NH 3 sensor capable of detecting concentrations as low as 200 ppb and a response of 42% at 10 ppm, however the response and recovery times are 5 and 10 min, respectively. [146] However, this is a flexible sensor and the range is 10-40 ppm. It showed very good stability under bending conditions and would have been a very good candidate for food spoilage detection apart from the prolonged response and recovery times. A PPY/graphene-based, self-powered, flexible sensor has also been reported. [147] This sensor has a range of 200 ppb to 40 ppm and a response rate of 45% at 10 ppm NH 3 . The LoD is 41 ppb, but the response and recovery times are longer than what is needed for a consumer food spoilage detection device. However, it may still be a candidate sensor for long term food spoilage detection. Another PPY/ graphene based sensor demonstrated a range of very low LoD values varying from of 0.0005-12 ppm, which was based on the material used. [148] They reported that in comparison to a PPY sensor which has a LoD of 7.6 ppm at room temperature it can be improved to 0.9 ppm for PPY/graphene oxide, 0.035 ppm for PPY/reduced graphene oxide and 0.0002 ppm for PPY/sulphonated reduced graphene oxide. However, the response times for these different sensors vary from 48 to 105 s and the recovery times vary from 234 to 182 s, respectively.
Polypyrrole and zinc oxide based NH 3 sensors have been fabricated by different groups and have showed that these class of NH 3 sensors are capable of measuring food spoilage analytes in a wide range of concentrations above 1 ppm. [149,150] Pratibha et al. have used pre-prepared nano-sized ZnO to make ZnO encapsulated PPY by a chemical synthesis route. [150] They fabricated their sensor by screen printing ZnO encapsulated PPY nanocomposites on a glass tube and connecting copper terminals to it. It showed a response of ≈69% at 100 ppm NH 3 with a measurement range of 1-100 ppm. The response time and recovery times were 45 and 55 s, respectively, which operated at room temperature. This sensor also showed stability over a period of 90 days. Harpale et al. used ZnO nanorods prepared through an electrochemical procedure to prepare an NH 3 sensor. [149] These ZnO nanorods were electrodeposited on Au-coated Si substrate and PPY was deposited on top of that using chemical oxidative polymerization. Two Au plated copper electrodes 8 mm apart from each other were pressed onto the surface to measure the electrical resistance of the sensor. This sensor showed a response of 82% at 150 ppm NH 3 with a measurement range of 25-150 ppm. The response and recovery times are 26 and 204 s, respectively. Both these NH 3 sensors based on PPY/ZnO are unable to detect sub ppm level concentrations. The response time looks promising for an NH 3 consumer sensor however, the recovery time is bit longer than required.
SnO 2 and PPY have also been implemented by various research groups. [151,152] Hsieh et al. have developed graphene nanoribbons with MWCNTs using a chemical oxidative process. [152] The hollow SnO 2 nanoparticles were developed using a hydrothermal process. The PPY nanocomposites were synthesized by an in situ chemical oxidative polymerization method. The developed sensor showed a very good performance at low concentrations. The reported range is 600 ppb to 2 ppm and the response at 1 ppm is 92.7%. The response and recovery times are 81.8 s and ≈10 s, respectively. Though the range is narrow, the sub-ppm level sensing capability is appealing for our specific application, however the response time is not favorable. Ma et al. developed a flexible and self-healing sensor which can also store energy. [151] They developed a polypyrrole/Boron-cross linked polyvinyl alcohol/potassium chloride (PPY/B-PVA/KCl) hydrogel film first and then using a vapor phase polymerization process, a PPY/SnO 2 /B-PVA/KCl sensor film was developed. This sensor showed a very good response of 1000% at 10 ppm NH 3 and has a very wide measuring range from 50 ppb to 500 ppm. The response and recovery times are 124 and 68 s, respectively. [151] Another NH 3 sensor using Zn 2 SnO 4 and PPY showed very fast response and recovery times of 35 and 26 s, respectively. [65] This sensor shows a response rate of 82.1% at 10 ppm with an LoD of 100 ppb. The detection range is 100 ppb to 10 ppm with response and recovery times of 35 and 26 s, respectively. The sensor achieved a high response with fast response and recovery times due to the 3D structure of Zn 2 SnO 4 fabricated through the process illustrated in Figure 20. The Zn 2 SnO 4 hollow spheres were fabricated by using carbon microspheres as the scarifying template material and they confirmed the structural features and functional groups by Fourier transform infrared spectrum (FTIR) measurements. [65] WO 3 and PPY have been used by some research groups to make NH 3 sensors. [153,154] Amarnath and Gurunathan proposed size controlled nano islands of V 2 O 5 /WO 3 coated on PPY as the sensing substrate and have achieved a sensitivity of 85%. [153] WO 3 nanoparticles were synthesized through a simple precipitation method and V 2 O 5 nanoparticles were synthesized using ammonium metavanadate and HCl. 1:1 V 2 O 5 and WO 3 nanoparticles were dissolved in double distilled (DD) water until the solution color turned to light orange. Then the solution was transferred for polymerization with the pyrrole monomer and stirred well and dried to obtain the casting solution. This sensor has a range of 10-50 ppm and works at room temperature with the response time of 73 s and a recovery time of 102 s. Albaris and Karuppasamy presented another WO 3 and PPY sensor for NH 3 detection at room temperature. [154] They used a modified Hummer's method to synthesize graphene oxide while WO 3 was synthesized using a simple hydrothermal method. Then a 1:3 ratio of graphene oxide and tungsten oxide was made in aqueous media to synthesize the GO-WO 3 nanocomposite and this was then used with the pyrrole monomer to synthesize a PPY/GO/WO 3 senor for NH 3 measurement. This sensor displayed a sensitivity of 58% at 10 ppm NH 3 and a range of 5-15 ppm. The response and recovery times recorded were 50 and 120 s, respectively. Though the sensitivity and measurement range look promising for a food spoilage sensor, the speed of operation is not that favorable for a fast consumer device.
Dodecyl-benzenesulfonic acid (DBSA) is a common dopant that is used in the electropolymerization of PPY, and Fateh et al. reported a PPY/DBSA sensor for NH 3 detection. [155] They demonstrated an LoD of 4 ppm and a detection range of 5-40 ppm with a sensitivity of 13.3% at 20 ppm. However, the response and recovery times are 205 and 134 s, respectively. Kalaleh and Masri demonstrated a PPY-based sensor using sodium dodecyl sulfate (SDS), with an ultra-fast response time of 5 s and a range of 20-120 ppm. [156] This sensor has a sensitivity of 24.1% at 25 ppm and an LoD of 20 ppm, but suffers from a very long recovery time of 442 s.
Vanadium and polypyrrole composites have been used for NH 3 detection by different groups in the past. [157,158] Li et al. demonstrated an NH 3 sensor using a freestanding PPY/ Na 5 V 12 O 32 fibers composite where they first synthesized Na 5 V 12 O 32 upon which PPY was polymerized. [158] Na 5 V 12 O 32 was prepared by mixing NH 4 VO 3 and NaCl to a molar ratio of 1:6 in deionized (DI) water and transferred to a stainless steel autoclave. Then a Ti foil was inserted and the hydrothermal reaction was carried out for one hour at 150 °C and naturally cooled to room temperature. The Ti foil was removed by dissolving it in 0.5 m citric acid and washed in DI water. Then PPY was grown on these freestanding Na 5 V 12 O 32 fibers. This sensor showed a wider detection range of 5-1000 ppm and an ≈9% sensitivity at 50 ppm NH 3 . The best response time recorded was 42 s at 1000 ppm but the recovery time was not determined, however from the response curves that were presented it appears to be much longer than the response time. Another vanadium PPY based NH 3 sensor was proposed by Khan et al. where they reported a super-fast reaction time of 10.5 s with a recovery time of 81.6 s. [157] After testing different percentages of V 2 O 5 in the sensor they found that the best performance was obtained by using PPY/8% V 2 O 5 . This sensor showed a range of 5-500 ppm and an LoD of 1.4 ppm with a 125% sensitivity at 500 ppm NH 3 .
NiO and PPY have been used by Thi Hien et al. to develop NH 3 sensors. [159] They used NiO nanoparticles synthesized through a hydrothermal process using Ni(NO 3 ) 2 .H 2 O and CO(NH 2 ) 2 precursors. This was mixed with an organic substance (α-terpineol) and deposited on an alumina substrate integrated Pt electrode. Different concentrations of FeCl 3 ·6H 2 O dissolved in ethanol (50 vol%) were then drop cast on the substrate to make different sensors. These were then placed in a reactive chamber and PPY was deposited by chemical vapor deposition. These sensors showed very good responses to NH 3 and the best response was 246% at 350 ppm with an LoD of 0.74 ppm NH 3 . The detection range was 45-350 ppm with a response time of 11 s and a recovery time of 198 s. This is promising but the recovery time is a bit longer than what is expected in a consumer device.
Li et al. developed a very responsive NH 3 sensor where both the response and recovery times were ≈7 s with a response rate of 25.5% at 100 ppm NH 3 . [160] They reported an LoD of 1 ppm and a range of 1-800 ppm. The fabrication process is little complicated, but they achieved excellent performances for an NH 3 sensor for a consumer device to be used for food spoilage detection. To begin they have dissolved vanadyl acetylacetonate (VA) in N,N-dimethylformamide (DMF). Then hollow Au/Polypyrrole Capsules (HAuCl 4 ) and ethanol were added to the solution and stirred for an hour. Then polyvinylpyrrolidone (PVP) was added to the solution and stirred for another hour to make PVP/VA/HAuCl 4 . This was electro-spun in air under a relative humidity of 40%. Then these nanofibers were heat treated at 75 °C until the underlying PVP melted and then the temperature was increased at a rate of 3 °C min −1 until 330 °C. It was kept at this temperature for two hours and sintered from 330 to 450 °C at 2 °C min −1 rate and maintained at 450 °C for 30 min. This made an Au/V 2 O 5 membrane which was followed by in situ vapor-phase polymerization of PPY on the Au/V 2 O 5 membrane. Figure 21 is a schematic illustrating the sensor fabrication process. Another NH 3 sensor with a very low LoD of 100 ppb for NH 3 was reported by Xuan Du et al. but it has a very narrow range of 0.1-1 ppm and the response and recovery times are greater than 400 s. [161] There have been several other materials such as polyelectrolyte complexes, [162] polyethylene oxide, [163] p-toluenesulfonic acid (PTSA), [164] styrene-ethylene-butylene-styrene, [165] Ag nanocomposite, [166] and ammonium persulfate [167] together with PPY that have been reported by various research groups and the comparison of their performances can be seen in Table 2. They all have their own advantages but, suffer from the common problem of long response and/or recovery times and are not suitable for food spoilage detection device for consumers. All different PPY based NH 3 sensors discussed up to this point are resistive type sensors. Muthusamy et al. proposed an ammonia sensor using an alternative optical measurement platform. [168] This sensor has a range of 0-500 ppm with a sensitivity of 78% at 100 ppm NH 3 . There were no specific response and recovery times presented but, as this is an optical sensor it is fair to assume the response is instant. A love-wave based sensor has been reported where they measure a change in frequency in response to varying ammonia concentration. [169] They have reported a range of 5-15 ppm with a range of 898 Hz at 2 ppm NH 3 and response and recovery times of 59 and 74 s, respectively.

Hydrogen Sulfide Gas Sensors
Hydrogen sulfide (H 2 S) is another major gas formed by bacteria in food which causes food spoilage. [31] Therefore, detecting H 2 S in very small quantities will help us identify the bacterial activity during food spoilage at an early stage. If a consumer device is made to identify H 2 S inside the food package, that will help the customers to make sure that the food they buy is not spoiled at the time of purchase. H 2 S gas sensors are available in many different forms and conventional semiconductor-based and metal oxide-based sensors dominate the market. SnO 2 , [170] Fe 2 O 3 , [171] In 2 O 3 , [172] MoO 3 [173] are a few of the metal oxide compounds used in H 2 S sensors found in recent literature. However, their integration into food packaging has not been investigated and needs a thorough study before using them for food spoilage applications. Conducting polymer based H 2 S sensors are easy to fabricate and integrate into food packaging as most of them have flexibility and bio compatibility. PANI and PPY are two of the most investigated conducting polymers for H 2 S sensing applications and therefore, in this review it is focused on these two types over the other conducting polymers.
Since the threshold level of H 2 S gas to determine the food spoilage status depends on the type of food and customer requirements, it is hard to define a single value for all cases. 10-100 ppb of H 2 S is the level when a rotten egg is first noticeable and above 20 ppm is considered not safe for long term exposure. [72] Therefore, 10 ppb to 20 ppm of H 2 S is a range wide-enough to identify early-stage to mature-stage food spoilage.
H 2 S can interact with conductive polymers via the doping mechanism however, as a weak acid, H 2 S is partially doped into the conductive polymer results in a low sensitivity. [174] This causes fabricating H 2 S sensors is more difficult than fabricating NH 3 sensors using the same materials. Coleone et al. presented a theoretical study on polypyrrole derivatives for toxic gas detection where they analyzed derivatives such as PPY-F, PPY-NH 2 , PPY-OCH 3 , and PPY-OH. [175] After an extensive theoretical analysis they found that the PPY derivatives have strong interactions with most toxic gases, however they do have less extensive interactions with analytes such as AsH 3 , H 2 S, and PH 3 . This finding explains why there is less published work on PPY based H 2 S sensors.

Polyaniline-Based Hydrogen Sulfide Sensors
There are not many PANI-based H 2 S sensors reported in the recent literature, however, the following is a summary of the literature found for this study. Bibi et al. developed a carbon aerogel PANI composite based H 2 S sensor which showed ≈49% sensitivity at 50 ppm H 2 S. [176] They synthesized graphene oxide though the Hummer's method and dispersed it in deionized water by sonication, after which the solution was freeze dried by placing in a tube pre-frozen by liquid nitrogen for 20 min. This freeze-drying process was carried out at −48 °C for 48 h followed by 24 h at room temperature to prepare the graphene oxide aerogel (GOA). They mixed 1 wt% of PANI powder in N-methylpyrrolidone (NMP) solvent under magnetic stirring for 3 h. 1 wt% (with respect to PANI) of GOA was added to the same solution under magnetic stirring. Finally, the solution was sonicated for one hour to obtain the PANI/GOA composite material. The same procedure was repeated for 3 wt% of GOA to make the other PANI/GOA composite. The composites were spin-coated on IDE substrates to make the sensors. They reported a response time in the range of 1-89 s and a recovery time in the range of 240-865 s dependent upon the H 2 S concentration and achieved an LoD of 1 ppm. Another work by the same research group reported a carbon aerogel/ PANI sensor showing a sensitivity of 452% at 50 ppm H 2 S. [177] As Figure 22 illustrates, they created the PANI/carbon aerogel composite in a sequential process. The hydrolysis and condensation steps were done at 45 °C for one day and 75 °C for another day where cross-linking processes had finished by that time and the gel was formed. The obtained gel was placed in ethanol for five days while changing the ethanol daily to remove residual solvents. Then it was placed at room temperature for seven days to remove excessive ethanol and finally the carbon aerogel was obtained by carbonization at 1000 °C for six hours under N 2 atmosphere. This sensor displayed an LoD of 1 ppm with response and recovery times of 1 and 135 s, respectively with a range of 1-50 ppm of H 2 S but unfortunately due to the longer recovery time they are not suitable for consumer devices for food spoilage detection.
SnO, SnO 2 , and WO 3 based PANI sensors have been tested by several research groups for H 2 S sensing in the past. [178][179][180][181] Shang et al. reported a zinc oxide based PANI senor displaying a response of 40.5% at 50 ppm with response and recovery times Figure 21. The fabrication process illustration of the Brain Neural-like PPY/Au nanofibrous film for NH 3 sensing. Reproduced with permission. [160] Copyright 2020, American Chemical Society.  [158] of 63 and 12 s, respectively. [180] They synthesized ZnO powder by following a sequence of steps. First Zn(CH 2 COO) 2 2H 2 O was added to deionized water and then NaOH was added to the solution in the required quantities and stirred well for 30 min. The solution was heated to 120 °C for one day in an autoclave and washed several times and dried for 12 h, which produced ZnO powder. PANI was synthesized using standard in situ polymerization in an ice-bath for two hours.  [178] They synthesized graphene oxide (GO) using Hummer's method. SnCl 2 was fully dissolved in DI water after which NaOH was added dropwise to nucleate SnO 2 until the Figure 22. The fabrication of carbon aerogel/PANI composite. Reproduced under the terms of Creative Commons Attribution (CC BY 4.0) license. [177] Copyright 2017, MDPI.  pH reached a value of 9. Then it was transferred to a Teflon lined autoclave and maintained at 180 °C for one day. The white color precipitate was dried at 80 °C overnight to obtain an SnO 2 nano-powder. The PANI/SnO 2 /rGO nanocomposite was synthesized by oxidative interfacial polymerization of aniline in a single pot with the prepared SnO 2 and GO. They confirmed the existence of reduced graphene oxide by XRD analysis and in addition, they carried out TEM and EDAX analysis, FTIR analysis, and UV-DRS to verify the various properties of the sensing material and the sensor. [178] The fabricated sensor displayed sensitivities of 56% and 45% for H 2 S and NH 3 respectively at a concentration of 100 ppm for both gases. However, the selectivity in question as all the tests were carried out in the presence of a single gas in air. Therefore, it is hard to comment on the sensor output when a combination of these gases would be present in a real sample. However, for food spoilage detection it may be used as the alert could be triggered by either gas, however calibration would be very difficult. Zhang et al. used exactly the same materials (PANI/rGO/SnO 2) with an in situ polymerization process and reported a sensor with an LoD as low as 50 ppb. [181] In contrast to the previous study, [178] they used a different morphology using a sacrificial template of carbon spheres. First, they synthesized carbon microspheres in the following way. Glucose (3g) was fully dissolved in DI water for an hour and the solution has transferred to a Teflon lined autoclave and kept at an elevated temperature of 190 °C for nine hours. Then the precipitates were washed three times in DI water and dried at 80 °C for eight hours to produce the black/ brown carbon powder. These carbon microspheres were used as a template to prepare hollow SnO 2 spheres. In this process 7 g of SnCl 4 ·5H 2 O was dissolved in 40 mL of ethanol solution and then the pre-prepared carbon microspheres were added to this solution. Then 2 g of NaOH dissolved in 2 mL of DI water was stirred for 30 min and these two solutions were mixed together where the pH reached a value of 10. After stirring for another hour this solution was transferred to an autoclave and kept for 24 h at 120 °C and then dried at 60 °C for 12 h followed by an annealing process at 600 °C for three hours at a rate of 2 °C min −1 to produce the hollow SnO 2 spheres. Then the PANI/rGO/SnO 2 ternary composite was made by in situ polymerization and screen printed on an IDE. This sensor recorded response and recovery times of 80 and 88 s respectively with a sensitivity of 9.1% at 50 ppm and a range of 0.05-10 ppm of H 2 S. The produced sensor is suitable for detecting very low concentrations of H 2 S, but again the response and recovery times are bit longer than required for a consumer device. Belkhamssa et al. presented a PANI/WO 3 /CuCl 2 H 2 S sensor with a range of 0.1-1 ppm, an LoD of 155 ppb and a response of 20% at 0.1 ppm. [179] The response and recovery times are 10 and 240 s, respectively. They concluded that by adding WO 3 to the PANI/CuCl 2 composite, it increased selectivity and displayed reversibility. Gautham and Panda investigated the effect of moisture and the molecular weight of PANI on H 2 S sensor performance and revealed that their sensor resistance increased in response to increasing H 2 S concentration in a dry environment, but the sensor resistance decreased for the same conditions in a humid environment. [182] They also reported that the response time and sensitivity are non-monotonous with respect to the molecular weight of PANI, however they noticed that the response time decreased monotonically with an increasing band-gap of PANI. Ali and Shano investigated the influence of solvents on PANI nanofibers synthesized using a hydrothermal method and their use in H 2 S sensing. [183] They reported that the PANI nanofibers prepared using 2-methoxyethanol had the highest energy gap value while using water as a solvent resulted in a smaller energy gap value. Further, they reported a sensitivity of 23.67% at 25 ppm and super-fast response and recovery times of 0.83 and 0.8 s, respectively for water based PANI nanofiber sensors. However, they only carried out the experiments at a single concentration of 25 ppm H 2 S. Chaudhary et al. reported that PANI/Ag nanocomposite films modified by an electron beam could influence the H 2 S sensing performance. [184] They showed that the electrical conductivity of the film was enhanced with increased electron beam dose. The LoD reported was ≈1 ppm and the range was 1-20 ppm with a sensitivity of ≈70% at 20 ppm H 2 S. Almeida et al. demonstrated PANI modified cotton fabrics for H 2 S measurement with a range of 1-1000 ppm. [185] All these PANI-based H 2 S sensors have their own advantages and disadvantages with respect to the intended application of food spoilage detection. Compared to the number of available PANI based NH 3 sensors, there are not as many PANI based H 2 S in the recent literature and therefore there are opportunities for one to investigate the possibilities of developing new PANI-based disposable flexible H 2 S sensors.

Polypyrrole-Based Hydrogen Sulfide Sensors
The number of PPY based hydrogen sulfide sensors is limited in the literature. [135] Liu et al. reported a method to transform H 2 S into elemental sulfur. [186] Though they did not propose it as a sensor, it could easily be developed as a highly selective sensor for H 2 S. There they used PPY/KOH substrates synthesized by direct carbonization of polypyrrole at temperatures between 600 and 800 °C. They reported that the PPY/KOH substrates developed at 700 °C are the best for H 2 S absorption. Further studies are needed for the response time and as per the available information in literature this is not an easily reversible process. Therefore, if a sensor is made using this substrate, it will be a single-use type disposable sensor. A PPY based aerogel has been used by Shu et al. to develop an optical output sensor. [187] To prepare the PPY/Cu x O/GO aerogel, they used an in situ polymerization procedure with a 'big-macromolecular surfactant' of graphene oxide. Figure 23a shows a schematic illustrating the PPY/Cu x O/GO aerogel synthesis process. They then drop-coated this aerogel on to a cellulose fiber filter paper to make the sensor. The authors confirmed the action of the large GO molecules in the network and its effect on sensing through various experiments. They also made a circuit consisting of two LEDs in series with these sensors and developed a color measurement scheme with mobile phones to capture the intensities of the LEDs and successfully convert them into relevant H 2 S concentrations. [187] This sensor has a range of 2-200 ppm, but the response and recovery times and sensitivity data were not provided, however, they can be approximated from the graphs.
Shu et al. presented a Cu 2+ doped SnO 2 /PPY nanospheres based H 2 S sensor with an LoD of 50 ppb. [188] They used Cu 2+ doped SnO 2 nanograins (dNGs) in the sensor fabrication where the dNGs were synthesized by a reflux method in a mixed solvent. The method uses 1.6 g of SnCl 2 .H 2 O and different ratios of HCl (0%, 1%, 3%, 5%, 7%, and 10%) that were dissolved in 40 mL of ethanol solution (0.1 mL of 6 m HCl and 0.1 g of cetyltrimethylammonium bromide [CTAB]) under stirring. Then 110 mL of DI water was added slowly and the solution was refluxed at 90 °C for 2 h where the precursor formation could be witnessed by the yellowish-white color in the solution. Then the suspension was cooled to room temperature and the precipitate was collected. Finally, it was washed in ethanol and dried at 60 °C for 4 h, calcinated at 400 °C for one hour and ground to obtain the dNGs inorganic nanograins. Then the Cu 2+ -doped SnO 2 nanograins polypyrrole hybrid (dNG@SP) was chemically synthesized using standard procedures. This was coated on an IDT to fabricate the H 2 S senor. They also produced a PPY only sensor for comparison purposes. [188] The results show a range of 0.3-50 ppm, a sensitivity of 9% at 50 ppm and response and recovery times of 7 and 14 s, respectively. This sensor looks very promising for a food spoilage detection device with these performance parameters. They concluded that the dNG@SP increased the sensitivity by 7 times compared to that of the pure PPY based sensor at 50 ppm H 2 S and the response recovery times were improved 27 and 22 times respectively, in comparison to the pure PPY sensor.
Abdel Rahman et al. reported a cellulose acetate based nanofiber and nanofilms for H 2 S sensing. [189] They prepared three different proportions of nanoparticles of WO 3 (5%, 7.5%, and 10% by weight in proportion to cellulose acetate) which were used in the preparation of PPY/cellulose acetate/WO 3 nanofiber and nanofilm sensors. The mixtures were electrospun to make the nanofibers and the mixtures were dropped onto Teflon films and vacuum dried at 50 °C to make the nanofilms for the sensors. The sensor was made by placing a 1 cm × 1 cm piece of nanofiber/film in between a bottom electrode of Cu (1.5 × 1.5 cm 2 ) and a top electrode of stainless-steel mesh (250 × 250 µm 2 ). They tested the sensors for 1, 10, 15, 25, and 50 ppm of H 2 S and reported that the maximum range was 1-50 ppm with an LoD of 1 ppm and a response time of 22.8 s with a sensitivity of 31.2% at 50 ppm H 2 S. This sensor is also suitable for food spoilage detection.

Discussion
In this review it is mainly focused on NH 3 and H 2 S gas sensing to detect food spoilage as they are two of the main gases emitted by macrobacteria activity during the process of food spoilage in meat, egg, and fish. Sensing these two gases alone may not be the best way to detect food spoilage in some other low protein food. However, testing for NH 3 and H 2 S works for most food that is spoiled quickly. The type of tests reviewed here are mostly static, one-time tests and therefore the development of low-cost sensors is essential for consumer-devices.
The sensors considered here are mainly polyaniline-based or polypyrrole-based and they both shows good biocompatibility.
In particular polyaniline has shown good biocompatibility for skin irritation, sensitization, and cytotoxicity. [190] Polypyrrole is usually considered to be a promising biocompatible material used in many different biomedical applications. [191] Due to this unique feature, we have focused on these conducting polymers and their derivatives as sensing material for food sensors. However, the sensors considered here are composites of these two conducting polymers with other material such as CNT, WO 3 , SnO 2 , Zn 2 SnO 4 , CuFe 2 O 4 , etc. Therefore, each composite needs to be further tested for their biocompatibility before utilizing for food sensing. These materials provide the 3D structures for capturing the target gas effectively and therefore provides higher and quicker response.
The sensors based on PANI and PPY for detecting H 2 S and NH 3 are being designed and developed using metal oxides, MOFs, graphene, CNTs, and many other 3D materials. They need to have the flexibility for integration into smart packaging systems for future demand. Not only the sensor, if a microcontroller system with this sensor can be integrated into the food packaging material, then it can be developed as a smart food sensor. Then a hand-held device with an internet of things (IoT) enabled system can track and monitor packaged food at different stages of the supply chain and in store for maximum consumer satisfaction.

Challenges and Future Research Opportunities
Food sensing technology is a critical global need to monitor food quality and ensure hygienic condition for healthy living. Today, researchers face various challenges to develop high-quality reliable sensors for real-world applications and its implementation in smart packaging. The most critical challenges in the NH 3 and H 2 S food sensor area are: 1) cost of production, 2) selectivity for the target gas, 3) greater sensitivity, 4) faster response and recovery times, 5) biocompatibility, 6) shelf lifetime, and 7) limit of detection. In our focused food sensor review, we have successfully described some of the most important and critical gas sensors with a very high sensitivity ranging from 0.1 to 500 ppm, however with the drawback with that they have longer response and recovery times. [98,107,126,127,151,166] In order to develop next generation food sensors, researchers should take into account the selection of an appropriate active sensing site in conducting materials with a wide range of functionalities to enhance the surface area for higher sensitivity as well as affinity to target analytes. For example, if a sensor is designed to measure a very low concentration of H 2 S, then the active sensing material should have a high selectivity for H 2 S gas only, which will depend on the careful selection of the active sensing conducting material with tailored functionalities. At the same time, it should also provide a rapid and large change in electron transfer properties when reacted with H 2 S gas to ensure a fast reaction and recovery time. It has been noticed that for most of the ammonia and hydrogen sulfide gas sensors, the choice of active materials is either polyaniline or polypyrrole and these active sensing material exhibits very high sensitivity. The polyaniline-based gas sensor has good selectivity of ammonia because when polyaniline based materials exposed to ammonia, their conductivity would be changed due to the reversible reaction polyanilineH + + NH 3 ⇋ polyaniline + NH 4 + . [192] Whereas in polypyrrole sensors, ammonia acts are reducible gas and able to provide electrons which increases the electron concentration of PPy. Due to this reason when ammonia contacted to the PPy, the resistance of the PPy films decreased. [193] In addition to the active sensor material selection with higher sensitivity and selectivity, there is also great scope in developing fabrication techniques and sensor integration into smart electronics. Listed below are some of the future research directions.
Development of novel low cost conjugated conducting polymer materials with high selectivity and sensitivity for the target analytes. This includes synthesizing new conjugated building blocks as well as developing homo or co-polymer networks with better conducting properties. Development of new 2D and 3D nanomaterials and their combinations to be used as the active sensing material. The 2D and 3D materials can be combined with conducting polymer for better processing and enhancing conductivity. Such a highly conducting active layer can show changes in current when exposed to the target gas with very low concentration. From the material horizon perspective, there is scope to use a wide range of materials for future advanced food sensing technology which includes soft conjugated organic semiconductors (small molecules and polymers), 2D materials, metal oxides, nanomaterials (inorganic quantum dots, carbon dots), organometallic materials (metal complexes, metal-organic framework, perovskites). For the selection of materials, one needs to consider the material cost, ease of processing, scalability, long term stability, appropriate functionality, and suitability for various prototyping. Some of the key research areas listed below are critical and important for future sensing technology development.
• Develop metal-oxide framework (MOF) based conjugated materials for enhancing gas sensitivity. • Develop advanced low-cost fabrication techniques including spin coating, dip coating, screen printing, inkjet printing, and 3D printing to make the prototypes required for smart sensing integrated packaging. Printing techniques have the advantage that material consumption is very low, so low-cost devices can be fabricated with precise patterning. • From the consumers utilization perspective, it is expected to develop food sensors which can be used at ambient conditions. The active sensing materials properties can be tuned based on the conjugated building blocks together with the fabrication method to improve the shelf lifetime. Based on the nature of food, its deterioration with the type of release of gas, the active sensing materials properties can be tuned.
• Digital technology has transformed human life, so the next generation sensor devices need to be low energy consuming and interfaced with the Internet of Things (IoT). These flexible prototype devices can be connected via Bluetooth to the mobile phones and computers so real time data can be monitored to evaluate food safety.

Conclusion
In this review article, we provided an overview of conducting polymer-based sensors and their suitability for food spoilage detection based on recent literature. The main gases generated during food spoilage are considered here which includes NH 3 and H 2 S since they are produced by bacteria activity during food deterioration. The two conductive polymers reviewed in this article for their suitability to make food sensors are PANI and PPY. The review revealed that there are number of PANI and PPY based NH 3 and H 2 S sensors suitable for consumer electronic devices for food spoilage detection while some other sensors are more suitable for long-term food soilage monitoring devices to be used in food transport or storage stages. We found that there are several PANI based NH 3 sensors with promising characteristics for food spoilage detection applications where the number of suitable PPY-based sensors for the same purpose is comparatively less. The conducting polymer metal oxide composites and nanostructure-based sensors have proven to be the best suitable sensors for this application among the reviewed literature. Other than a few sensors, all the other reviewed sensors are of resistive type and therefore, research opportunities exist for other type of sensors such as electrochemical type, transistor type, capacitive type, frequency type or luminescence type to be developed. The luminescence type of sensors have the advantage of warning about the food spoilage without the aid of expensive external instrumentation and the frequency type of sensors have the direct digital interfacing capability. Further, there are opportunities to develop specific conductive polymers with parameters tuned for target gases where the response and selectivity can be intensified. Though this review has mainly focused on NH 3 and H 2 S, there are research opportunities for developing other sensors such as CO 2 sensors and VOC sensors to help monitoring food spoilage since these gases are also released when food gets spoiled. Another direction for future research is single sensor with tunable selectivity where the same sensor can response to only one gas at any given moment dependent on the tunable parameter value. This could be an externally provided bias voltage of current to the sensor.
This review also provides comparison tables for ammonia sensors using PANI and PPY as the active layer based on the recent literature. In our opinion this is a first kind of single source of information for any researcher interested in food sensors science and technology.