Reusing Waste Coffee Grounds as Electrode Materials: Recent Advances and Future Opportunities

Abstract Coffee industry produces more than eight million tons of waste coffee grounds (WCG) annually. These WCG contain caffeine, tannins, and polyphenols and can be of great environmental concern if not properly disposed of. On the other hand, components of WCG are mainly macromolecular cellulose and lignocellulose, which can be utilized as cheap carbon precursors. Accordingly, various forms of carbon materials have been reportedly synthesized from WCG, including activated carbon, mesoporous carbon, carbon nanosheets, carbon nanotubes, graphene sheet fibers (i.e., graphenated carbon nanotubes), and particle‐like graphene. Upcycling of various biomass and/or waste into value‐added functional materials is of growing significance to offer more sustainable solutions and enable circular economy. In this context, this review offers timely insight on the recent advances of WCG derived carbon as value‐added electrode materials. As electrodes, they have shown to possess excellent electrochemical properties and found applications in capacitor/supercapacitor, batteries, electrochemical sensors, owing to their low cost, high electrical conductivity, polarization, and chemical stability. Collectively, these efforts could represent an environmentally friendly and circular economy approach, which could not only help solve the food waste issue, but also generate high performance carbon‐based materials for many electrochemical applications.


Introduction
Coffee is one of the most popular beverages, with an estimated 2.25 billion cups consumed daily worldwide amounting to over In this context, this review is structured to offer timely insights at the historical development of WCG reuse that occurred throughout the past decades. Mostly notably, WCG is an abundant and cheap carbon resource that can be reused to lower manufacturing costs of electrode materials. Therefore, a more focused view at its most recent applications as high value-added electrode materials is provided including key milestone publications that marked the start of different application avenues in this promising research area. The key conversion parameters and properties of WCG as electrode materials are then examined, with the important papers being explored and compared in more depth. Finally, some conclusive thoughts and suggestions are outlined to analyze in what directions WCG electrode research may continue and for what other applications it may be used in the future.

Early Attempts at Recycling WCG
The reuse of WCG has been attempted since the late 1970s in which it was initially reported for using as ruminant feedstock by McNiven et al. [59] Sikka et al. [60] investigated the use of WCG as a feedstock for fattening pigs. This study showed that an introduction of up to 10% WCG can be included in an isonitrogenous feeding mixture over a period of 70 days without affecting the overall pig's health. In 1996 Udayasekhara [61] studied the nutrient composition of WCG and the supplementary effects in animals. It was shown that the increase in spent coffee in the feedstock negatively attributed to the following: gain in body weight, protein efficiency ratio, net protein utilization and amongst others. In addition, WCG has been used in gardening applications as a green compost material, and the composting of the coffee grounds helps to enrich the soil with nitrogen. Provenzano et al. investigated the use of different materials as compost materials, including sawdust, waste coffee, farmyard manure, and the organic fraction of domestic solid waste. [62] It was noted that the samples from waste coffee were characterized by a higher functional group heterogeneity and a lower degree of aromaticity. Research in 2004 by Reddy et al. [63] demonstrated the organic recycling of WCG through a biotechnological process. This study essentially mixed WCG with biofertilizers and left them to incubate over a period of 45 days. It highlighted that the spent coffee was enriched by the process and therefore it can be reused as organic manure in sustainable agriculture. Alongside agricultural/gardening applications, WCG has also been reported to be used as mulch, a snail/slug deterrent, or as a base for worm food for vermicomposting. [64,65] Up to 2000, the reported reuse of WCG in literature was centered in the field of agriculture, as fertilizer and compost. To explore different avenues of WCG reuse, Regalado [66] carried out research in the production of enzymes (i.e., β-mannanases) from solid substrate fermentation of both WCG and copra paste by inoculating both Aspergillus Oryzae and Aspergillus Niger. [66] This was one of the earliest attempts that started to branch out of the agricultural/composting route typically used for coffee waste. Thus far, there has been abundant studies tapping into WCG's potential as feedstock or cultivation medium for the production or extraction of various value-added microbiological or chemical products, [67] including fruiting bodies, [68] pigment (e.g., carotenoids [69] ), enzymes, [70,71] cosmetics, [72] pharmaceutics (e.g., prebiotic, [73] anti-inflammatory [74] and antioxidant compounds [75] ), polymers (e.g., polyurethane [76] and polyhydroxyalkanoates [77,78] ), and biofuels (e.g., biosyngas, [79] biogas, [80] biodiesel, and bioethanol [81] ), etc.
In 2001, Nakagawai et al. [82] first explored WCG as precursor for activated carbon production via relatively rapid pyrolysis, as previous studies widely used varying food waste materials or natural organic products. In their work, steam activation was used to activate the carbon obtained from WCG, of which surface area 900 m 2 g −1 and pore volume 0.3 cm 3 g −1 were achieved. When samples were further pretreated with a mixture of metal salts and acid treatments (e.g., Ca(OH) 2 and HNO 3 ), these values could be improved to over 1000 m 2 g −1 for surface area and roughly 0.5 cm 3 g −1 for pore volume. Following this research, many studies have demonstrated the use of either raw WCG or WCG-derived activated carbon as alternative adsorbents for potential environmental remediation, including the removal of heavy metals, dyes, and organic contaminants from aqueous solutions. [83][84][85][86][87][88][89] On the other hand, activated carbon is considered to be one of the most used and adaptable electrode materials in electrochemical applications, which has signaled a great potential in the alternative use of WCG in this direction. [90] Next, this review continues with a specific focus on how the WCG can be reused in different areas of electrochemical applications, which to our best knowledge has been lacking in the literature.

