1 Introduction

Pharmaceutical agents have been detected worldwide in almost all water bodies. The entry of these drugs into water systems is in the form of the discharge of untreated or treated wastewater directly into receiving bodies or infiltration into groundwater [1].

Hydroxychloroquine (HCQ) sulfate (Table S1) is a synthetic quinolyl derivative with chemotherapeutic properties [2]. HCQ acts against erythrocytic malarial parasites (Plasmodium vivax, P. ovale and P. malariae). HCQ also has anti-inflammatory properties and is used in the treatment of rheumatoid arthritis and systemic lupus erythematosus [3]. Additionally, HCQ is on the World Health Organization's (WHO) List of Essential Medicines [4]. HCQ has been reported to be effective on SARS-CoV-2, and it has also been used to fight COVID-19 early in the pandemic period [5,6,7,8,9]. However, like all pharmaceutical agents, HCQ can also not be completely metabolized in the human body, and some part of it is excreted in an unchanged form. Half of the administered dose of HCQ is excreted in an unchanged form from the human body in the urine [10], and biotic degradation tests for these therapeutic agents showed 0% degradation in 28 days [11]. The literature indicates that hydroxychloroquines are subject to photochemical decomposition reactions in nature. Dabić detected five degradation products (DP-1 to DP-5) of the agent [12]. Although the risks of this drug, which is a quinoline derivative, for the environment are not exactly known, quinoline and its derivatives are primary environmental pollutants due to their persistent, toxic, carcinogenic and teratogenic properties [13]. Consequently, both HCQ and its degradation products are hazardous to ecosystems and human health due to their high solubility and low biodegradability [14, 15]. Therefore, there is a need to develop economical and effective methods to remove this hazardous pollutant, which is likely to be encountered in water resources due to its recent intensive use, before its discharge into natural water bodies.

There are currently several methods for removing pharmaceutical pollutants from contaminated waters. These methods include membrane bioreactors [16], advanced oxidation processes (AOPs) such as ozonation, photo-Fenton, sonolysis, irradiation and electrochemical oxidation [17] and adsorption [18]. Among these processes, the adsorption process is one of the most promising methods that is low cost, easy to use, has high efficiency and no risk of toxic byproducts [19]. The literature has focused on the stability of HCQ molecules in water [20], and only one study that involved the adsorption of HCQ in aqueous media was found in the literature review [21].

In recent years, research related to adsorption methods using biochar has increased due to these materials’ porous structure, high specific surface areas and strong interactions. The sorption capabilities of biochar and its surface area are also increased by various chemical activation methods which utilize various chemicals such as potassium hydroxide, sodium hydroxide, zinc chloride and phosphoric acid [22].

Recently, byproducts of the algal biodiesel industry have received great interest as adsorption materials [23, 24]. Macroalgae are quite suitable for bioethanol, biodiesel and biogas production due to their rich carbohydrate and oil contents. In the biodiesel production process, a large amount of waste algal biomass is produced with the extraction of algal metabolites (about 70%) [25]. To increase the sustainability of the biodiesel production process, it is important to obtain value-added products that make use of the byproducts and reduce the costs of the process. Marine macroalgae is abundant and is not limited to water, and it can be easily obtained or cultivated [26]. Thus, in this study, it was aimed to obtain an economical product with high added value, which can be derived from the by-products of the biodiesel production process, while on the other hand, to contribute to the environment by both effectively removing HCQ and utilizing biodiesel wastes. Algal waste biomass (C. barbata), which represents byproducts of this process, was used in the preparation of the biochar in this study. Microwave irradiation, which was used to obtain the biochar, is an environmentally friendly and fascinating heating technology based on the interaction of conductive materials with a rapidly alternating electromagnetic field [27], and it is known as a promising alternative to conventional pyrolysis. Microwave-assisted pyrolysis increases energy efficiency and reduces energy costs [28]. Therefore, it is expected to contribute to the search for cleaner production processes by significantly reducing the synthesis times and energy requirements of biochar by microwave pyrolysis. In this study, a one-step microwave pyrolysis method was used to prepare the biochar adsorbent.

This study aimed to facilitate adsorption of HCQ from aqueous solutions using the engineered biochar fast and cost-effectively. The UV–visible spectrophotometry method was preferred for monitoring the HCQ removal rates. This method was chosen to ensure that monitoring in larger applications worldwide is inexpensive and accessible.

