Coffee pulp characterization and treatment as adsorbent material for heavy metal removal from landfill leachates

To add value to wastes from the coffee crop, this research physically and chemically characterized the coffee pulp waste from an organic farm crop located in Santa Bárbara (Antioquia-Colombia), specifically analyzing whether or not this material has promise for heavy metal removal from wastewater, such as landfill leachate. The coffee pulp was chemically and thermally modified to improve its physical and chemical condition and improve the sorption capacities. Sorption was characterized before and after modification thus point of zero charge, surface area, functional groups, elemental and morphological analysis, and its lignin, cellulose, and hemicellulose content. Sorption tests Cu and Pb for the coffee pulp removal capacity were also carried out in batches for determining chemical kinetics using leachates from Neal Road Landfill, in Butte County, Northern California, USA. Results showed that this material has a high potential for liquid-effluent treatment because the removal rate achieved was around 70% and 90% for the copper and lead, especially when there are simultaneously in the solution (leachate). Also, it can be concluded that in these experimental conditions, the biosorption by coffee pulp will allow the legally established permissible limits for landfill leachates to be satisfactorily fulfilled.


Introduction
Heavy metals are a potential source of pollution, especially in water environments. Metals are frequently used in various economic activities. Their toxicity is increased due to their combination with other substances, producing bioaccumulation, persistence, recalcitrance, and serious adverse effects on the environment and public health (Ubando et al. 2021;Wangb and Fenglian 2011).
One such economic activity is solid waste disposal using landfills; in these systems, leachates are generated with a high organic matter content, as well as inorganic compounds and heavy metals, due to the breakdown of the waste and its mixing with water supplied by rain. Heavy metals in leachates have been identified in their different valence states, such as chromium, lead, copper, mercury, zinc, and nickel, among others, in concentrations above the permissible limits in Colombia established in legislation by the Environment and Sustainable Development Ministry. Typical concentrations of heavy metals from leachate are shown in Table 1 (Kiely 2007).
Over time, conventional technologies have been implemented to treat these pollutants, such as precipitation, filtration, and coagulation, which can achieve high removal rates but with high operation and maintenance costs, as well as the generation of much sludge with high levels of heavy metals and metal ion selectivity (Wangb and Fenglian 2011). Biotechnologies have also been developed using bacteria, fungi, algae, different types of vascular plants, and vegetable waste as well; these have produced excellent results, such as the application to various engineering fields, lower costs, highefficiency levels, and the possibility of recovery and reuse of metal ions (Cheng et al. 2002;Park et al. 2016).
One of these biotechnologies is biosorption, which has been widely accepted in wastewater engineering due to Editorial responsibility: Maryam Shabani. being consider a high-efficiency technology and its low operation cost (one of the main reasons for its development). Low price reflects the ease of access to sorbent materials, such as metabolically inactive materials (industrial surpluses or organic waste from different sources), which have been discarded and possibly disposed of landfills without planned reuse. Additionally, no special and sophisticated treatment is required for their use as a potential source for capturing contaminants, e.g., heavy metals.
Coffee pulp is an agricultural waste generated in high quantities; its handling is complex given the minimal added value assigned. According to Cenicafé, in Colombia (whole the county), coffee pulp represents 43.58% of processed wet waste, producing 2.25 fresh tons/ha-year; hence, it is the main by-product of the coffee industry (Rodriguez-Valencia and Zambrano-Franco 2010). Pulp has carboxylic and hydroxylic groups that can be used for the cation exchange of metals; it also contains 46.1% cellulose, 34.6% hemicellulose, and 9.10% lignin (Blandón-Castaño et al. 1999).
This coffee pulp waste that is being produced in high quantity from coffee crops in Colombia is typically composted or dumped above the soil (Rodriguez-Valencia and Zambrano-Franco 2010;Blandón-Castaño et al. 1999), even though there could be alternate management and treatment for it in industrial processes or through the sorption of heavy metals such as Cu and Pb removal from aqueous solutions, especially in landfill leachate.
Based on the above, the research seeks to answer the following questions: the coffee pulp properties make it an adsorbent material suitable for heavy metals removal? coffee pulp removal efficiencies are comparable to commercial adsorbents, or other adsorbents produced through biomass?
Finally, the aims are to assess the removal efficiency of the heavy metals (Cu and Pb) through coffee pulp, chemically and thermally modified, and understand the sorption phenomenon from the laws that govern the process. Based on this understanding, the leachates treatment from landfills can be scaled in real conditions, in such a way that they can meet the regulatory requirements on the matter. For this goal, the coffee pulp properties were studied, through its physicochemical characterization, in addition to performing kinetics that establishes the speed and adsorption capacity of heavy metals leachates. Figure 1 shows the workflow methodology through which the coffee pulp was characterized in batch tests. Is important to highlight that the methods used for the coffee pulp characterization, as well as leachates, were taken from successful literature reports.

