Nonlinear regression analysis of the sorption of crystal violet and methylene blue from aqueous solutions onto an agro-waste derived activated carbon

Sorption of synthetic dyes on low-cost solid sorbents is a simple technique for their removal from wastewater. Recent initiatives in the sorption process have sought the use of activated carbon derived from agricultural wastes as it provides an attractive and cheaper alternative to commercial activated carbon, which is usually expensive. This research investigates the sorption kinetics and equilibrium of two synthetic cationic dyes, crystal violet and methylene blue from aqueous media using activated carbon prepared from an agro-waste, Millettia thonningii seed pods. Sorption experiments were carried out using the batch process. The kinetic data were analyzed using the pseudo-first-order, pseudo-second-order, and intraparticle diffusion models while the equilibrium data were analyzed using the Langmuir, Freundlich, and Redlich–Peterson isotherm models. Nonlinear regression method was used to fit the data to the isotherm models in order to determine model parameters and the best-fit isotherms. Thus, three error functions; coefficient of determination, Chi-square statistic test, and the sum of error squares were applied to evaluate the sorption data. The pseudo-second-order model best described the sorption kinetics of both dyes while the Redlich–Peterson model described the equilibrium data the most, followed closely by the Freundlich isotherm model indicating a heterogeneous sorbent surface. The experimental results indicate that the agro-waste derived activated carbon is a viable adsorbent for the remediation of dye-contaminated water.


Introduction
Dyes are colored organic compounds usually employed to impart color to a variety of materials in textile, pharmaceutical, leather, paper, and food industries. They constitute a significant group of pollutants as several industries discharge a huge amount of wastewater containing various dyes into natural water bodies. This consequently leads to severe water pollution problems since most of these dyes are not easily degradable and therefore environmentally persistent. Several dyes and their degradation products are known to be toxic, mutagenic, carcinogenic, and teratogenic to both aquatic and human lives (Gong et al. 2007). Extensively used in textile manufacturing processes and in medicine as biological stains are two basic synthetic dyes, crystal violet (CV) and methylene blue (MB). Exposure to these compounds for a prolonged period has been reported to cause various detrimental effects such as eye burns, skin, and gastrointestinal irritation, respiratory tract irritation, cardiac arrhythmias, hypotension, 1 3 132 Page 2 of 11 and anemia, and even cancer (Hassani et al. 2014;Mittal et al. 2010). Even though the toxicity of these dyes has been well documented, they are still extensively used in several industries. As such, they are most likely discharged into sewer systems, where they eventually reach both surface and groundwater thereby posing a severe threat to both public health and environmental quality. Their removal from process or waste streams, therefore, remains critical.
Sorption of dyes from aqueous solution is an efficient process of remediating dye-contaminated water. It has been described as one of the most effective and economically feasible methods for the removal of dyes from aqueous solutions (El Haddad et al. 2013). Adsorption using activated carbon as sorbent has been cited by the US Environmental Protection Agency (USEPA) as one of the best environmental control technologies (Asenjo et al. 2011). However, the high cost of commercial activated carbon sometimes makes its use limited. This economic disadvantage has directed research into the use of agro-wastes as alternative low-cost and renewable precursors for the production of activated carbon. In the last few years, the utilization of activated carbon derived from agro-wastes has attracted the attention of the research community due to their availability and very low-cost. There have been several reports on the use of agro-waste derived activated carbon to successfully remove dyes from aqueous media, such as, activated carbons derived from groundnut shells (Malik et al,2007), cocoa shell (Ahmad et al. 2012), and plantain peel (Inam et al,2017). In the present study, activated carbon derived from Millettia thonningii seed pods an agricultural residue, with little commercial value, is used as a sorbent in the remediation of crystal violet and methylene blue-contaminated water.
A detailed knowledge of the sorption kinetic and equilibrium characteristics of any sorbate-sorbent system is essentially significant in the design of sorption treatment plants. Sorption kinetics describes the relationship between sorbate concentration and sorbent as a function of time. It governs the residence time of the solute and facilitates the appropriate selection of reactor dimensions (Ho 2006). The most common kinetic models used to explain the sorption processes are the pseudo-first-order and the pseudo-secondorder kinetic models. The intraparticle diffusion and external mass transfer models have also been used to predict sorption kinetics (Kumar et al. 2005;Walker et al. 2003). Sorption equilibrium isotherms, on the other hand, describe the equilibrium conditions of the sorption process, relating the concentrations of the sorbate in the liquid and solid phases at a definite temperature. They provide physicochemical data on the capacity and affinity of the sorbent for the sorbate. Several different adsorption isotherm models have been used to verify experimental sorption data, the most common models being the Langmuir, Freundlich, Dubinin-Radushkevich, and Redlich-Peterson models. The usefulness of these model parameters, their simplicity, and their ease of interpretability makes them more preferred (Tran et al. 2017).
In the past, a very common practice in estimating the bestfit relationship in a sorption system consists of manipulating kinetic or isotherm equations to obtain linear equations that are used to estimate the model parameters using the linear least-squares regression method (Osmari et al. 2013). This transformation has been criticized because the fundamental theories of the isotherm models are usually violated (Kumar and Sivanesan 2006). In recent years, however, an increasing interest in the use of the nonlinear regression method has been observed. For a nonlinear regression method, isotherm parameters are obtained from the main form of an isotherm equation. Nonlinear regression for various isotherm models is carried out on the same ordinate and abscissa (Kumar et al. 2008), unlike linear regression where different axial settings are used for various isotherms which ultimately influences the accuracy and reliability of the results. The usage of the nonlinear regression method instead of the linear regression method has been recommended by several researchers (Lima et al. 2015;El-Khaiary et al. 2010;Nagy et al. 2017;Tran et al. 2017;Moussout et al. 2018).
This research investigates the sorption kinetic and equilibrium characteristics of crystal violet and methylene blue ( Fig. 1) onto activated carbon derived from Millettia thonningii seed pods. The experimental sorption data for both sorbate-sorbent systems is evaluated via nonlinear regression analysis using three kinetic models (pseudofirst-order, pseudo-second-order, and intraparticle diffusion models) and three equilibrium models (Langmuir, Freundlich, and Redlich-Peterson isotherm models). Nonlinear regression was used to analyze the experimental data using the Solver add-in function in Microsoft Excel (Microsoft Corporation). Three error functions are applied to evaluate, compare, and rank the feasibility of the applied kinetic and isotherm models.

