Resource Recovery from Waste Coffee Grounds Using Ultrasonic-Assisted Technology for Bioenergy Production

Biodiesel is a proven alternative fuel that can serve as a substitute for petroleum diesel due to its renewability, non-toxicity, sulphur-free nature and superior lubricity. Waste-based non-edible oils are studied as potential biodiesel feedstocks owing to the focus on the valorisation of waste products. Instead of being treated as municipal waste, waste coffee grounds (WCG) can be utilised for oil extraction, thereby recovering an energy source in the form of biodiesel. This study evaluates oil extraction from WCG using ultrasonic and Soxhlet techniques, followed by biodiesel conversion using an ultrasonic-assisted transesterification process. It was found that n-hexane was the most effective solvent for the oil extraction process and ultrasonic-assisted technology offers a 13.5% higher yield compared to the conventional Soxhlet extraction process. Solid-to-solvent ratio and extraction time of the oil extraction process from the dried waste coffee grounds (DWCG) after the brewing process was optimised using the response surface methodology (RSM). The results showed that predicted yield of 17.75 wt. % of coffee oil can be obtained using 1:30 w/v of the mass ratio of DWCG-ton-hexane and 34 min of extraction time when 32% amplitude was used. The model was verified by the experiment where 17.23 wt. % yield of coffee oil was achieved when the extraction process was carried out under optimal conditions. The infrared absorption spectrum analysis of WCG oil determined suitable functional groups for biodiesel conversion which was further treated using an ultrasonic-assisted transesterification process to successfully convert to biodiesel.


Introduction
The limited reserves and increasing price of fossil fuels, as well as the adverse impact of fossil fuel combustion on climate change, has motivated researchers to find an alternative source of energy, e.g., renewable fuel sources [1][2][3]. Biodiesel is a renewable fuel consisting of a mixture of mono-alkyl esters and long-chain fatty acids, and is non-toxic, biodegradable and can be used in diesel engines with minimal modification [4][5][6]. Biodiesel is produced from different sources including edible oils, non-edible oils, and animal fats [7][8][9][10][11]. Currently, biodiesel production costs are calculated to be 4.4 times the cost of petroleum-derived diesel production [12]. Given that the current commercial biodiesel feedstocks are of edible oil origins such as palm and soy, government intervention in the biodiesel market will complicate the effects on food security. The use of WCG oil as biodiesel feedstock promotes biodiesel production from an alternative resource while reducing the issue of landfilling with food waste, which is prominent globally.

Materials and Methods
WCG was obtained from a local store which was then oven-dried at 60 • C. High purity analytical grade chemicals (Sigma-Aldrich) and solvents including 2-propanol (purity 99.7%), n-hexane (purity 99%), methanol (purity 99.8%), and potassium hydroxide were used to extract oil and convert into biodiesel.

Moisture
The moisture content of WCG was determined by measuring the mass before and after the drying of the collected samples. Drying was conducted in an electric oven (Tech-lab, stainless steel forced-air convection oven FAC-138SS) at 100 • C for 36 h. Mass of WCG was weighed before drying and at Energies 2020, 13, 1770 3 of 15 intervals of 12 h. It was found that the mass stopped changing after 36 h which indicates the sample had dried. The following equation was used to determine the moisture content.
Moisture content (%) = ∆m m i × 100% (1) where ∆m (g) is the changes between the final and initial mass of the sample, m i (g) is the initial mass of WCG. The moisture content of WCG was found to be 20%. For calculating more accurate oil yields, the mass of WCG was only weighed after the drying process. Table 1 shows the change of mass of WCG as drying time increases. Mass of WCG remained constant after the 24 h mark.

Experimental Setup
The reactor used for Soxhlet extraction was equipped with a reflux condenser, one Soxhlet extractor, and a heating mantle. The temperature of the condenser was controlled using a refrigerator cooling bath WiseCircu®(Model: WCR-P8, Daihan Scientific, Gang-Won-Do, South Korea). The experimental setup of WCG Soxhlet extraction is illustrated in Figure 1a.
Where ∆ (g) is the changes between the final and initial mass of the sample, (g) is the initial mass of WCG.
The moisture content of WCG was found to be 20%. For calculating more accurate oil yields, the mass of WCG was only weighed after the drying process. Table 1 shows the change of mass of WCG as drying time increases. Mass of WCG remained constant after the 24 hours mark.