Coffee pulp modification
The coffee pulp, Pergamino variety, was taken from an organic crop in the Santa Bárbara municipality (Antioquia-Colombia). Coffee pulp was obtained using a wet method (Gómez 2010), separating the superficial peel of the grain. Pulp was washed with distilled water and then dried for 72 h in a conventional oven, then was milled, and sieved until it achieved a particle size less than 0.5 mm. This coffee pulp without modification was named WMCP.
For the chemical modification, the previously milled and sieved coffee pulp was mixed with 50%, phosphoric acid (H 3 PO 4 ) at a 2:1 rate V/W (phosphoric acid/ coffee pulp) over 48 h. It was rinsed with distilled water to remove most of the acid and the pH was adjusted to 6.6-7 with 0.1 M NaOH. Sample was decanted and placed at 150 °C for 24 h for humidity removal. Thermal modification or carbonization, later to chemical modification, was realized was under air, in three steps through the method of Pap et al. (2017). In the first step, the materials were placed in crucibles inside a muffle furnace and heated at a rate of 10 °C per minute until a temperature of 180 °C was achieved for 35 min. In the second phase, the temperature was increased to 400 °C by heating at a rate of 10 °C per minute for 30 min. Last step was carried out with the same heating rate to 600 °C for 60 min. This modified coffee pulp was named MCP. These methods were selected for their versatility, high levels of efficiency, and for being referenced with excellent results in several investigations of biomass used as adsorbent material in the removal of contaminants.

Coffee pulp characterization
MCP and WMCP were characterized to determine their properties and determine which is the most effective for the removal of heavy metals. Methods for coffee pulp characterization are presented below. Potentiometric titrations A 250 mL solution of 0.1 M NaOH and 0.1 M NaCl, with 300 mg/L of pulp, was prepared with MCP and WMCP samples. pH was lowered to 3 with 0.1 M HCl, and NaCl. Solution was titrated using constant volumes of 0.1 M NaOH, and 0.1 M NaCl and the changes in pH were recorded plotted as the change in pH versus titrant. PZC is the point at which the acid group undergoes protonation or deprotonation on the sorbent surface (Boehm 1966).

Qualitative and quantitative functional group determination
Functional group identification and quantification in the coffee pulp surface were realized through Fourier Transformed Infrared Spectroscopy (FTIR) in a Thermo Electron Nicolet 4700 spectrophotometer. Quantity determination was realized using Boehm´s method (Boehm 1966), which uses bases like NaOH, NaHCO 3 , and Na 2 CO 3 for the titration of the adsorbent samples to identify acid sites according to the force shown. Strong carboxylic group was determined through its neutralization with NaHCO 3 diluted solution. The Na 2 CO 3 solution is used for weak acids like those found in cyclic esters, commonly called lactones. Phenolic groups produce weak acidity that can only react with strong alkalis such as NaOH (Soto 2009). The titrated solution contained 250 mL of the bases described to which 0.075 g of MCP and WMCP was added. Before starting the titration process, the samples were protonated with 0.1 M HCl for 1 h. Acid solution and the base solution were mixed with a 0.1 M NaCl solution to maintain the same ionic strength during titration.

Morphologic analysis and surface area
Structural and morphologic characterization of the modified and unmodified coffee pulp surfaces were realized using scanning electron microscopy (SEM) with EVO MA10 (Carl Zeiss) microscope. Surface area and pore size were recognized by spectrometry through the BET method (Palchoudhury et al. 2015).

Lignin, cellulose, and hemicellulose determination
Lignin, cellulose, and hemicellulose of MCP and WMCP were determined through the fiber method in acidic and neutral detergent on a dry basis in the Animal Nutrition Laboratory of the National University of Colombia-Bogotá.