Recent Applications of WCG as Electrode Materials
Literature was searched to gain an insight on the reuse of WCG as high value-added electrode materials, which yielded 72 publication results from Web of Science between 2008 and 2022. The data collected was then cumulatively plotted to highlight and illustrate years of growth in WCG research for electrochemical applications as shown in Figure 2. It is evident that the interest in the reuse of WCG as electrode materials has steadily grown throughout the years, with a large increase (both citations and publications) occurring recently around 2020-2021 indicating that it is a novel research area and gathering momentum in a variety of applications.
Key milestones in the development of WCG as electrode materials are illustrated in Figure 3. From the application perspective, the reuse of WCG as electrode materials was first reported in 2008 by Rufford et al. [1] Nanoporous carbon electrodes were fabricated using pyrolyzed coffee beans with ZnCl 2 activation and then used as a low-cost alternative for supercapacitor applications. So far, most of published papers using WCG derived electrodes are in the application of capacitors.
In 2017, reusing pyrolyzed WCG as electrodes began to move away from capacitors: Song et al. attempted to fabricate an asymmetrical energy storage device (AESD) using WCG derived carbon as a cathode for surface-driven sodium-ion storage; [34] A study by Ghi et al. investigated the use of core (ZnO)/shell (WCG derived carbon) microspheres as a nonprecious electrode material in direct methanol fuel cells (DMFCs). [91] In 2018, Krikstolaityte et al. reported reusing of WCG as a promising electrode material for vanadium redox flow batteries, which demonstrated higher energy and voltage efficiency in a static cell test than the typical bipolar graphite (e.g., TF6, SGL Carbon) plates; [36] Gao et al. demonstrated WCG derived carbon to be a good candidate as anode material for sodium ion battery. [37] In 2019, Zhao et al. fabricated hierarchically microporous activated carbon from WCG enabling Se cathodes for high-performance lithium-selenium (Li-Se) battery. [41] Most recently, Kim et al. [40] and Djuandhi et al. [45] explored the use of WCG derived biochar as a cheap alternative for a conductive sulfur host in high-capacity Li/S batteries.
In 2019, Jagdale et al. highlighted a study to use waste coffee biochar after 700 °C pyrolysis as a potential low-cost carbon precursors for fabricating humidity sensors. [92] Screen printing was used to fabricate the sensor electrodes, of which impedance response was observed for relative humidity (RH) between 20% and 100% along with fast response and recovery time (less than 2 min). A study by Estrada-Aldete et al. in 2020 utilized WCG to build a carbon paste-based sensor electrode to determine concentrations of heavy metals in aqueous solutions. [93] An electrode consisting of 50% WCG provided the best results for differential pulse anodic stripping voltammetry determination of Pb(II) and Cd(II) ions, at limit of detection (LoD) of 90 and 89 × 10 −6 m, respectively. The chosen electrode was also conducted against a glassy carbon electrode, which showed a significant order of magnitude increase, hence further highlighting the potential use of WCG in electrochemical sensor applications.
In 2021, a paper published by Li et al. outlined, for the first time, the fabrication of a novel, metal-free and environmentally friendly TENG (Triboelectric Nanogenerator) device by Figure 2. A graph to illustrate a) the number of yearly citations and b) publications of WCG derived carbon materials in the field of electrochemical applications on a cumulative scale to show research interest (last accessed 23/04/2022 on Thomson Reuters' Web of Science using keywords "waste/ spent coffee grounds," "electrodes" and "electrochemical"). embedding carbonized WCG into the silicone rubber elastomer as a lightweight and shape-adaptive capacitors (see Figure 4). [94] As a result, this wearable TENG device can harvest surrounding energy from human motions and store the generated electricity in these WCG derived capacitors to drive portable electronics. Furthermore, the self-powered TENG has also demonstrated the capability in sensing human physiological signals, monitoring motions, emulating gestures, as well as developing smart tactile epidermal controller and intelligent vending coaster, energy-efficient artificial sensors, and wearable electronics toward humanoid robotics and human-machine interfaces.

Pyrolytic Carbonization
Within the current literature, WCG derived carbon as electrode materials are noticeably used for electrochemical applications in supercapacitors and batteries. In order to obtain high performance electrodes, WCG need to be carbonized and activated as the former enables its conductivity and the latter will improve the resulting capacitance. Therefore, carbonization and activation processes have been the focus of most reported studies, of which the key conversion parameters and properties across different studies are summarized in Tables 1 and 2. For these applications, WCG was initially pyrolyzed between 500 and 1000 °C, which was commonly carried out in a tube-furnace. The decomposition temperature of WCG in to activated carbon precursors were reported to be in the range of 257-470 °C. [95] More specifically, thermal decomposition of carbohydrates occurs between 200 and 260 °C; that of hemicellulose occurs between 200 and 260 °C; that of cellulose occurs between 240 and 310 °C; that of lignin occurs between 310 and 400 °C. [96][97][98][99][100] As the temperature continues to rise (>500 °C), higher degree of graphitization (i.e., lower defect to graphene ratio) will be introduced along with increased electrical conductivity into WCG derived carbon. [101][102][103] After pyrolysis, samples are typically activated using different methods, such as chemical activation with various types of reagents. This is to aid the increase of samples' porosity and active surface area, which are another two commonly explored properties of WCG derived carbon electrodes manufactured for electrochemical applications. Studies have shown that WCG derived carbon would feature minimal surface area and micro-porosity without any activation. [37,45] It is generally agreed that the specific capacitance (C F ) and charge/discharge ability of the electrode increases with porosity and surface area, [4] as increased porosity allows for more charge interactions and pathways to occur. [12] More specifically, micropores (diameters < 2 nm) contribute to high surface area, which plays an essential role for charging the electrical double layer capacitance and determines the value of capacitance; on the other hand, mesopores (diameters 2-50 nm) allow fast mass-transport and the free movement of charged ions providing high power density. [104] Recent studies suggested that the coexistence of the microporous and mesoporous structures in carbon materials could have a synergistic effect on their pseudocapacitance of the double layer. [105,106] Shi first published a simplified model to  [34] Copyright 2017, American Chemical Society; Adapted with permission. [37] Copyright 2018, Elsevier; Adapted with permission. [91] Copyright 2017, Nature; Adapted with permission. [92] Copyright 2019, MDPI; Adapted with permission. [93] Copyright 2020, Elsevier; Adapted with permission. [94] Copyright 2021, Elsevier. estimate the specific capacitive contributions from meso-and micropores. [107] Rufford et al. later modified this model and discovered that mesoporous structure favors the rapid chargedischarge rate but microporous structure plays a bigger part in the slow charge-discharge process and storing energy. [108]

Chemical Activation Agents
Rufford et al. first studied the effect of different activation reagents on morphological characteristics and electrochemical properties of carbon electrodes prepared from WCG. [3] Coffee grounds were impregnated with FeCl 3 , ZnCl 2 and MgCl 2 and then treated at 900 °C. Resultant carbon materials from ZnCl 2 and FeCl 3 activation was found to have higher surface areas (977 and 846 m 2 g −1 , respectively) than that from MgCl 2 activation (123 m 2 g −1 ). As a result, improved specific electrochemical double-layer capacitances of 57 F g −1 was reported in the system with FeCl 3 treated carbon electrodes.
A later study by Chiu and Lin [18] tried to expand the range of activating agents, which encompassed the whole pH range from alkaline and acidic. As a result, a total of six different activating agents (i.e., KOH, NaOH, HCl, H 3 PO 4 , ZnCl 2 , and FeCl 3 ) were selected and their effects on activated carbon produced from WCG were investigated using a facile one-step synthesis method. A mixture of dried WCG and different activating agents (weight ratio 1:2) was placed in a tube furnace and pyrolyzed at 700 °C for 2 h in a N 2 rich atmosphere. Compared with traditional two-step pyrolysis (as illustrated in Figure 5), the energy consumption per sample of this modified approach would potentially be reduced. Morphological characteristics and electrochemical properties varied vastly across WCG samples pyrolyzed and activated by the six different activating agents. In Figure 6, SEM images of samples activated by H 3 PO 4 (a) and ZnCl 2 (d) appears to have larger grains than those activated by the rest of agents. In terms of surface area (S BET ), KOH activated was the best performing sample, which recorded 1250 m 2 g −1 and was followed by ZnCl 2 NaOH, H 3 PO 4 , FeCl 3 , and HCl at 1242, 669, 75, 41, and 9 m 2 g −1 , respectively. Compared with alkaline activating agents, the more acidic types (HCl, H 3 PO 4 , and FeCl 3 ) was proved to be ineffective in creating large specific surface area and enabling pore formation, further evidenced by their lower total pore volume (V total ) recorded at 0.005, 0.041, and 0.035 cm 3 g −1 , respectively. The estimated series resistance (R s ) for the electrode was used to indicate the electrical conductivity, [109] of which the values were measured for KOH, NaOH, HCl, H 3 PO 4 , ZnCl 2 , and FeCl 3 to be 3.17, 3.38, 2.12, 2.20, 3.41, 2.66 ohm, respectively. This was found to be roughly in the same trend as their I D /I G ratios (i.e., 2.44, 2.67, 3.11, 0.8, 2.65, and 1.66). Acidic activating agents (HCl, H 3 PO 4 , and FeCl 3 ) appeared to produce slightly higher conductivity in the resultant carbon samples. Cyclic voltammetry (CV) and galvanostatic charge-discharge (GCD) curves were analyzed to calculate the C F of each activating agent. C F values of 105.3, 69.5, 0.6, 51.0, 72.9, and 41.3 F g −1 were recorded for KOH, NaOH, HCl, H 3 PO 4 , ZnCl 2 , and FeCl 3 , respectively. The best C F achieved by KOH activated samples was shown to be five times of that of commercial activated carbon electrode. Symmetric Steady performance over 10 000 cycles   [2] Carbonized at 900 °C for 1 h under a N 2 atmosphere Prior to carbonization dried coffee grounds were mixed with ZnCl 2 at ratios of 1.0, 3.
Each sample was measured at 0.1 and 1 A g −1 , respectively There was a large capacitance drop at over 1 A g −1 Rufford et al. 2010 [3] Dried at 100 °C for 24 h Zn: Each sample was measured at 0. Huang et al. 2013 [5] No specific methods discussed Each sample was measured at 50 and 150 mA cm −2 , respectively.
The potassium-based carbons had higher retention over the commercial carbons.
Little variance was reported over 3000 cycles.

All samples exceeded 87%
Yun et al. 2015 [11] 11  [16] Obtained coffee carbon (CC) was precarbonized before use in this work The CC was doped using melamine and triphenyl phosphate to create N-CC, P-CC,   Liu et al. 2020 [21] Dried under vacuum at 80 Biegun et al. 2020 [22] Hydrolysis in an autoclave at Alhnidi et al. 2022 [33] Hydrothermal treatment at 220 capacitor fabricated using the best WCG derived samples displayed the maximum energy density of 6.94 Wh kg −1 at the power density of 350 W kg −1 along with excellent cycling stability after 8000 cycles. In the study, the highest C F value for the KOH-activated WCG electrodes was attributed to their largest specific surface area, the suitable pore volume for ions adsorption and diffusion, and the less hydrophobic functional groups (better contact between electrode surface and electrolytes); on the other hand, moderate I D /I G ratio (≈2.5) was essential in achieving the delicate balance of sufficient active sites and electrical conductivity simultaneously. In addition, the observed shifts of the D-band and G-band peaks to the higher values for the KOH-activated carbon could imply a shorter bond length, which also favors higher charge transfer and thus the energy storage ability. So far, most reported activating agent for WCG pyrolytic conversion was KOH, and various chemical activation reactions using the KOH have been proposed in Equations (1)-(6) as follows. [110] The high basic property and small size of the potassium ions (intercalating with carbon lattices) contribute to the superior activation ability of KOH toward efficient conversion of WCG to activated carbon materials [111] 4KOH CH Multistep chemical activation of WCG with more than one agent has also been reported. In the study by Liu et al., a mixture of WCG and FeCl 3 with weight ratio of 5:1 was first sonicated and pyrolyzed at 700 °C (10 °C min −1 ) under argon for 2 h, which was followed by a second stage of pyrolysis with different amount of KOH heated at 800 °C (5 °C min −1 ) for 2 h under argon (see Figure 7). [21] The FeCl 3 was shown to produce mainly microporosity and the following KOH activation introduced a large amount of micropores, which together created the hierarchical porous structure. A high carbon yield of 42.5 wt% from Figure 5. Illustration for preparing activated carbon using the traditional two-step synthesis and the novel one-step synthesis for carbonization and activation of waste biomass such as coffee grounds. Reproduced with permission. [18] Copyright 2019, Elsevier. WCG was highlighted, as adsorbed iron-containing particles in the well-defined mesoporous carbon structure could play a catalyst role during the high temperature carbonization process of biomass/polymer. [112] As illustrated in Figure 8, Xie et al. demonstrated the combined use of Fe(NO 3 ) 3 as graphitization catalyst and CaCO 3 (plus its CO 2 by-product) as pore forming agent during a pyrolysis of WCG (750 °C, Ar, 2 h), which led to a 3D porous carbon architecture consisting of crosslinked, wrinkled carbon nanosheets (around five layers). [48] Research has shown that corresponding derivatives (Fe/Fe x O y /Fe 3 C, etc.) of iron-containing precursors could easily grow into carbonaceous structure with high temperature. [113]

Chemical Activation Temperature
Activation temperature could have effect on the performance of WCG derived electrodes when using different activating agents. Zhao et al. examined the effect of activation temperature when using KOH as the activating agent (WCG:KOH mass ratio of 2:1) following pyrolytic carbonization (700 °C, 10 °C min −1 under N 2 atmosphere). [41] The mixture was then annealed at 700, 800, and 900 °C for 2 h in a N 2 rich atmosphere. Their study found that the activation at 700 °C yielded the largest specific surface area (1355 m 2 g −1 ) and greatest volume of micropores, while higher temperatures reduced the total specific surface area as the pores may have collapsed in the heat. Further SEM images (Figure 9) showed that the carbonization formed a honeycomblike structure with small pores across the sample. Upon the activation, the same honeycomb shape was maintained, while the pore size appeared to have increased drastically. This contrasts with the raw WCG that has a wrinkled surface and a nonporous structure, as evidenced in SEM analysis. [114] It was also observed that the intensity D (I D , ≈1300 cm −1 ) and G (I G , ≈1600 cm −1 ) bands in Raman spectroscopy were slightly different across the different activation temperatures used within the study. Results for the I D /I G ratio were 2.42, 2.56, and 2.61 for 700, 800, and 900 °C, respectively. The lowest I D /I G ratio of 700 °C sample indicated a slight increase in the graphitization and thus better conductivity of the materials as the G band is associated with the in-plane vibrations of ordered sp 2 carbons, whereas the D band is the outer plane vibrations in structural defects and disordered sp 3 carbons. WCG derived carbon was then utilized as a selenium (Se) cathode host in Li-Se batteries by a melting diffusion method. At a scanning rate of 0.1 mV s −1 , the reversible specific capacity of Se/AC-700 was 655 mAh g −1 , which is close to the theoretical value of Se (675 mAh g −1 ). Based on Nyquist plot simulation results, electron transfer and Li-ion diffusion coefficient of Se/AC-700 was calculated to be the highest, which led to the excellent performance as the composite cathode. The cycling stability was also assessed in which Se/AC-700 recorded at 631 mAh g −1 after 100 cycles, with insignificant capacity decay of 0.04% probably due to Se confined tightly in the microporous carbon. Some of these findings are consistent with the previous study by Wang et al., which also reported that 700 °C for KOH activation of WCG was the optimal temperature to produce the highest specific surface area (1622.77 m 2 g −1 ) and capacitance (175 F g −1 at 1 A g −1 ). [13] Figure 8. Preparation scheme of the nitrogen-enriched graphene-like nanosheets constructed 3D porous carbon framework. Reproduced with permission. [48] Copyright 2021, Elsevier. . Synthesis process of hierarchical porous carbon from waste coffee grounds and its supercapacitor application. Reproduced with permission. [21] Copyright 2020, Springer Nature.
A study by Kim et al. [40] investigated the effect of activation time on WCG derived carbon using 2 m HNO 3 and 3% w/w H 2 O 2 after their pyrolysis (800 °C under N 2 atmosphere). The acid mixture of HNO 3 and H 2 O 2 could introduce higher porosity and surface area because it would penetrate the carbon layers and break them up by oxidation. [115] Wet WCG samples were either left untreated (at 61% w/w bound water) and denoted as W-SPC, while the WCG samples dried in a convection oven at 110 °C for 24 h were denoted as D-SPC. The activation temperature was altered to investigate its effect at 60, 80, and 100 °C for 24 h. D-SPC samples exhibited specific surface areas of 31.69, 256.34, 636.62, and 529.30 m 2 g −1 for no activation, 60, 80, and 100 °C, respectively; W-SPC samples exhibited specific surface areas of 510.85, 860.68, 1037.52, and 716.83 m 2 g −1 for no activation, 60, 80, and 100 °C, respectively. Generally, the higher activation temperature accelerates the reaction, enabling pore formation and enlargement in the carbon structure. [116,117] This is consistent with the reported results and showed that the activation at 80 °C was the most effective at increasing the specific surface area and mesoporosity of the WCG. However, the higher activation temperature (>80 °C) induced excessive oxidative degradation on the surface of WCG, causing mesoporous structures to collapse and the total specific surface area to diminish. Compared with the highest specific surface area of D-SPC samples at 80 °C, W-SPC activated at the same temperature showed even higher specific surface area. This is potentially due to the formation of larger pores when the bound water vapor exploded within the W-SPC structure during the pyrolysis. As illustrated in Figure 10, these pores could have been further opened and enlarged from the chemical activation resulting in additional micro-and meso-porosity. Sulfur impregnated W-SPC-80 (weight ratio of 1:4) were then tested as electrodes in Li-S battery in the study, where an excellent initial discharge capacity of 1458 mAh g −1 was recorded and very close to the theoretical capacity of sulfur (1675 mAh g −1 ). This was also corroborated by the nearly vertical line in the lower frequency region of Nyquist plot, indicating enhanced diffusion of lithium ions into the hierarchical structure of W-SPC-80. [118] Upon testing the cycling stability, this value rapidly declined for the first 50 cycles and then stabilized with an average decrease of 0.3% per cycle. The rapid decline of discharging capacity after the first cycle was ascribed to the desorption of some of the sulfur and converted into Li 2 S at the edge of the carbon and their subsequent electrochemical isolation; [119] Much slower decrease from the second cycle was due to Li 2 S dendrite formed on the lithium electrode surface during the charging process, leading to a decrease in the total amount of sulfur participating in the charge/discharge process and the irreversible capacity reduction. [120] A final charge/discharge capacity of 474 mAh g −1 at current density of 0.2 mA cm −2 was maintained without further deterioration after 400 cycles. The similar phenomena of stabilized capacity after multicycling were also observed in other studies by Djuandhi et al. [45] and Gao et al.. [37] They assigned the cause to the growth of solids electrolyte interphase (SEI) layer, which could slow down formation of dendrite to some extent and thus improve cell cycling stability. Figure 9. SEM images of waste coffee grounds (WCG) a) as received, b) after carbonization, and c) after activation (AC-700); d) N 2 adsorption isotherms, e) pore size distribution, and f) Raman spectra of AC-700, AC-800, and AC-900. Reproduced with permission. [41] Copyright 2019, Elsevier.