Experimental Setup
The reactor used for Soxhlet extraction was equipped with a reflux condenser, one Soxhlet extractor, and a heating mantle. The temperature of the condenser was controlled using a refrigerator cooling bath WiseCircu® (Model: WCR-P8, Daihan Scientific, Gang-Won-Do, South Korea). The experimental setup of WCG Soxhlet extraction is illustrated in Figure 1a.
The equipment used for ultrasound extraction in this study was a Qsonica Q500-20 sonicator with a 1″ diameter tip (500 W power rating, 20 kHz frequency) ultrasonic probe. The sample was placed in 250 ml beaker made of borosilicate glass as a reactor, where the tip of the probe was fully immersed in the solvent and sample mixture. The probe was placed in the center of the reactor to ensure even ultrasonication of the entire sample. The precaution was taken to ensure that the probe tip was fully immersed to ensure direct sonication of the sample. Figure 1b shows a schematic of the ultrasonic-assisted extraction setup. The ultrasonication time, amplitude and frequency of ultrasonic waves can be changed using the sonicator system. However, the system was set at a moderate level to avoid energy wastage, deterioration of the sample, and to reduce risk of breaking of the equipment. The ultrasonication can also be set to continuous or pulsed modes. However, to increase the efficiency of the system, a pulsed mode was selected [26].  The equipment used for ultrasound extraction in this study was a Qsonica Q500-20 sonicator with a 1" diameter tip (500 W power rating, 20 kHz frequency) ultrasonic probe. The sample was placed in 250 ml beaker made of borosilicate glass as a reactor, where the tip of the probe was fully immersed in the solvent and sample mixture. The probe was placed in the center of the reactor to ensure even ultrasonication of the entire sample. The precaution was taken to ensure that the probe tip was fully immersed to ensure direct sonication of the sample. Figure 1b shows a schematic of the ultrasonic-assisted extraction setup. The ultrasonication time, amplitude and frequency of ultrasonic waves can be changed using the sonicator system. However, the system was set at a moderate level to Energies 2020, 13, 1770 4 of 15 avoid energy wastage, deterioration of the sample, and to reduce risk of breaking of the equipment. The ultrasonication can also be set to continuous or pulsed modes. However, to increase the efficiency of the system, a pulsed mode was selected [26].

Soxhlet Extraction Method
In this step, 20 g of WCG was weighed in a cellulosic thimble before it was placed in a Soxhlet oil extractor. The oil was extracted using 300 ml of three different types of organic solvents including n-hexane, chloroform and methanol. Among the selected solvents, n-hexane and chloroform are polar in nature whereas methanol is a non-polar solvent. The latent heat of vaporisation of chloroform is the lowest followed by the n-hexane and methanol solvents. These organic solvents increase the yield of oil extraction [27] compared to other green solvents. The average cycle time was recorded as 15 min. To maintain this extraction cycle time, the temperature was varied based on the chosen solvent. The solvent-oil mixture was placed in a rotary evaporator (IKA RV 10 digital V rotary evaporator with vacuum) at 60 • C to separate the extracted oil. The extraction process was done three times for each solvent type and the average oil extraction yield was calculated by measuring the mass of the dried sample.

Ultrasonic-assisted Oil Extraction Method
In this step, 10 g of WCG was poured into the 500 ml beaker which also works as a reactor. Selected solvents including n-hexane, chloroform or methanol were added at a ratio 1:20 g/ml into ultrasonicator. The ultrasonic probe was immersed into a sample such that the tip was completely submerged in the solvent mixture. The ultrasonic waves were applied for 5 s with a stop interval of 2 s. Extraction time (25, 37.6, and 50 min) and ultrasonic amplitude (20%, 30%, and 40%) were the other parameters selected for optimisation. The temperature was not selected for optimisation because of continuous compression and rarefaction of the ultrasonic cavitation cycle, which produces heat within the mixture. Filter papers were used for gravitation filtration of the solvent mixture from WCG oil. The rotary evaporator was used to evaporate the sample at 60 • C. The oil yield was calculated using Equation (2).
Oil yield percentage = mass of flask after exploration − mass of the empty flask mass of dried WCG × 100% (2) The molar mass of WCG oil was collected from literature as 862.8 g/mol [28].