Leachate characterization
Leachate samples were obtained from the Neal Road landfill of Butte County, Northern California (USA). Analyses performed on these leachates using the Hach DR-3900 spectrophotometer were COD (dichromate method), nitrites (Diazotization method), nitrates (Chromotropic Acid method), ammonia nitrogen (Salicylate method), and total organic carbon (Direct). pH was determined through the Hach HQ 40d pH-meter.

Chemical kinetics
The chemical kinetics allow us to know the reaction speed for heavy metals removal studied in the research. Were carried out in a batch-type system, taking as reference the main variables that condition the process, such as the contact time, the pH, and the initial concentration of the metal (individually and in a mixture). With these variables, a 2 3 factorial experimental design was carried out. Initial concentration of the experimental region was chosen based on the real conditions of Colombia leachate. Contact time was selected according to previous tests with coffee pulp. pH is a function of the PZC defined through the pH drift method and potentiometric titrations.
As already mentioned, the heavy metals chosen to carry out the adsorption tests were lead and copper, which were analyzed in a Thermo Electron S4 spectrophotometer. Concentrations of the heavy metals under study were so low that they were not detected in the spectrophotometer, which is why it was necessary to prepare solutions from 1000 mg/L standards and add them to the leachate until obtaining the concentrations under study. The aforementioned was carried out with the purpose of simulating the concentrations of heavy metals in leachate, as it happens in the sanitary landfills of Colombia.
Experimentally, the kinetics consisted of putting the leachates in contact with the MCP under a constant agitation of 150 rpm in jar test equipment. Dose of adsorbent material used was 1 g. After the contact time had elapsed, the equilibrium concentrations were measured (Ce, mg/L), and these values were plotted as a function of time to determine the order of the reaction (0, 1, 2, order). Highest correlation coefficient will be the one that best fits the experimental data.
It is important to mention that the kinetic tests were performed with MCP and not with WMCP. Characterization results of coffee pulp after chemical and thermal modification improved its conditions in terms of the quality and number of functional groups and chemical composition, except in the determination of surface area. For this reason, it was decided to use the MCP instead of the WMCP since it has better physicochemical characteristics.

Results and discussion
Coffee pulp processing Figure 2a demonstrates the coffee pulp obtained by the wet method. Is a material´s shell is dark brown and has high water content. Figure 2b shows the pulp after a drying and milling process (particle size > 3 mm). Figure 3a shows the pulverized WMCP at a particle size of < 0.5 mm and Fig. 3b shows the MCP after chemical, and thermal modification.   For the unmodified pulp, the PZC exhibits neutral values, while for the modified one, its charge values are acidic. There are not significant differences between both methods (e.g., drift and potentiometric) for determining the PZC, as they yield very close values, both for the modified and unmodified pulp.

Point of zero charge (PZC)
In this research, if the solution (leachate) has pH values greater than PZC, the adsorption of metal ions will be improved because the surface will be negatively charged, thus attracting cations, as is the case for heavy metals. When pH of the solution is below the PZC the opposite occurs: the surface will be positively charged and will be suitable for anion adsorption.
PZC values determined in the present study are very similar to those found by Bustamante-Alcántara (2011) in a study of heavy metals removal with coffee pulp waste. This showed that the PZC has a value of 5.5 when the adsorbent has not received any type of chemical modification. Meanwhile, when functionalizing with citric acid with concentrations of 0.6 and 0.1 M, the PZC value is 2.8 and 3.9, respectively. Comparing these results with other agricultural materials in the investigation of Pb and Cu removal with persimmon leaves (Lee and Choi 2018), the PZC without chemical modification was 5.6, while in the study of heavy metals adsorption with plum seeds, the PZC was 4.12 when the adsorbent was chemically modified with phosphoric acid (Pap et al. 2017). Taken together, these results show that surfaces of materials of vegetable origin tend to have a near neutral pH, and once chemically modified, their tendency

Initial pH
Initial pH will depend on the nature of the reagent used, either acidic or alkaline.