Optimization of the process parameters was performed using the Taguchi method. This method is applied as a design of experiment (DOE) methodology based on statistical techniques and provides process optimization by offering design techniques that reduce costs and improve quality [29,30,31]. The signal-to-noise (S/N) ratio was used to determine the optimum process parameters. The degrees of the contribution (% contrib.) of the experimental parameters to HCQ removal were determined using analysis of variance (ANOVA) to analyze the S/N ratio data.

2 Materials and Methods

2.1 Materials and Chemicals

Hydroxychloroquine sulfate (98% w/w), phosphoric acid (H3PO4, 85% w/w), sodium hydroxide (NaOH, 97% w/w) and hydrochloric acid (HCl, 37% w/w) were purchased from Merck. Ultrapure water (UW) and 0.01 M HCl were used to prepare solutions containing HCQ. Biodiesel waste algal biomass was used to prepare the biochar. Algae were collected from the Black Sea coasts located in the province of Sinop in Turkey.

2.2 Preparation of Biochar

The microwave-assisted active biochar was prepared based on methods reported in the literature with minor modifications [32, 33]. The algae were washed first with tap water and then with ultrapure water (UW) to remove impurities and dried at 105 °C in a laboratory oven (Nüve FN 300) for 24 h. It was then ground using an electric grinder (Waring 8011) and defatted using a chloroform–methanol mixture (75% v/v of methanol) according to the method reported by Hidalgo et al. [34]. The defatted algal biomass was separated from its liquid phase, washed a few times with UW and dried. Then, it was stored in a desiccator for future experiments. Phosphoric acid was used as an activating agent. The previously prepared waste biomass was mixed with pure phosphoric acid at an impregnation ratio of 1:10 (g ml−1) for 24 h at room temperature using a magnetic stirrer (150 rpm). A modified microwave heating oven was used for one-step microwave pyrolysis. After the impregnation procedure, the samples that were prepared were placed in a sealed quartz glass reactor, where pyrolysis gases could escape, and carbonized and activated at a microwave power of 700 W in three cycles of 6 min (18 min in total) in an oxygen-free environment. The samples were then allowed to cool down to room temperature, and they were washed with ultrapure water until they reached neutral pH and dried at 105 °C for 24 h. The activated biochar was labeled as BC-H and stored in closed bottles for further experiments.

2.3 Biochar Characterization

The functional groups of the BC-H that was prepared were determined by FTIR spectroscopy (Fourier transform infrared) (FTIR-Hyperion 1000) in the wavelength range of 400–4000 cm−1. The morphological structure of the BC-H was determined by using SEM (scanning electron microscopy) (Quanta 400F Field Emission). The pH at the point of zero charge (pHpzc) of the BC-H was determined according to the method reported by Dastgheib et al. [35]. The BET surface area and pore characteristic of the prepared biochar were evaluated with a Micromeritics 3Flex volumetric gas adsorption analyzer based on the HK83 points method through N2 physisorption at 77 K. Prior to the measurements, all samples were degassed at 105 °C for 24 h. Pore volume distribution was determined by adsorption–desorption isotherms used in NLDFT calculations.

3 Batch Adsorption Experiments

The preliminary adsorption experiments were conducted at different value ranges of the experimental parameters including adsorbent dose (0.025–1 g L−1), initial pH value (4–11) and contact time (0–240 min). The parameter ranges for design of experiments (DoE) were selected based on these results. The pH values of the aqueous HCQ-containing solutions were adjusted to the desired value by 0.1 M HCl or NaOH solutions. Known amounts of the BC-H were added to certain concentrations of the HCQ solutions and stirred by using mechanical stirrer (İKA ™ KS130) at 150 rpm during the contact time at room temperature (23 ± 1 °C). After the experiments, the residual HCQ concentration was determined using a UV–visible spectrophotometer at 342 nm (Thermo Genesys 10) following the method of Ferraz et al. [3]. The equilibrium analyses were performed by adding 0.4 g L−1 of BC-H into 0.1 L of the HCQ solution (10 to 50 µg L−1) at the optimum pH values (7) at the equilibrium time (180 min). For kinetics analyses, the experiments were carried out at concentrations of 20 and 50 µg/L−1 HCQ at the optimum pH of 7 and the optimum adsorbent concentration value (0.4 g L−1). The solutions were shaken at 150 rpm, and samples were regularly collected until the specified time. Pharmaceuticals are present at relatively low concentrations (ng L−1 to μg L−1) in water, and it is important to perform studies at low concentrations for more realistic results [36]. Therefore, low concentration ratios were selected in this study, and the effectiveness of this method was also confirmed with real domestic wastewater. The concentrations of HCQ adsorbed by the BC-H (qe and qt) were determined using the following equations, respectively:

