Carbon Adsorbents from Spent Coffee for Removal of Methylene Blue and Methyl Orange from Water

Activated carbons (ACs) were prepared from dried spent coffee (SCD), a biological waste product, to produce adsorbents for methylene blue (MB) and methyl orange (MO) from aqueous solution. Pre-pyrolysis activation of SCD was achieved via treatment of the SCD with aqueous sodium hydroxide solutions at 90 °C. Pyrolysis of the pretreated SCD at 500 °C for 1 h produced powders with typical characteristics of AC suitable and effective for dye adsorption. As an alternative to the rather harsh base treatment, calcium carbonate powder, a very common and abundant resource, was also studied as an activator. Mixtures of SCD and CaCO3 (1:1 w/w) yielded effective ACs for MO and MB removal upon pyrolysis needing only small amounts of AC to clear the solutions. A selectivity of the adsorption process toward anionic (MO) or cationic (MB) dyes was not observed.


Introduction
Water is among the most valuable resources worldwide. As a result, reliable methods for water treatment and remediation are among the most pressing issues worldwide. In addition to natural organic matter, heavy metals, biological contaminants, and disinfection byproducts are among the key pollutants in surface and drinking water. Synthetic organic substances such as dyes, oils, or pharmaceuticals and their metabolites or degradation products also play a major role in water pollution [1].
Many of these substances can be removed from the aqueous phase by activated carbon (AC) adsorbents. AC can be produced on an industrial scale from sources such as coal, petroleum, or coconut husk [2,3]. As a general requirement, the starting material needs to have a high carbon content, and many renewable raw materials are therefore candidates for AC production. Typical ACs have large surface areas between 500 and 1500 m 2 /g and pore volumes of up to 1.8 cm 3 /g [1]. Therefore, many groups have studied a diverse pool of natural (waste) products such as coconut shells, fruit seeds (grapes, pomegranate, date palm), olive and peach stones, wood wastes, pine cones, and more for the fabrication of ACs [4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20]. Other studies include composites of clay and carbonaceous materials [6,[21][22][23]. For example, Okman and Karagöz et al. [10] chemically activated grape seeds with potassium carbonate and potassium hydroxide before carbonization between 600 and 800 • C, resulting in materials with BET surface areas of up to 1238 m 2 /g (K 2 CO 3 ) and 1222 m 2 /g (KOH).
Dried spent coffee (SCD) is yet another interesting starting material for AC production. In Germany alone, every coffee drinker consumes about 3.6 cups every day [24]. Accordingly, large amounts of SCD are produced but are typically discarded. This is clearly a waste of raw material. Indeed, because very large amounts of SCD are available worldwide, SCD-based adsorbents have become a subject of intense research and development. SCD has been studied both in its parent, untreated form [3,[25][26][27][28][29][30] and in the form of ACs made from SCD [31][32][33][34][35]. Typical procedures involve the impregnation of SCD with ZnCl 2 and H 3 PO 4 or treatments with NaOH before carbonization. The resulting ACs exhibit high porosities and large surface areas, along with functional groups on the AC surface. These factors are beneficial to the overall performance of the AC adsorbents.
For example, Alves et al. [35] described the synthesis of AC via the impregnation of SCD with ZnCl 2 for 7 h at 85 • C before pyrolyzing this mixture for 2 h at 500 • C under nitrogen. Afterward, the remaining ZnCl 2 was removed with 0.1 M HCl. The resulting AC had a BET surface area of 1039 m 2 /g and a total pore volume of 0.481 cm 3 /g. This is close to the total surface areas in commercial ACs. The carbon material had a maximum adsorption capacity of 123.22 mg/g for bisphenol A (BPA). In a related approach, Lamine et al. [34] activated SCD using a phosphoric acid treatment before pyrolysis at 600 to 700 • C for 1 h. The materials had surface areas up to 186 m 2 /g and phenol adsorption capacities up to 56 mg/g.
The current study describes the activation of SCD with sodium hydroxide. Moreover, the effect of calcium carbonate powder added to the raw SCD is also presented. Depending on the pretreatment, ACs with different properties (surface areas, surface functional groups, adsorption behavior) were obtained. Both activation processes led to materials that almost completely remove methylene blue (MB) and methyl orange (MO) from aqueous solution. These experiments include a first study on the kinetics, as well as a first study on the adsorbent dose dependence of the dye removal process. With increasing pyrolysis temperature, the effectiveness of the ACs increased. The approach of SCD activation with CaCO 3 is a new and very low-cost, yet highly promising approach towards cheap adsorbents based on food waste (SCD) and a mineral easily found in nature (CaCO 3 ).

Methods
CHNS analysis was carried out on an Elementar Vario EL III (Langenselbold, Germany) in duplicate.
Thermogravimetric analysis was done on a Linseis TGA/DTA L81 (Selb, Germany) from 25 to 1000 • C under nitrogen with a heating rate of 10 • C.
Scanning electron microscopy (SEM) was done on a JEOL JSM-6510 SEM (Freising, Germany) with a tungsten cathode operated at 15 kV. Prior to imaging, all samples were sputter-coated with Au/Pd for 75 s and 18 mA using a SC7620 mini sputter-coater (Quorum Technologies, Lewes, UK).
X-ray powder diffraction data were collected on a PANalytical (Malvern, UK) Empyrean powder X-ray diffractometer in a Bragg-Brentano geometry equipped with a PIXcel1D Materials 2021, 14, 3996 3 of 18 detector using Cu Kα radiation (λ = 1.5419 Å) operating at 40 kV and 40 mA; θ/θ scans were run from 4-70 • 2θ with a step size of 0.0131 • and a sample rotation time of 1 s. The diffractometer was configured with a programmable divergence and anti-scatter slit and a large Ni-beta filter. The detector was set to continuous mode with an active length of 3.0061 • .
The specific surface areas and pore characteristics were determined via nitrogen sorption measurements on a Micromeritics Tristar unit (Norcross, GA, USA) at 77 K. Prior to the experiment, each sample was degassed to about 2 Pa at 353 K for 10 h. The specific surface area (SSA) was calculated using the Brunauer-Emmett-Teller method (BET). The average pore sizes were estimated from the adsorption branch of the isotherm using the Barrett-Joyner-Halenda method (BJH). The pore volume was determined at P/P 0 > 0.99.
UV/Vis spectroscopy was done on a Shimadzu UV-1900 (Kyoto, Japan) between 250 and 1000 nm with a sampling interval of 1.0 nm at medium speed in single-scan mode. Solutions were placed in PMMA cuvettes with a path length of 10 mm using water as a reference. All data were evaluated using Origin 2020b Pro.
Solid state NMR spectroscopy. 13 C CP solid-state NMR spectra were recorded on a Bruker Avance 300 MHz spectrometer (Billerica, MA, USA) using a commercial 2.5 mm MAS NMR probe and operating at a resonance frequency of 75.48 MHz. The MAS frequency was 15 kHz. Chemical shifts are referenced to TMS using adamantane. Ramped 1 H-13 C cross-polarization (CP, contact time: 4 ms) and SPINAL 1 H-decoupling were applied during the signal acquisition. The recycle delay was 3 s, and 24,000 scans (SCD) or 32,000 scans (PSC50) were accumulated. Table 1 summarizes all materials studied. Firstly, as a control material, dried spent coffee (SCD) was pyrolyzed at 500 • C (PSC50). Secondly, the carbon precursor material Na90 was produced by pretreating SCD with NaOH for 24 h at 90 • C. Afterward, these solids were dried without filtration (these materials could not be filtered due to severe clogging of the filters). After drying, the powder was inserted into the pyrolysis oven (a custom modified oven system with an opening to insert and remove the fused silica glass reaction tubing; see Appendix A, Figure A1), and then the oven was heated to 500 • C at 5 • C/min. After 1 h at 500 • C the oven was switched off and allowed to cool to room temperature. After removal from the oven, the carbonaceous material was washed with 2 M HCl to remove residual NaOH from the powder to yield the pure carbonaceous material PNa90 and then washed to neutrality with d.i. water. Table 1. Overview of sample names and their preparation parameters. T T is the temperature for the NaOH pre-treatment, while T P is the pyrolysis temperature. For sample labels, see text above.

Label
Index ## Pretreatment A second type of ACs was made via mixing SC with CaCO 3 powder (weight ratio 1:1) and subsequent pyrolysis of the mixture between 500 and 850 • C for 1 h, again using a heating rate of 5 • C/min. Afterward, the resulting black solids were washed with 2 M HCl to remove the CaCO 3 until the solution was acidic, followed by washing with d.i. water until neutral and drying. Lastly, all materials were hand-ground in a mortar to reduce particle sizes. Table 1 summarizes all powders studied in this work. These materials are designated as SCC## (SC + CaCO 3 ) with the index ## indicating the pyrolysis temperature (Table 1). For example, SCC85 was made from a 1:1 mixture of SCD and CaCO 3 pyrolyzed at 850 • C for 1 h.

Adsorption Experiments
In a first study, 100 mg of each material (Table 1) was dispersed in 10 mL of dye solution (23 mg/L of either MO or MB to accommodate the detection limit of the UV/Vis spectrometer) and shaken on an IKA KS 260 basic shaker at a 300 rpm shaking speed for 3 h at room temperature. Dye uptake of the solutions after filtering the solutions through PTFE syringe filters (VWR, 0.45 µm) was quantified with UV/Vis spectroscopy between 250 and 1000 nm (MO @ 461 nm, MB @ 664 nm).
All materials showing a measurable dye uptake were then studied for their adsorption kinetics at room temperature. To that end, 100 mg of adsorbent were dispersed in 10 mL of dye solution (23 mg/L) and shaken at 300 rpm for 1, 5, 30, and 60 min, and 3, 24, and 48 h, counting from the point of dye addition to the adsorbents. Additionally, MO uptake by PNa90 was studied for up to 2 weeks to examine if an equilibrium stage is reached.
A further series of experiments was used to evaluate the dose dependency of SCC85 on dye adsorption for MB and MO solutions, as well as on a MO/MB mixture. The mixture was made by mixing equal volumes of the MO and the MB solutions. Here, amounts between 1 mg and 80 mg of material were exposed to 10 mL of dye solution and shaken for 3 h at a 300 rpm shaking speed at room temperature. Again, the solutions were filtered through PTFE syringe filters afterward and then quantified using UV/Vis spectroscopy.
Note: A dye concentration of 23 mg/L was used in this study. The reason for selecting an MO and MB concentration of 23 mg/L is that this concentration provides good UV/Vis absorption data, while it also enables the measurement of very low concentrations. Higher concentrations produce too strong absorption signals in the spectra of MO, while lower concentrations produce absorption signals that are too weak to analyze in the MB spectra. Further work is aimed at investigating different dyes, different concentrations, and different conditions such as pH, T, and salt effects on the performance of these materials.

Results
In a series of preliminary experiments using all materials listed in Table 1, only two groups of materials remove the organic dyes methyl orange (MO) or methylene blue (MB) from aqueous solution. Pyrolysis of (1) pure SC (PSC50) and (2) SC with calcium carbonate at 500 • C (SCC50) leads to powders with low dye adsorption. These two products were therefore not considered for extended adsorption experiments.
All other materials were further investigated for their dye removal capacities. Table 2 shows the elemental analysis data of these materials along with the data obtained for the pure (non-pyrolyzed) SCD raw material. After pyrolysis, all powders show a high carbon content and rather small fractions of other elements. This confirms a successful carbonization process in all cases. Table 2. Elemental analysis data in wt.% of dried spent coffee (SCD) and pyrolyzed samples either treated with 2 M NaOH (PNa) or mixed with CaCO 3 (1:1) before pyrolysis (SCC). These are the materials that show significant dye uptake in the pretests. T P is again the pyrolysis temperature.  Solid-state NMR (ssNMR; see Figure A2, Appendix A) investigations of SCD and PSC50 reveal the drastic change in material and structural properties upon pyrolysis. The comparison of 13 C CP NMR spectra of the same material before (SCD, Figure A2a) and after pyrolysis (PSC50, Figure A2b) shows the influence of the temperature treatment. In the spectrum of raw SCD, well-resolved signals corresponding to all organic matter present in SCD such as cellulose, hemicellulose, and lignin, as well as proteins and lipids, can be observed [36][37][38][39][40]. Carbons of different polysaccharides such as cellulose and hemicellulose cause the intense and narrow signals between 60 and 110 ppm ( Figure A2a). In the aliphatic region between 20 and 40 ppm, signals of lipids and protein side-chains appear. The broad signals between 120 and 160 ppm are probably due to lignin aromatic carbons, and the signal at 173 ppm can be assigned to carbonyl groups of lignin, hemicellulose, and proteins.
In contrast, after pyrolysis of this material, a broad signal at 128 ppm dominates the NMR spectrum. This signal can be assigned to highly condensed aromatic carbon atoms from carbon black. Furthermore, a shoulder at ca. 150 ppm is caused by phenolic carbons [41]. Very weak signals in the aliphatic region (20-40 ppm) are due to residual side-chains ( Figure A2b). Solid-state NMR spectroscopy, therefore, clearly shows that the vast majority of organic building blocks in the raw SCD are broken down during pyrolysis and form condensed aromatic carbons afterward. Figure 1a shows a representative thermogravimetric analysis (TGA) curve of SCD. A small step (5.7% weight loss) is visible at around 100 • C. This step is likely due to evaporation of residual water. A second and rather broad step (70.9% weight loss) is observed between 200 and 450 • C. This step can be assigned to the slow decomposition of hemicellulose, cellulose, and lignin (in that order), the main components of spent coffee [35,40,[42][43][44]. Subsequently, the TGA data indicate a continuous weight loss until 1000 • C showing the decomposition of the sample [40].   Figure 2 shows the infrared (IR) spectra of SCD and of selected treated materials. The IR spectrum of the starting material SCD shows strong bands between 1000 and 500 cm −1 and a series of weaker bands at around 1700 and 2900 cm −1 . After the pretreatment with NaOH and before pyrolysis, the bands in the fingerprint area are weaker than before. The bands at around 2900 cm −1 are still visible, and additional new bands between 1700 and 1000 cm −1 and at ca. 3400 cm −1 appear (  Figure 1b shows representative X-ray diffraction (XRD) data of selected powders. XRD patterns of dried spent coffee (SCD) show two broad halos along with a series of reflections sitting on these halos (Figure 1b). Such a pattern is typical for cellulosic materials [44]. After pyrolysis, the sharp diffraction rays are not observed anymore and only two broad halos remain. These reflections are typical for graphitic carbon-type materials and can be assigned to the carbon (002) and (100) planes [35,45]. Occasionally, the XRD patterns show a few remains of the sharp reflections, but this is not always the case. Figure 2 shows the infrared (IR) spectra of SCD and of selected treated materials. The IR spectrum of the starting material SCD shows strong bands between 1000 and 500 cm −1 and a series of weaker bands at around 1700 and 2900 cm −1 . After the pretreatment with NaOH and before pyrolysis, the bands in the fingerprint area are weaker than before. The bands at around 2900 cm −1 are still visible, and additional new bands between 1700 and 1000 cm −1 and at ca. 3400 cm −1 appear (Figure 2a). All bands can be assigned to the cellulose and lignin present in the materials [35,40,44,[46][47][48][49] (Table 3).   shows scanning electron microscopy (SEM) images of SCD after different treatments. The SCD material is rather heterogeneous in terms of both the particle size and the particle shape. There are elongated and rather thin particles with lengths reaching up to 100 µm, along with rounded particles, and numerous aggregated particles of various sizes and shapes. The surfaces of these particles are smooth and without any holes (Figure 3a). FTIR spectra of (a) SCD treated with NaOH before (Na90 (2 M)) and after (PNa90 (2 M)) pyrolysis, and (b) SC + CaCO 3 pyrolyzed at different temperatures, all in direct comparison to dried SC (SCD). All bands can be assigned to the cellulose and lignin present in the materials [35,40,44,[46][47][48][49] (Table 3). Bands in the area of 2000 cm −1 represent the natural resonance of the diamond crystal used for measuring. Table 3. Classification of infrared bands [35,40,44,[46][47][48][49]. Bands in the area of 2000 cm −1 represent the natural resonance of the diamond crystal used for measuring. After pyrolysis (Figure 2b) the bands between 1500 and 1000 cm −1 are broader and show a significantly increased intensity, while bands between 1000 and 500 cm −1 lose some intensity. No further changes can be observed in the IR data. While the ssNMR spectra of pure pyrolyzed SC ( Figure A2) shows that the organic material was reduced to highly condensed aromatic carbon atoms, a treatment with NaOH beforehand seems to leave some functional groups on the material surface, which can be confirmed via ATR-IR. Figure 3 shows scanning electron microscopy (SEM) images of SCD after different treatments. The SCD material is rather heterogeneous in terms of both the particle size and the particle shape. There are elongated and rather thin particles with lengths reaching up to 100 µm, along with rounded particles, and numerous aggregated particles of various sizes and shapes. The surfaces of these particles are smooth and without any holes (Figure 3a).

Wavenumber (cm −1 ) Classification
Pyrolysis of pure SCD at 500 • C has no obvious effect on the surface of the resulting carbons (Figure 3b). the SEM length scale). Pretreatments with 0.2 M NaOH ( Figure A3) lead to different effects after pyrolysis at 500 °C. The material now has clear edges and rougher surfaces on the particles including plenty of pores with maximum diameters of ca. 2.2 µm.
The nitrogen sorption isotherm of PNa90 (2 M) is displayed in Error! Reference source not found.. The shape of the isotherm suggests that PNa90 (2 M) likely has a fairly large pore size distribution. The surface area calculated from the data is 24 m²/g. This is much smaller than the surface areas typically observed in commercial AC (up to 1500 m²/g). Similarly, the pore volume of 0.033 cm 3 /g is also much lower than commercial AC [1]. The pore diameter of the material is 9.9 nm.  The nitrogen sorption isotherm of PNa90 (2 M) is displayed in Figure 4. The shape of the isotherm suggests that PNa90 (2 M) likely has a fairly large pore size distribution. The surface area calculated from the data is 24 m 2 /g. This is much smaller than the surface areas typically observed in commercial AC (up to 1500 m 2 /g). Similarly, the pore volume of 0.033 cm 3 /g is also much lower than commercial AC [1]. The pore diameter of the material is 9.9 nm.

Activated Carbons from Spent Coffee/Calcium Carbonate Mixtures
An alternative approach toward carbonaceous adsorbents using solid CaCO3 as activator was also explored. In this series, the SC powder was thoroughly mixed mechanically with dry calcium carbonate powder in a 1:1 (w/w) proportion. Pyrolysis was then done between 500 and 850 °C, i.e., below and above the point of decomposition of calcium carbonate at 825 °C. Table 1 shows the results from elemental analysis (EA) of these materials after washing. The washing process removes the CaCO3 and leaves the pure carbonaceous material behind, as evidenced from the EA data.
The IR spectra of these materials are shown in Figure 2b. Treatment temperatures up to 600 °C produce materials that exhibit IR spectra very similar to the spectra shown in a. However, higher treatment temperatures of the SCD/calcium carbonate mixtures produce materials where the typical IR bands disappear and the corresponding IR spectra only show a straight line. This indicates that the vast majority of the surface groups vanishes during the heat treatment. Similar to the broadening effects observed in the IR spectra of PNa90 (2 M), a band broadening between 1500 and 1000 cm −1 is noticeable for SCC50 and SCC60 (

Activated Carbons from Spent Coffee/Calcium Carbonate Mixtures
An alternative approach toward carbonaceous adsorbents using solid CaCO 3 as activator was also explored. In this series, the SC powder was thoroughly mixed mechanically with dry calcium carbonate powder in a 1:1 (w/w) proportion. Pyrolysis was then done between 500 and 850 • C, i.e., below and above the point of decomposition of calcium carbonate at 825 • C. Table 2 shows the results from elemental analysis (EA) of these materials after washing. The washing process removes the CaCO 3 and leaves the pure carbonaceous material behind, as evidenced from the EA data.
The IR spectra of these materials are shown in Figure 2b. Treatment temperatures up to 600 • C produce materials that exhibit IR spectra very similar to the spectra shown in Figure 2a. However, higher treatment temperatures of the SCD/calcium carbonate mixtures produce materials where the typical IR bands disappear and the corresponding IR spectra only show a straight line. This indicates that the vast majority of the surface groups vanishes during the heat treatment. Similar to the broadening effects observed in the IR spectra of PNa90 (2 M), a band broadening between 1500 and 1000 cm −1 is noticeable for SCC50 and SCC60 (Figure 2b). The spectrum of SCC65 shows an additional broad band around 3300 cm −1 which can be assigned to adsorbed water. However, as the pyrolysis temperature is increased, the resulting materials exhibit IR spectra where the bands around 1000 cm −1 are drastically reduced in intensity. Figure 5 shows representative SEM images of the SCC materials after washing out the calcium carbonate with aqueous hydrochloric acid. SEM clearly shows that the treatment temperature does not significantly affect the sample morphology. However, SEM also demonstrates that the calcium carbonate present in the reaction mixture leads to drastically different morphologies when compared, e.g., to the materials pretreated with NaOH ( Figure 3). based assembly produces a wide range of macropores that are clearly visible in the SEM (Error! Reference source not found.). SEM also shows that the large, aggregated particles have a wide range of sizes and shapes, yet their architecture on the micrometer level is rather uniform and always constructed from the flaky building blocks just described. The SEM images show no significant differences in the feature sizes or shapes vs. increasing carbonization temperatures. All powders contain particles with a broad size distribution and a variety of particle shapes (Error! Reference source not found.). The mixture of SCD and calcium carbonate produces materials with a much finer substructure than the powders PNa90 (2 M) described above. The particles appear more "porous" (or appear to have a much rougher surface) and seem to have also broken down into smaller particles. Some particles show holes and larger open areas. Figure 6 shows the corresponding nitrogen sorption data obtained from the SCC materials. All data indicate the presence of mesopores with a rather broad size distribution. Higher pyrolysis temperatures favor the formation of materials with higher surface areas with the highest surface area of ca. 166 m 2 /g obtained for the materials that were pyrolyzed at 850 °C. At the same time, the pore sizes decreases. Error! Reference source not found. summarizes these results. Again, even the materials with the highest porosities are far from commercial AC in terms of both specific surface area and pore volume. The presence of the calcium carbonate leads to the formation of heavily interconnected flake-like carbons with a sponge-like appearance. The individual flakes are rather thin but are densely aggregated and tightly connected to neighboring flakes. This flake-based assembly produces a wide range of macropores that are clearly visible in the SEM ( Figure 5). SEM also shows that the large, aggregated particles have a wide range of sizes and shapes, yet their architecture on the micrometer level is rather uniform and always constructed from the flaky building blocks just described.
The SEM images show no significant differences in the feature sizes or shapes vs. increasing carbonization temperatures. All powders contain particles with a broad size distribution and a variety of particle shapes ( Figure 5). The mixture of SCD and calcium carbonate produces materials with a much finer substructure than the powders PNa90 (2 M) described above. The particles appear more "porous" (or appear to have a much rougher surface) and seem to have also broken down into smaller particles. Some particles show holes and larger open areas. Figure 6 shows the corresponding nitrogen sorption data obtained from the SCC materials. All data indicate the presence of mesopores with a rather broad size distribution. Higher pyrolysis temperatures favor the formation of materials with higher surface areas with the highest surface area of ca. 166 m 2 /g obtained for the materials that were pyrolyzed at 850 • C. At the same time, the pore sizes decreases. Table 4 summarizes these results. Again, even the materials with the highest porosities are far from commercial AC in terms of both specific surface area and pore volume.  In summary, both groups of materials, PNa90 and SCC, show drastic property changes in comparison to the regular SC and its pyrolyzed form. A pyrolysis temperature of 500 °C is sufficient to break down the organic (carbohydrate, lipid, and protein) components to aromatic carbon (ssNMR, XRD), but does not lead to a complete removal of surface functional groups (ATR-IR). With increasing pyrolysis temperatures, more surface functional groups are removed from the materials, leaving behind an essentially carbononly material. Both PNa90 and SCC materials exhibit an increased surface area compared to the original spent coffee (SEM, nitrogen sorption data). However, the surfaces obtained from BET analysis along with the corresponding total pore volume are still significantly smaller than those of commercial AC [1].
Clearly, the process of material synthesis is simple and effective; therefore, the materials were also investigated for the adsorption capabilities for dye removal from aqueous solution. This is a model case, and the removal of other substances can of course also be considered.

Dye Removal
Dye adsorption experiments were done with methylene blue (MB) and methyl orange (MO). MO and MB are common model compounds for dyestuff-polluted aqueous media because they are (1) water-soluble and (2) easy to detect and quantify via UV/Vis spectroscopy. As some dyes are health hazards [50][51][52][53], MO and MB are suitable model cases for dye-contaminated water.
Error! Reference source not found.a shows the UV/Vis spectra of MB and MO solutions with 23 mg/L dye concentration along with the spectrum of a 1:1 MO/MB mixture. According to these spectra, the adsorption maxima of 664 nm for MB and 461 nm for MO were chosen for the comparison of dye uptake by the materials.  In summary, both groups of materials, PNa90 and SCC, show drastic property changes in comparison to the regular SC and its pyrolyzed form. A pyrolysis temperature of 500 • C is sufficient to break down the organic (carbohydrate, lipid, and protein) components to aromatic carbon (ssNMR, XRD), but does not lead to a complete removal of surface functional groups (ATR-IR). With increasing pyrolysis temperatures, more surface functional groups are removed from the materials, leaving behind an essentially carbon-only material. Both PNa90 and SCC materials exhibit an increased surface area compared to the original spent coffee (SEM, nitrogen sorption data). However, the surfaces obtained from BET analysis along with the corresponding total pore volume are still significantly smaller than those of commercial AC [1].
Clearly, the process of material synthesis is simple and effective; therefore, the materials were also investigated for the adsorption capabilities for dye removal from aqueous solution. This is a model case, and the removal of other substances can of course also be considered.

Dye Removal
Dye adsorption experiments were done with methylene blue (MB) and methyl orange (MO). MO and MB are common model compounds for dyestuff-polluted aqueous media because they are (1) water-soluble and (2) easy to detect and quantify via UV/Vis spectroscopy. As some dyes are health hazards [50][51][52][53], MO and MB are suitable model cases for dye-contaminated water. Figure 7a shows the UV/Vis spectra of MB and MO solutions with 23 mg/L dye concentration along with the spectrum of a 1:1 MO/MB mixture. According to these spectra, the adsorption maxima of 664 nm for MB and 461 nm for MO were chosen for the comparison of dye uptake by the materials. In a first study, PNa90 (2 M), which was washed neutral, and all as-prepared SCC materials were used for MB and MO removal in batches exposed to the solutions for 3 h. The SCC50 material (i.e., the material pyrolyzed at the lowest temperature of 500 °C) only removes below 20% of dye and was, therefore, not considered any further. It is noteworthy, however, that the non-pyrolyzed SCD raw material shows a remarkable adsorption capability for MB while it adsorbs nearly no MO. Similarly, PNa90 (2 M) shows a preferred adsorption of MB, but also takes up ca. 60% of the MO present in the solution. All other materials show a near-quantitative removal of both MO and MB (Error! Reference source not found.7b).
Error! Reference source not found. shows the adsorption isotherms (dye removal vs. treatment time at room temperature) for washed PNa90 (2 M) and SCC materials. Error! Reference source not found.a shows the data for dye adsorption on PNa90 (2 M). Clearly, MB removal is faster and more effective. Already after 1 min, MB is removed almost completely from the aqueous phase. Quantitative (i.e., >99%) removal is achieved after 5 min and no re-release of MB into the solution is observed. In contrast, MO is taken up somewhat less effectively and the uptake is not as rapid. After an initial, rather fast uptake reaching ca. 80% MO removal, there is a second, much slower uptake regime starting at ca. 60 min. This slower uptake continues until the end of the experiment, but only contributes to a further uptake of ca. 6% after 48 h, resulting in an overall removal of around 86% of MO at the end of the process.
At this point, it is worthwhile to note that a significant hypsochromic shift is observed in the UV/Vis spectra of MO for longer adsorption times (Error! Reference source not found.b). Already after 24 h, the spectra begin to show a peak broadening with a shoulder toward shorter wavelengths. This is further pronounced at longer treatment times of 48 h. Longer adsorption experiments running for 1 and 2 weeks show an even stronger change in the absorption bands, making a true quantification of the data obtained at long adsorption times difficult. In a first study, PNa90 (2 M), which was washed neutral, and all as-prepared SCC materials were used for MB and MO removal in batches exposed to the solutions for 3 h. The SCC50 material (i.e., the material pyrolyzed at the lowest temperature of 500 • C) only removes below 20% of dye and was, therefore, not considered any further. It is noteworthy, however, that the non-pyrolyzed SCD raw material shows a remarkable adsorption capability for MB while it adsorbs nearly no MO. Similarly, PNa90 (2 M) shows a preferred adsorption of MB, but also takes up ca. 60% of the MO present in the solution. All other materials show a near-quantitative removal of both MO and MB (Figure 7b). Figure 8 shows the adsorption isotherms (dye removal vs. treatment time at room temperature) for washed PNa90 (2 M) and SCC materials. Figure 8a shows the data for dye adsorption on PNa90 (2 M). Clearly, MB removal is faster and more effective. Already after 1 min, MB is removed almost completely from the aqueous phase. Quantitative (i.e., >99%) removal is achieved after 5 min and no re-release of MB into the solution is observed. In contrast, MO is taken up somewhat less effectively and the uptake is not as rapid. After an initial, rather fast uptake reaching ca. 80% MO removal, there is a second, much slower uptake regime starting at ca. 60 min. This slower uptake continues until the end of the experiment, but only contributes to a further uptake of ca. 6% after 48 h, resulting in an overall removal of around 86% of MO at the end of the process.
At this point, it is worthwhile to note that a significant hypsochromic shift is observed in the UV/Vis spectra of MO for longer adsorption times (Figure 8b). Already after 24 h, the spectra begin to show a peak broadening with a shoulder toward shorter wavelengths. This is further pronounced at longer treatment times of 48 h. Longer adsorption experiments running for 1 and 2 weeks show an even stronger change in the absorption bands, making a true quantification of the data obtained at long adsorption times difficult.  The reason for this hypsochromic shift is an increase in the pH value of the MO solution over time. As MO is a pH indicator, it reacts to this change in proton concentration via a color change. Indeed, measurements using a pH electrode show that the pH of the PNa90/MO mixed system starts out at pH 5 and increases to well above 7 after 24 h. This also indicates that, despite washing the material with 2 M HCl after pyrolysis, some NaOH remains in the material. The longer the material remains in the aqueous solution, the more NaOH seems to be released from the sample. This observation suggests that the current, prototype materials may need to be subjected to an improved cleaning process before application. On the other hand, such long batch exposure times are unrealistic for a larger-scale application, and we, therefore, performed further experiments at much shorter times.
Error! Reference source not found.c,d show the adsorption isotherms obtained from the analogous experiments with the SCC materials obtained after removing the calcium carbonate. All SCC materials are effective adsorbents for MO and MB but there are differences. In the case of MB (Error! Reference source not found.8c), two different types of behavior can be distinguished: (1) SCC60 and SCC75 show a somewhat slower adsorption kinetics, and the final fraction of adsorbed dye is lower (around 98%) than in the case of SCC80 and SCC85. In contrast, (2) adsorption on SCC80 and SCC85 is very rapid and essentially reaches a quantitative removal of the dyes within 20 min. The reason for this hypsochromic shift is an increase in the pH value of the MO solution over time. As MO is a pH indicator, it reacts to this change in proton concentration via a color change. Indeed, measurements using a pH electrode show that the pH of the PNa90/MO mixed system starts out at pH 5 and increases to well above 7 after 24 h. This also indicates that, despite washing the material with 2 M HCl after pyrolysis, some NaOH remains in the material. The longer the material remains in the aqueous solution, the more NaOH seems to be released from the sample. This observation suggests that the current, prototype materials may need to be subjected to an improved cleaning process before application. On the other hand, such long batch exposure times are unrealistic for a larger-scale application, and we, therefore, performed further experiments at much shorter times. Figure 8c,d show the adsorption isotherms obtained from the analogous experiments with the SCC materials obtained after removing the calcium carbonate. All SCC materials are effective adsorbents for MO and MB but there are differences. In the case of MB (Figure 8c), two different types of behavior can be distinguished: (1) SCC60 and SCC75 show a somewhat slower adsorption kinetics, and the final fraction of adsorbed dye is lower (around 98%) than in the case of SCC80 and SCC85. In contrast, (2) adsorption on SCC80 and SCC85 is very rapid and essentially reaches a quantitative removal of the dyes within 20 min.
A similar observation can be made for MO (Figure 8d). While the dye removal process was rather rapid and efficient, the SCC60 and SCC70 materials are again somewhat less effective than SCC80 and SCC85. In contrast to the data shown in Figure 7, these data show a slightly lower adsorption at around 60 min before returning to the very high fractions of removed dye at the end of the treatment. The reason for this slight "dip" is not clear at the moment and will be a matter of future research with materials improved from the current, first-generation adsorbents.
Overall, the SCC60 and SCC75 materials show a roughly quadratic increase in adsorption up to nearly 100%, resulting in a plateau. SCC80 and SCC85 essentially take up 100% of both dyes immediately after exposition, i.e., full dye removal is realized in less than 5 min. No significant adsorption/desorption fluctuation is noticeable in these materials.
These findings are especially interesting when compared to the analytical data described above. While PNa90 (2 M), SCC60, and SCC65 still show a significant presence of surface groups in the IR spectra (Figure 2), SCC75 through SCC85 show no more signals for any kind of surface groups. Hence, the observed dye adsorption can not be correlated to ionic interactions between material surfaces and type of dye. Rather, we currently speculate that the main interaction could be a van der Waals type interaction between the dye molecules and the adsorbent surface.
In addition to kinetic experiments, an evaluation of the effect of adsorbent dose was carried out with one of the best-performing materials, SCC85 ( Figure 9). Overall, the data show that SCC85 is a highly effective adsorbent for both dyes with ≥90% of MO and MB taken up even at very low adsorbent doses of only 5 mg. Moreover, exposure to mixed solutions containing both dyes simultaneously has no impact on the adsorption capacity of the material. Again, all solutions are completely clear at the end of the treatment. In spite of this, MO adsorption is slightly faster at very low adsorbent doses of 1 and 2 mg. These two experiments also show a slight tint of the glassware, indicating that, at very low dosages, the sample environment may also have an influence, similar to a recent study on MO and MB uptake using a hydrogel/3D printed hybrid setup [50]. Adsorbent doses above 2 mg do not exhibit this behavior, indicating that the adsorbent dominates the removal process as intended. A similar observation can be made for MO (Error! Reference source not found.d). While the dye removal process was rather rapid and efficient, the SCC60 and SCC70 materials are again somewhat less effective than SCC80 and SCC85. In contrast to the data shown in Error! Reference source not found., these data show a slightly lower adsorption at around 60 min before returning to the very high fractions of removed dye at the end of the treatment. The reason for this slight "dip" is not clear at the moment and will be a matter of future research with materials improved from the current, first-generation adsorbents.
Overall, the SCC60 and SCC75 materials show a roughly quadratic increase in adsorption up to nearly 100%, resulting in a plateau. SCC80 and SCC85 essentially take up 100% of both dyes immediately after exposition, i.e., full dye removal is realized in less than 5 min. No significant adsorption/desorption fluctuation is noticeable in these materials.
These findings are especially interesting when compared to the analytical data described above. While PNa90 (2 M), SCC60, and SCC65 still show a significant presence of surface groups in the IR spectra (Figure 2), SCC75 through SCC85 show no more signals for any kind of surface groups. Hence, the observed dye adsorption can not be correlated to ionic interactions between material surfaces and type of dye. Rather, we currently speculate that the main interaction could be a van der Waals type interaction between the dye molecules and the adsorbent surface.
In addition to kinetic experiments, an evaluation of the effect of adsorbent dose was carried out with one of the best-performing materials, SCC85 ( Figure 9). Overall, the data show that SCC85 is a highly effective adsorbent for both dyes with ≥90% of MO and MB taken up even at very low adsorbent doses of only 5 mg. Moreover, exposure to mixed solutions containing both dyes simultaneously has no impact on the adsorption capacity of the material. Again, all solutions are completely clear at the end of the treatment. In spite of this, MO adsorption is slightly faster at very low adsorbent doses of 1 and 2 mg. These two experiments also show a slight tint of the glassware, indicating that, at very low dosages, the sample environment may also have an influence, similar to a recent study on MO and MB uptake using a hydrogel/3D printed hybrid setup [50]. Adsorbent doses above 2 mg do not exhibit this behavior, indicating that the adsorbent dominates the removal process as intended.

Conclusions
Spent coffee is a cheap waste material that is produced daily in large amounts all over the world. It is thus a viable resource for numerous applications including low-cost water treatment. The current prototype study clearly shows that suitable treatments can improve the removal capacities for organic dyes from aqueous solution. Two different treatments are both highly promising: (1) pretreatment with NaOH followed by pyrolysis produces materials that favor the adsorption of MB, while (2) pyrolyzed mixtures of spent coffee and calcium carbonate powders produce materials that are almost indifferent to the charge of the dye molecule in solution. As a result, the simplest synthesis protocol (mixing spent coffee and calcium carbonate powders followed by pyrolysis) produces the most promising adsorbents. Simply by selecting the reaction temperature, the properties of the resulting materials can further be adjusted. Therefore, the current approach provides a truly sustainable approach toward low-cost water treatment materials. These materials are therefore quite similar to commercial activated carbons as far as their performance is considered. Interestingly, the data also show that the presence of active surface groups may not be necessary for good adsorption properties. The current, first-generation materials can further be upgraded by improving the cleaning processes, by improving the mixing ratio of the precursors leading to further improved surface areas and pore structures, and by implementing a true continuous (flow) process.    . 13 C CP NMR spectra of (a) spent coffee SC and (b) PSC50. Figure A2. 13 C CP NMR spectra of (a) spent coffee SC and (b) PSC50.