Functional group determination
Infrared analysis (FTIR) The main peaks found in the spectrum of the modified and unmodified coffee pulp correspond to the hydroxylic, carboxylic acids, and alcohols functional groups, typical of materials derived from waste of a vegetable nature. According to Fig. 6, the OH − stretches appear around 3400-3300 cm −1 . Signal appearing around 3000 cm − 1 corresponds to the saturated C-H extensions, being more noticeable in the WMCP. Above 3000 cm −1 , C=C-H stretches of alkenes or aromatic compounds are observed, being more significant in the WMCP due to the greater presence of phenolic groups and low-scale carboxylic. Carboxylic acids have two very characteristic signals: the first is observed in the range of 3400 and 2600 cm −1 . Is a very wide band (when it is forming hydrogen bonds), which overlaps with most of the functional groups in that region. If there is no formation of hydrogen bonds, the signal is more acute, as is the case of the MCP. In this band, the carboxylic groups have good intensity, with a medium to strong tendency. Another sign is carbonyl, which comes in Between 1490 and 1390, the symmetrical and asymmetric flexes of CH 3 , and the scissoring of CH 2 . Between 1200-1100 cm −1 are the C-O stretches. The presence of carboxylic acids was increased on the surface of the coffee pulp due to chemical modification with phosphoric acid. Results presented previously are comparable with those reported by Dávila-Guzmán et al. 2013a in which the adsorbent material from coffee waste has absorption bands between 1665 and 1750 cm −1 , which are attributed to stretching symmetric and asymmetric carbonyl groups, and was more intense in coffee waste pretreated with 0.1 M NaOH, compared to those obtained before pretreatment. May be due to alkaline hydrolysis, which results in the breaking of the ester bonds, causing the carboxylic and hydroxylic group formation of the surface of the biomass. A study on the bioadsorption of Cd(II) and Pb(II) from aqueous solutions by residual coffee biomass, Pacheco et al. (2010) reported that a varied and intense band centered around the surface of the bioadsorbent (observed 1605.95 cm −1 ) that would correspond to the carbonyl groups present and the aromatic double bond, C=C. Presence of the carboxyl group was also confirmed by the intense and rather wide absorption band centered at 3288.05 cm −1 , which would corresponding to the O-H elongation (Pacheco Tanaka et al. 2010). These reasons, it can be deduced that the functional groups of coffee pulp, with or without modification, are very similar to those  reported by other authors who have used sorbent materials derived from coffee waste. Table 3 shows the results of the functional groups quantification based on the potentiometric titrations. The largest number of groups for both WMCP and MCP corresponds to phenolics or hydroxylics groups with 0.029 and 0.0049 mmol/g, followed by strong carboxylic acids with 1.46 × 10 −7 and 1.01 × 10 −5 mmol/g, and subsequently, weak carboxylic acids with 7.29 × 10 −7 and 4.60 × 10 −6 , respectively. The reason that the presence of hydroxylic groups is much greater than that of the carboxylic groups in WMCP and MCP may be because different authors have reported that phenolic compounds are present in coffee, such as caffeic acid (acid 3,4) -dihydroxy-cinnamic), ferulic acid (3-methoxy, 4-hydroxy-cinnamic acid), and p-coumaric acid (4-hydroxy-cinnamic acid) among others (Bustamante-Alcántara 2011). Although the presence of carboxylic groups is lower compared to phenolic groups, it is also important, especially in the MCP and for being one of the agents responsible for the adsorption of the metal ions present in the leachates.

Potentiometric titrations
As shown in Figs. 7,8,9,10,11,12, the curves generated in the potentiometric titrations represent the changes in pH from adding each of the bases that determine the acidity or alkalinity of the respective functional groups present on the surface of coffee pulp. These, it is evident that the pKa of the weak carboxylic acids and the strong acids of the WMCP and MCP, fall in the typical ranges suggested by previous studies in values between 3 and 5. Same way, the phenolic groups values, whose pKa value indicated by previous studies ranges from 8 to 11, were 8.94 and 8.17 for the WMCP and the MPC, respectively. pKa values found in this study are like those reported by Bustamante-Alcántara (Bustamante-Alcántara 2011), in which adsorption studies were carried out with chemically modified coffee waste, also finding that pKa for strong carboxylic groups are found in values of 4 and for phenolic groups as 8.02. In the same way, in a study of heavy metals adsorption with chemically modified coffee waste (Dávila Guzmán 2012), it is reported that pKa values for strong carboxylic groups are 3.66 and for phenolic groups 9.7, which are very close to those determined in the present study. Is worth mentioning that the increase in the strong and weak carboxylic groups of the MPC concerning the WMCP may be due to the incorporation of oxygenated groups, products of the chemical modification carried out  Figure 13 shows that it is not possible to observe the pores and hollow structure of the WMCS, typical of waste vegetables, a condition that can be attributed to the presence of metals and lignin that cover the pores preventing their observation. SEM analysis, the main components of the modified and unmodified coffee pulp were also determined. Figure 14, the pores of the modified pulp are more easily observed due to the chemical and thermal modification applied; therefore, can be concluded that the given treatment is an optimal mechanism for the formation of new pores that facilitates the adsorption of the heavy metals on the surface of the adsorbent. A similar process has been reported in a study of heavy metal removal with carobs shells, the pores on the surface were not observable through the SEM analysis before to chemical modification, but once applied, NaOH the pores were observed in different forms and sizes (Farnane et al. 2017).  Table 4 shows the main components (elemental analysis) of the modified and unmodified coffee pulp. Both cases, very similar values were presented in chemical composition. For example, the value for carbon were 69.39% and 65.05% for WMCP and MCP, respectively, and the oxygen value was 13.37% and 27.27% for WMCP and MCP, respectively. The other cations are a smaller proportion in both cases, only that for the MCP has a greater amount of phosphorus and sodium that can be seen since the chemical modification was made with phosphoric acid and sodium hydroxide. These results are consistent with those reported by many authors (Table 5), who have worked with adsorbents of vegetable origin and found that the presence of cellulose, hemicellulose, and lignin makes them rich in functional groups, whose main composition is carbon, oxygen, and other metals, in smaller proportion, which become exchangers with the metals present in the leachate. Table 6 shows the lignin, cellulose, and hemicellulose percentage, dried, for the modified and unmodified coffee pulp.