$${\text{qe}} = \left( {\left( {{\text{Co}} - {\text{Ce}}} \right)\,V} \right)/m$$
(1)
$${\text{qt}} = \left( {\left( {{\text{Co}} - {\text{Ct}}} \right)\, \, V} \right)/m$$
(2)

where V (L) is the volume of the HCQ solution, m (g) is the biochar mass, C0 (µg L−1) is the initial concentration of the HCQ, Ce and Ct (µg L−1) are the residual concentrations of the HCQ in the solution, at equilibrium and time t, respectively, and qe and qt (µg g−1) are subsequently the adsorbed amount at the equilibrium and time t.

The experimental data were analyzed by using the Freundlich and Langmuir isotherm models and the pseudo-first-order (PFO), pseudo-second-order (PSO) and intraparticular diffusion kinetic models. The equations of these models are listed in Table S2.

Optimization of treatment processes is extremely important for the operation and design stages. For optimization with a minimal number of experiments, design of experiments (DoE) methods which are a more practical application than conventional experimental methods and based on statistical results may be preferred. In this study, the Taguchi design was utilized, and an L16 orthogonal array with four parameters as initial pH, adsorbent dosage, contact time and initial pollutant concentration and their four levels was determined for HCQ removal. The identified factors and their values are listed in Table 1.

Table 1 Experimental parameters and their levels

4 Statistical Analysis and Quality Control

The experiments were performed twice, and the average values of the two results were used. The model data were calculated by nonlinear equations using Excel SOLVER. The DoE and evaluation analyses were carried out with the Minitab 17 statistical software. In Fig. 3d, the error bars (in a confidence interval of 95%) show the standard error of the mean.

All chemical procedures and analyses were performed in accordance with the standard methods for the examination of water and wastewater [37], followed by quality assurance/quality control (QA/QC), through the same procedure.

5 Results and Discussion

5.1 Pore, Surface and Chemical Characterization of BC-H

The BET surface areas and pore size distributions of the synthesized BC-H were calculated from the nitrogen adsorption–desorption isotherms at 77 K (Fig. S2). The BET specific surface area (SBET), micropore area, external surface area, micropore volume and average pore radius were 1088.806 (m2 g−1), 374.622 (m2 g−1), 714.184 (m2 g−1), 0.181 (cm3 g−1) and 2.71 (A0), respectively. BC-H had a large surface area composed of regularly dispersed micropores and mesopores. It is thought that the presence of a high number of micropores and mesopores may cause an increase in the HCQ adsorption capacity of the material from aqueous solutions.

The SEM images of the BC-H are presented in Fig. 1a, b. The images show the morphologies of the BC-H before and after adsorption. It is quite evident that the HCQ uptake created a significant change on the biochar surface. The pores of the biochar became indistinguishable after the HCQ uptake process. This situation is thought to be due to the filling of the biochar’s pores with HCQ molecules.

Fig. 1
figure 1

SEM images of BC-H (x10.000) a before and b after adsorption c FTIR spectra of the BC-H before and after HCQ adsorption

Functional groups are very important characteristics of biochar, because they determine the surface properties and quality of the adsorbent. The surface chemistry of the BC-H was studied by FTIR. The FTIR spectra of BC-H are shown in Fig. 1c for before and after adsorption, respectively. The peak at 3794 (in the region of 3800–3200 cm −1) was attributed to O–H stretching of hydroxyl groups. OH groups can increase the electron donor property of BC-H [38]. Here, a broad peak (in the region of 1400–1800 cm−1) with a maximum value at 1573.86 cm−1 can be assigned to C=O or C=C stretching of esters and carboxylic acids (Li et al., 2018). Several peaks were also observed at 2664, 2275 (CH stretching of CH2 and CH3), 1158, 990 and 480 (C–O, C–C and C–OH stretching, aromatic compounds) [39]. During the adsorption process, these bands shifted due to various interactions between the BC-H and the HCQ. The IR bands at 990.10, 480.56, 2664.98 and 2275.56 cm−1 completely disappeared, and new peaks were observed after adsorption (3186.75, 1046.12, 751.36, 667.79 and 507.56), and they could be involved in the adsorption process of HCQ.