Response Surface Methodology (RSM)
Design-Expert software version 11 (Stat-Ease Inc., Minneapolis, USA) was used to analyse and optimise experimental data. Analysis of variance (ANOVA) and RSM features of the software were utilised. To optimise the parameters of the oil extraction process, Box-Behnken experimental design was applied. The operating parameters such as the amplitude (X1), reaction time (X2) and n-hexane (X3), were varied to optimise oil yield (Y). The coded and uncoded levels of the Box-Behnken independent variables were presented in Table 2. The experimental data were analysed in the form of a mathematical model as follows: where, Y predicted the yield of WCG crude oil; Xi is the input independent parameter, C o and Ci are the intercept and regression first-order coefficient of the model, regression coefficient among ith and jth input parameters, and the number of input parameters is represented by k respectively. Cii is the regression quadratic coefficient of the model for the ith factor. Cij is the linear coefficient of the model for the interaction between the ith and jth factor.

Two-Step Esterification and Transesterification
The methyl ester was produced using a two-step esterification and trans-esterification process. The esterification process was carried out due to extracted oil having a very high acid value. In this process, the WCG crude oil sample was transferred into a reactor and then mixed with methanol at a molar ratio of 6:1 (methanol to oil). A 1 vol. % H 2 SO 4 catalyst was added into the pre-heated oil (60 • C). An ultrasonication amplitude of 30% was applied for 60 to 105 min. The ultrasonic waves were applied for 5 s with 2-s rest intervals. Following the esterification process, the sample was transferred into a separating funnel. Two distinguishable liquid layers were observed, the top layer consisted of catalyst residues and methanol whereas the bottom layer contained esterified WCG oil.
The esterified oil was placed in a reactor. The required amount of catalyst KOH was weighed into a beaker along with methanol for mixing. Before pouring into the reactor, the mixture was heated and stirred up until the KOH pellets were completely dissolved. The ultrasonic probe was immersed into the mixture in a way that ensured the tip was fully submerged inside the solvent mixture. A similar procedure for ultrasonication as of esterification was followed. The transesterification process was carried out with 1 w/wt% KOH in 6:1 methanol to oil ratio for 30, 45, 60 and 75 min, as a part of the optimisation of reaction time. The temperature was not optimised for the reason explained previously. After transesterification, the separation was carried out by allowing the mixture to settle. The bottom layer (glycerol layer) was removed before washing off the top layer. Washing was done with warm water (60 • C) several times until no impurities were observed in the water. The biodiesel was then placed in a rotary evaporator to remove any remaining moisture. The top biodiesel layer was tested for fatty acid methyl ester (FAME) contents using the Agilent 7890A Gas Chromatograph (GC). Figure 2 shows the phase separation after transesterification.

Two-Step Esterification and Transesterification
The methyl ester was produced using a two-step esterification and trans-esterification process. The esterification process was carried out due to extracted oil having a very high acid value. In this process, the WCG crude oil sample was transferred into a reactor and then mixed with methanol at a molar ratio of 6:1 (methanol to oil). A 1 vol. % H2SO4 catalyst was added into the pre-heated oil (60 °C). An ultrasonication amplitude of 30% was applied for 60 to 105 min. The ultrasonic waves were applied for 5 seconds with 2-second rest intervals. Following the esterification process, the sample was transferred into a separating funnel. Two distinguishable liquid layers were observed, the top layer consisted of catalyst residues and methanol whereas the bottom layer contained esterified WCG oil.
The esterified oil was placed in a reactor. The required amount of catalyst KOH was weighed into a beaker along with methanol for mixing. Before pouring into the reactor, the mixture was heated and stirred up until the KOH pellets were completely dissolved. The ultrasonic probe was immersed into the mixture in a way that ensured the tip was fully submerged inside the solvent mixture. A similar procedure for ultrasonication as of esterification was followed. The transesterification process was carried out with 1 w/wt% KOH in 6:1 methanol to oil ratio for 30, 45, 60 and 75 minutes, as a part of the optimisation of reaction time. The temperature was not optimised for the reason explained previously. After transesterification, the separation was carried out by allowing the mixture to settle. The bottom layer (glycerol layer) was removed before washing off the top layer. Washing was done with warm water (60 °C) several times until no impurities were observed in the water. The biodiesel was then placed in a rotary evaporator to remove any remaining moisture. The top biodiesel layer was tested for fatty acid methyl ester (FAME) contents using the Agilent 7890A Gas Chromatograph (GC). Figure 2 shows the phase separation after transesterification.