Sorption kinetic models
In the adsorption process, kinetics plays an important role as it provides vital information about the reaction pathway and the rate-controlling mechanism of reactions (Balarak et al. 2015). The pseudo-first order, pseudo-second order, and intraparticle diffusion models are used in this study to examine the adsorption rates of crystal violet and methylene blue onto Millettia thonningii seed pods activated carbon.
The pseudo-first-order kinetic model (Lagergren 1898) expresses the mechanism of removal as adsorption preceded by diffusion through a boundary. The nonlinear form of the model is given as in Eq. (1).
where q e and q t are the amount of dye adsorbed (mg/g) at equilibrium and at time t (min), respectively, and k 1 (min −1 ) is the pseudo-first-order rate constant. The pseudo-first-order equation assumes the adsorption of one adsorbate molecule onto one active site on the adsorbent surface.
The pseudo-second-order kinetic model, first proposed by Blanchard et al. (1984), is based on the assumption that adsorption follows a second rate kinetic mechanism. The model describes the sorption process as being controlled by chemisorption involving sharing or exchange of electrons between the solute and the sorbent. It assumes the adsorption of one adsorbate molecule onto two active sites on the sorbent surface. It can be represented in the following form: where q e and q t are the amounts of dye adsorbed (mg/g) at equilibrium and at time t (min), respectively, and k 2 (g/ mg min) is the pseudo-second-order rate constant.
The intra-particle diffusion model, based on the theory proposed by Weber and Morris (1963), is used to interpret experimental kinetics data, from a mechanistic viewpoint and is expressed as follows: where q t is the amount of dye adsorbed per unit weight of sorbent, C (mg/g) is a constant which gives information about the boundary layer and K id (mg g −1 min −1/2 ) is the intraparticle diffusion rate constant and t is the contact time. When the value of C = zero, intraparticle diffusion is the sole rate-limiting step. However, C ≠ zero indicates the presence of some degree of boundary layer control and depicts that intraparticle diffusion is not the only rate-limiting step.

