The Development of Biocomposite Filaments for 3D Printing by Utilizing a Polylactic Acid (PLA) Polymer Matrix Reinforced with Cocoa Husk Cellulose Fibers

Vegetable fibers are increasingly used in biocomposites, but there is a need for further development in utilizing by-products like cocoa husks. Three-dimensional printing, through Fused Filament Fabrication (FFF), is advancing rapidly and may be of great interest for applying biocomposite materials. This study focuses on developing innovative and fully biodegradable filaments for the FFF process. PLA filaments were prepared using cellulose fibers derived from cocoa husks (5% mass ratio). One set of filaments incorporated fibers from untreated husks (UCFFs), while another set utilized fibers from chemically treated husks (TCFFs). The fabricated materials were analyzed using scanning electron microscopy (SEM), thermogravimetric analysis (TGA), and Fourier transform infrared (FTIR) techniques, and they were also tested for tensile strength. ANOVA reveals that both UCFFs and TCFFs significantly predict tensile strength, with the UCFFs demonstrating an impressive R2 value of 0.9981. The optimal tensile strength for the filament test specimens was 16.05 MPa for TCFF8 and 13.58 MPa for UCFF8, utilizing the same printing parameters: 70% infill and a layer thickness of 0.10 mm. Additionally, there was an 18% improvement in the tensile strength of the printed specimens using the filaments filled with chemically treated cocoa husk fibers compared to the filaments with untreated fibers.


Introduction
Biocomposite materials of thermoplastic polymers reinforced with vegetable fibers have attracted the attention of researchers and companies seeking more sustainable alternatives with superior mechanical performance [1].The mechanical strength properties of these biocomposites primarily depend on the type of incorporated vegetable fiber, the aspect ratio (length/diameter), the quality of adhesion at the interface between the embedded fiber and the polymer matrix, and the volume fraction of fiber added to the mixture [2].While incorporating vegetable fibers into a polymer composite can improve its material properties, it can also worsen the properties of the material, depending on the interaction of the abovementioned factors.Beyond the mechanical properties, incorporating vegetable fibers can help reduce the consumption of pure polymer and make these materials more environmentally friendly.Research and development on and the application of these bio-based materials can benefit the ecosystem and contribute to local socio-economic development [3].
Polymers 2024, 16, 1757 2 of 13 Several studies have shown the application of PLA together with a natural filler, such as bamboo, jute, flax, pineapple, sisal, or kenaf, to produce green composites [3][4][5].In Kumar's study [6], a tensile strength value of 61.07 MPa was reported for a PLA biocomposite with cellulose nanocrystals at proportions of 99/1%, respectively.Another notable study was presented by Liu [7] with a PLA biocomposite with sugarcane bagasse at proportions of 94/6%, respectively, which exhibited a tensile strength of 57.1 MPa.These studies have demonstrated that it is possible to produce biocomposites with optimized mechanical strength compared to pure PLA, serving as a reference to this study.
Cocoa husks are highlighted in this research due to their local abundance and frequent disposal as waste from cocoa processing, making them a significant focus among lignocellulosic raw materials.Their utilization could offer sustainable solutions while addressing environmental concerns and contributing to local economic (Theobroma cacao L.) production; the husks represent approximately 80% of the total weight of the fruit.Cocoa fruit husks are produced in significant amounts within cocoa bean industries, yet they are often discarded due to their limited market value, despite being generated as waste in cocoa plantations [8].Cocoa husks are a source of natural vegetable fiber, with lignocellulosic material comprising approximately 87% of the dry weight of the husks.Its chemical composition on a dry weight basis (%w/w) is approximately 35.4% cellulose, 37% hemicellulose, and 14.7% lignin, and the remainder consists of ash and other components, such as wax, pectin, moisture, impurities, etc. [9].Therefore, pretreatments are essential in the cellulose extraction process and the removal of impurities.
This study outlines the development of biocomposite materials intended for use as raw materials (filament) in a 3D printer.Cocoa husk fibers were crushed, and cellulose microcrystals were chemically isolated.Two types of biocomposites (in the form of 3D filaments) were produced: one with untreated cocoa husk fibers and PLA and another with chemically isolated cellulose microcrystals and PLA.Alkaline and bleaching treatments were employed due to their recognized effectiveness in removing impurities from cellulose fibers, as well as them being more accessible and cost-effective techniques [10].
The amount of fiber added significantly impacts the mechanical properties of the composite.Studies indicate that the tensile strength tends to decrease, with a more pronounced reduction as the fiber content increases compared to the polymer.Overall, a lower fiber content tends to yield superior mechanical performance in biocomposites [8].The fiber weight percentage added was 5% relative to PLA in both cases.
The untreated cocoa husk fibers and chemically treated microfibrils were analyzed using TGA and FTIR tests, while the mechanical properties of the printed parts with the filaments were tested using tensile tests.The mechanical tests followed international ASTM D638-14 [11].