CO 2 Activation
Tashima et al. reported a study using the low-cost CO 2 as a form of physical activation for pyrolyzed WCG at 600 °C for 1 h under N 2 flow (700 mL min −1 ). [7] Every sample was then subjected to activation at 1000 °C at a constant heating rate of 11 °C min −1 with a constant CO 2 gas flow (700 mL min −1 ). They then investigated the impacts that the activation time could have on the surface area and porosity of pyrolyzed WCG. Six samples were carbonized at a heating rate of 10 °C min −1 and then activated for 1-6 h at 1 h increment were denoted as HC600A1-6; Three samples were carbonized at a heating rate of 5 °C min −1 and then activated for 1-3 h at 1 h increment were denoted as HC300A1-3. The results obtained from this study highlighted that the highest specific surface area was obtained after 2 h of activation, with HC600A2 and HC300A2 having a specific surface area of 1596 and 1867 m 2 g −1 , respectively. Excessive activation demonstrated a detrimental effect on the specific surface area. After 2 h of activation, there was a rapid decrease in the specific surface area of the materials, e.g., longest activated time would reduce the specific surface area down to 258 m 2 g −1 for HC600A6. The same trend for peak micropore volume (i.e., 0.769 cm 3 g −1 and 0.958 cm 3 g −1 ) were observed after 2 h of activation for HC600A2 and HC300A2, respectively, whereas the lower heating rate (i.e., 5 °C min −1 ) in the pyrolysis step proved to increase the pore volume further. Longer activation time was also found to reduce the oxygen-containing functional group (e.g., the phenolic hydroxyl groups and the carboxyl group), which was turned into gas by the reaction of carbon and oxygen. This is potentially another drawback because the carboxyl group has been reported to give rise to the values of specific capacitances in aqueous electrolytes. [121] Electrochemical performances of WCG derived electrode materials were assessed as electric double layer capacitor (EDLC), which normally have better lifecycle than a typical battery with excellent discharge characteristics. The CV analysis was conducted at a scan rate of 10 mV s −1 , where the integrated area of quasi-rectangular cyclic voltammogram for each sample mainly correlated with its BET surface area, as the higher specific surface areas allowed for more charge transfer and therefore a better calculated areal capacitance. Therefore, HC300A2 with the highest specific surface area and greatest porosity was marked as the best performing sample with a recorded specific capacitance of 103 F g −1 in the aqueous electrolyte (1 m H 2 SO 4 ) and that of 152 F g −1 in the organic electrolyte (0.8 m tetraethylammonium tetrafluoroborate [(C 2 H 5 ) 4 NBF 4 ] in propylene carbonate). Finally, the cycling stability of HC300A2 sample was tested at the scan rate of 10 mV s −1 , where its specific capacitance remained in the 130-150 F g −1 range showing no significant drops or fading throughout 3000 cycles.