5.2 Results of Taguchi DOE Methodology

The experimental plan as an L16 orthogonal array, consisting of 16 experiments, and the results of the experiments that were performed are shown in Table 2. The S/N ratio, a measurable value suggested by Taguchi [40], was used in the analysis in this study. The highest S/N value specifies the control factor that minimizes the effect of the noise factors and maximizes the value of the response. The S/N ratio (the larger the better) was calculated using the following equations.

$$\frac{\rm S}{\rm N} = - 10{\text{log}}\left( { \frac{1}{n}\mathop \sum \limits_{i = 1}^{n} \frac{1}{{y_{i}^{2} }}} \right)$$
(1)

where n is the number of the experiments and yi is the response for the experiments.

Table 2 Orthogonal array of L16 for HCQ adsorption

The optimum levels of the controllable factors according to the response table, for the highest signal-to-noise ratios, are presented in Table 2. The optimum conditions for the maximum adsorption of HCQ are listed in Table 3.

Table 3 The optimum condition for the maximum uptake of HCQ

The effect of the factors on the S/N ratio is shown in Fig. 2. The S/N value increased with the increasing adsorbent concentration, indicating that a higher BC-H amount contributed positively to the adsorption process. The increase in the percentage of HCQ adsorption with the increase in the BC-H dosage may be attributed to the increase in the surface area of the adsorbent and therefore the increase in the number of binding sites due to the increase in the quantity [41]

Fig. 2
figure 2

Plot of the effect of factor levels on S/N ratio

As for the contact time, the highest S/N ratio was obtained with the longest contact time. This showed that the increase in the contact time played an active role in the HCQ adsorption process. The highest S/N ratio was obtained at the lowest HCQ concentration (20 µg L−1). This indicates that an increased HCQ concentration plays a weaker role in HCQ adsorption [42]. The lowest S/N value was obtained at pH 6, whereas the S/N ratio reached the peak at pH 7. The BC-H exhibited a pHPZC value of approximately 6.8 (Fig. S1). In an aqueous solution, when pH > pHPZC, the surface of the BC-H will be negatively charged, and when pH < pHPZC, the surface of the BC-H will be positively charged, so that strong attractive electrostatic forces will be involved [43]. HCQ has three functional groups with pKa values of < 4.0, 8.3 and 9.7 [20]. Two of the functional groups become protonated under neutral conditions. This situation suggests the possibility of a strong electrostatic interaction between the negatively charged biochar and the HCQ at pH 7 (pH > pHpzc).

ANOVA was performed to investigate the significance of the differences between the groups of data using the differently selected values of the parameters [44]. The results of the ANOVA on the adsorption of HCQ using BC-H are listed in Table 4. p-values smaller than 0.05 show the effective parameters. Additionally, the F-value displays the effects of the parameters on the adsorption process of HCQ from the aqueous solutions. Larger F-values indicate a greater effect on the response variable due to the change in the factor [45]. The adsorbent dosage was the most effective factor in removing HCQ from the aqueous solution. The initial pH and the initial HCQ concentration had a lesser impact than the adsorbent dosage.

Table 4 ANOVA results for uptake of HCQ using BC-H

A confirmation experiment was performed for the optimum conditions predicted with the Taguchi DoE methodology, ​​and the S/N values were calculated. In the confirmation experiment, a removal efficiency value of 98.9% was obtained, and the S/N ratio was calculated as 39.90. The experimental results were compared to the results predicted by the program. According to the data obtained from the program, the S/N value and the percentage of adsorption were estimated as 43.30 and 122.027, respectively. This predicted value was greater than 100% of the experimental HCQ adsorption value. This result was due to the fact that the software does not have any sense of the figures and just does the calculations by statistical procedures [29]. It was observed that the HCQ in the solution could be adsorbed by the BC-H almost completely in the experiments under the optimum conditions.

5.3 Kinetic Studies