Materials
PLA granules (Ingeo Biopolymer 3051D) suitable for 3D-printing the filaments, with a density of 1.24 g.cm 3 , were used, sourced from NatureWorks © (Minnetonka, MN, USA).Cocoa husks were purchased from a local market in Ilhéus, southern Bahia, Brazil.Sodium hydroxide (NaOH), sodium hypochlorite (NaClO), and glacial acetic acid from Sigma-Aldrich (Barueri, São Paulo, Brazil) were also used, available at the Laboratory of Materials and Environment (LAMMA) of the State University of Santa Cruz (UESC).

Processing of Cellulose Fibers
The processing of the cocoa husks is summarized in Figure 1.The cocoa husks were washed to remove dirt and impurities and then dried at 105 • C in an oven until they reached a constant weight.Next, the pieces were ground using a knife mill.After grinding, the fiber was sieved through a mesh #325 (particles smaller than or equal to 44 µm).Part of the ground fibers, referred to as untreated cocoa husk fibers (UCF), was stored in a hermetic container for later use and analysis (chemical and morphological).The other part of the fibers was treated in a beaker with a 4% w/v sodium hydroxide (NaOH) solution at 80 • C for 4 h with mechanical stirring.After this treatment, the fibers underwent vacuum filtration, followed by washing with distilled water and then vacuum filtration again.Next, the fibers were treated in a 1:1 aqueous dilution of sodium hypochlorite (NaClO) for 30 min at 80 • C. Acetic acid was added until the solution reached a pH of 4. The fibers were then vacuum-filtered, washed with distilled water, dried, and finally ground in a ball mill for 60 min.The chemically treated fibers, referred to as treated cocoa husk fibers (TCFs), were stored in hermetic containers for later use and analysis.
The processing of the cocoa husks is summarized in Figure 1.The cocoa husks were washed to remove dirt and impurities and then dried at 105 °C in an oven until they reached a constant weight.Next, the pieces were ground using a knife mill.After grinding, the fiber was sieved through a mesh #325 (particles smaller than or equal to 44 µm).Part of the ground fibers, referred to as untreated cocoa husk fibers (UCF), was stored in a hermetic container for later use and analysis (chemical and morphological).The other part of the fibers was treated in a beaker with a 4% w/v sodium hydroxide (NaOH) solution at 80 °C for 4 h with mechanical stirring.After this treatment, the fibers underwent vacuum filtration, followed by washing with distilled water and then vacuum filtration again.Next, the fibers were treated in a 1:1 aqueous dilution of sodium hypochlorite (NaClO) for 30 min at 80 °C.Acetic acid was added until the solution reached a pH of 4. The fibers were then vacuum-filtered, washed with distilled water, dried, and finally ground in a ball mill for 60 min.The chemically treated fibers, referred to as treated cocoa husk fibers (TCFs), were stored in hermetic containers for later use and analysis.

Preparation of the Filaments and Printing of the Test Specimens
Two types of filaments were created (Figure 2), one using untreated cocoa husk fiber, referred to as UCFF, and another with chemically treated cocoa husk fiber, called TCFF.In both cases, the cellulose microfibers and PLA pellets were weighed at a mass ratio of 5% fiber to 95% PLA and then dehumidified for 12 h at 60 °C.The filaments were manufactured using a single-screw extruder, where the fiber-PLA mixture was fed through a funnel to the extruder, and the heater was adjusted to temperatures between 185 °C and 205 °C.The filament diameter was 1.75 ± 0.05 mm.