Sorption isotherm models
Sorption processes are well described by isotherms whose purpose is to help elucidate the interaction between sorbate and sorbent. They also provide information on the affinity of the sorbent for the sorbate. In this study, the Langmuir, Freundlich, and Redlich-Peterson isotherm models were applied to observe the sorption behavior of crystal violet and methylene blue onto the activated carbon.
The Langmuir isotherm model proposes monolayer coverage of adsorbate molecules onto a solid surface. It is assumed that once the adsorbent site is covered with the dye molecules no further adsorption occurs at that site. It also suggests that all the adsorption sites are of equivalent energy. The equation was developed by Irving Langmuir 1916). The Langmuir isotherm model in its nonlinear form is expressed as Eq. (4) where q e is the adsorption capacity of the adsorbent (mg/g) at equilibrium, Q max is the Langmuir saturation adsorption capacity, C e is the adsorbate concentration (mg/L) in solution at equilibrium and K L is the Langmuir equilibrium adsorption constant (L/mg) related to energy of adsorption which quantitatively reflects the affinity between the adsorbent and adsorbate. The Langmuir adsorption isotherm model is not capable of explaining the mechanism of the adsorption process, but it provides information on adsorption capability and the equilibrium process (Puri and Sumana 2018). Graphically, it is characterized by a plateau, an equilibrium saturation point where once a molecule occupies a site, no further adsorption can occur (Allen et al. 2004). The Freundlich isotherm model is based on the assumption that the adsorption occurs on a heterogeneous surface. It is applicable to monolayer adsorption (chemisorption) and multilayer (Van der Waals adsorption) adsorption (Yang 1998). The nonlinear expression of the Freundlich equation (Freundlich 1906) is given as Eq. (5) where K F is the Freundlich constants associated with adsorption capacity and 1/n is the heterogeneity factor. A large value of the adsorption capacity K F , indicates a higher adsorption capacity. Favorable adsorption is inferred when the magnitude of 1/n F ranges between 0 and 1, becoming more heterogeneous as its value tends to zero (Karthikeyan et al. 2005).The Freundlich equation is characterized by an adsorption isotherm lacking a plateau, indicating multilayer adsorption (Daifullah et al. 2004).
The Redlich-Peterson isotherm, a three-parameter isotherm was proposed by Redlich and Peterson (1959). The mechanism of adsorption can be described as a hybrid one that does not follow ideal monolayer adsorption. The model incorporates features of both the Freundlich and Langmuir models and can be applied in describing sorption equilibrium over a wide range of adsorbate concentrations. The nonlinear form of this empirical model is given in Eq. (6) as follows: where C e is the adsorbate concentration (mg/L) in solution at equilibrium, K RP (L/g) and a RP (mg/L) −g are the Redlich-Peterson constants and g is an exponent whose value must lie between 0 and 1. Equation (6) linear isotherm when g = 0, reduces to the Langmuir isotherm when g = 1, and transforms into the Freundlich isotherm when K RP and a RP are ≫ > 1 and g ≤ 1. Hence, if the g value falls outside the range of 0-1, the data are not sufficiently explained by the Redlich-Peterson equation (Tran et al. 2017;Ho and Ofomaja 2006). The ratio of K RP /a RP indicates the adsorption capacity (Belhachemi and Addoun 2011).