The relationship between contact time and adsorption of HCQ on BC-H at initial pollutant concentrations of 20 and 50 µg L−1 is studied to predict the adsorption behavior (Fig. 3b, c). The pseudo-first-order, pseudo-second-order and intraparticle diffusion models were studied. In kinetic studies for both concentrations, the pseudo-second-order (PSO) kinetic model was the best model for HCQ adsorption onto BC-H with low RMSE and high R2 values. The pseudo-second-order kinetic was the major fitted model for pharmaceutical pollutant adsorption. This situation was consistent with other studies in the literature [44]. The model data, experimental values of qe (exp) and calculated values of qe (cal) are shown in Table 5.

Fig. 3
figure 3

a Isotherm studies of HCQ, b kinetic studies of HCQ (conditions: 20 and 50 µg L−1 HCQ), c intraparticle diffusion model, d comparison of experimental results in the optimum conditions for HCQ adsorption from synthetic wastewater and treated campus wastewater (DWW)

Table 5 Kinetic parameters

5.4 Adsorption Isotherms

Adsorption isotherm data obtained from equilibrium studies gives a comprehensive idea about the nature of the interaction between adsorbent and adsorbate [43]. In this study, Freundlich and Langmuir isotherm models represent heterogeneous and homogeneous adsorbent surfaces, respectively, were used. Isotherm model parameters are presented in Table 6. Plot of the isotherm studies is shown in Fig. 3a. High R2 and smaller RMSE values indicate a better curve fitting. As seen from Table 6, the Langmuir model with smaller RMSE values was better fit to the experimental results in comparison with the Freundlich model. According to Langmuir model, adsorption is monolayer way, and after the pollutant covers the surface of adsorbent first layer, no more adsorption takes place. [41]. All active areas in the adsorbent, which has a homogeneous surface, have equal energy [20].

Table 6 Isotherm model parameters

Maximum monolayer adsorption capacity of BC-H was calculated to be 353.58 µg g−1 from the isotherm. The RL (separation factor) was found to be (0.33–0.71). The separation factor (RL), which expresses a dimensionless constant, suggested that the adsorption process is favorable (if 0 < RL < 1).

5.5 Real Wastewater Application

In order to obtain wastewater containing pharmaceutical contaminants, 50 µg L−1 of HCQ was added to the effluent of the domestic wastewater (DWW) treatment plant of Sinop University. The characteristics of the biological wastewater treatment plant effluent that was used in the experiments are presented in Table S3. Figure 3d shows the comparison of HCQ adsorption in the real wastewater and the aqueous solution at 50 µg L−1 of HCQ and the optimum conditions obtained in this study. The adsorption trends of the HCQ onto the BC-H in these two types of aqueous media were very similar, indicating that the ability of the activated biochar to adsorb the HCQ was not affected by competitive ions in the wastewater.

6 Conclusions

This study proposes an energy-efficient, environmentally friendly and effective adsorbent that encourages the use of industrial byproducts for the removal of HCQ by the adsorption process. The biochar prepared by the activation of algal biomass residue after biodiesel production proved to be an effective adsorbent material for HCQ removal. The prepared novel activated biochar presented remarkable adsorption efficiency (98.9%) and a large surface area (1088.806 m2 g−1) for HCQ adsorption. The adsorption experiments that were performed according to the Taguchi DoE approach showed that the maximum adsorption rate of HCQ was obtained at the adsorbent dosage of 0.4 g L−1, the initial HCQ concentration of 20 µg L−1, the pH value of 7 and the adsorption time of 180 min. The adsorption of the HCQ was primarily influenced by the amount of the adsorbent (%Contrib.: 71.314), the solution pH (%Contrib.: 6.075), the contact time (%Contrib.: 19.175) and the HCQ concentration (%Contrib.: 3.436). The pollutant concentration had a small influence on the removal of the HCQ. The large surface area of the BC-H is thought to have been highly effective for the adsorption of the HCQ. The adsorption kinetic behavior of the HCQ onto the BC-H could be expressed by the pseudo-second-order kinetic model, indicating that the adsorption process was chemical in nature. The adsorption equilibrium data were in good agreement with the Langmuir isotherm equation. Finally, the presence of competitive ions did not greatly affect the adsorption of the HCQ onto the BC-H. Biochar materials prepared from waste biomass are less costly than other commercial adsorbents (activated carbon) and environmentally friendly (reuse of waste algae biomass). BC-H can be used as an effective and excellent adsorbent in removing HCQ from the aquatic environment.