1 Introduction

Antibiotics are one class of the most prevalent contaminants, which have been widely used in the pharmaceutical, medical and aquacultural industries (Martucci et al. 2014; Zheng et al. 2013). These contaminants have given rise to serious environmental problems due to their refractory and toxicity (Bougnom and Piddock 2017). Sulfonamides (SAs) have a high detection rate in the sewage, water, soil, surface water all over the world because of their large amount of application (Kummerer 2002; Nakata et al. 2005; Yan et al. 2018). They would induce the generation of drug-resistant bacteria (Bai et al. 2014; Davies and Davies 2010; Kim et al. 2014), and cause hypoimmunity and dysbacteriosis after entering the human bodies through food chain (Lange and Dietrich 2002; Poloni et al. 2017). Therefore, it is urgent to search for advanced technologies to remove these refractory antibiotics from water.

Many effective technologies, such as chemical remediation, advanced oxidation, photocatalysis and adsorption have been developed and applied to remove antibiotics (Zessel et al. 2014). Among these approaches, adsorption has become one of the most widely accepted technologies due to its economy, feasibility and environmental–friendliness (Gao et al. 2012; Hu et al. 2020; Kim et al. 2020; Ling et al. 2016; **ao et al. 2018). Based on the characteristics of high porosity, hydrophobicity and aromaticity (Peiris et al. 2017), biochars (BCs) have attracted extensive attention as an excellent adsorbent for removing organic contaminants (Dai et al. 2020; Hopkins and Hawboldt 2020; Ndoun et al. 2020; Tan et al. 2015; Yao et al. 2020). BCs are the pyrolysis products of biomasses at low  temperatures (< 800 °C) in the oxygen-limited environment (Tripathi et al. 2016). Among those raw materials from agriculture for the preparation of BCs, coffee is one of the world’s most traded products with an annual output of more than 8.0 billion kg per year (Vardon et al. 2013). The solid residues (coffee grounds, denoted as CGs) containing 40% lignin (Jeguirim et al. 2014) are easy to polycondensate to form a polycyclic aromatic hydrocarbon structure, and thus are believed to be the potential to exhibit a higher fixed carbon content under hyperthermal conditions (Ma et al. 2015).

On top of all the factors that might affect the physicochemical properties of BCs (Antonangelo et al. 2019; Suliman et al. 2016), the pyrolysis temperature is a key parameter that would affect the quantity of functional groups, porosity and aromaticity level of biochar (Choi and Kan 2019). The dissociation energy required to decompose the functional groups is different owing to the distinct functionalities contained in biomass (Angin and Sensoz 2014; Gao et al. 2021; Li et al. 2019). It remains a challenge to reveal the relationship between the temperature and the biochar quality because of the various nature and composition of biomasses.

Furthermore, various modification strategies including acid and alkaline activation (Bashir et al. 2018; Guo et al. 2017; Vithanage et al. 2015; Wang and Kaskel 2012), electrochemical modification (Yang et al. 2019a), magnetic modification (Quah et al. 2020), mineral modification (Oginni et al. 2020), and oxidant modification (Huff and Lee 2016), have been applied to improve the adsorption performance of biochar. The combined alkali-acid modification can significantly improve the adsorption capacity of BCs, because the former alkali treatment could help to produce more activated sites for the latter acid modification (Tang et al. 2018), and thus not only expand the porosity of the original biochar, but also increase the number of acid binding sites and oxygen functional groups (Wang and Wang 2019). In particularly, H3PO4 acidification after the alkali treatment could optimize pore size distribution, and would be beneficial for the specific surface area increasing as well as the pore volume (Liu et al. 2012). Moreover, the enriched functional groups, P=O and P=OOH for example, could impact the charge distribution of the adsorbent and the H-bonding formation thanks to the lone pair electrons, and therefore tend to lead to the stronger surface complexation for adsorption (Peng et al. 2017). Compared to sulfuric acid, nitric acid, zinc chloride and other modification methods, phosphoric acid modification can protect the carbon skeleton and exhibit greater advantages in micropore formation (Chen et al. 2018; Kang et al. 2018; Liu et al. 2020a). Moreover, considering their environmental effect, equipment corrosion and chemical recovery, phosphoric acid is most preferred (Chu et al. 2018; Prahas et al. 2008). To our knowledge, there has been no report on the synergistic modification of biochar through combined alkaline and phosphorous acid treatment.