Preparation of the Filaments and Printing of the Test Specimens
Two types of filaments were created (Figure 2), one using untreated cocoa husk fiber, referred to as UCFF, and another with chemically treated cocoa husk fiber, called TCFF.In both cases, the cellulose microfibers and PLA pellets were weighed at a mass ratio of 5% fiber to 95% PLA and then dehumidified for 12 h at 60 • C. The filaments were manufactured using a single-screw extruder, where the fiber-PLA mixture was fed through a funnel to the extruder, and the heater was adjusted to temperatures between 185  The test specimens (TSs) printed for the tensile test were sized according to the guidelines of the international standard ASTM D638-14 [11].The Type I TS used as a reference is illustrated in Figure 3.The test specimens (TSs) printed for the tensile test were sized according to the guidelines of the international standard ASTM D638-14 [11].The Type I TS used as a reference is illustrated in Figure 3.The test specimens (TSs) printed for the tensile test were sized according to the guidelines of the international standard ASTM D638-14 [11].The Type I TS used as a reference is illustrated in Figure 3.The planning of the experiments, as well as the quantity of TSs manufactured by the 3D printing process, was defined using face-centered central composite design with two factors, two blocks, and ten experiments (Table 1).The input variables chosen were infill percentage and layer height.For the infill percentage factor, a lower limit of 30%, a central point of 50%, and an upper limit of 70% were adopted.For the layer height factor, a lower limit of 0.1 mm, a central point of 0.15 mm, and an upper limit of 0.20 mm were adopted.These two variables of the 3D printing process were identified as critical for the analysis and will be the input parameters studied for comparison of the results in subsequent tests.The combinations of these parameters are detailed in Table 2.

Test Specimen (TS)
Infill (%) Layer Height (mm) The planning of the experiments, as well as the quantity of TSs manufactured by the 3D printing process, was defined using face-centered central composite design with two factors, two blocks, and ten experiments (Table 1).The input variables chosen were infill percentage and layer height.For the infill percentage factor, a lower limit of 30%, a central point of 50%, and an upper limit of 70% were adopted.For the layer height factor, a lower limit of 0.1 mm, a central point of 0.15 mm, and an upper limit of 0.20 mm were adopted.These two variables of the 3D printing process were identified as critical for the analysis and will be the input parameters studied for comparison of the results in subsequent tests.The combinations of these parameters are detailed in Table 2.The mechanical designs of the test specimens (TSs) were created using SolidWorks 2023© software, where they were also later exported into STL file format.These files were imported into the slicing software PrusaSlicer© 2.7.4,where the G-codes used in the 3D printer to manufacture each model were generated.The Fused Filament Fabrication (FFF) process parameters used in the Ender-3 Pro 3D printer (Creality, Shenzhen, China), at Laboratory of Mechanical Projects and Tribology (LAPMET) of UESC and configured in the PrusaSlicer© software for the manufacturing of the CPs are detailed in Table 3.These parameters were kept constant for all the test specimens to ensure standardization.The tensile tests were carried out in triplicate, totaling 30 printed test specimens for each of the two types of filaments.

Characterization Techniques for the Fibers and the Biocomposites
A thermogravimetric (TGA) analyzer model DTG-60H (Shimadzu©, Barueri, São Paulo, Brazil) at the Laboratory of Research and Innovation in Advanced Materials (LAPIMA) of UESC was used to perform the thermogravimetric analysis on the untreated cocoa husk fibers (UCFs) and chemically treated cocoa husk fibers (TCFs).Approximately 6 mg of powder was placed in an alumina crucible and heated to 1000 • C at an incremental rate of 10 • C•min −1 under a nitrogen atmosphere with a flow rate of 100 mL•min −1 .
The Fourier transform infrared (FT-IR) spectra of the untreated cocoa husk fibers (UCFs) and chemically treated cocoa husk fibers (TCFs) were recorded using an Attenuated Total Reflectance (ATR) spectrometer, model IRPrestige-21 (Shimadzu©), at the Laboratory of Research and Innovation in Advanced Materials (LAPIMA) of UESC.The spectra were obtained in the wavenumber range between 4000 and 450 cm −1 .
The morphology of the untreated cocoa husk fibers (UCFs) and chemically treated cocoa husk fibers (TCFs) was visualized using a Quanta 250 Scanning Electron Microscope (SEM), model (FEI Company©, Hillsboro, OR, USA), at the Center for Electron Microscopy (CME) of UESC.The powdered materials were placed on double-sided carbon adhesive tape in the sample holder.The sample was gently pressed with paper, and the excess material was removed.Subsequently, the morphological characteristics were visualized.
The tensile strength mechanical tests were conducted according to the guidelines of the international ASTM standards.For the tensile test, the reference was ASTM standard D638-14 [11].The Instron 5982 universal testing machine (Instron©, Norwood, MA, USA) was used to perform the tensile test, with a crosshead speed of 0.0000254 m.s −1 (1.524 mm.min −1 ) at the Laboratory of Experimental Measurements and Uncertainty Assessment (LAMEAI) of UESC.