The GC Analysis of the Fatty Acid Composition (FAC)
A GC (Agilent 7890A) fitted with a flame ionisation detector was used to determine the FAME content of the produced biodiesel. Carbon chains (C8-C24) in the FAME layer and linolenic acid Energies 2020, 13, 1770 6 of 15 methyl ester content of the biodiesel were measured following the EN 14103:2011 standard method with methyl nonadecanoate (internal standard). This method is suitable for use with the GC equipped with HP-INNOWax high-polarity column (length × inner diameter × film thickness: 30 m × 0.25 mm × 0.25 µm, stationary phase: polyethylene glycol). The oven temperature protocol: 2 min constant 60 • C, heated to 200 • C at 10 • C increase per minute, then to 240 • C at 5 • C increase per minute and finally 7 min at 240 • C. Helium gas was used as the carrier gas, with a flow rate for helium of 1.5 mL/min. All the FAMEs were chromatographically resolved at the approximate retention time of 25 min. The comparison between the area of methyl ester peaks and internal standard peaks provided the FAME yield (Equation (4)): where E signifies the percentage FAME content (%), A the sum of the area of C8:0 to C24:0 peaks, A El the peak area of internal standards, W El the weight (mg) of methyl nonadecanoate and m is the weight (mg) of the sample.

FT-IR Analysis
The characterisation of WCG methyl ester was carried out by FT-IR (Perkin Elmer equipped with the MIR TGS detector) in the range 4000-650 cm −1 and analysed with the software program 'Spectrum'. The resolution was 8 scans and between 8 cm −1 and 4 cm −1 .

Comparison of Soxhlet and Ultrasonic-Assisted Extraction
From Table 3, the WCG reaction time was found to be 30 min with the highest oil yield obtained being 15.84% using ultrasound-assisted extraction. As for Soxhlet extraction, the highest yield was found to be 15.62% at 180 min reaction time. It is seen that for the constant solvent, ultrasonic-assisted extraction technology offers a higher oil yield and takes less time to complete compared to Soxhlet technology.

Effect of Solvent on Lipid Extraction Yield
Results on the effect of solvents on lipid extraction showed that n-hexane offers the highest yield (15.8%) followed by, chloroform (12.3%) and methanol (9.11%). Reshad [29] reported improved performance of n-hexane for rubber seed oil extraction. Al-Hammare et al. [30] also obtained a higher oil yield (15.3%) when using the Soxhlet technique and n-hexane solvent. Although the oil yield is higher than that reported in this study, this may be due to the nature of the source from which the WCG was obtained. Oil extraction using methanol resulted in 18.67% more viscous oil than n-hexane which might be the result of non-oil components being extracted together with the oil components due to its polarity, as suggested by Perrier [31]. Further, due to the alcohol's low selectivity to triglycerides, the extraction will involve other compounds such as polyphenols, phosphatides, soluble sugars and pigments [32]. An ethanol and chloroform solvent mixture were found to produce the highest oil yield for microalgae Chlorella sp. [33]. This suggests that the selection of solvent for oil extraction depends on the feedstock used. It is to be noted that effective oil extraction requires complete solvent penetration into oil storage and matching targeted compounds polarity [34].