Steam activation
In the study performed by Krikstolaityte et al, they used coffee beans for an electrode material in vanadium-redox batteries (VRB) and investigated the activation step using steam alone, where water vapor and carbon material normally undergo the steam reforming reaction between 700 and 800 °C, producing CO + H 2 and yielding the porous structure. [36] Dried and pelletized coffee beans was first pyrolyzed at 850 °C (heating rate of 5 °C min −1 ) in a quartz tube for 30 mins under a N 2 gas flow (250 mL min −1 ). Following the pyrolysis, samples were subjected to steam activation using a 63 vol% steam and 37 vol% N 2 at a total flow rate of 670 mL min −1 at various activation times (1, 2, and 3 h). The impact of activation time on sample's specific surface area and the kinetics of the electrochemical reactions was assessed. Narrow pores are typically formed at first, which would progressively widen with time increasing the specific surface area and diminishing the charge transfer resistance. However, prolonged activation process was also found to increase microporosity/structural disorders in WCG derived carbon, and thus be responsible to cause stagnant ion mass transport and reduction of the overall energy/voltage efficiency. [122]

Dopant Effect
During the pyrolysis under various atmospheres, dopants can be introduced into carbonized WCG matrix. For example, raw WCG contains nitrogen heteroatoms (2.38% w/w) naturally, which would enable a certain degree of self-doping of nitrogen. [40] As a result, the potential effects of different dopants on the performance of WCG derived electrodes have also been investigated in applications, such as Li/Na-ion battery [39] and supercapacitors. [13,14,17] So far, nitrogen as a dopant received most of the attention as the C-N bond is weaker Figure 10. A schematic illustration of the synthesis of hierarchical porous carbon from raw spent coffee ground. Reproduced with permission. [40] Copyright 2020, Springer Nature. than the C-O, H-N, and C-H bonds and thus can be easily engraved on the coffee grounds surface. [123] Tsai et al. reported using adamantane-like structure HMT (C 6 H 12 N 4 ) as nitrogen precursor for doping the WCG samples, which thermally decompose into NH 3 atmosphere with no residue observed after 200 °C [39] and reduce the oxygen components in WCG by removing CO, CO 2 , or water molecules during the pyrolysis. High nitrogen content of 6.17% (more in the pyridinic form) was observed in nitrogen doped samples. Compared with pyrrolic nitrogen, the pyridinic N rich carbon sample with relatively lower degree of graphitization could contribute to more electrochemical active sites and efficient interfacial contact between electrode and electrolytes. Their density functional theory (DFT) calculations further indicated that the presence of pyridinic N introduced extra states near the Dirac cone (see Figure 11), which could result in greater conductivity. These findings make pyridinic graphene most suit able for Li storage as they enhance discharge capacity and promote the Li/ Na-ion storage performances. [124] Consequently, nitrogen doped WCG electrodes showed a power density of 107.1 mAh g −1 , which was nearly 2.02 times than that of undoped samples.
Another main advantage of nitrogen doping is the increased mesoporosity within carbon matrix, which could enhance diffusivity by introducing more paths of ion diffusion. Both Choi et al. [17] and Wang et al. [13] reported that nitrogen introduction in presence of melamine and N-methyl pyrrolidinone (NMP) led to the high specific surface area (1824 and 1622.77 m 2 g −1 , respectively) for activated carbon derived from WCG, in which the presence of pyridinic-N, pyrrolic-N, and pyridine-N-oxide were observed. Both Figure 11. DFT Models used calculations and the corresponding density of state plots for a) pyrrolic, b) pyridinic, and c) mixed. Black curve is total density of states. Reproduced with permission. [39] Copyright 2019, Elsevier.
pyridinic-and pyrrolic-N containing functional groups in carbon formation are known to be electrochemically active. On the other hand, the positive charge on pyridine-N-oxide would enhance the electron transfer at the carbon/aqueous interface. [125,126] As a result, high specific capacitance of 74 and 175 F g −1 was reported at a current density of 1 A g −1 as supercapacitors in their studies, respectively, together with remarkable cycling stability (10 000 cycles test).
Park et al. found that the combined presence of several dopants (16.1 at% oxygen, 2.7 at% nitrogen, and 1.6 at% sulfur) could aid the performance of capacitors derived from carbonized WCG. [14] High specific surface area (1960.1 m 2 g −1 ), of which most were micropores (1932.5 m 2 g −1 ) ≈0.6 nm in size, and specific capacitance (best 438.5 F g −1 at 2 mV s −1 ) was obtained with good cycling stability (2000 cycles). Unfortunately, direct comparison with samples containing no dopants was not carried out in their study. Interestingly, high temperature (800 °C) KOH activation was discovered to exfoliate amorphous carbon structures into nanoporous (<100 nm diameter) carbon nanosheets (NCNS) of defective hexagonal carbon structures with high aspect ratios (>100), as shown in Figure 12b,d.
In studying phosphorus containing functional groups and their effects on the carbon surface, particularly the polyphosphates (i.e., P 2 O 7 4− , PO 3 − , and P 4 O 10 ), Huang et al. reported a high specific capacitance of 180 F g −1 (at a current density of 1 A g −1 ) and energy density of 15 Wh kg −1 in supercapacitors assembled with carbonized WCG via 800 °C H 3 PO 4 activation. [5] A stable energy storage performance was achieved over 1.5 V, which was even above the theoretical potential (1.23 V) for water splitting. This widening of working potential window was ascribed to the reversible electrochemical hydrogen storage in narrow carbon micropores stabilized by the phosphorus functional groups. Based on an unexplained pair of redox peaks at −0.4 V/−0.1 V versus Ag/AgCl in CV voltammograms, they also speculated that these polyphosphates on carbon surface probably participated in certain redox reactions, which could contribute to the improvement of energy storage.