Herein, we aim to prepare a series of H3PO4-modified coffee grounds-derived activated biochar (PABC) materials for removing sulfadiazine (SDZ) in aqueous solutions. The effects of pyrolysis temperature and phosphoric acid modification on the adsorption performance of biochar were systematically explored in the first place.

2 Materials and methods

2.1 Chemicals and reagents

Chemicals used in this work were of reagent-grade and were dissolved in deionized water. SDZ (98%), KOH, HCl and H3PO4 were purchased from Aladdin (Shanghai, China).

2.2 Adsorbents preparation

Coffee grounds (CGs) were collected from the Starbucks located in Fuzhou City, Fujian Province, China. CGs were washed with 75% ethanol and then dried in an oven at 60 °C for 12 h. After being dried, CGs were screened by 100 mesh sieve. The pre-treated CGs were calcined in a tube furnace (GSL-1500X, China) for 1 h under N2. CGs pyrolyzed at 500 °C, 600 °C and 700 °C were labelled as CBC-500, CBC-600 and CBC-700, respectively. Then, the CBCs were activated with two equivalents of KOH at 700 °C for 1 h to obtain activated carbon ABC-500, ABC-600 and ABC-700. The ABCs were washed with hydrochloric acid (0.1 M) and deionized water until the pH of the filtrate equaled 7.0.

PABCs were prepared as follows: ABCs were firstly mixed with 35.0 wt% phosphoric acid at a mass ratio of 1:2, and then immersed for 30 min before being sonicated for 10 min. This process was repeated for 6 times. After that, the H3PO4-modified sample was repeatedly washed with deionized water until the pH value of the eluate was about 7.0. After being dried overnight at 60 °C in an oven, PABCs were prepared and denoted as PABC-500, PABC-600 and PABC-700, respectively.

2.3 Characterization

The surface morphology was obtained by scanning electron microscope (SEM, ProX Premium, Phenom, Netherlands). Powder X-ray diffraction (PXRD) was carried out on a diffractometer (Miniflex 600, Rigaku, Japan) with Cu Kα radiation (λ = 0.154 nm). The Raman spectra were measured on a Raman spectrometer (LabRAM HR800, HORIBA Jobin Yvon, France) using 633 nm laser. The N2 adsorption/desorption isotherms, surface area and porous properties were determined by the Brunauer–Emmett–Teller method (BET, ASAP2460, Micromeritics, USA) at liquid nitrogen temperature (77 K). The carbon (C), hydrogen (H), and nitrogen (N) contents of each biochar sample were evaluatedusing an Elemental Analyzer (Vario max cube, Elementar, Germany). X-ray photoelectron spectroscopy (XPS, ESCALAB 250**, Thermo Fisher, USA) served for the element composition determination with Al Kα x-ray source (15 kV, 10 mA). The functional group analysis of ABC-700 and PABC-700 was carried out by the Fourier transform infrared spectrometer (Nicolet iS50, Thermo, USA), with a spectral range of 400–4000 cm−1. The zeta potential was determined using a high sensitivity Zeta potential analyzer (NanoBrook Omni, Brookhaven, USA). Thermogravimetric analysis was performed using a thermogravimetric analyzer (TG 8120, Rigaku, Japan) at a heating rate of 10 °C/min, and a nitrogen flow rate of 100 mL/min. A drop shape analyzer (DSA100, Krüss GmbH, Germany) was employed to observe the contact angle (CA) of biochar samples.

2.4 Batch adsorption experiments

In a typical batch adsorption experiment, 5.0 mg adsorbent was added to 50 mL SDZ solution (10 mg/L) shaking in a water bath thermostatic oscillator (25 °C, 130 r/min), and sampled for the determination of SDZ concentration using a UV–vis absorbance (UV-2600, Shimadzu, Japan) at 246 nm. The standard curves of SDZ determined at various pH values were demonstrated in Fig. S1.

Similarly, the adsorption isotherms were measured by adding 5.0 mg adsorbent to a range of concentrations (1–20 mg/L) of SDZ solutions and shaking in a water bath thermostatic oscillator (25 °C, 130 r/min) for 720 min.

The amount of SDZ adsorbed at equilibrium (qe (mg/g)) was calculated by the following equation (Eq. (1)):

$$q_{e} = (C_{0} - C_{e} )V/W,$$
(1)

where qe (mg/g) is the adsorption capacity of an antibiotic. C0 (mg/L) and Ce (mg/L) indicate the initial concentration and equilibrium concentration, respectively. V (L) is the volume of reaction solution and W (g) is the mass of the adsorbent.

Pseudo-second-order kinetic model (Eq. (2)) (Ho 2006) was represented asfollows:

$$t/q_{t} = 1/k_{2} q_{e}^{2} + t/q_{e} = 1/h + t/q_{e} ,$$
(2)

where qt (mg/g) is the adsorption amount at time t. k2 (g/(mg min)) is the rate constant determined by the t/qt versus t, and hindicates the initial adsorption rate.

The Langmuir (Eq. (3)) (Yang et al. 2017) and Freundlich (Eq. (4)) (Yao et al. 2011) isotherm models are shown below:

$$q_{e} = q_{m} K_{L} C_{e} /\left( {1 \, + K_{L} C_{e} } \right),$$
(3)
$$q_{e} = K_{F} C_{e}^{1/n} ,$$
(4)

where qm (mg/g) is the maximum adsorption capacity. Ce (mg/L) is the solution equilibrium concentration. KL is the Langmuir constant; KF and n are the Freundlich constant.

3 Results and discussion

3.1 Physical and chemical properties of the synthetic carbonaceous materials

SEM (Fig. 1a–i) illustrated the morphology changes of the biochars under different treatments. It could be clearly seen that initial biochars possessed smooth surface, and limited pore structures were observed. After KOH activation, the surface of ABCs became rough and collapsed which should be ascribed to the etching effect of alkali vapor. Furthermore, it was obvious that roughly porous structures were revealed on the surface of PABCs after the modification by H3PO4.

Fig. 1
figure 1

SEM patterns of a CBC-500; b ABC-500; c PABC-500; d CBC-600; e ABC-600; f PABC-600; g CBC-700; h ABC-700; and i PABC-700 (×15,000 magnification)

As depicted in the XRD pattern (Fig. 2a), two obvious broad peaks were discovered at 2θ = 24.2° and 43.4° for PABCs prepared at various pyrolysis temperatures. These two peaks were supposed to be assigned to the (002) and (100) crystal planes of graphite carbon. The intensity of the peak at 24.2° decreased along with the rise of the temperature, which was an implication of the increase of the disordered carbon along withthe reduced degree of graphitization (Zhang et al. 2019).

Fig. 2
figure 2

a XRD data of ABC-700 and PABCs; b Raman spectra with band ratio (ID/IG) for ABC-700, and PABC-700 before and after adsorption of SDZ

Moreover, the PABC-700 showed a relatively weak intensity at 24.2° compared to ABC-700. It was evident that the H3PO4 modification was propitious to form disordered carbon at the fixed pyrolysis temperature. In addition, the decrease of ID/IG from 1.502 for ABC-700 to 1.460 for PABC-700 as calculated from the Raman shift (as shown in Fig. 2b) conveyed that abundant functional groups existed on the external surface and some surface defects were occupied after phosphorous acid modification (Deng et al. 2016). Adding Cl or SO42− had negligible effect on SDZ sorption (Fig. 8b). However, HCO3 and HPO42− had negative impact on SDZ removal. The aqueous solutions of NaHCO3 and NaHPO4 were weakly alkaline, and the  electrostatic repulsion between SDZ species and the negative surface of PABC-700 under alkaline conditions was the main reason for the decrease of removal efficiency.

Fig. 8
figure 8

Added cations (Na+, K+, Ca2+, Mg2+using NaCl, KCl, CaCl2 and MgCl2, respectively) (a) and added anions (Cl, HCO3, SO42−, HPO42−, using NaCl, NaHCO3, Na2SO4 and Na2HPO4, respectively) (b) affecting SDZ adsorption on PABC-700

4 Conclusions

The micropore dominated activated carbons with remarkably high adsorption capacity and affinity for SDZ were prepared via alkali/phosphoric acid modification using carbonized coffee grounds. The maximum adsorption capacity of biochars followed the order of PABC-700 > PABC-500 > PABC-600, ABC-700 > ABC-500 > ABC-600. The results demonstrated that phosphoric acid modification and pyrolysis temperatures had significant effects on the properties of the PABCs, and consequently PABC-700 showed optimal SDZ adsorption capacity. In particular, the adsorption affinity was greatly improved to be competitive to the latest boron nitride bundles and multi-walled carbon nanotubes. It is believed that excellent porosity, newly formed phosphate, enriched acidic and carboxyl groups made a significant contribution for increasing the qm of PABC-700. In addition, the effects of temperature should be emphasized during the preparation process of biochar to avoid the blocking of porous structures by tars and volatiles generated during pyrolysis. Overall, this study provides an efficient sulfadiazine removal technology, as well as supplies an economical and environmentally friendly approach for coffee grounds disposal.