Optimisation of the WCG Oil Yield Using Response Surface Methodology
In this study, WCG oil yield was maximised by optimising the independent process variables, such as amplitude, reaction time and amount of n-hexane. The quadratic regression model was suggested after a regression analysis performed on Box-Behnken experimental design results. The WCG oil yield results for 17 experimental runs obtained using the quadratic regression model equation are shown in Table 4. The WCG oil yield is predicted by the quadratic model in the form of coded values is shown in Equation (5).
Here, Y shows the WCG oil yield and X 1 , X 2 and X 3 exhibit the amplitude, reaction time, and amount of n-hexane.
The significance of the response surface model (quadratic) to optimise the WCG oil yield was evaluated using ANOVA. The results are presented in Table 5. The quadratic model p-value was also <0.0001, which indicated that the quadratic regression model was "significant". Model terms are significant if values of "Prob > F" are less than 0.0500 and model terms are insignificant if values of "Prob > F" are greater than 0.10. The lack of fit "F value" is 0.0927, which indicates that lack of fit was not significant relative to the pure error. The value R2 is 0.9975, which indicates that 99.75% of the deviation in USC crude oil yield was due to independent input process variables chosen for this model. According to high R 2 value, data points will be closer to the regression line, and it was a better estimation between the experimental data and quadratic model. The calculated yield of WCG oil at the optimal condition of 1:30 g/g of the mass of oil: n-hexane for 34 min of reaction time at the 32% amplitude was 17.75 wt. %. The yield of calculated coffee oil under the optimal condition can be proved by the experiment. The results from the experiment showed that 17.23 wt. % of coffee oil can be extracted from WCG under the optimal condition. Thus, the experimental yield closely matches the calculated coffee oil yield.

Effect of Ultrasonic Amplitude and Period on WCG Lipid Yield
As ultrasonication amplitude increases bubble collapse becomes more violent, which leads to higher extraction yields. However, an excessive ultrasonic amplitude may lead to wastage of energy. The WCG oil extraction versus ultrasonic amplitude and period is shown in Figure 3a,b. With the use of n-hexane solvent, the increase of amplitude from 20% to 33% resulted in a significant increase in oil extraction. The ultrasonic power increase in this range enhances the molecular diffusion of oil into the n-hexane. However, the extraction yield decreases after this amplitude. Liu et al. [35] reported a reduction of oil yield after a specific ultrasonic power threshold and attributed this to intense heating resulting in decomposition and volatility of the oil. The optimum condition resulted in an oil extraction of 17.75 wt. % using ultrasonic assistance, significantly higher than that obtained using the Soxhlet extraction method. For rapeseed oil extraction, Sicaire et al. [36] reported that the chief contributors to optimised oil yield were ultrasonic intensity and solvent-to-solid ratio. They also reported a reduction of oil yield when ultrasonic power exceeded the optimum values (> 30%).  The optimum extraction period avoids excessive power use and reduces the risk of oil damage. Sufficient extraction time is required to break ground coffee cell walls, extract the lipids and achieve an equilibrium [37]. From the results, the optimum ultrasonic oil extraction period using n-hexane was 34 minutes, significantly lower than the 3 hours required by the Soxhlet extraction method for the same solvent. Thus, the oil is not subjected to intense heating for long periods which reduces the risk of oil degradation [38]. Zhang et al. [39] reported a similar optimum extraction period for flaxseed oil. The initial rapid oil extraction rate is due to the solvent penetration into the cellular structure at a faster rate. Due to the oil constituents' external diffusion through the porous residual solids, a reduced extraction rate at a later stage was observed [40]. Evaporation might have resulted in the loss of a large portion of solvent which reduced the extraction efficiency. WCG cell wall rupture results in suspended impurities within the extract which may reduce the permeability of solvent into cell structure [41]. Furthermore, the extended periods of ultrasonication might also result in WCG oil readsorbing into ruptured tissue particles due to the larger specific surface area [42]. Figure 4 shows a 3D plot of the reaction time versus the amount of n-hexane. From the results, the optimum n-hexane for WCG ultrasonic oil extraction is 1:30. High extraction rates require a high amount of n-hexane, but extended extraction periods, in turn, increase energy consumption as well as the chance of degradation of extracted oil. The optimum extraction period avoids excessive power use and reduces the risk of oil damage. Sufficient extraction time is required to break ground coffee cell walls, extract the lipids and achieve an equilibrium [37]. From the results, the optimum ultrasonic oil extraction period using n-hexane was 34 min, significantly lower than the 3 h required by the Soxhlet extraction method for the same solvent. Thus, the oil is not subjected to intense heating for long periods which reduces the risk of oil degradation [38]. Zhang et al. [39] reported a similar optimum extraction period for flaxseed oil. The initial rapid oil extraction rate is due to the solvent penetration into the cellular structure at a faster rate. Due to the oil constituents' external diffusion through the porous residual solids, a reduced extraction rate at a later stage was observed [40]. Evaporation might have resulted in the loss of a large portion of solvent which reduced the extraction efficiency. WCG cell wall rupture results in suspended impurities within the extract which may reduce the permeability of solvent into cell structure [41]. Furthermore, the extended periods of ultrasonication might also result in WCG oil re-adsorbing into ruptured tissue particles due to the larger specific surface area [42]. Figure 4 shows a 3D plot of the reaction time versus the amount of n-hexane. From the results, the optimum n-hexane for WCG ultrasonic oil extraction is 1:30. High extraction rates require a high amount of n-hexane, but extended extraction periods, in turn, increase energy consumption as well as the chance of degradation of extracted oil.