Lignin, cellulose, and hemicellulose determination (analysis bromatological)
Lignin values are 23.9% and 10.8% for WMCP and MCP, respectively; cellulose are 35.1% and 4.9% for WMCP and MCP, respectively, and finally, hemicellulose are 3.5% and 1.3% for WMCP and MCP, respectively. Is important to note that the method used to determine these compounds shows reliable results for the WMCP because this is used in forages and/or in materials of vegetable origin. Laboratory where the test was carried out states that, for the MCP, the reliability of the results could not be determined because, although the waste is of vegetable origin, chemical and thermal process was altered. As previously mentioned, the values for MCP are very different from those reported in previous studies, which could be due to the treatment applied that considerably changed the composition percentage of lignocellulosic compounds.
Previous studies report, for example, that the most significant functional groups in lignin in compounds of vegetable origin are the methoxy (OCH 3 ), hydroxy (OH), and carboxylic (COOH) groups (Prinsen 2010). First groups represent around 16% of their weight, followed by 10%, second, and the third, 0.1%, respectively. Is important to remember that hydroxylic and carboxylic groups were identified and quantified in MCP and WMCP through infrared FTIR analysis and potentiometric titrations. Is then evident that the lignin, cellulose, and hemicellulose percentages obtained in the present study for WMCP do not differ considerably from those obtained by other authors (Table 7), with the coffee bean and pulp being the closest values.

Surface area
As shown in Table 8, the surface area of the MCP is 2.7 times smaller than that of the WMCP despite the chemical and thermal treatment applied. This situation may be due to factors such as:    • The ion presence, such as phosphate and sodium, from the chemical modification of coffee pulp, possibly caused the clogging structure. The thermal activation time was maybe insufficient to increase the surface area, and the pore opening. • The structure of the MCP was softened, that is the aliphatic chains are lost in the applied pretreatment, leaving only the aromatic chains of tars, which are joined together and forming linear planes (Valderrama Rios et al. 2018). • The absence of a gasifier and reducer in the thermal activation, such as nitrogen and water vapor, could cause the structure to collapse and prevent the achievement of the expected results. • Tars, such as volatile elements (aromatic and cyclic) present in the coffee pulp, were possibly condensed and were immersed in the structure of the coffee causing clogging and sealing of pores (Valderrama Rios et al. 2018) (Guo et al. 2018).
• The tars give carbonized biomass, an oily and bituminous texture (Aranguren Campos 2015). These attributes were evidenced in the research when rubbing the modified coffee pulp. • The chemical and thermal method applied to increase the surface area in coffee pulp was not effective even though the procedure was developed in accordance with previous studies established for biomass of vegetable origin.
The surface area reported by previous studies with different biomass and coffee waste is presented in Table 9. From these data, the surface areas for materials without chemical or thermal modification or treatment are not different from the virgin coffee pulp used in the present study. High surface areas were found only in the case of the coffee husk thermally modified by Velásquez et al. (2008), which were equated with activated carbon of commercial origin.