Nonlinear regression analysis
Sorption isotherm model parameters can be conveniently estimated via nonlinear regression method using the original form of the isotherm equation. This method uses the same objective as described for the conventional linear regression method which is to obtain model parameter estimates by minimizing the squared sum of the difference between experimental data and model outputs. It, however, differs from linear regression in that it is an iterative process (Brown 2001). It involves entering first the experimental data, in this case, equilibrium concentration, C e and amount of dyes adsorbed at equilibrium, q e (for sorption equilibrium) and the time and amount of dyes adsorbed at time, q t (for sorption kinetics) into the Excel Spreadsheet and graphing the data. Initial estimates of the unknown parameters in the model equations are then made to calculate the theoretical q e or q t values from which the squared sum of the difference (SS) between the experimental data and the model (theoretical) output is obtained. Successive iterations are then performed which involve changing the initial estimated parameter values by a small amount and recalculating the SS several times until the parameter values result in the lowest possible value of SS. Linear regression, on the contrary, usually requires only a single calculation to provide the lowest value of the SS. The nonlinear regression analysis is conveniently carried out using the Solver add-in function in the Microsoft Excel spreadsheet. Recently, Tran et al. (2017) reviewed the inconsistencies of linearized forms of different isotherm models and their negative impact on the parameter values involved in the liquid-phase adsorption process. In general, nonlinear regression gives a more appropriate and accurate determination of model parameters than the linear regression method (Crini and Badot 2010). A detailed description on how to configure a spreadsheet for nonlinear regression using the Solver function is described elsewhere (Brown 2001).

Error function analysis
In order to evaluate the suitability of a model equation to experimental results, an error function assessment is usually required. Error functions are statistical equations used to measure the deviation of theoretically predicted data from the values of actual experimental data. The bestfitting sorption kinetic and equilibrium isotherm models were validated using three different statistical error functions namely coefficient of determination (r 2 ), Chi-square (χ 2 ) test as well as sum of square error (SSE). The best-fit model is the one with the lowest value of SSE, χ 2 and the one in which the value of r 2 is closest to unity. Coefficient of determination (r 2 ) represents the percentage of variability in the dependent variable (the variance about the mean). It is employed to analyze the degree of fit of isotherm and kinetic models with the experimental data (Kumar and Sivanesan 2006). Its value varies from 0 to 1 and is given as in Eq. (7). It provides the best fitting when its value is closest to unity.
The Chi-square (χ 2 ) test statistic is the sum of the squares of the differences between the experimental data and data obtained by calculating from models, with each squared difference divided by the corresponding data calculated from models as given in Eq. (8). If the q e , experimental values are similar to the q e model values, χ 2 is close to zero. A high χ 2 value indicates a high bias between the experimental and the calculated model values.
The Sum of Error Squares (SSE) function is a popular statistical tool used by several researchers to judge the agreement between the experimental quantity of dye adsorbed and the calculated quantity adsorbed (Boparai et al. 2011). The lower the value, the better the curve fits the experimental values. It is mathematically expressed in Eq. (9).
The equations of all error functions used are expressed as follows: where q e , exptal (mg/g) is the amount of dye uptake at equilibrium obtained from Eq. (11), q e , calc (mg/g) is the amount of dye uptake achieved from the model after using the Solver Add-in; and q e , mean (mg/g) is the mean of q e , exp values.

The sorbates
Crystal violet (C 25 H 30 N 3 Cl, molecular weight = 407.99, λ max = 590 nm) and methylene blue (C 16 H 18 ClN 3 S, molecular weight = 319.86, λ max = 664 nm) were used as sorbates in this study. Stock solutions were prepared by dissolving 1 g of each dye in 1 L of deionized water. All working solutions of desired concentrations were prepared by diluting the stock solutions with deionized water.

The sorbent
The activated carbon used in the present study was obtained as follows: Millettia thonningii seed pods, were collected locally, washed, dried, pulverized, activated with H 3 PO 4 in a ratio 2:1 (acid: biomass), and carbonized at 400 °C for 30 min in a muffle furnace. It was subsequently rinsed until neutral pH and oven-dried at 100 °C for 1 h. The dried activated carbon was sieved to particle size range of 1-2 mm and stored in clean sample containers for subsequent use.