Microwave Assisted Carbonization
In 2015, Wang et al. highlighted a novel alternative carbonization approach, utilizing microwave plasma irradiation (MPI) to generate the various carbonaceous material from WCG. [8] Plasma ignition of H 2 -Ar mix (1:1 ratio) was achieved by using a 2.45 GHz microwave at 900 W, the WCG were loaded into a quartz tube in a nickel foil case and then bombarded with the plasma mixture for 15 mins as illustrated in Figure 13a. Under these conditions, WCG generated carbon atoms, which could then be deposited as formation of the carbon layer, leading to spherical particles with energetic dangling bonds. As temperature and pressure increased, carbon nanotubes were produced with the aid of nickel particles. As a result, the use of MPI allowed for long wavy graphene-sheet fibers (GSF) of various types (carbon nanotubes with different layer graphene sheets grown on their sidewalls) and sizing (a diameter within the range of 10-200 nm) to be produced from the WCG (see Figure 13b). Along with the presence of D and G bands, Raman spectroscopy analysis showed characteristic peaks to that of monolayer graphene, where the 2D peak (≈2700 cm −1 ) with the single bandwidth of ≈60 cm −1 was observed (see Figure 13c,d). High resolution TEM also confirmed the stacking configuration, which consisted of mono-, bi, and trilayer graphene, with a spacing between the layers of 0.345-0.352 nm (see Figure 14).
To illustrate the electrochemical performance of WCG derived GSF, CV analysis was conducted across the potential of 0.0-0.5 V in 1 m KCl solution, where typical rectangular shapes of I-V curves were observed for scan rates up to 0.1 V s −1 indicating a good capacitive behavior. Specific capacitance was calculated to be 223.93, 71.05, and 1293.33 µF g −1 at a scan rate of 0.1 V s −1 for a bare Pt, glassy carbon (GC), and modified WCG derived graphene electrode, respectively. This huge improvement in terms of the capacitance was attributed to the increased specific surface areas and unique morphology of the resultant GSF. This has demonstrated that the obtained WSG derived GSF is highly suitable for electrochemical conversion and energy storage applications, especially as capacitors.