Leachate characterization
When comparing the concentrations of heavy metal leachate from the Neil Road landfill with others in Latin America, and especially in Colombia it were shown that heavy metals in Neil Road are very low. Also are imperceptible due to regulatory requirements and advances in hazardous waste management. In Colombia, high concentrations of heavy metals have been found in leachate, due to the inadequate   disposal of hazardous waste such as batteries, and industrial waste mixed with ordinary waste. For this reason, it was decided to prepare the leachate with the addition of standards, to know the effectiveness of the process, and to replicate the tests in the future with leachates that effectively present heavy metals, as is the case of those produced in Colombian landfills. Heavy metals concentrations with which the tests (kinetics) were carried out, are presented in Table 10.

Chemical kinetics
The following tables show the results of the copper and lead kinetics in single and mixed solutions, using different values of concentration, contact time and pH. In each kinetics, there is a value for each variable, shown in Table 10.
It is important to specify that the analysis of chemical kinetics was not carried out by using the cumulative time over which the tests were made, but that they are analyzed by sections or intervals of time, since in each of them, a behavior or order is observed different, compared to the overall reaction time.
In individual solutions, the highest percentage of copper removal (67.40%) was achieved in the best kinetic (statistical design). Said kinetic corresponds to 15 h of contact time, pH 5, and 1.5 times the initial concentration. This pH is higher than at the PZC, demonstrating that this parameter does influence the adsorption rate because the surface of the coffee pulp is negatively charged, therefore attracting cations like Cu 2+ . Lowest values of the adsorption rate were 18.50% and 17.36% at pH 6, in the 3th and 4th kinetic, respectively.
Previous studies indicate that adsorption can be increased to pH above the point of zero charge because there is little presence and competition of H + ions and cationic species such as heavy metals adsorb to capture sites, a situation that is checked in the trials of individual solutions. In this case, although the pH does impact the process, the presence of other species in solution and of negatively charged functional groups (hydroxylics, carboxyls, and carbonyls) could also cause the copper exchange in the coffee pulp surface. Mixed solution, the highest adsorption rate (70.42%) was reached in that first kinetic, which corresponds to 6 h, pH 6, and initial concentration of 1 ppm. From this test, it can be concluded that the simultaneous presence of copper and lead did influence the amount of metal removed because the equilibrium time was shorter (6 h), compared to the individual solution (15 h) which could be because the surface is saturated more quickly by the presence of both metals in the solution. It also follows that the initial concentration plays an important role in the process since at higher concentrations, the adsorption rate is lower. Can be evidenced when the concentration is 0.7 ppm since the adsorption rate is 57.17% in the individual solution and 34.36% in the mixture; at a concentration of 2.34 ppm, the adsorption rates were 51.12% in the individual solution and 67.32% for the mixture.
Concerning the order of the reaction, in the case of the individual and mixed solution, most tests are due to secondorder reactions (kinetics), which means that the copper disappeared at a proportional rate to the square of its concentration. This model also assumes that the rate-limiting step may be the chemisorption promoted by the electronic forces, through the exchange of electrons between sorbent and sorbate, or covalent forces, through the exchange of electrons between the constituents involved (Alhogbi 2017). Figure 15 presents the adsorption kinetics by sections for individual and mixed copper solutions. Results of the experimental trials concluded that the contact time is not a decisive factor in increasing adsorption, can be concluded that at these times, equilibrium was reached. Equilibrium time was much longer for the individual solution because there was no competition with lead for the active sites on the surface, contrary to what happened in the mixture, since the time to reach equilibrium was much shorter due to the simultaneous presence of both metals.
Previous studies mention that the kinetics do not obey a single order, but, on the contrary, different behaviors can be observed throughout the entire reaction. For example, in the first stage, the adsorption rate could be faster due to the external sorption caused by the electrostatic attraction between the cations positive charge and the negative charge of the adsorbent surface. The second stage, intraparticle diffusion occurs, in which metal ions migrate to surface pores and adsorb at internal active sites. The third stage, equilibrium is achieved, and there is a decrease in adsorbate concentrations and available active sites on the surface of the adsorbent (Edathil et al. 2018). The phases or stages described above can be seen in Fig. 15, for both the individual and mixed copper, since a steep slope and higher speed is observed during the first 90 min due to the cation transfer onto the adsorbent surface; in the second interval, the speed drops, with the cations transfer tending to be a bit constant, and in the third phase, the speed and transfer rate are increased, possibly due to the effect of the agitation, until reaching equilibrium at a time of 450 and 350 min for individual and mixed copper, respectively. One similar conclusion to that achieved in the study of Pb removal with plum seed waste was that the kinetics are given by sections or stages; the first is known as the external adsorption or instantaneous adsorption stage, the second is attributed to the stage of gradual adsorption, where intraparticle diffusion is controlled by speed, and the third is the equilibrium stage. Adsorption of metal ions is a complex combination of surface chemisorption processes where the most important velocity-control steps are the diffusion   (Pap et al. 2017).
It is corroborated that, like copper in individual solutions, lead has a much higher adsorption rate when there is a lower initial concentration and lower pH. In this case, efficiency of 74.17% was obtained at a pH of 3.3 and a concentration of 1.5 ppm. Lowest efficiencies were 41.67% at pH 5, and an initial concentration of 2.34, and 44.15% at pH 6 and 1 ppm of initial concentration. When the solution is in the mixture, an inverse situation occurs for the pH. Thus, the highest percentage of lead removal was 95.53% and 97.91% at pH 6 for concentrations of 1 and 2 ppm, respectively. In all cases, the optimum pH is above the PZC.
The time at which the equilibrium was reached in the individual solution was 9 h and for the mixed solution, it was 6 h, again showing that when there is a simultaneous presence of both metals surface of the coffee pulp saturates more rapidly. Comparing the time over which equilibrium is reached using the coffee pulp to that obtained by Bustamante-Alcántara (2011) using coffee waste, it does not differ significantly; this may be due, as already mentioned, to the treatments carried out on the adsorbent material with different acids, generating the presence of various functional groups on the surface of both wastes of vegetable origin. Referring to the orders of the reaction, for the individual and mixed lead solution, the predominant order in the different  tests is the second order, concluding that the intermolecular or covalent forces govern the process, promoting the cation exchange between the liquid film and the coffee pulp surface. Figure 16 presents the reaction kinetics for lead, individually and mixed, according to time intervals. Both cases, it is observed that during the first hours of the reaction, the rate of transfer to the surface of the pulp is rapid because of the availability of active sites on the surface for electron transfer. Then, as the availability of the exchange sites is reduced, the transfer rate becomes more constant and manages to remove another significant percentage of cations. The third stage, the speed increases again until equilibrium is reached and the possible saturation of the pulp surface. Table 11 reaction orders and kinetic constants are presented for different metal ions and wastes of vegetable origin, including coffee waste. General, the kinetics are controlled by a second-order reaction when the metal ions are individually in solution, and kinetic constants are on the order of 10 −4 g/mg-min, a situation that is very similar to the present study with coffee pulp.
Contrasting the equilibrium time for the Cu in an individual solution determined in the present study with that obtained from coffee waste in the study carried out by Bustamante-Alcántara (2011), it is concluded that the coffee waste was saturated over a shorter time (4 h) compared to 15 h with coffee pulp; this difference could be due to the chemical modifications applied to both wastes, which had different types and quantities of functional groups serving as a surface exchange for both materials for Cu removal. With coffee husk and activated carbon from spent coffee, the equilibrium time was 4 h, and the reaction was of second-order, a situation resulting from the valence forces produced by electron exchange between the ion adsorbent and nickel, or by covalent forces, through electron exchange (Hernández Rodiguez, et al. 2018). A study of lead removal from drinking water using coffee grains, was found that equilibrium was reached in 2 h when 500 mg of adsorbent is added, and 95% of metal was removed. When 50 mg of adsorbent is added the equilibrium time is reached in 8 h and 40% of the lead is removed, concluding then that the equilibrium is reached in less time and more metal is removed when the amount of adsorbent is increased (Tokimoto et al. 2005). This situation is contrary to occur in the present study with coffee pulp.
The heavy metal removal using spent coffee powder, the initial adsorption rates for arsenic were found to be relatively fast and occur within the first 25 min, followed by a slower reaction rate, until adsorption equilibrium is reached at 100 min. Cu (II) ions, the adsorption rate is much faster due to the strong interaction between copper ions and surface amines; the rate remains constant for a period of up to 250 min before reaching an equilibrium phase (Hao et al. 2017). The copper and chromium reaction kinetics with coffee waste, three stages were observed: the first of 0-20 min, which represents the fast ions adsorption, suggesting a fast external diffusion and surface adsorption; the second of Approaching the order of reaction, (Alhogbi 2017) found that lead removal with coffee husk follows a second-order reaction, and consequently, adsorption could be from chemisorption due to the electron exchange between the adsorbent solid, i.e., the coffee husk. A similar study, but with spent coffee waste, lead was also removed from sewage; the tests conform to a second-order reaction and a kinetic constant of 5.9268 g/mg-min (Naga Babu et al. 2018). This constant has a much higher value, almost 100 times higher, than that found with coffee pulp, and even with other studies of adsorbents from coffee. In the removal of Cu and Ni with coffee waste spends, the reaction rate is presented in two stages. In the first one, a fast adsorption rate was exhibited during the first 20 min, due to many sites available on the surface of the adsorbent; in the second, equilibrium is reached at 60 min in which the adsorption sites have already been occupied by Ni and Cu, which is why equilibrium is reached. Kinetics is second order, and the value of their respective constant is 0.058 g/mg-min. As the tests were performed with the chelating agent EDTA, it was concluded that adsorption was favored due to the formation of complexes with the coffee waste (Escudero et al. 2008).
In a cadmium adsorption study with coffee grain, second-order kinetics, and a constant of 0.1035 g/mg-min were exhibited at a temperature of 50 °C. The equilibrium time was short, only 120 min. Copper removal using spent coffee beans, it was found that the kinetics that the process represents a second order, and that the adsorption rate is proportional to the number of copper ions adsorbed on the surface of the waste until equilibrium is reached. Available fraction of the active sites is proportional to the driving force that generates mass transfer (Dávila-Guzmán et al. 2013b).
From the previously discussed investigations, it can be concluded that the copper and lead kinetics in individual solutions have the same order as most studies conducted with coffee and other wastes of vegetable origin. Similarly, chemisorption is the mechanism by which the transfer of electrons occurs from the sine of the liquid to the active sites on the surface of the coffee pulp.