Sorption experiments
Kinetic experiments were accomplished by agitating 200 mg of adsorbent with 50 mL of 10 mg/L dye solutions at a constant speed (300 rpm), ambient temperature, and pH 7.0. Samples were withdrawn at appropriate time intervals (5-240 min), centrifuged and the absorbance of the supernatants measured spectrophotometrically. The isotherm experiments were performed using initial dye concentrations ranging from 10 to 50 mg/L under the same conditions as the kinetic experiments for a predetermined equilibrium time of 180 min. The mixtures were separated by centrifugation at 1500 rpm for 5 min, and the initial and residual dye concentrations were determined using a UV-Vis spectrophotometer (Agilent CARY 300) at 590 nm for CV and 664 nm for MB. The amount of dye adsorbed onto the adsorbent at time t, q t (mg/g) and at equilibrium time q e (mg/g) was calculated by Eqs. (10) and (11), respectively.
where C o , C e and C t (mg/L) are the liquid phase concentrations of the dyes at initial, equilibrium and any time t, respectively, V is the volume of solution (L) and m is the mass of the dry adsorbent (g). (10) Blank experiments were also conducted by using dye solutions without adsorbent to ensure that no dye was adsorbed onto the containers which would interfere with the measurement of dye concentrations on a spectrophotometer. All adsorption experiments were performed in duplicates.

Morphological and functional group analysis
Morphological and surface functional group characteristics of the Millettia thonningii seed pods activated carbon before and after adsorption were carried out using Scanning electron microscopy (Phenom Pro X Scanning Electron Microscope) and Fourier transform infrared (FTIR) spectroscopy (FTIR-CARY 630, Agilent Technologies), respectively.

Results and discussion
The kinetic and equilibrium modeling data of CV and MB sorption onto Millettia thonningii seed pods activated carbon in addition to the error calculations are listed in Tables 1 and 2, respectively. These data were determined from the plots shown in Figs. 2, 3, 4 and 5 which depict a graphical correlation between the experimental data and the theoretical models for the sorption systems.