Properties of Recovered Lipid
The acid value of ultrasonically extracted WCG oil was 9.56 mg KOH/g oil. The viscosity and density of the oil were determined to be 43.6 mm 2 /s and 918.4 kg/m 3 respectively. The WCG oil higher heating value (HHV) was measured to be 38.85 MJ/kg, exceeding the HHV of other biodiesel feedstocks such as waste cooking oil [43], cottonseed oil [44] and rice bran oil [45]. The higher calorific value might be due to the high carbon to oxygen ratios [46].

Esterification and Transesterification Process
To reduce the total energy required for oil extraction, the ultrasonic amplitude was optimised. Figure 5 depicts WCG fatty acid methylester (FAME) yield after different periods. The FAME yield continues to increase up to 60 min reaction time reaching a peak (98.21%) before slightly reducing beyond 60 min reaction time. Ultrasonic assistance is known to reduce the reaction time for biodiesel conversion. The 60 minutes reaction time required using ultrasonic assistance is significantly lower compared to conventional solvent transesterification of WCG (12 hours for optimum conversion) [35]. Temperature and time affect the transesterification reaction as it is kinetically controlled. Temperature changes during long sonication periods have been known to destroy the oil [47]. It is also challenging to maintain the temperature throughout the ultrasonication process due to the constant compression and rarefactions, resulting in a temperature which fluctuates. By controlling the reaction period, the total amount of energy introduced into the system can be easily quantified. Furthermore, given the large heat capacities of certain oils, the effect temperature has during the transesterification reaction is small when compared to the time [48]. Extended reaction times would decrease FAME yields due to degradation and polymerisation [49].

Properties of Recovered Lipid
The acid value of ultrasonically extracted WCG oil was 9.56 mg KOH/g oil. The viscosity and density of the oil were determined to be 43.6 mm 2 /s and 918.4 kg/m 3 respectively. The WCG oil higher heating value (HHV) was measured to be 38.85 MJ/kg, exceeding the HHV of other biodiesel feedstocks such as waste cooking oil [43], cottonseed oil [44] and rice bran oil [45]. The higher calorific value might be due to the high carbon to oxygen ratios [46].

Esterification and Transesterification Process
To reduce the total energy required for oil extraction, the ultrasonic amplitude was optimised. Figure 5 depicts WCG fatty acid methylester (FAME) yield after different periods. The FAME yield continues to increase up to 60 min reaction time reaching a peak (98.21%) before slightly reducing beyond 60 min reaction time. Ultrasonic assistance is known to reduce the reaction time for biodiesel conversion. The 60 min reaction time required using ultrasonic assistance is significantly lower compared to conventional solvent transesterification of WCG (12 h for optimum conversion) [35]. Temperature and time affect the transesterification reaction as it is kinetically controlled. Temperature changes during long sonication periods have been known to destroy the oil [47]. It is also challenging to maintain the temperature throughout the ultrasonication process due to the constant compression and rarefactions, resulting in a temperature which fluctuates. By controlling the reaction period, the total amount of energy introduced into the system can be easily quantified. Furthermore, given the large heat capacities of certain oils, the effect temperature has during the transesterification reaction is small when compared to the time [48]. Extended reaction times would decrease FAME yields due to degradation and polymerisation [49]. 3.6. Characterisation of FAME of WCG