Statistical Analyses
Response Surface Methodology (RSM) was employed to investigate the relationship between tensile strength (σt) and the parameters of internal infill and layer height.The experimental data were analyzed using Excel 365© and Minitab 21.3.0© software.Analysis Polymers 2024, 16, 1757 6 of 13 of variance (ANOVA) was conducted to determine the significance level of each factor (linear, quadratic, and a linear combination of these factors).
A significance level of 95% was adopted, corresponding to a p-value of ≤0.05.According to [12], there are five indices for validating a model: the coefficient of determination (R 2 ), mean absolute percentage error (MAPE), root mean square error (RMSE), relative error (%), and multi-objective error function (MO).
The R 2 and RMSE indices were used.There are no specific values for each of these indices; however, for R 2 , the higher the percentage value, the greater the influence of the analyzed variables on the response.RMSE evaluates the performance of prediction models by providing a measure of how well the predictions match the observed data.A lower RMSE value indicates a better fit of the model to the observed data, with a value near zero indicating a closer match between the observed and predicted values [12].

Morphological Characterization
A detailed comparative analysis of the surface morphologies of both the untreated cocoa husk fiber samples and those chemically treated is depicted in detail in Figure 4 using scanning electron microscopy (SEM).Figure 4a shows a SEM micrograph of the untreated cocoa husk fibers (UCFs), while Figure 4b displays a SEM micrograph of the cocoa husk fiber samples subjected to chemical treatment (TCFs).Analyzing the surface morphology of the fibers was pivotal to discern the surface charge of these samples, especially in the case of the untreated fibers.In Figure 4a, it is evident that the surface of the untreated cocoa husk fiber (UCF) exhibits greater uniformity, forming a denser and more filled material due to the presence of waxes, hemicellulose, pectin, lignin, and other impurities [13].Conversely, in Figure 4b, the surface of the chemically treated cocoa husk fiber (TCF) displays increased porosity, with more empty spaces between the material, attributed to the partial or complete removal of waxes, hemicelluloses, pectin, and lignin.The SEM micrographs of the fractured test specimens of pure PLA, the test specimens created with filament using untreated cocoa husk fiber (UCFF), and test specimens created with filament using cocoa husk fiber subjected to chemical treatment (TCFF) are presented in Figure 5.The basic goal was to determine whether there were any observable fiber aggregates on the fractured surfaces.In comparison to pure PLA (Figure 5a), the surfaces of the UCFF (Figure 5b) and TCFF (Figure 5c) biocomposites exhibited rougher textures, with protrusions, small voids (red arrows), and well-dispersed fibers (yellow circles).In The SEM micrographs of the fractured test specimens of pure PLA, the test specimens created with filament using untreated cocoa husk fiber (UCFF), and test specimens created Polymers 2024, 16, 1757 7 of 13 with filament using cocoa husk fiber subjected to chemical treatment (TCFF) are presented in Figure 5.The basic goal was to determine whether there were any observable fiber aggregates on the fractured surfaces.In comparison to pure PLA (Figure 5a), the surfaces of the UCFF (Figure 5b) and TCFF (Figure 5c) biocomposites exhibited rougher textures, with protrusions, small voids (red arrows), and well-dispersed fibers (yellow circles).In the TCFF specimen (Figure 5c), areas attributed to small fiber aggregates (red circles) can be observed, which are only visible in the TCFF sample.However, overall, a good dispersion of fibers was achieved in the UCFF and TCFF biocomposites.Polymers 2024, 16, 1757 8 of 13

