3.1. Deacidification of Waste and Fresh Coffee Ground Oils
Wet waste coffee grounds were collected from three coffee bars and one household and dried until all water was removed. After extraction of oil from the different types of waste and one sample of freshly milled coffee grounds, the quantity of extracted oil and TAN of all oils were determined and presented in
Table 2. The quantity of oil ranged from 11.28 to 14.85% in dried WCGOs and 16.22% in fresh coffee ground oil (FCGO), which was in concordance with the previously published data [
23]. Slightly lower concentrations of oil in WCGOs can be attributed to the low extraction of lipids during preparation of the coffee beverage [
38]. Since the TAN of all extracted oils was higher than 2 mg KOH/g oil, the concentration of FFA needed to be reduced. The concentration of FFA in all samples was significantly lower than that reported in the literature [
23] due to the different types of coffee [
5,
39]. Campos, Vega, R. et al. reported in their review that the acid value of oils extracted in a laboratory usually ranges from 4 to 10 mg KOH/g oil. For instance, based on the results by Chokchai Mueanmas et al., oil extracted from WCGO of a mixture of grounds from Arabica and Robusta coffee beans contained 16.5% of FFAs, which corresponded to an acid value of 32.84 mg KOH/g of oil. The first employed method for lowering the concentration of FFAs was a commonly used method, esterification with H
2SO
4. This method successfully reduced TAN, however, it was not cost-effective since the reaction was conducted for two hours at elevated temperature. After one hour, TAN was reduced to 2.69 mg KOH/g oil. On the other hand, only 30 min at room temperature were sufficient to achieve TANs lower than 1 mg KOH/g oil by means of extractive deacidification with DES based on potassium carbonate. Extraction efficiency ranged from 86.18 to 94.15%. Deacidification by means of esterification with sulfuric acid was tested for one type of WCGO for comparison with the efficiencies obtained for WCGO and FCGO of different origins. Chokchai Mueanmas et al. reported esterification efficiencies from 65 to 94.79% for different reaction conditions [
23]. Esterification efficiency obtained in this article fell within the range that can be found in the literature. Since sulfuric acid is a strong acid and the reaction is conducted under unfavorable conditions (increased temperature and longer reaction duration) when compared to deep eutectic solvents (green solvent) and mild extraction conditions (30 min, room temperature). The initial acid number of the used extracted oils ranged from 3.76 to 5.9 mg KOH/g oil. Different extraction efficiencies probably result from different compositions of the extracted oils. It was expected that the increase in the initial concentration of FFA will result in a higher extraction efficiency due to the higher driving force for mass transfer. Since the WCGOs are of different origin, and consequently different chemical composition, obviously some other components participated in mass transfer and effected the solubility of FFA in DES or the rate of mass transfer.
The FTIR spectra of WCGO2 are shown in
Figure 1. Some characteristic peaks can be observed: peaks between 3000 and 2800 cm
−1 correspond to the aliphatic CH
2 group; peaks at 2360.22 and 2341.17 cm
−1 belong to CO
2; the peak at 1743.62 cm
−1 is attributed to the ester carbonyl groups of triglycerides. A weak shoulder at around 1710 cm
−1 corresponds to the stretching vibration of the free fatty acid carbonyl group and the reduction of that peak (shown in the enlarged portion of the spectra, to the right) indicates that free fatty acids were extracted successfully. The absence of a peak at around 1570 cm
−1 means that neutralization did not occur and that the reduction of free fatty acids is indeed due to extraction [
40]. The peak at 1377.26 cm
−1 corresponds to the glycerol group O–CH
2 of mono-, di-, and triglycerides [
41].
3.2. Selection of Optimal Process Conditions
In the first set of experiments, purified WCGOs of different origins were used for biodiesel synthesis. BD1 was synthesized from WCGO1 and BD2 from WCGO2, while BD3 and BD4 were produced from WCGO3. Reaction conditions were: mass ratio catalyst:methanol:oil = 1.0:40:100; synthesis time, 60 min; extraction time, 60 min.
1H NMR spectra of synthesized crude biodiesels (BD1, BD2, BD2, and BD4) are given in
Figure 2. Aside from the signal characteristic for methyl ester at 3.66 ppm, the hydroxyl group signal from glycerol and methanol at around 3.44 ppm could also be observed. The signals characteristic for kahweol (5.87, 5.91, 6.19, and 6.29 ppm) were found on all spectra [
42]. This means that kahweol was also extracted with
n-hexane from the waste coffee grounds. Signals in the range from 3.80 to 4.35 ppm are attributed to unreacted mono-, di-, and triglycerides.
Crude biodiesels were then purified by means of liquid–liquid extraction with DES based on choline chloride. Distributions of FAME in crude and purified biodiesels are given in
Table 3. Based on the obtained results, it can be concluded that the type of coffee, deacidification method, and catalyst used for transesterification influenced the quality of the produced biodiesel. The concentration of FAME in the crude and purified biodiesels increased in the following order: BD2 < BD1 < BD3 < BD4. It was obvious that not only the concentration of FFAs in oil influenced the quality of biodiesel. The lowest quality biodiesel (lowest concentration of FAME) was obtained from deacidified WCGO2, which had the lowest acid number. The most abundant FAME in all crude biodiesels was linoleic acid methyl ester (from 33.85 to 43.1%), followed by palmitic acid methyl ester (from 26.31 to 33.6%), oleic acid methyl ester (from 6.49 to 8.9%), and stearic acid methyl ester (from 5.56 to 6.80%). According to the published data reviewed by R. Campos-Vega, waste coffee grounds oils consist mostly of linoleic, palmitic, oleic, and stearic fatty acids. FAME profiles depend on the method and/or conditions of oil extraction, purification method, reaction conditions, and origin. In this study, oils were obtained by the same extraction method (Soxhlet extraction with
n-hexane). The purification method did not significantly modify the composition of FAME. All biodiesels were produced at the same reaction conditions, so based on the results presented in this work, coffee origin plays a major role. Biodiesels BD3 and BD4 were of the same origin and the few FAME that were detected in other biodiesels were not detected in biodiesels obtained from WCGO3. It is possible that the concentration of those FAME (C8:0 up to C12:0, C16:1, C22:0, C22:6, C23:0) were below the detectable limit. In general, concentrations of different types of FAME in WCGO biodiesels were as follows: polyunsaturated FAME > monounsaturated FAME > saturated FAME. The increase in FAME concentration up to 4.2% after purification could be observed for lower quality biodiesels (BD1 and BD2). In contrast, the composition of purified biodiesel did not change significantly for higher quality biodiesels (BD3 and BD4). When KOH was used as the catalyst, the total FAME content in crude BD4 (97.3%) was higher than in crude biodiesel BD3 (96.4%), therefore, it can be concluded that KOH is a more effective catalyst than NaOH. The presence of other components in extracted oil and FFA profiles influenced the conversion of triglycerides to FAME, in other words, the quality of biodiesel [
13,
39]. A concentration increase of FAME for biodiesels BD1 and BD2 can be attributed to the removal of glycerol and glycerides during the extraction step. In order to confirm this, the concentrations of glycerol and glycerides in crude and purified biodiesels (BD1) were measured and are presented in
Figure 3. Bearing in mind that the concentration of free glycerol, mono-, di-, and triglycerides was reduced from 1.287 to 0.775%, it is obvious that some other substances (excess catalyst, methanol, or some biocompounds characteristic for coffee oil) were extracted from crude biodiesel. Additional measurements of caffeine in crude and purified biodiesel confirmed that caffeine also participated in mass transfer. Concentration of caffeine was reduced from 0.46 to 0.40%.
1H NMR spectra of deacidified oil (WCGO1), crude and purified biodiesel (BD1) are presented in
Figure 4. Signals that corresponded to aliphatic protons in the region between 0 and 3 ppm were visible in the
1H NMR spectra of oil and biodiesels. Crude and purified biodiesel spectra contained a signal at 3.66 ppm corresponding to the methyl ester group, while the deacidified oil spectrum contains signals in the region between 4.10 and 4.35 ppm and 5.25 ppm, corresponding to glycerides. The intensity of the signal that corresponded to the hydroxyl group was significantly reduced, so it can be concluded that the selected DES is suitable for the extraction of glycerol as well as methanol from crude biodiesel.
The FTIR spectra shown in
Figure 5 are characteristic for biodiesel samples with an ester group peak at 1741.65 cm
−1, –CH
3 group peak at 1436.61 cm
−1, and O–CH
3 group peak at 1196.90 cm
−1. In the spectrum of unpurified biodiesel, a wide –OH peak between 3000 and 3600 cm
−1 indicated the presence of alcohols, namely glycerol and methanol, and the peak at 1028.74 cm
−1 corresponded to the C–O stretching of methanol; both of these peaks are significantly reduced in the spectrum of purified biodiesel [
43].
Since preliminary results with WCGO3 indicate that using KOH instead of NaOH did not significantly influence the FAME content in biodiesel, for the WCGO that produced the lowest quality biodiesel (WCGO2), the influence of mass ratio catalyst (NaOH):methanol:oil and extraction time with DES2 was investigated. FAME distributions in crude and purified biodiesels are presented in
Table 4. The highest concentration of FAME was obtained for a mass ratio NaOH:methanol:WCGO2 equal to 0.5:40:100 when the biodiesel yield was 78.60%. A higher amount of catalyst did not enhance the reaction and the biodiesel yield was reduced. It is possible that a small amount of esters undergo the saponification reaction due to the presence of excess catalyst. However, all biodiesels contained a higher amount of FAME after extraction. Increasing the duration of the purification step from 30 to 90 min did not significantly influence the total FAME amount, therefore, the extraction time was set to 60 min for the other experiments.
The influence of reaction time on the conversion of the same WCGO2 to biodiesel and the purification time on the composition of biodiesel is presented in
Table 5. For the investigated feedstock, the influence of reaction time on the conversion of oil to biodiesel could be neglected. Generally speaking, the influence of extraction duration on extraction efficiency could also be neglected since the total FAME content changed for a maximum of 1.69% with increasing extraction time from 30 to 90 min. These conclusions were derived from the high capacity of deep eutectic solvents for different types of solutes and it can be assumed that equilibrium is reached after a short extraction period. In some cases, a slight decrease in FAME concentration can be observed, most probably due to the dissolution of some esters in DES.
Since better results were obtained with KOH as the catalyst, the influence of mass ratio of catalyst, methanol, and WCGO3 (catalyst: KOH, synthesis time, 60 min; extraction time, 60 min) on the FAME concentration of purified biodiesels was investigated. Based on the obtained results given in
Table 6, it can be concluded that the mass ratio of catalyst, methanol, and WCGO3 did not influence the biodiesel yield significantly for the given range of reaction conditions. For all biodiesels, the concentration of FAME satisfied the biodiesel quality standard (>96.5% FAME) after the purification step. The highest concentration of FAME (98.0%) was obtained when 0.5 g of KOH and 40 and 50 g of methanol were used for transesterification of 100 g of oil.
Finally, biodiesel was produced from fresh and waste coffee grounds (household coffee) of the same type of coffee, and the FAME concentrations in the purified biodiesels are given in
Table 7 (KOH:methanol:oil = 0.5:40:100; synthesis time, 60 min; extraction time, 60 min). Total FAME content was the same for fresh and waste coffee grounds. However, the concentration of glycerides and glycerol was different. Crude biodiesel produced from fresh coffee grounds contains more free glycerol and diglycerides and significantly less triglycerides than crude biodiesel produced from waste coffee grounds (
Figure 6). Coffee contains different types of lipids (triglycerides, esters of diterpene alcohols and fatty acids, diterpene alcohols, esters of sterols and fatty acids, sterols, tocopherols, phosphatides and tryptamine derivatives) [
1]. During beverage preparation, water soluble lipids, like diterpens, are partially extracted, so it can be expected that the content of glycerides is different. Chlorogenic acids, a class of water soluble esters, and related compounds are the main phenolic compounds in green and roasted coffee [
44] as well as in waste coffee grounds [
45]. Phenolic compounds present in WCGO and FCGO can also be extracted during the extraction of oil with
n-hexane [
46]. It was also reported that phenolic compounds are soluble in deep eutectic solvents and therefore these compounds can be extracted from biodiesel during the purification step [
47,
48]. Häkkinen and Abbott reported that different types of carbohydrates were soluble in choline chloride-based DESs. Some other compounds present in SCG, like terpenoids, can also be extracted with
n-hexane [
49].
Figure 7 shows that the
1H NMR spectra of fresh and waste coffee grounds oil differed mostly in the intensity of signals that correspond to caffeine at: 3.39, 3.57, 3.98, and 7.55 ppm [
42].
Based on the obtained results, it is obvious that the origin of the coffee influences the quality of the synthesized biodiesel. This means that the optimal reaction conditions have to be determined experimentally for each type of coffee. However, some general conclusions can be drawn. The best mass ratio of catalyst:methanol:oil is 0.5:40:100. Too low a mass of the catalyst may not be enough for a high yield of biodiesel, while excess catalyst can induce saponification of FAME. Too low a mass of methanol may not be enough for the high conversion of oil to biodiesel. If the reaction is conducted with a high excess of methanol, the concentration of residual methanol in biodiesel can be too high, which can lower the flashpoint of biodiesel. Reaction time can be set to 60 min in order to ensure the maximum possible yield of biodiesel, and the extraction time can be set to 60 min to be sure that equilibrium (for transfer of glycerol, methanol and catalyst from crude biodiesel to DES) is achieved. Finally, since a higher conversion of oil to biodiesel was achieved with KOH as well as a better solubility of KOH in methanol, KOH was selected as the better catalyst.