GC Analysis
The FAC was determined via GC following the steps described in the methodology section. WCG biodiesel is known to have a similar FAC to corn and soybean biodiesel [50]. The FAME profile for the biodiesel produced optimally is reported in Table 6. As shown in Table 6, WCG biodiesel has 37.61% saturated fatty acids and 62.27% unsaturated fatty acids, the latter of which consists of 33.56% monounsaturated fatty acids and 28.71% polyunsaturated fatty acids. Among the fatty acids linoleic (18:2) is the predominant fatty acid compared to other fatty acids.

FT-IR Analysis
The characteristic peaks of the WCG methyl ester are found at 2926 cm −1 , 2854 cm −1 , 1743 cm −1 , 1435-1463 cm −1 and 1163 cm −1 , which corresponds to the C-H stretching vibration with strong absorption intensity, CH2 asymmetric and symmetric vibration with strong absorption intensity, C = O stretching vibration with strong absorption intensity, CH2 shear-type vibration with mild absorption intensity, and C-O-C symmetric stretching vibration with mild absorption intensity, respectively. Table 7 shows the characteristic peaks of WCG methyl ester. 3.6. Characterisation of FAME of WCG

GC Analysis
The FAC was determined via GC following the steps described in the methodology section. WCG biodiesel is known to have a similar FAC to corn and soybean biodiesel [50]. The FAME profile for the biodiesel produced optimally is reported in Table 6. As shown in Table 6, WCG biodiesel has 37.61% saturated fatty acids and 62.27% unsaturated fatty acids, the latter of which consists of 33.56% monounsaturated fatty acids and 28.71% polyunsaturated fatty acids. Among the fatty acids linoleic (18:2) is the predominant fatty acid compared to other fatty acids.

FT-IR Analysis
The characteristic peaks of the WCG methyl ester are found at 2926 cm −1 , 2854 cm −1 , 1743 cm −1 , 1435-1463 cm −1 and 1163 cm −1 , which corresponds to the C-H stretching vibration with strong absorption intensity, CH2 asymmetric and symmetric vibration with strong absorption intensity, C = O stretching vibration with strong absorption intensity, CH2 shear-type vibration with mild absorption intensity, and C-O-C symmetric stretching vibration with mild absorption intensity, respectively. Table 7 shows the characteristic peaks of WCG methyl ester. The fuel properties of WCG biodiesel produced through ultrasonic transesterification were analysed and compared to the ASTM D6751 and EN 14214 standards [51]. Table 8 shows the fuel properties of WCG FAME. It was found that the kinematic viscosity of WCG FAME was 4.89 mm 2 /s, the higher heating value was 39.74 MJ/kg, density was 886.8 kg/m 3 and the acid value lowered to 0.52 mgKOH/g oil. Further, the ester content was found at 98.21%. However, all these results except the acid value were within the specified limit of the ASTM D6751 and EN14214 standards.

Conclusions
This paper evaluated the recovery of an energy source from a wasted product, i.e., waste coffee grounds, using ultrasonic assistance to produce biodiesel. Use of this feedstock is advantageous as it is abundant, utilises a food waste, and eliminates the side effects of landfill disposal. Some of the salient results are: Successful production of biofuel oil from the UCG using ultrasonic assistance which was later converted into biodiesel.
The optimum ultrasonic oil extraction conditions were 1:30 g/g of the mass ratio of oil-to-n-hexane, 32% ultrasonic amplitude with a reaction time of 34 min and an achieved oil yield of 17.75 wt.%.
Ultrasonication of WCG during oil extraction reduced the amount of solvent required significantly. This also reduced extraction time and increased extractability compared to the conventional Soxhlet extraction method.
Thus, the study can suggest ultrasonic assistance is a superior method compared to the Soxhlet extraction method. Furthermore, it is also possible to convert waste-to-energy by producing biodiesel from WCG. Further studies are required to evaluate the produced biodiesel as a substitute for petro-diesel.