Conclusion
It was evident that the chemical and thermal modification of the coffee pulp caused substantial changes in its chemical configuration and, to some degree its physical structure.
Significant changes were noted in the point of zero charge, functional groups number, lignin cellulose, and hemicellulose content, which allowed the capture and removal of the heavy metals studied.
Related to the physical structure, such as surface area and pore size, the method used and recommended by the literature did not allow for a value increase in these parameters; however, good removal rates were achieved with the operating conditions of the experimental tests.
The reasons for the decrease in the surface area of the MCP, which could be generated after applying the treatment recommended by previous studies, maybe from the presence of ions such as phosphate and sodium or the products of chemical modification, which likely caused the plugging of the structure. Thermal activation time was likely not enough to increase the surface area and the pore opening. Structure of the MCP was softened, that is to say, that the aliphatic chains were lost in the applied pretreatment, leaving only the aromatic chains of the tars, which are joined together and form linear planes.
It is essential that the thermal modification of the coffee pulp be carried out at high temperatures (> 600 °C) and under inert atmospheric conditions by using nitrogen or a similar gas since this ensures that the surface area of the absorbent material increases and that the surface pores are not covered by other compounds present in it. Was not possible to thermally modify the coffee pulp through an inert atmosphere in the present study, but carbonization at temperatures of 600 °C and in the presence of oxygen was achieved, the surface area did not undergo substantial changes; on the contrary, it exhibited desired effects when its area was reduced, compared a coffee pulp without any thermal modification.
Chemical kinetics, the amount of metal removed was influenced by the presence of copper and lead, simultaneously, because the equilibrium time was shorter, compared to the individual solution, which could be due to the surface saturating more quickly from the presence of both metals in the solution.
Order of the reaction was analyzed in sections because it is not convenient to typify a general behavior throughout the entire test, in the case of the individual and mixed solution. Most trials are due to second-order reactions.
The results showed that the coffee pulp is material has a high potential of liquid-effluent treatment, especially the leachates, because the removal rate achieved was between 70 and 90%, especially when there are heavy metals simultaneously in the solution.
It is necessary to continue investigating the coffee pulp properties as an adsorbent material, especially with chemical and thermal modifications on a larger scale, and thus prove its effectiveness in heavy metals removing.
It is necessary to carry out future tests with leachates that present concentrations of heavy metals, as is the case of the leachates of Colombia and many countries in Latin America. In this way, it will be possible to know the efficiency process and its real application.
Funding Open Access funding provided by Colombia Consortium. This author funded by California State University, Chico 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/.