Thermogravimetric Analysis
The thermogravimetric analysis of untreated cocoa husk fiber (UCF) and chemically treated cocoa husk fiber (TCF) is presented in Figure 6a.The TGA plot illustrates the percentage of mass loss concerning the temperature increase.Both samples exhibit distinct stages of mass loss in the thermogravimetric analysis, indicating the thermal degradation behavior of untreated and chemically treated cocoa husk fibers.A marginal decrease in mass percentage is observed in the samples from 20 • C to 110 • C, with the UCF displaying the highest mass loss in this range, around 14%, and the TCF showing the lowest loss, approximately 6%.The decline in mass percentage observed in this range is attributed to the evaporation of moisture adsorbed on the sample surfaces, along with chemisorbed water molecules bound to the hydrogen within the samples [13,14].The second region was identified between 130 and 380 • C in the TCF sample and between 210 and 380 • C in the UCF sample.This range corresponds to the degradation primarily of hemicellulose and cellulose, along with a fraction of the lignin.The third region of thermal degradation occurs at temperatures between 380 and 600 • C. Temperatures above 380 • C are associated with the pyrolysis of lignin [15] and the oxidation of the fixed carbon present in cocoa husks [13].

Thermogravimetric Analysis
The thermogravimetric analysis of untreated cocoa husk fiber (UCF) and chemically treated cocoa husk fiber (TCF) is presented in Figure 6a.The TGA plot illustrates the percentage of mass loss concerning the temperature increase.Both samples exhibit distinct stages of mass loss in the thermogravimetric analysis, indicating the thermal degradation behavior of untreated and chemically treated cocoa husk fibers.A marginal decrease in mass percentage is observed in the samples from 20 °C to 110 °C, with the UCF displaying the highest mass loss in this range, around 14%, and the TCF showing the lowest loss, approximately 6%.The decline in mass percentage observed in this range is attributed to the evaporation of moisture adsorbed on the sample surfaces, along with chemisorbed water molecules bound to the hydrogen within the samples [13,14].The second region was identified between 130 and 380 °C in the TCF sample and between 210 and 380 °C in the UCF sample.This range corresponds to the degradation primarily of hemicellulose and cellulose, along with a fraction of the lignin.The third region of thermal degradation occurs at temperatures between 380 and 600 °C.Temperatures above 380 °C are associated with the pyrolysis of lignin [15] and the oxidation of the fixed carbon present in cocoa husks [13].
Beyond 600 °C, ash formation constitutes the final residue, comprising inorganic elements.The untreated cocoa husk fiber (UCF) and chemically treated fiber (TCF) left residues of 9.8% and 5.5% of the initial mass, respectively.The DTG curves (Figure 6b) of TCF and UCF revealed cellulose degradation peaks at 295 and 309 °C, respectively.TCF exhibited a maximum thermal stability temperature of 295 °C , lower than UCF due to the reduced cellulose crystallinity [9], as confirmed by the FTIR spectral analyses.TCF exhibited a peak at 190 °C , attributed to the residual hemicellulose [12].Above 380 °C, a continuous and slow weight loss is attributed to lignin degradation [13], with a degradation peak at 440 °C for both UCF and TCF.

Fourier Transform Infrared Spectroscopy (FTIR)
The change in the chemical composition of chemically treated cocoa husk fiber (TCF) relative to untreated cocoa husk fiber (UCF) is illustrated in the FTIR spectrum according to the absorbance in Figure 7. Through this analysis, the components of the raw material Beyond 600 • C, ash formation constitutes the final residue, comprising inorganic elements.The untreated cocoa husk fiber (UCF) and chemically treated fiber (TCF) left residues of 9.8% and 5.5% of the initial mass, respectively.
The DTG curves (Figure 6b) of TCF and UCF revealed cellulose degradation peaks at 295 and 309 • C, respectively.TCF exhibited a maximum thermal stability temperature of 295 • C, lower than UCF due to the reduced cellulose crystallinity [9], as confirmed by the FTIR spectral analyses.TCF exhibited a peak at 190 • C, attributed to the residual hemicellulose [12].Above 380 • C, a continuous and slow weight loss is attributed to lignin degradation [13], with a degradation peak at 440 • C for both UCF and TCF.