Current Challenges and Future Research Directions
As one of the largest contributors to food waste, WCG has created adverse environmental burden due to their decomposition. Recycling WCG into other materials for use is a key step into reducing global waste in the beverage industry and play a significant role in societal transitioning to food circular economy. WCG contains mainly lignocellulose, of which the carbonization has been shown to be achievable via relatively rapid pyrolysis. In the recent decade, there are growing interests in Reproduced with permission. [14] Copyright 2016, Korean Journal Publishing Service.
converting abundant WCG into value-added carbon electrode materials. These WCG-derived electrodes have demonstrated their potential in various electrochemical applications owing to their low cost and high performance, such as batteries, supercapacitors, and sensors. In this context, the recent progress on using WCG as a renewable carbon source to produce electrode Figure 13. A schematic diagram of the experiment, and the morphology and microstructure of individual GSFs obtained from waste coffee grounds by the MPI technique. a) Setup of the MPI technique. b) SEM image of a GSF. c) Raman spectrum obtained with the laser at 532 nm, and d) 2D peak in the Raman spectrum fitted by a single Lorentzian function. Reproduced with permission. [8] Copyright 2015, Royal Society of Chemistry. Figure 14. TEM images of an individual GSF. a) A graphitic fiber without a hollow structure consisted of graphene nanosheets with a varying thickness. b) Monolayer graphene. c) Bilayer graphene. d) Tri-and four-layer graphene. e) High-resolution TEM image from monolayer graphene. Inset: a hexagonal pattern of carbon atoms by fast Fourier transform for monolayer graphene. f) High-resolution TEM image from few-layer graphene. Inset: a dotted ring pattern for few layer graphene. Scale bars: a) 50 mm, b-d) 1 nm, and e,f) 0.5 nm. Reproduced with permission. [8] Copyright 2015, Royal Society of Chemistry.
Kar Seng Teng is a professor and Head of Department of Electronic and Electrical Engineering at Swansea University. He received his Bachelor of Engineering and Ph.D. degrees in electrical and electronic engineering from Swansea University, UK in 1997 and 2001, respectively. His research interest is in the designing, fabrication and characterization of nanoscale electronic materials and devices for applications in healthcare, optoelectronics, and energy technologies.
Wei Zhang is currently a lecturer at the Department of Chemical Engineering, Swansea University. His main research interest is in developing novel water treatment and monitoring technologies. During his research career, he was the recipient of many prestigious awards, including Australian Endeavour fellowship in 2014, Japan Society for Promotion of Science (JSPS) overseas fellowship in 2015, and Horizon 2020 Marie Skłodowska-Curie Actions (MSCA) fellowship in 2017. He also serves as topic editors for the journals Biosensors and Frontiers in Sensors.