Sorption kinetics
Crystal violet sorption kinetics depicted in Fig. 2 reveals that removal was rapid during the first 40 min but subsequently decreased slightly and plateaued after approximately 140 min. A similar observation was made for the kinetics of methylene blue removal which attained equilibrium at about 100 min (Fig. 3). The parameters of the pseudo-first-order, pseudo-second-order, and intraparticle diffusion kinetic models were estimated by nonlinear regression. The resulting kinetic parameters and error function data are presented in Table 1. For CV sorption, the r 2 value for the pseudo-secondorder kinetic equation was found to be higher than that of the pseudo-first-order kinetic equation. The q e , experimental (2.55 mg/g) was closer to the q e , calculated values for the pseudo-second-order model (2.6443 mg/g) than the value of the pseudo-first-order (2.3359 mg/g). Even though the r 2 values of the pseudo-first-order model and the pseudosecond-order model both exhibit good correlation with the experimental data, as seen from the high r 2 values of 0.9794 and 0.9877, respectively, indicating the simultaneous occurrence of physical diffusion and chemical adsorption, a higher r 2 (0.9877) and lower χ 2 (0.0361) and SSE values (0.0626) confirmed that the adsorption process predominantly followed the pseudo-second-order kinetic model. It is important to note that both physisorption and chemisorption may occur on the surface of an adsorbent simultaneously as a layer of molecules may be physically adsorbed on top of an underlying chemisorbed layer (Denizli et al. 2000;Hema   . MB sorption kinetic data shows that the pseudo-second-order model had the highest r 2 value of 0.9389 with the calculated q e values (2.908 mg/g) being closest to the q e , experimental (2.835 mg/g) than the value of the pseudo-first order (2.7715 mg/g). The pseudo-secondorder model also presented the lowest χ 2 and SSE values of all three models. The intraparticle diffusion model for both dyes demonstrated the least fitting to experimental kinetic data. However, the intercept value, C, not equal to zero for both systems implies that the intraparticle diffusion mechanism does not solely limit the overall adsorption process. The best fit for both sorbate-sorbent systems provided by the pseudo-second-order model suggests that the ratelimiting step for CV and MB is probably chemical sorption or chemisorption involving valence forces of bonds through sharing or exchange of electrons between sorbent and sorbate. This implies that two sorption sites on the sorbent surface could be occupied by one divalent dye ion probably due to the formation of (CV + ) 2 or CVH 2+ and (MB + ) 2 or MBH 2+ in aqueous solution. The suitability of the pseudosecond-order kinetics was also observed in the adsorption of crystal violet and methylene blue onto other agro-waste derived activated carbons (Bello et al. 2008;Aysu and Küçük 2015;Doke et al. 2016).

Sorption equilibrium
Figures 4 and 5 reveals an increase in the equilibrium sorption capacity of the Millettia thonningii seed pods activated carbon for both dyes with increasing initial dye concentration. By comparing the r 2 , χ 2 and SSE values for both dyes from Table 2, the sorption isotherm models fitted the experimental data in the order of Redlich-Peterson > Freundlich > Langmuir isotherm. The experimental data were best described by the Redlich-Peterson isotherm model by providing for CV, the highest r 2 of 0.9814 and the lowest χ 2 and SSE values of 0.0632 and 0.3443, respectively. For MB, the Redlich-Peterson isotherm also correlated the most with the highest r 2 of 0.9661 and the lowest χ 2 and SSE values of 0.5118 and 2.7947, respectively. The Freundlich model performed as much as the Redlich-Peterson providing a good fit with a close r 2 value of 0.9775 for CV and 0.9660 for MB. Figures 4 and 5 show that the individual model curves for both the Redlich-Peterson and Freundlich isotherm model equations derived on the basis of the studied error functions practically coincided. This implies that the hybrid Redlich-Peterson isotherm is tending toward the Freundlich isotherm. The Freundlich isotherm model fitted the experimental data better than Langmuir isotherm model for both systems also suggesting that the studied sorption processes could be described either as non-ideal or reversible sorption, not limited to monolayer formation on a heterogeneous surface, or as a multilayer sorption with nonuniform distribution of adsorption heat and affinities over a heterogeneous surface (Foo and Hameed 2010). The value of the Redlich-Peterson constants g ≠ 1 and K RP and A RP being ≫ > 1 mathematically justifies the Redlich-Peterson equation tending toward the Freundlich model, thereby confirming the fit of the Freundlich over the Langmuir. Similar findings have also been reported by other researchers as well (Baghdadi et al. 2016;Yadav and Singh 2017).
The Freundlich exponent, 1/n, obtained in this study was 0.29 (corresponding to an n value of 3.4028) for CV and 0.36 (corresponding to an n value of 2.7936) for MB (Table 2), indicating favorable adsorption of both dyes onto MTSPAC as, exponent values between 0 and 1 show favorability of the adsorption process (Karthikeyan et al. 2005). The value of 1/n also indicates the degree of nonlinearity between solution concentration and sorption as follows: a value equal to unity specifies that the isotherm is linear; if below unity, the sorption is a chemical process; if above unity, sorption is a favorable physical process; the more heterogeneous the surface, the closer the value of 1/n is to zero (Tien 1994: Treybal 1987. Thus the sorption of CV and MB as indicated by the 1/n value suggests chemical adsorption onto a heterogeneous sorbent surface. The Redlich-Peterson isotherm exponent, g, calculated as 0.7354 and 0.6452, for CV and MB respectively are also indicative of a favorable adsorption of both dyes to the adsorbent (Aksu and Kabasakal 2004). From the Freundlich and Redlich-Peterson isotherms, the parameters, K F and ratio of K RP /A RP , respectively, which give an indication on the extent of adsorption were very comparable (2.961 for the Freundlich isotherm and 3.271 for the Redlich-Peterson isotherm for CV; and 8.0683 for the Freundlich isotherm and 7.552 Redlich-Peterson isotherms for MB) ( Table 2). These values of K F and K RP /A RP are greater for MB than for CV indicating that the relative adsorption capacity of the carbon for MB is greater than that for CV. The Langmuir K L which can be used for the quantification of the interaction between adsorbate and adsorbent also had higher values for MB (2.2940) than for CV (0.54). This implies that the interactions between MB and MTSPAC are more stable than the interactions between CV and the activated carbon. In other words, the sorbent, MTSPAC has a greater affinity for MB than for CV. These experimental inferences could be attributed to the molecular geometry as well as the size and molecular weights of both adsorbates. The more linear structure of methylene blue (Fig. 1b) as well as its smaller molecular size and molecular weight allows for greater mobility and faster diffusion into the adsorbent pores when compared to the trigonal planar and bulkier structure of the crystal violet molecule (Fig. 1a). Bulkier dye molecules will usually present diffusion limitations when compared to smaller dye molecules (Tsang et al. 2007). The Qmax (mg/g), the maximum saturated monolayer adsorption capacity of the adsorbent was found to be 7.717 mg of CV and 14.092 mg of MB per gram of MTSPAC in the studied range of adsorbate concentration (10-50 mg/L).

SEM and FTIR analysis
Morphological characterization of the adsorbent using SEM, before and after adsorption, showed micrographs that revealed a complete change in the surface texture of the activated carbon (Figs. 6a-c). Prior to adsorption, there was smooth surface morphology with pores of different sizes which supports earlier findings from sorption equilibrium which indicate that adsorption was onto a heterogeneous sorbent surface. Post-adsorption micrographs revealed a rough and less defined porous surface for both dyes-loaded sorbent (Fig. 6b, c), indicating that the pores had been filled with both dyes which implies a significant interaction between the dyes and the sorbent. The FTIR spectra of Millettia thonningii seed pods activated carbon before and after adsorption of both dyes are presented in Fig. 7. A conspicuous difference is observed between the pre-and post-adsorption spectra as the intensity of the OH-band are enhanced between 3100 and 3300 cm −1 for both dyes-loaded activated carbon which is an evidence of a possible interaction between both dyes and the bonded hydroxyl -OH group of the activated carbon. An increase in intensity of the peaks about 1890 cm −1 was also observed. Attenuation or increase in peak intensity or a displacement of a peak in a spectrum is an evidence of a change in the functionality or electron distribution associated with a bond on the activated carbon Fig. 6 Scanning electron micrographs of MTSPAC at × 500 magnification a before adsorption, b after CV adsorption and c after MB adsorption (Ghasemian andPalizban 2016: Liang et al. 2010). This suggests interactions of the dye molecules with the functional groups on the sorbent during the sorption process.

Conclusion
The adsorption of crystal violet and methylene blue by agrowaste derived activated carbon-Millettia thonningii seed pods activated carbon indicates its potential application as an adsorbent for the removal of dyes from aqueous solutions. The kinetic investigation showed that both dyes were predominantly chemisorbed on the adsorbent surface following the pseudo-second-order kinetics. Redlich-Peterson provides the best-fit tending toward the Freundlich isotherm showing that the adsorbent surface was heterogeneous and both dyes were adsorbed in multilayers. SEM and FTIR analysis showed modification of the sorbent surface as well as enhancement in surface functional groups which are evidence of interaction between the sorbates and the sorbent. From the results obtained, Millettia thonningii seed pods activated carbon can be used effectively to remove crystal violet and methylene blue from aqueous solutions and hence tackle dye pollution problems in the environment.
Funding This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.

Compliance with ethical standards
Conflict of interest The authors declare that they have no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creat iveco mmons .org/licen ses/by/4.0/.