Fourier Transform Infrared Spectroscopy (FTIR)
The change in the chemical composition of chemically treated cocoa husk fiber (TCF) relative to untreated cocoa husk fiber (UCF) is illustrated in the FTIR spectrum according to the absorbance in Figure 7. Through this analysis, the components of the raw material were verified due to the existence of the principal bands related to cellulose, hemicellulose, and lignin.While it is a qualitative analysis, the peak amplitudes can indicate the substance concentration or the number of molecules with specific vibrations.Thus, the differences in the amplitudes of the spectra between UCF and TCF are indicative of the removal of lignin, hemicellulose, and extractives.
were verified due to the existence of the principal bands related to cellulose, hemicellulose, and lignin.While it is a qualitative analysis, the peak amplitudes can indicate the substance concentration or the number of molecules with specific vibrations.Thus, the differences in the amplitudes of the spectra between UCF and TCF are indicative of the removal of lignin, hemicellulose, and extractives.
The spectral region between 3200 and 3600 cm -1 indeed corresponds to the stretching vibration of the hydroxyl (OH) group band, which is commonly found in biopolymers such as cellulose, lignin, and hemicellulose.Additionally, this peak includes inter-and intramolecular hydrogen bonding vibrations in cellulose [13].With the removal of part of the lignin and hemicellulose, this peak tended to become narrower and sharper [16] since the TCF was also milled in the ball mill, which caused some crystalline cellulose structures to break, resulting in a more amorphous structure; a reduction in signal intensity at 3410 cm -1 can be observed.These results are consistent with literature reports on the effects of mechanical milling on the structure of cellulose [17].
The peak at 2920 cm −1 , more prominent in the UCF spectrum, corresponds to the stretching vibrations of C-H from the methyl and methylene groups of lignin and hemicellulose [16,18].The reduction observed in the TCF indicates the partial removal of these components.The peak at 1730 cm −1 corresponds to the C=O stretching vibrations of the acetyl and ester groups found in hemicellulose and fiber extractives [19].It is solely present in UCF, suggesting the removal of these components in TCF.The peak at 1620 cm −1 , attributed to the aromatic ring of lignin [20], can be observed in both spectra, with a lower intensity in TCF, indicating once again the partial removal of lignin.Similarly, the reduction in the bands at 1520 cm −1 and 1250 cm −1 , related to C=C group and C-H bond vibrations in lignin's methylene and methyl groups [21,22], also corroborates these results.
The absorption band at 1429 cm −1 corresponds to the asymmetric stretching of CH2, indicating the crystallinity of the cellulose material.This peak becomes broader if the cellulose material has lower crystallinity [23].In the case of TCF, this signal is broader, which corroborates the decrease in the crystallinity of the cellulose present, as the TCF samples were milled in a ball mill.The spectral region between 3200 and 3600 cm −1 indeed corresponds to the stretching vibration of the hydroxyl (OH) group band, which is commonly found in biopolymers such as cellulose, lignin, and hemicellulose.Additionally, this peak includes inter-and intramolecular hydrogen bonding vibrations in cellulose [13].
With the removal of part of the lignin and hemicellulose, this peak tended to become narrower and sharper [16] since the TCF was also milled in the ball mill, which caused some crystalline cellulose structures to break, resulting in a more amorphous structure; a reduction in signal intensity at 3410 cm −1 can be observed.These results are consistent with literature reports on the effects of mechanical milling on the structure of cellulose [17].
The peak at 2920 cm −1 , more prominent in the UCF spectrum, corresponds to the stretching vibrations of C-H from the methyl and methylene groups of lignin and hemicellulose [16,18].The reduction observed in the TCF indicates the partial removal of these components.The peak at 1730 cm −1 corresponds to the C=O stretching vibrations of the acetyl and ester groups found in hemicellulose and fiber extractives [19].It is solely present in UCF, suggesting the removal of these components in TCF.The peak at 1620 cm −1 , attributed to the aromatic ring of lignin [20], can be observed in both spectra, with a lower intensity in TCF, indicating once again the partial removal of lignin.Similarly, the reduction in the bands at 1520 cm −1 and 1250 cm −1 , related to C=C group and C-H bond vibrations in lignin's methylene and methyl groups [21,22], also corroborates these results.
The absorption band at 1429 cm −1 corresponds to the asymmetric stretching of CH 2 , indicating the crystallinity of the cellulose material.This peak becomes broader if the cellulose material has lower crystallinity [23].In the case of TCF, this signal is broader, which corroborates the decrease in the crystallinity of the cellulose present, as the TCF samples were milled in a ball mill.
A band at 1318 cm −1 corresponds to the deformation of O-H and the vibration of CH2 in cellulose [24].The vibration at 1161 cm −1 is attributed to the anti-symmetric stretching vibration of the C-O-C bridge, while the vibration at 1105 cm −1 is designated for the anti-symmetric stretching band of the in-plane ring.The intensity of these two peaks also decreases as the crystallinity of cellulose decreases [23].The band at 1058 cm −1 has been associated with the stretching of C-C and C-O in polysaccharides and lignin [16,17,25]; there was a reduction in signal intensity in TCF, corroborating the removal of hemicellulose and lignin during the chemical treatment.
The vibration at 898 cm −1 results from the stretching of C-O-C in the β-(1-4) glycosidic linkage.This band is identified as the absorption band of amorphous cellulose, whose relative intensity increases with a reduction in crystallinity [17,23,26].There was an increase in this peak in TCF due to the increase in the amorphous phase of cellulose after milling in the ball mill.
In UCF, there are peaks in the region near 819 cm −1 and 770 cm −1 , which have been associated with the functional groups of the deformed C-H bonds present in lignin [27,28]; there was a significant reduction in these bands in TCF, confirming the removal of part of the lignin after the chemical treatments applied to the raw fibers.

