Upcycling spent brewery grains through the production of carbon adsorbents—application to the removal of carbamazepine from water

Spent brewery grains, a by-product of the brewing process, were used as precursor of biochars and activated carbons to be applied to the removal of pharmaceuticals from water. Biochars were obtained by pyrolysis of the raw materials, while activated carbons were produced by adding a previous chemical activation step. The influence of using different precursors (from distinct fermentation processes), activating agents (potassium hydroxide, sodium hydroxide, and phosphoric acid), pyrolysis temperatures, and residence times was assessed. The adsorbents were physicochemically characterized and applied to the removal of the antiepileptic carbamazepine from water. Potassium hydroxide activation produced the materials with the most promising properties and adsorptive removals, with specific surface areas up to 1120 m2 g−1 and maximum adsorption capacities up to 190 ± 27 mg g−1 in ultrapure water. The adsorption capacity suffered a reduction of < 70% in wastewater, allowing to evaluate the impact of realistic matrices on the efficiency of the materials.


Introduction
The use of agricultural and industrial wastes to produce added-value materials is an interesting possibility to reduce the negative impacts of agro-industrial processes and to reintroduce end-of-life residues into the productive chain Jaria et al. 2019). These wastes, usually available in large amounts, can be an alternative to non-renewable sources to be used as precursors of carbon materials, such as activated carbons (ACs), and applied in water purification systems (Azargohar and Dalai 2008). AC is a carbonaceous material with high adsorption capacity towards a vast number of compounds, such as pharmaceuticals .
The key properties associated to an AC with high adsorption capacities include high specific surface area (S BET ) and microporosity, as well as high carbon and low ash contents (Jaria et al. 2015). For these reasons, agro-industrial lignocellulosic residues, which have low inorganic and relatively high volatile contents, are considered good precursors of AC (Azargohar and Dalai 2008).
Spent brewery grains (SBG) are lignocellulosic wastes which constitute a major by-product of the brewing process, representing around 85% of the total wastes generated by the brewing industry Vanreppelen et al. 2014). This material consists of the remains from the barley malt after the mashing process (Barrozo et al. 2019), and their properties depend on the type of used barley and the brewing technology (Olszewski et al. 2019). Nevertheless, their main polysaccharides are generally hemicellulose (mainly arabinoxylane) and cellulose, while lignin and a considerable amount of proteins and lipids are also part of the typically reported composition of SBG (Olszewski et al. 2019;). To date, SBG have primarily been used as animal feed (Gonçalves Responsible editor: Tito Roberto Cadaval Jr Electronic supplementary material The online version of this article (https://doi.org/10.1007/s11356-020-09543-0) contains supplementary material, which is available to authorized users. Vanreppelen et al. 2014). However, considering that the efficient reuse of this agro-industrial waste can be important, not only from the perspective of the brewer who can benefit from the valorization of this by-product but also from an environmental point of view, the study of alternative SBG applications is highly desirable (Barrozo et al. 2019). In this context comes up the possibility of using SBG to produce adsorbent materials aiming at the adsorptive removal of water micro-contaminants, such as pharmaceuticals.
In the last years, a few studies have reported the possibility to use raw and processed SBG as adsorbent to remove contaminants from water. To the best of the authors' knowledge, the application of SBG to the removal of pharmaceuticals from water has not been so far reported in literature. However, some examples of the application of this waste to the removal of other organic pollutants, such as dyes used in paper and textile industries (Fontana et al. 2016;Silva et al. 2004), or inorganic pollutants, such as metals (Ferraz et al. 2005; Wierzba and Andrzej 2019), from water can be found in literature. Concerning organic contaminants, Silva et al. (2004) studied the removal of acid orange 7, a dye currently used in paper and textile industries, by using SBG in aqueous solutions (Silva et al. 2004). The results showed high levels of color removal (above 90%, for an initial dye concentration of 60 mg L −1 ), with low contact times between adsorbent and dye (less than 1 h), attaining a maximum adsorption capacity of~30.5 mg g −1 at 30°C. The reported removal capacity was obtained using the SBG in its raw form, i.e., without any previous treatments such as milling and/or sieving, incineration, or chemical modification. Gonçalves et al. (2017) used SBG to produce bio-oil and a granular AC via pyrolysis and CO 2 activation (Gonçalves et al. 2017). In the production of the AC by these authors, the effect of the activation time on some properties, including S BET , was investigated. The adsorptive properties of AC were evaluated by the determination of the iodine number and methylene blue discoloration. The authors concluded that the S BET , iodine number, and methylene blue adsorption onto the AC increased as activation time increased. Therefore, 6 h of activation resulted in an AC with S BET of 617.4 m 2 g −1 , an iodine number of 490.1 mg g −1 , and an excellent adsorption of methylene blue (99.97 % for an initial concentration of 200 mg L −1 of methylene blue and granular AC dosage of 10,000 mg L −1 ). Ferraz et al. (2005) in a study for Cr (III) adsorption also used SBG as adsorbent, obtaining a maximum adsorption capacity of 17.84 mg g −1 at pH 5.0 (Ferraz et al. 2005). As in the study carried out by Silva et al. (2004), this work also reported a good removal capacity of Cr (III) using the SBG in its raw form.
Considering the above-mentioned studies and the high availability of SBG for its large-scale application, the use of this biomass as sorbent for the removal of pharmaceuticals from contaminated water could be a sustainable solution for the valorization of this residue, upcycling it through its transformation into an added-value product. The main objective of this work consists of using SBG as a precursor of biochar and AC. SBG obtained from two different types of brewing processes were selected to evaluate the impact of the fermentation on the properties of the resulting adsorbents. The produced materials were physical and chemically characterized and subsequently tested as adsorbents to remove the antiepileptic pharmaceutical carbamazepine (CBZ) from aqueous solutions. CBZ was selected due to its relevance as environmental microcontaminant. It is one of the most frequently detected pharmaceuticals in the aquatic environment (Fekadu et al. 2019;Li 2014;Tran et al. 2018), most possibly as a consequence of being highly recalcitrant to conventional wastewater treatments (Jelic et al. 2011). For these reasons, CBZ has been proposed by several authors as a valid marker of anthropogenic pollution (Bahlmann et al. 2012;Clara et al. 2004). This pharmaceutical (M w 236.27 g mol −1 ) is neutral over the range of environmentally relevant pH (pKa of 13.9, related to the deprotonation of the -NH 2 group of CBZ) (Jones et al. 2002) and has a relatively low water solubility (18 mg L −1 at 25°C, with a log K ow of 2.45) (Aga 2008). The materials produced in this work with the best performance for the adsorption of CBZ, selected after a battery of preliminary tests, were subjected to kinetic and isothermal studies both in ultrapure water and wastewater (final effluent collected at a sewage treatment plant), in order to confirm their adequacy for the target application.

Production of carbon adsorbents
To produce the adsorbent materials, SBG from the brewery Faustino Microcervejeira, Lda (Aveiro, Portugal) were used as precursor. In order to evaluate the effect of using SBG arising from different types of fermentation on the properties of the produced materials, two different residues were collected: SBG from the production of barley wine (BW), a type of beer that has a high fermentation, and SBG from the production of pilsener (PL), a beer that has a low fermentation process. After collection, the SBG was dried at room temperature for several days, followed by a 24 h period at 104°C in an oven, to eliminate moisture. Then, it was grinded with a blade mill and stored dry until use. The adsorbents were produced by pyrolysis of BW and PL in a furnace muffle (Nüve, series MF 106, Turkey) under inert environment (nitrogen flow), at different temperatures (heating rate of 10°C min −1 ) and residence times, and with (AC) or without (biochar) a previous activation process, as detailed below. The yield of production (η) of all carbon adsorbents produced was calculated in Eq. (1): Preparation of biochar The raw SBG were weighed in porcelain crucibles and carbonized at 600°C and 800°C, using residence times of 60 and 150 min. Accordingly, BW was pyrolyzed under such conditions, resulting in the following materials: BC-BW-600-60, BC-BW-600-150, BC-BW-800-60, and BC-BW-800-150. Preliminary tests carried out with these materials indicated that pyrolysis at 600°C, without chemical activation, did not result in materials with interesting properties for the adsorptive removal of organic contaminants. For this reason, only the higher temperature (800°C ) was used for PL, i.e., it was treated at 800°C for 60 min and 150 min, giving the BC-PL-800-60 and BC-PL-800-150 materials, respectively. After pyrolysis, the materials were washed with a 0.5 M solution of HCl for the removal of ashes and other inorganic content. For this purpose, for each 10 g of material~200 mL of 0.5 M HCl were added; the materials were immersed in the acid solution for 1 h and subsequently vacuum filtered and washed with distilled water until the washing leachate reached neutral pH (e.g.,~200 mL of distilled water for each 10 g of AC activated with alkaline agents or up to a few liters for acid-activated materials). Finally, the material was oven dried at 104°C for 24 h and separated by grain size. The granulometry used in the adsorption tests was below 0.18 mm.

Preparation of activated carbon
Different types of AC were prepared by chemical activation of SBG, followed by carbonization at 800°C for 150 min. The chemical agents used for activation were KOH, NaOH, and H 3 PO 4 in a ratio precursor:activating agent of 1:1 (w/w). For the materials activated with KOH and NaOH, the solidactivating agent was dissolved in distilled water in a proportion activating agent:water of 3:10 (w/v), whereas for the activation with H 3 PO 4 , the activating agent was diluted in a ratio activating agent:water of 1:3 (v/v). In both cases, SBG was impregnated for 1 h with the activating agent solution, using an ultrasonic bath. The resulting slurry was then dried at room temperature. Then, the materials were pyrolyzed and subjected to washing and sieving under the same conditions as those described for the biochar ("Preparation of biochar" section). Six AC materials were obtained: KOH-BW-800-150, NaOH-BW-800-150, H 3 PO 4 -BW-800-150, KOH-PL-800-150, NaOH-PL-800-150, and H 3 PO 4 -PL-800-150.

Characterization of precursors and carbon adsorbents
The precursors (PL and BW) and the obtained materials were characterized by the following techniques: total organic carbon, proximate analysis, Fourier transform infrared spectroscopy with attenuated total reflectance (FTIR-ATR), point of zero charge, determination of carbons' functional groups by back titration, S BET , and scanning electron microscopy (SEM). A detailed description of the procedures used can be found in the Supplementary Material (SM).

Batch adsorption experiments
In order to test the adsorptive performance of the produced materials for the removal of CBZ from water, adsorption experiments were made under shaking and batch conditions. In a first analysis of the produced biochars and ACs, some preliminary adsorption tests were carried out in order to select the most promising materials that will be subjected to a deeper analysis (kinetic and isothermal studies). For these tests, CBZ solutions with an initial concentration (C i ) of 5 mg L −1 were prepared in ultrapure water. Subsequently, these solutions were placed in polypropylene tubes containing a known mass of adsorbent (varying from 25 to 1000 mg L −1 for biochars and from 25 to 50 mg L −1 for ACs) and shaken in an overhead shaker (Heidolph, Reax 2) at 80 rpm for 24 h and under controlled temperature (25.0°C ± 0.1°C). Based on the adsorption percentages resulting from these experiments, the materials with the best adsorptive properties were selected for further studies, as described in the "Adsorption kinetics" and "Adsorption equilibrium" sections.
Generally, all studies (preliminary, kinetic, and equilibrium) were performed in triplicate. Each experiment included a control (CBZ solution without the adsorbent) that was used as reference for the calculation of adsorption percentages after the contact time between the solution and the material. After stirring under specific conditions, sample aliquots were filtered through 0.22 μm PVDF filters (Whatman) and analyzed by using micellar electrokinetic chromatography, in order to determine the remaining pharmaceutical concentration, as described in the "Pharmaceutical's quantification" section.

Adsorption kinetics
To study the adsorption kinetics of CBZ onto the selected carbons (KOH-BW-800-150 and KOH-PL-800-150), a fixed dose of the carbon adsorbent (mg L −1 ) was placed in tubes and put in contact with 45 mL of 5 mg L −1 of two aqueous solutions of CBZ (prepared in ultrapure water and wastewater, respectively). The concentrations of both KOH-BW-800-150 and KOH-PL-800-150 were 15 mg L −1 and 40 mg L −1 in ultrapure water and wastewater, respectively. The solutions were shaken for different time intervals between 5 and 240 min for ultrapure water, and 15 and 1860 min for wastewater. A minimum of six time intervals was considered for each system, and the dose of carbon material was selected in order to obtain a significant adsorption percentage but, simultaneously, to avoid CBZ removals close to 100%, which would make the analytical determination of the remaining CBZ concentration difficult. The adsorbed concentration of CBZ onto each AC at time t, q t (mg g −1 ), was calculated using Eq. (2). The experimental data were fitted by using the pseudo-firstorder model (Lagergren 1898) and pseudo-second-order model (Ho et al. 2000), presented in Eqs. (3) and (4), respectively, in order to determine the kinetic parameters of each system.
where C i (mg L −1 ) is the initial concentration of pharmaceutical, C t (mg L −1 ) is the concentration of pharmaceutical in solution at time t, V (L) is the volume of solution, m is the mass of adsorbent (g), q e refers to the amount of adsorbate per unit mass of adsorbent at equilibrium (mg g −1 ), k 1 is the pseudo-first-order rate constant (min −1 ), and k 2 is the pseudo-second-order rate constant (g mg −1 min −1 ). Non-linear fittings were performed using GraphPad Prism, version 5.

Adsorption equilibrium
For the determination of the adsorption isotherms, the experiments were performed using the shaking time needed to attain the equilibrium, as determined in the "Adsorption kinetics" section, and varying the concentration of carbon adsorbents while keeping the initial concentration of the CBZ constant (5 mg L −1 ). These experiments allow to calculate the adsorption capacity of the materials. Briefly, 50 mL of a 5 mg L −1 aqueous solution of CBZ was added at different doses of each carbon. For ultrapure water, the dose of KOH-BW-800-150 and KOH-PL-800-150 varied between 12.5 and 30 mg L −1 and between 20 and 40 mg L −1 , respectively, and for wastewater, it varied between 35 and 90 mg L −1 and between 25 and 70 mg L −1 , respectively. A minimum of six concentrations was considered for each system. The adsorbed concentration of CBZ onto each AC at the equilibrium, q e (mg g −1 ), was calculated using Eq. (5). The experimental data were fitted by the Langmuir (Langmuir 1916) and Freundlich (Freundlich 1906) isotherm models (Eqs. (6) and (7), respectively) in order to determine the equilibrium parameters of the systems. Nonlinear fittings were performed using GraphPad Prism, version 5.
where C e (mg L −1 ) is the concentration of CBZ in the solution at the equilibrium; q m is the maximum adsorption capacity of each material towards CBZ (mg g −1 ); K L is the Langmuir equilibrium constant (L mg −1 ); K F is the Freundlich equilibrium constant (mg g −1 (L mg −1 ) 1/N ); N is the degree of nonlinearity; and all the other variables are defined as in Eqs.

Wastewater sampling
Wastewater was collected in June 2019 in a local sewage treatment plant (Aveiro, Portugal), and it corresponds to the final effluent, after the biological treatment, as discharged into receiving waters (~3.3 km away from the coast, into the Atlantic Ocean). Immediately after collection in order to remove suspended organic matter, it was filtered through cellulose Supor-450 membrane disc filters of 0.45 μm with a vacuum system. After filtration, the samples were stored in the dark at 4°C and used within no longer than 15 days. The collected effluent was characterized by measuring the conductivity (WTW meter), pH (pH/mV/°C meter pHenomenal® pH 1100L, VWR), and dissolved organic carbon content (TOC-VCPH Shimadzu). The pH, conductivity, and dissolved organic carbon were 8.42, 2.78 ms cm −1 , and 18.0 ± 0.8 mg L −1 , respectively.

Pharmaceutical's quantification
The quantification of CBZ was performed by using micellar electrokinetic chromatography using a Beckman P/ACE MDQ instrument (Fullerton, CA, USA), equipped with a UV-Vis detection system, controlled by the software 32 Karat, according to the procedure described by Calisto et al. (Calisto et al. 2011), with minor modifications. Briefly, a coated silica capillary with 30 cm to the detection window was used, and the electrophoretic separation was performed at 25°C and 25 kV, during 4.5 min runs. Ethylvanillin was used as internal standard, and sodium tetraborate was used to obtain higher repeatability and better peak shape and resolution. Both were spiked to all samples and standard solutions at final concentrations of 3.34 mg L −1 and 10 mM, respectively. Detection of CBZ was monitored at 214 nm, and the separation buffer consisted of 15 mM of sodium tetraborate and 20 mM of sodium dodecyl sulfate. The calibration curve was determined for a concentration range between 0.25 and 5.0 mg L −1 . All the analyses were performed in triplicate.

Yield of the adsorbents' production
After the production (pyrolysis and washing) of the adsorbent materials, the production yield was calculated. A considerable difference between the values obtained for the biochars and for the ACs was observed. Briefly, the yields obtained were around 30% for all biochars; 13% for BW and PL KOH-ACs; 11 and 4% for BW and PL NaOH-ACs, respectively; and around 51 % for BW and PL H 3 PO 4 -ACs. In general, the washing step was an inevitable cause of material losses, due to the removal of the inorganic fraction. The low production yields obtained for the KOH-ACs and NaOH-ACs (in opposition to the ones obtained for biochars and H 3 PO 4 -ACs) can be due to a higher loss of volatile organic matter caused by the reaction with the alkali bases. On the other hand, for H 3 PO 4 -ACs, the product yield increased comparatively to biochars. According to Molina-Sabio et al. (1995), the high yield of H 3 PO 4 -ACs can be due to the formation of largest structural units by the reaction between this activating agent and the lignocellulosic precursor which do not escape as volatile matter during pyrolysis. This leads to a final material with higher density, most likely due to the generation of phosphate or polyphosphate structures (Hunsom and Autthanit 2013), contributing to increase the product yield.

Physical and chemical characterization
The results concerning total organic carbon determination are presented in Table S1 of SM. Both precursors present a high value of total organic carbon (48.5 ± 0.6% and 48.2 ± 0.2% for BW and PL, respectively) and very low inorganic carbon contents (< limit of detection), corroborating that these residues constitute a promising raw material for the production of carbon adsorbents. Comparing the total organic carbon content values of the carbon adsorbents with those of the precursors, the increase for biochars and ACs is clear (~30%), except for H 3 PO 4 -BW-800-150 and H 3 PO 4 -PL-800-150, for which total organic carbon remained similar to the precursor.
The thermogravimetric analyses of the raw materials (BW and PL) and the resulting KOH-ACs are depicted in Fig. S1 of SM, while the corresponding proximate analyses, reported on a dry basis, are depicted in Table 1. The results showed that BW and PL have similar characteristics, i.e., low ash contents and high volatile matter and fixed carbon contents. According to Fig. S1, a pronounced thermal decomposition of the precursors began at approximately 200°C. However, BW and PL have three stages of mass loss during the pyrolysis process, corresponding to derivative thermogravimetric peaks at 84, 295 and 352°C and 83, 283 and 351°C, respectively. Initially, the derivative thermogravimetric curve shows a peak (~80°C) corresponding to the mass loss derived from water evaporation (Mahmood et al. 2017;Oliveira et al. 2018). The major weight loss was observed in the temperature range of 200-500°C, which is due to the thermal decomposition of the main SBG constituents (cellulose, hemicellulose, and lignin) (Mahmood et al. 2017). At~500°C, the breakdown of lignocellulosic material was finished, and no further weight loss was observed. This indicates that the basic structure of carbon is expected to have been formed at 500°C, which should be considered as the lowest carbonization temperature for AC production from SBG. The tested pyrolysis temperatures were 600 and 800°C, since higher temperatures usually translate into a higher development of microporosity, which is advantageous for adsorbents with superior adsorption capacity (Calisto et al. 2014). For KOH-ACs, the volatile matter content is much lower than that of the raw materials. On the other hand, an increase (approximately four times higher) in the fixed carbon content was observed. In fact, the ratio between the volatile matter and fixed carbon percentages for KOH-ACs suffered a substantial decrease compared with the raw materials, indicating an extensive volatile matter release with the increase of the non-volatile carbon fraction, which are two factors that positively contribute to the formation of a carbonrich and highly porous adsorbent (Calisto et al. 2014). The high fixed carbon content is consistent with the total organic carbon determination. Moreover, the low ash content (below 15%) is also in accordance with the low inorganic carbon content of the samples.
Regarding the FTIR-ATR analyses, the spectra of the BW, PL, and produced carbon adsorbents are presented in Fig. S2 of SM, allowing to identify the major functional groups. The results show that the precursor materials (both BW and PL) have a much more complex chemical composition than the produced carbon adsorbents. The spectra of BW and PL present several typical bands of cellulose. The bands between 2935-2915, 2865-2845, and 2880-2860 cm −1 correspond to vibrations of the C−H stretch in asymmetric and symmetric aliphatic chains (−CH 2 and −CH 3 , respectively) (Coates 2000), which may belong to cellulose, lignin, or hemicellulose (Fontana et al. 2018). In both cases, these bands disappeared in ACs; however, they are still noted in the BC-BW-800-150 and BC-PL-800-150. The peak at 1743 cm −1 , found in spectra of PL, corresponds to the vibration of the stretching of the carbonyl group (C=O) in ketones, ethers, aldehydes, and carboxylic acids. In the FTIR spectra of BW-and PL-based biochars (BC-BW-800-60, BC-BW-800-150, BC-PL-800-60, and BC-PL-800-150), the typical bands of cellulose disappeared. This fact showed that there was a considerable degradation of the main functional groups of BW and PL after pyrolysis, even without activation. Additionally, for spectra of the BW, PL, and respective ACs, several peaks are present between 1650 and 1150 cm −1 . These peaks can be associated with the cellulosic ethers (C−O−C bonds) (~1150 cm −1 ) (Coates 2000), with the C−O stretching in carbonyl group (1 238 cm −1 ) (Coates 2000), with the C−H bending vibrations (~1300 cm −1 ) (Fontana et al. 2018;Jaria et al. 2017), and with the carbonyl group in aromatic rings (~1641 cm −1 ) (Calisto et al. 2014;Coates 2000) found in lignin (Fontana et al. 2018). The groups identified in the FTIR spectra of the BW and PL are in agreement with the brewing waste composition, which is rich in cellulose, hemicellulose, lignin, and proteins (Olszewski et al. 2019;).
The point of zero charge (Table 2 and Fig. S3 of SM) was determined in order to know the net charge of the ACs. The concentrations of some functional groups, namely carboxyl and total basic groups, were obtained by using back titrations ( Table 2). Low point of zero charge is directly connected with the presence of high concentrations of the carboxyl groups; on the other hand, higher point of zero charge is linked to a higher concentration of total basic groups and lower concentration of carboxyl groups. The point of zero charge determined for KOH-BW-800-150 and KOH-PL-800-150 is neutral or slightly basic, respectively, which is in line with the very similar concentrations obtained for the two functional groups for both materials.
For the study of the textural features of the materials, nitrogen adsorption isotherms and SEM were used as characterization techniques. The results of S BET and the textural characterization of all the produced carbon adsorbents are presented in Table 3. PL-based carbons presented slightly higher S BET compared with BW-based carbons produced under the same conditions. This fact may be explained by the relative higher content of volatile matter in PL in comparison with BW. KOH-BW-800-150 and KOH-PL-800-150 were the materials with the highest S BET , 1090 and 1120 m 2 g −1 , respectively. On the other hand, the ACs obtained with NaOH and H 3 PO 4 chemical activation resulted in a much lower S BET , more comparable with the values obtained for the biochars than with the KOH-based ACs. The same conclusion is valid for total pore volume (V p ) and micropore volume (W 0 ) values, which will certainly influence the adsorptive capacity of these materials. This comparison is particularly interesting in the case of the materials resulting from KOH and NaOH chemical activation: the activating agents are of similar nature, both alkali hydroxides, but the results are drastically different for the two alkali There are some works that use SGB in the raw form, as the one described by Fontana et al. (Fontana et al. 2016), who only dried, crushed, and sieved the raw material, and obtained a S BET of 0.8246 m 2 g −1 . In what concerns materials resulting from chemical activation, most authors initially carbonize the previously dried SBG and then activate the resultant carbon material, adopting a two-step activation instead of the one-step procedure applied in the present manuscript. The study of Olajire et al. (2017) is an example of such cases, where dry SBG were carbonized at 300°C during 30 min and subsequently activated with H 3 PO 4 and subjected to a second carbonization at 300°C during 1 h. The resultant carbon presented a S BET of 412 m 2 g −1 (Olajire et al. 2017). Also, a comparison of the materials described in this study with some commercially available ACs shows that KOH-BW-800-150 and KOH-PL-800-150 presented higher S BET . For example for the commercial AC, PULSORB FG4 (PBFG4) and Norit (SAE SUPER 8003.6) (applied by Calisto et al. (2014) and Silva et al. (2019), respectively) have a S BET of 848 and 996 m 2 g −1 , respectively, indicating that the produced materials have very promising properties to be used as adsorbents. Figure 1 shows the SEM images of both precursors and some examples of BW-and PL-based carbons. The images show a gradual difference between the surface morphology of the precursors, the biochars, and the KOH-ACs. In comparison with ACs, the structure of biochars is more homogeneous, with some degree of destruction of the original structure, and a few pores can be observed (as confirmed by the S BET analysis). On the other hand, the structure of the KOH-AC is a much rougher surface (particularly, for PL materials) with a well-developed porosity. The highly porous structure is in accordance with a higher surface area, as can be confirmed by the results of S BET , V p , and W 0 (Table 3). Other SEM images of the biochars and KOH-AC are presented in Figs. S4 and S5 of SM, respectively, at different magnifications.

Batch adsorption experiments
Preliminary tests were performed to evaluate the adsorptive removal of CBZ from water by all the produced carbons, allowing to identify the most promising materials. For the biochars, a considerable range of carbon dosages (between 25 and 1000 mg L −1 ) was tested. The results showed a negligible CBZ adsorption, even at materials' dose as high as 1000 mg L −1 (data not shown). This performance is in accordance with the very low S BET obtained for the non-activated carbons. Therefore, kinetic and equilibrium studies were not performed with biochars.
On the other hand, the ACs revealed much more interesting results, even at much lower carbon doses (25 and 50 mg L −1 ), as evidenced by the data depicted in Table S2 of SM. The ACs with the best adsorptive performance to remove CBZ (C i = 5 mg L −1 ) from aqueous solutions were KOH-BW-800-150 and KOH-PL-800-150, with adsorption percentages of 88 ± 11% and 85 ± 7%, respectively, using only 25 mg L −1 of material. The other ACs were not able to satisfactorily adsorb CBZ at the tested doses, with removal percentages below 15 ± 6%, using 50 mg L −1 of material. Better removal percentages for the KOH-ACs are certainty related with their S BET , V p , and W 0 , which are much higher than those obtained for NAOH-ACs and H 3 PO 4 -ACs (Table 3). Based on these results, the two KOH-ACs (KOH-BW-800-150 and KOH-PL-800-150) were selected to perform kinetic and equilibrium studies. For this purpose, both ultrapure water and wastewater were used as test matrices, in order to evaluate the adsorptive behavior of the materials under more realistic and representative conditions. Table 3 Textural characterization of all the produced carbon adsorbents-specific surface area (S BET ), total pore volume (V p ), micropore volume (W 0 ), and average micropore width (L)

Adsorption kinetics
The amount of CBZ adsorbed onto KOH-BW-800-150 and KOH-PL-800-150 at time t (q t , mg g −1 ) versus time, as well as the fittings of the experimental data to pseudo-first-and second-order kinetic models (Eqs. (3) and (4), respectively), is represented in Fig. 2. The fitting parameters are summarized in Table 4. Generally, the pseudo-second-order model was the one that best fitted the experimental data, with determination coefficients (r 2 ) ranging from 0.974 to 0.985 (except for KOH-BW-800-150 in ultrapure water). The adequacy of the pseudo-second-order model to describe the adsorption of CBZ onto carbon adsorbents was in line with the results previously reported in several literature studies, where this model was the one presenting the most satisfactory fittings to the experimental data Chen et al. 2017;Oliveira et al. 2018;Silva et al. 2019;To et al. 2017).
Considering the adsorption of CBZ onto KOH-BW-800-150 and KOH-PL-800-150, it can be verified that the observed adsorption rates (k 2 ) determined by the pseudo- second-order model indicated that no major differences can be found for the adsorption kinetics for both materials and both matrices. All the systems attained adsorption equilibrium after 120 to 240 min of contact between the adsorbent and CBZ. Overall, and considering that the equilibrium is quickly reached, both SBG-based carbons are kinetically adequate for wastewater treatment, combining quick kinetics with no significant matrix interferences (that could have been possibly observed due to the compositional complexity of the sewage treatment plant's effluent) in the time needed to attain the equilibrium.

Adsorption equilibrium
The adsorption isotherms, represented as the amount of CBZ adsorbed onto KOH-BW-800-150 and KOH-PL-800-150 at equilibrium (q e , mg g −1 ) versus the amount of pharmaceutical remaining in solution (C e , mg L −1 ), are shown in Fig. 3. The fitting parameters obtained for the experimental data using the Langmuir and Freundlich isotherm models (Eqs. (6) and (7), respectively) are summarized in Table 4. The Langmuir-Freundlich equilibrium model (Sips 1948) has also been tested for fitting the experimental data. However, the determination of the Langmuir-Freundlich adsorption parameters was ambiguous for all systems, and thus it was not considered in this discussion.
According to the results obtained for the r 2 , ranging from 0.953 to 0.983, the equilibrium experimental data are satisfactorily described by the Langmuir model, for both matrices and materials. As evidenced in Fig. 3 and confirmed by the adsorption parameters depicted in Table 4, it was possible to conclude that the Langmuir maximum adsorption capacity (q m ) for KOH-BW-800-150 and KOH-PL-800-150 was significantly higher in ultrapure water than in wastewater. The q m in wastewater decreased~70 and~60% for KOH-BW-800-150 and KOH-PL-800-150, respectively. This can be due to the complex chemical composition of the wastewater, which contains organic and inorganic components, such as dissolved organic matter, that can compete for the adsorption sites of the carbons and, consequently, hamper the access to the pores of the adsorbents (Oliveira et al. 2018;Silva et al. 2019). These results reinforce that, despite the relevance of a first evaluation of the adsorptive capacity of the materials in ultrapure water, tests using real wastewater are of utmost importance to predict the behavior of the adsorbents under conditions as close as possible to their real application. Each point (± standard deviation) is the average of three replicates. Note that xand y-axis scales are not the same in all graphs to allow a better visualization of the results *n is the number of data points used in the fitting Fig. 3 Fittings for the isotherms experimental data for KOH-BW-800-150 in a ultrapure water and b wastewater, and for KOH-PL-800-150 in c ultrapure water and d wastewater. The results were fitted to the Langmuir (solid lines) and Freundlich (dashed lines) equilibrium models. Each point (± standard deviation) is the average of three replicates. Note that xand y-axis scales are not the same in all graphs to allow a better visualization of the results A comparison between KOH-BW-800-150 and KOH-PL-800-150 reveals that these two materials have a similar q m (190 ± 27 and 178 ± 10, respectively) in ultrapure water. In wastewater, the q m was slightly lower for KOH-BW-800-150 than for KOH-PL-800-150 (57.4 ± 1.6 and 76.0 ± 1.5, respectively). Still, the performance of the materials is very similar with no major differences between them, highlighting that SBG resulting from different fermentation levels does not result in adsorbent materials with significantly distinct adsorptive properties for the systems considered in the present study.
The removal of CBZ from both ultrapure water and wastewater through adsorption onto commercial or waste-based carbon adsorbents has been addressed in the literature by several authors. Table 5 presents some examples of relevant studies from the last 5 years, allowing for a comparative evaluation of the performance of the materials depicted in the present study. Along with the maximum adsorption capacity towards CBZ, the S BET of the materials was also presented, as it is considered a key property of the adsorbents. The results here obtained are comparable to the performances observed for commercial ACs, which attained q m between 116  and 242 mg g −1 (Delgado et al. 2019) in ultrapure or distilled water. This is a good indication of the satisfactory removal efficiencies of the materials derived from SBG chemical activation and pyrolysis. When compared with other waste-based adsorbents, biochars produced by carbonization with no activation agents have significantly lower performances Nielsen et al. 2015), as it was also verified for the biochars produced from SBG, corroborating the need of such activation procedures to attain efficiencies comparable to commercially available options. On the other hand, ACs produced from industrial or agricultural wastes present significantly higher performances than biochars and similar to the results obtained for AC produced from SBG (up to 190 mg g −1 ), varying from 93 (Oliveira et al. 2018) to 335 mg g −1 (Torrellas et al. 2015). While the evaluation of the materials' adsorptive capacity in ultrapure or distilled water is always considered in the literature, fewer works were carried out in real matrices, namely wastewater. In these cases, and considering CBZ in particular, some studies reported that the adsorptive removal remained almost unchanged , while others observed a significant decrease in the ability to remove the target pollutant (Oliveira et al. 2018), as verified for the AC described in the present work. In this context, further research needs to be done to improve the adsorptive performance of the adsorbent materials at conditions representative of the target application, where the competition with dissolved organic matter and other organic and inorganic compounds could be determinant. The modification of the adsorbent surface by chemical functionalization could Table 5 Examples of literature studies reporting the adsorptive removal of carbamazepine using commercial or waste-based carbon adsorbents Adsorbent S BET (m 2 g −1 ) Equilibrium experimental conditions 1 Maximum adsorption capacity 2 (mg g −1 ) Reference Commercial AC (PBFG4) 848 T = 25°C; C 0 = 5 mg L −1 116 (ultrapure water)  Commercial AC (Norit) 996 T = 25°C; C 0 = 5 mg L −1 174 (ultrapure water); 160 (wastewater, pH 7.7-7.9)  Commercial AC from vegetable origin 1328 T = 25°C; C 0 = 10-40 mg L −1 242 (distilled water, pH~6) (Delgado et al.

2019)
Biochar from paper mill sludge 414 T = 25°C; C 0 = 5 mg L −1 17.4 (ultrapure water, converted from μmol g −1 )  Carbonized sewage sludge + fish waste 34-101 T = 30°C; C 0 = 1-100 mg L −1 4.9-37.2 (Sips isotherm) (Nielsen et al. 2015) AC from bleached paper pulp 768-965 T = 25°C; C 0 = 5 mg L −1 57-93 (ultrapure water); 29.9-80 (wastewater, pH 7.8) (Oliveira et al. 2018) AC from paper mill sludge 1627 T = 25°C; C 0 = 5 mg L −1 212 (ultrapure water); 209 (wastewater, pH 7.7-7.9) This study 1 C 0 -carbamazepine initial concentration 2 Maximum adsorption capacity determined by fitting the experimental data with the Langmuir isotherm model, unless stated otherwise be a possible way to improve the affinity of the materials towards specific pharmaceuticals. Overall, considering the large-scale production all over the world and the sustainable nature of the precursor used in the production of adsorbents, the results presented in this study indicate that SBG are a viable AC precursor that might be successfully applied to the removal of pharmaceuticals from water. Nevertheless, it should be highlighted that the sustainability of the whole process can be hampered by the use of high temperatures and pyrolysis times combined with high proportions of activating agents, which are required for obtaining materials with adequate properties for increased adsorptive performances. In this sense, further research should be carried out to investigate the conversion of SBG into AC using milder conditions by applying, for instance, alternative heating technologies, such as microwave-induced pyrolysis. Moreover, the produced adsorbents are in powdered form, which might hinder their affordable applicability in sewage treatment plants due to the need of introducing an additional step aimed at separating the treated aqueous phase from the powdered AC. This might be overcome by (i) testing the introduction of magnetic properties in the produced AC and (ii) testing the performance of SBG-derived granular materials. In fact, the applied production process allows to obtain higher particle sizes (granular AC) without the need of any extra step (such as the addition of agglomeration agents).

Conclusions
The chemical activation of SBG was fundamental to obtain high-efficiency adsorbents, being KOH-ACs, the materials with the most interesting physicochemical characteristics and the best adsorptive performance towards CBZ. Moreover, using as precursor SBG from different types of fermentation does not influence the adsorbents' properties. Adsorption studies in sewage treatment plant's wastewater allowed to verify a decrease in the performance of the materials, in comparison with ultrapure water, highlighting the importance of using realistic matrices as model systems. This study represents a step forward in the utilization of SBG for AC production, enabling its application to the effective adsorption of pharmaceuticals.