Results of Mechanical Tensile Tests
The results from the mechanical tensile test for the PLA/cocoa husk fiber biocomposite filaments are presented in Table 4.The plot shows the average values of tensile strength (σt), modulus of elasticity (Et), and strain (ε%) for the PLA filament with untreated cocoa husk fibers (UCFF) and the PLA filament with chemically treated cocoa husk fiber (TCFF).The best tensile strength (σt) result for the printed specimen using TCFF filaments was 16.05 MPa (TCFF8), while for the UCFF filament specimen, it was 13.58 MPa (UCFF8), both printed with the same settings: 70% infill and a 0.10 mm layer thickness.This comparison highlights a remarkable 18% enhancement in tensile strength for the TCFF filaments, suggesting that the chemical treatment applied to the fibers had a significant impact on the mechanical property of tensile strength.However, when comparing the tensile strength of the TCFF8 filaments at 16.05 MPa with the pure PLA filaments reported by [29] with σt = 29.5 MPa, we observe a decrease of approximately 45% in tensile strength for the TCFFs.
The highest elastic modulus (Et) values recorded for the test specimens printed with the filaments were TCFF8 = 542.4MPa and FFCN8 = 474.8MPa, respectively.These figures indicate that the FFCQ filaments demonstrated greater rigidity compared to FFCN under the specific conditions of the tensile test, emphasizing the positive effect of chemical treatment on the material's elastic properties.
The analysis of variance (ANOVA) for tensile strength yielded an R 2 = 0.9981 and an RMSE = 0.07079 for UCFF and an R 2 = 0.9979 and an RMSE = 0.08482 for TCFF.With an R 2 = 0.9981 for the variable (UCFF), this suggests that roughly 99.81% of the variation in tensile strength can be explained by the statistical model used, indicating a strong and significant relationship between the independent and dependent variables in this context.The R 2 = 0.9979 for (TCFF) suggests that approximately 99.79% of the variability in tensile strength is explained by the corresponding model for this variable.Both results indicate a strong relationship between the independent variables (infill and layer height) and tensile strength.Considering the stress data scale in MPa, the RMSE is relatively small in both cases, suggesting that the prediction errors are proportionate to the inherent variability of the data.These findings imply that the model holds significance and statistical significance.
Based on the obtained data and the results of the ANOVA for tensile strength, it was possible to establish a model of tensile strength (σt) as a function of the parameters percentage of infill (%) and layer height (mm).Figure 8a illustrates the response surface plot for the UCFF material, whereas Figure 8b shows the response surface plot for the TCFF material.The highest elastic modulus (Et) values recorded for the test specimens printed with the filaments were TCFF8 = 542.4MPa and FFCN8 = 474.8MPa, respectively.These figures indicate that the FFCQ filaments demonstrated greater rigidity compared to FFCN under the specific conditions of the tensile test, emphasizing the positive effect of chemical treatment on the material's elastic properties.
The analysis of variance (ANOVA) for tensile strength yielded an R 2 = 0.9981 and an RMSE = 0.07079 for UCFF and an R 2 = 0.9979 and an RMSE = 0.08482 for TCFF.With an R 2 = 0.9981 for the variable (UCFF), this suggests that roughly 99.81% of the variation in tensile strength can be explained by the statistical model used, indicating a strong and significant relationship between the independent and dependent variables in this context.The R 2 = 0.9979 for (TCFF) suggests that approximately 99.79% of the variability in tensile strength is explained by the corresponding model for this variable.Both results indicate a strong relationship between the independent variables (infill and layer height) and tensile strength.Considering the stress data scale in MPa, the RMSE is relatively small in both cases, suggesting that the prediction errors are proportionate to the inherent variability of the data.These findings imply that the model holds significance and statistical significance.
Based on the obtained data and the results of the ANOVA for tensile strength, it was possible to establish a model of tensile strength (σt) as a function of the parameters percentage of infill (%) and layer height (mm).Figure 8a illustrates the response surface plot for the UCFF material, whereas Figure 8b shows the response surface plot for the TCFF material.

Discussion
Biocomposites with PLA granules and cellulose fibers from cocoa husks were premixed and compounded by extrusion in an attempt to create filaments for 3D printing.The results obtained in this study demonstrated the feasibility of using this agricultural Layer height (mm) Layer height (mm) Infill (%) Infill (%)

Discussion
Biocomposites with PLA granules and cellulose fibers from cocoa husks were premixed and compounded by extrusion in an attempt to create filaments for 3D printing.The results obtained in this study demonstrated the feasibility of using this agricultural waste as reinforcement in PLA biocomposites, applied as raw material in the filament production industry for 3D printers.
FTIR and TGA analyses revealed significant differences in the structural and thermal characteristics of the cocoa husk fiber samples.The presence of bands related to cellulose was confirmed in both samples.Additionally, reductions were observed in bands related to water molecules, low-molecular-weight organic compounds, metallic oxides, lignin, and hemicellulose in the chemically treated cocoa husk fibers (TCF).Thermal degradation changes between UCF and TCF were evident, corroborating the structural changes indicated in the FTIR analyses.The analysis highlights the effectiveness of chemical treatment in modifying the thermal and structural properties of cocoa husk fibers.
Morphological studies of cocoa husk fiber and the generated biocomposites showed good fiber dispersion in PLA; however, small aggregates occurred in TCFF, indicating that the fibers were not as well dispersed in this composite.
The mechanical tests demonstrated a superior performance by 18% in terms of the tensile strength of the PLA filament specimens with cellulose fibers from cocoa husks subjected to chemical treatment (TCFFs) compared to filaments containing untreated fibers (UCFFs).This analysis highlights the significant influence of chemical treatment on fibers for enhancing biocomposite performance.However, when comparing the tensile strength result for the pure PLA filament specimens with that of the TCFF filament specimens, it was found that the incorporation of fibers resulted in a reduction of approximately 45% in tensile strength properties.Although there was a decrease in tensile strength, the study highlights the importance of investigating variations in the manufacturing process to understand their impact on composite performance better.Additionally, a significant improvement in quality was observed when the fibers were treated.However, other aspects of the manufacturing process, such as the bonding between the fibers and PLA, the optimal fiber quantity, and the possibility of adding additives to enhance the composite properties, also require investigation to optimize performance and applicability.
In all cases, printing settings with a 70% infill density and a layer height of 0.10 mm yielded the best results.This configuration demonstrated an effective combination of high strength, material efficiency, and printing speed, making it a favorable choice.It is worth noting that balancing the desired strength with practical considerations such as print time and overall process efficiency is important for optimizing part performance in real-world contexts.These results provide valuable insights for the optimization of 3D printing processes, as they indicate which specific settings can result in the desired mechanical properties.
This study demonstrates that the process of creating biocomposites with cocoa husk fibers is a promising method; however, further research is needed to improve the dispersion and adhesion of fibers in PLA.

Figure 3 .
Figure 3. Type I test specimen for tensile strength testing according to ASTM D638-14.

Figure 3 .
Figure 3. Type I test specimen for tensile strength testing according to ASTM D638-14.

Figure 4 .
Figure 4. SEM images of (a) the cellulose fibers from untreated cocoa husk (UCFs); and (b) of the cellulose fibers from the chemically treated cocoa husk (TCFs).

Figure 4 .
Figure 4. SEM images of (a) the cellulose fibers from untreated cocoa husk (UCFs); and (b) of the cellulose fibers from the chemically treated cocoa husk (TCFs).

Table 1 .
Levels of adjustment for input variables: infill (%) and layer height (mm) for central composite design, face-centered.

Table 2 .
Central composite design-central face, experiments for the input variables infill and layer height.

Table 1 .
Levels of adjustment for input variables: infill (%) and layer height (mm) for central composite design, face-centered.

Table 2 .
Central composite design-central face, experiments for the input variables infill and layer height.

Table 3 .
FFF process parameters used in the printing of the TSs.