Introduction

Natural gas, petroleum, and coal are various statuses (gaseous, liquid, and solid) of fossil fuels. Fossil fuels are considered non-renewable resources, and their probable reserves are depleted faster than the natural process of fresh fossil fuels was created (Unpaprom et al. 2020; Whangchai et al. 2021). Also, severe environmental issues, for example, global warming and CO2 emission, are the effect of used fossil fuels (Nguyen et al. 2020). Due to global energy situations such as the energy crisis, they decrease fossil fuels, environmental issues, and climate change. Humanity realizes that is a very significant issue. Therefore, it essentials to find clean and sustainable energy. This alternative energy source is vast and cheap, and environmentally friendly (Khammee et al. 2020a, b; Nong et al. 2020).

The alternative energy resources have five primaries: wind energy, hydropower, geothermal energy, biomass energy, and solar energy (Vu et al. 2018; Sophanodorn et al. 2020a, b). The highest potential energy in electricity generation was reachable by solar energy, about 6.5 EJ compared to all other energy sources. Therefore, the solar cell’s enormous potential was attended to provides an effective solution to handle the problem related to the energy crisis and environmental issues (Alami et al. 2019).

Nowadays, researchers, academia, and governments worldwide have attention to solar energy conversion (Rajkumar et al. 2019). Various solar photovoltaic approaches have been developed and prove using enhanced overall performance. One of the most promising technological developments in the solar cells field is dye-sensitized solar cell (DSSC), the third generation of solar cells. Moreover, a potential alternative has come with the long‐term target of reach efficiency comparative with first‐generation technology (silicon‐based photovoltaics) at the economics of second‐generation (thin-film solar cell) manufacturing. Its simple fabrication process, low manufacturing cost, high cell performance on the widespread light condition, and eco-friendly (Bashar et al. 2019).

Dye-sensitized solar cells also can operate in low light circumstances that virtually feasible during cloudy days. It has been recommended that it be used indoors to operate from various lights such as illuminate the indoors (Ananthi et al. 2020). In DSSCs, a sensitized dye adsorbed the lights and transmission an electron to the semiconductor, which is usually used nanostructured TiO2, followed by dye regeneration. Most traditional DSSCs used the transition metal coordination compounds (ruthenium and osmium complexes mostly) as a sensitizer due to their remarkable efficiency. However, the large-scale fabrication when using this kind of metal complexes as a sensitizer often a big problem because of its complexes synthesis and purification process (Arulraj et al. 2019; Ocakoglu et al. 2012; Cerda et al. 2016; Argazzi et al. 2004).

Thus, natural dyes were becoming popular and attracted most of the research. Due to its easy extraction process, the abundance of material, cheap, innocuous, etc. Accordingly, much research was investigated and took advantage of natural pigments to convert photons into electrons with a cost-beneficial approach and environmentally friendly (Arulraj et al. 2019, 2017; Richhariya et al. 2017; Wongcharee et al. 2007). Natural pigments can be easily extracted from fruits, flowers, leaves, bacteria, etc. By exhibiting various colors from pigments. The major pigments for natural dyes consist of chlorophylls, carotenoids, flavonoids, and anthocyanin (Shalini et al. 2015). Besides, the dye-sensitized solar cell performance essentially depends on the dye sensitizer. This is the first novel investigation of using natural dyes extracted from Inthanin bok leaves as light-harvesting units for dye-sensitized solar cells. This study aimed to focus on pigments’ extraction from Inthanin bok leaves (Lagerstroemia macrocarpa), which is waste material (red or orange colors) that fall from the trees to become a light harvester for DSSC. The dyes and the manufactured DSSC cells were analyzed for their optical and structural properties. In addition, laser scanning microscopy explored the interface between the natural dye and nano-TiO2; in addition, using various nanostructure layers (1, 2, and 3 layers) and temperatures (100, 200, and 300 °C) to figure out the best DSSC condition to obtain high efficiency.

Materials and methods

Materials collection

The materials are Inthanon bok (Lagerstroemia macrocarpa), collected from the Inthanin field of Maejo University, Chiang Mai, Thailand. The leaves of those plants are shown in Fig. 1. After collecting the leaves, the dust was removed with tap water and scrape dry with a towel. Then, the middle parts of the leaves were removed for the next process, the pigment extraction process.

Fig. 1
figure 1

Material collection of Inthanin bok (a), and pigments’ extraction (b) and (c)

Pigments extraction and analysis

This research was modified by the extraction method from Sumanta et al. (2014). The extraction process was used the solvent extraction method in the ratio (20 g of Inthanin bok leaves: 100 ml of methanol). The leaves were mixed with the solvent using a blender and set the time for 10 min. After that, separated residue and pigments by used a vacuum filter. The experiment was operated with triplications, and the experiment processes are shown in Fig. 1.

For preparation for the next process was measure the absorption wavelength of natural dyes (Inthanin bok leaves) by using a UV–visible spectrophotometer and analyzed the determination of chlorophylls (Chl-a and Chl-b) and carotenoids content by using the following equations:

$$ {\text{The amount of chlorophyll-a}} = \left( {12.25 \times A_{663} {-}2.79 \times A_{645} } \right) \times {\text{DF,}} $$
(1)
$$ {\text{The amount of chlorophyll-b}} = \left( {21.50 \times A_{645} {-}5.10 \times A_{663} } \right) \times {\text{DF,}} $$
(2)
$$ {\text{The amount of carotenoids}} = \frac{{(1000 \times A_{470} - 1.43 \times C_{a} - 35.87 \times C_{b} ) \times {\text{DF}}}}{205}. $$
(3)

Preparation of TiO2 electrode

The first step was to clean the FTO glass for photoanode and counter electrode by ultrasonic with soap solution distilled water and methanol for 10 min each consecutively. Meanwhile, TiO2 powder reduced the particle size using a magnetic mixer set the time for 1 h to prepare the TiO2 paste. A ratio of TiO2 paste is 5 g of TiO2 powder, 10 ml of 5% acetic acid, and 0.5 ml of surfactant (Tween 20) was utterly mix using a magnetic stirrer for 1 h. After that, to avoid evaporation of the TiO2 paste must be kept in a sealed receptacle. Eventually, the TiO2 paste was deposited on the conduction electrode fluorine-doped SnO2 on the glass substrate (FTO) using the doctor blading technique. This experiment’s layers are 1, 2, and 3 layers using the adhesive tape to determine the layers and the active area is 3 cm2. After that, wait until the active area of the FTO glass dried and remove the tape. The film was gradually sintered at 100, 200, and 300 °C for 1 h. The TiO2 film was then cooled at room temperature and subsequently immerse in 30 drops of natural dye sensitizer (Inthanin bok) solution at room temperature for 1 h under a dark condition.

Assembling and testing the DSSC

The natural dyes (Inthanin bok leaves) coated on an active layer of photoanode and the counter electrode coated on FTO glass by platinum paste (Sigma Aldrich) annealed at 200 °C for 1 h. These were assembled like a sandwich by the gap between photoanode and counter electrode was injected the electrolyte, consisting of 0.6 mol/l of KI, 0.075 mol/l of I2, 20 ml of acetonitrile, and 5 ml of ethylene glycol (Gu et al. 2017). Finally, the DSSC is sealed entirely in order as sealed completely to avoid leakage of the DSSC cell’s electrolyte. A digital multimeter (UNI-T UT61E) was used to measure the current–voltage characteristics of DSSC with variable resistance (10 kΩ) under illuminated with the tungsten light of 24,000 lx (0.03504 W/cm2) in the ambient atmosphere and the schematic circuit diagram of the experimental setup displayed in Fig. 2.

Fig. 2
figure 2

Schematic circuit diagram of the experimental setup used to measure the current–voltage characteristics of DSSC with variable resistance (10 kΩ)

The fill factor, all the more ordinarily known by its acronym “FF”, is essentially a proportion of solar cells. The FF is comparing by the Imax and Vmax at maximum power point (Pmax) of the IV curve and the open-circuit voltage (Voc) is the maximum voltage accessible from a solar cell, and this happens at zero current. The short circuit current (Jsc) is the current through the solar cell per unit area when the voltage across the solar cell is zero (Sharma et al. 2018) The FF is generally determined as:

$$ {\text{FF}} = {{\left( {I_{\max } \times V_{\max } } \right)} \mathord{\left/ {\vphantom {{\left( {I_{\max } \times V_{\max } } \right)} {\left( {I_{{{\text{sc}}}} \times V_{{{\text{oc}}}} } \right)}}} \right. \kern-\nulldelimiterspace} {\left( {I_{{{\text{sc}}}} \times V_{{{\text{oc}}}} } \right)}}. $$
(4)

The photovoltaic cell’s efficiency is compared the performance of one solar cell to another cell. Also, it is determined as the ratio of maximum power output to the energy input from the light. This experiments were used Pin = 3.504 mW/cm2 by the following conversion efficiency formula (Dawoud 2016):

$$ \eta = \left[ {{{\left( {I_{{{\text{sc}}}} \times V_{{{\text{oc}}}} \times {\text{FF}}} \right)} \mathord{\left/ {\vphantom {{\left( {I_{{{\text{sc}}}} \times V_{{{\text{oc}}}} \times {\text{FF}}} \right)} {P_{{{\text{in}}}} }}} \right. \kern-\nulldelimiterspace} {P_{{{\text{in}}}} }} \, } \right] \times 100. $$
(5)

Characterization techniques

The characterization of the TiO2 coated on FTO glass substrate with natural dyes immersion (Inthanin bok leaves) was investigated under the scanning electron microscope (SEM) for the determination of the morphology (Khammee et al. 2020b). Besides, the energy-dispersive X-ray spectroscopy (EDX) analyzed the elemental composite of the samples. The laser scanning microscope (Olympus; OLS 5100) was examined the surface and morphology of Inthanon bok dyes coated on TiO2 layers.

Statistical analysis

All statistical analyses were performed using SPSS Version 20.0. A correlation was assumed significant when P < 0.05.

Results and discussion

Spectrophotometric analysis of pigments

The plant pigment structure was interacted with sunlight and the wavelengths were transformed by transmitted or reflected from the plant tissue. This procedure leads to the occurrence of plant pigmentation. The natural pigments such as chlorophylls, carotenoid, flavonoidere specified, and anthocyanin were specified from the maximum absorbance of wavelength (λmax) and the colors perceived by humans (Shalini et al. 2015; Kumara et al. 2013). In this study, the absorption wavelength of pigments extraction (Inthanin bok leaves) was examined by the UV–Vis spectrophotometer that the wavelength between 380 and 800 nm, as shown in Fig. 3. Absorbance spectra curves from the Inthanin bok dyes have shown three peaks of the wavelength of 420 nm, 440 nm, and 470 nm. The wavelength of 420 nm, 490 nm, and 660 nm is the standard maximum absorption wavelength of chlorophylls (Khammee et al. 2020a, b). Thus, the maximum absorption wavelength of Inthanin bok dyes feasibility is chlorophylls.

Fig. 3
figure 3

The absorption wavelength of pigments extraction (Inthanin bok leaves)

On the other hand, the absorption peak of Inthanin bok was also matched with the absorption bands of carotenoids, which is 420 nm, 440 nm, and 470 nm. In most plant tissues, the spectrum’s considerably sophisticated blue region owing to the absorption wavelength of chlorophylls and carotenoid pigments overlaps absorption wavelength (Khammee et al. 2020a, b). It indicates that the pigments’ extraction from Inthanin bok consists of chlorophylls and carotenoid pigments.

The pigment extraction content and estimation of Inthanin bok leaves

Chlorophylls are photosynthetic pigments that provide a green color. The primary functions of chlorophylls are harvesting light energy, spectral properties, and energy transduction for photosynthesis processes. Chlorophylls have two main types, which are chlorophyll-a and chlorophyll-b (Ramaraj et al. 2013). Their derivatives of chlorophylls are consumed as sensitizers in DSSC because of their absorbed blue and red light. The most efficient is the chlorophyll-a derivative, which is the carboxyl group. There are directly attached to the conjugated macrocycle to facilitate effective electron injection to TiO2 (Shalini et al. 2015; Wang et al. 2005). Moreover, carotenoids are a vast group with over 600 members; these are provided with red, orange, and yellow for fruits and flowers. Carotenoids have essential roles in photosynthesis that complement chlorophylls, and functional involves the light-harvesting, photo-protective utilities, and the redox function (Wang et al. 2005; Frank and Cogdell 1996; Koyama and Fujii 1999). Inthanin bok leaves dye are composed of pigments, which are chlorophyll-a, chlorophyll-b, and carotenoids. Inthanin bok leaves analyzed the pigments extraction content using UV–Vis spectrophotometer and used the Eqs. (1, 2, and 3). The stated pigments found that the remarkably composed of carotenoids, as revealed in Fig. 4. The carotenoid content of natural dyes (Inthanin bok leaves) was 10.666 ± 0.324 μg/ml; followed by chlorophyll-a with 2.708 ± 0.251 μg/ml and lastly, by chlorophyll-b with 2.500 ± 0.102 μg/ml.

Fig. 4
figure 4

The amount of pigments (Inthanin bok leaves)

The surface and morphology analysis of TiO2 nanoparticles and natural dyes

The scanning electron micrographs (SEM) of surface morphology characteristics of TiO2 nanoparticles pure and with natural dye extracted from Inthanin bok leaves annealed at 300 °C are presented in Fig. 5a, b. The sphere-shaped TiO2 nanoparticles were observed to be homogeneously distributed and porous. No cracks have been identified and stuck on the FTO glass substrate very well, as exposed in Fig. 5a. The agglomeration of small particles brings about to formation of porous structure (Ruhane et al. 2017). The advantages of mesoporous holes of the TiO2 is to provide the surface of a large hole for higher adsorption of dye molecules and facilitate the penetration of electrolyte within their pores (Jin et al. 2010). Generally, the highest pigment performance consists of the smallest molecule, peak refractive index, scattering coefficient, and brightness. The chemical adsorption of natural dyes becomes potential because of the condensation of hydroxyl and methoxy protons with the hydroxyl groups on the surface of nanostructured TiO2 (Kushwaha et al. 2013). Therefore, Fig. 5b demonstrates that the pores and surface of the TiO2 layer were covered with natural dyes extracted from Inthanin bok leaves. The spherical, agglomerate grain morphology can be predicted; it is the Inthanin bok leaves’ pigment. Therefore, the spherical, agglomerate grain morphology and cover on their pores and surface of the TiO2 layer in Fig. 5b can forecast; it is a natural pigment extracted from Inthanin bok leaves.

Fig. 5
figure 5

Scanning electron microscope of morphological characteristics of TiO2 thin films without (a) and with natural dye extraction from Inthanin bok leaves dye annealed at 300 °C (b)

The energy-dispersive X-ray spectroscopy (EDX) was used to analyze the elemental contents of TiO2 nanoparticles pure (Fig. 6a-1, 2) and with natural dye extracted from Inthanin bok leaves with different spectrums as shown in Fig. 6b-1, 2, c-1, 2 and d-1, 2 respectively. The data of elemental contents are presented in Table 1 and Fig. 6a-1, 2 indicates that the TiO2 nanoparticles were coated on FTO glass due to elemental contents of oxygen (O) and titanium (Ti). The atomic ratios were 80.33 and 19.67%, respectively. Follow by Fig. 6b-1, 2, the natural pigments from Inthanin bok leave immersion on TiO2 nanoparticles. The results show that elemental contents consist of carbon (C), oxygen (O), and titanium (Ti) was 74.42, 24.14, and 1.44%, respectively. This indicated that attendance of natural pigments of functional groups coated on the surfaces of TiO2 particles. The adsorption of natural dyes on the TiO2 layer can be boosted electron transfer rates (Al-Alwani et al. 2018).

Fig. 6
figure 6

The energy-dispersive X-ray spectroscopy (EDX) analysis of TiO2 coated on FTO glass substrate (a1, 2) and TiO2-coated on FTO glass substrates with natural dyes immersion (Inthanin bok leaves) with different spectrum (b1, 2d1, 2)

Table 1 The elemental composition of TiO2 coated on FTO glass substrate with natural dyes immersion (Inthanin bok leaves)

The effect of different nanostructure layers and temperatures on DSSC

Recently, several improvements in this technology (DSSC), such as the innovative natural dyes, can absorb a more extended range of wavelengths and the titanium oxides (TiO2) nanostructure for increase surface areas, etc. (Sharma et al. 2018; Khammee et al. 2020a, b). The main improvement of the research is not only by introducing natural dyes extracted from the waste material, which is Inthanin bok leaves (red or orange colors) that fall from the trees as light harvesters instead of TiO2 itself but also using different nanostructure layers (1, 2, and 3 layers) and temperatures (100, 200, and 300 °C) to improve the absorption collection and efficiency of DSSC. Consequently, the optimized photoanode (TiO2 nanostructure) is necessary for developing the high solar efficiency of DSSCs (Jeng et al. 2013).

The data of DSSC parameters of the devices obtained with different thicknesses and temperature of natural dyes extracted from Inthanin bok leaves are shown in Table 2. Extracted natural pigment (Inthanin bok leaves) was applied with the different layers and temperatures on the photocurrent–voltage characteristics curve for the DSSC are presented in Fig. 7. The results showed that the highest efficiency of the pigments extracted from Inthanin bok leaves is 1.138% ± 0.018, which the condition of one layer of TiO2 nanostructure and natural dyes and the temperature; 300 °C. The photocurrent–voltage and power–voltage characteristics curve for the highest efficiency is shown in Fig. 8; also, the thickness, two layers, and the temperature; 300 °C was a similar performance, which is 1.134% ± 0.160. Still, the layer of thickness increased, and the protection of the environment, causing chemical waste in TiO2 paste processing, higher cost value, and protection of the environment.

Table 2 The DSSC parameters of the devices obtained with different thicknesses and temperature (natural dyes extracted from Inthanin bok)
Fig. 7
figure 7

The photocurrent–voltage characteristics curve for the DSSC extraction natural pigment (Inthanin bok leaves)

Fig. 8
figure 8

The photocurrent–voltage and power–voltage characteristics curve for the DSSC extraction natural pigment (Inthanin bok leaves)

The increasing rise in the thickness of TiO2 layers will adsorb more natural dyes. However, the results have shown that the established electron in natural dyes extracted from Inthanin bok leaves cannot be effectively injected into the electrode due too long-distance when the thickness of TiO2 layers is too thick. The thicker TiO2 layers will also result in a dwindle transmittance and reduce the pigment dyes’ absorption of light intensity. Also, the resistance of charge transfer might be increasing when the thickness of TiO2 layers increases. Furthermore, the thicker layers of TiO2 will become difficult for the charge recombination between electrons from the excited dye to the conduction band of TiO2 and the I3 ions in the electrolyte (Jeng et al. 2013).

Moreover, this research’s different temperature affects the pores of TiO2 nanoparticles and the absorption of natural dyes that result in the performance of DSSC. There examined using the laser scanning microscope to analyzed the surface and morphology of Inthanin bok dyes coated on TiO2 layers (1 layer and 100 °C) and (1 layer and 300 °C) to the comparison of the low and the highest efficiency of DSSC as shown in Figs. 9 and 10. Also, the area under a curve of the surface of the low and high efficiency of DSSC is presented in Table 3.

Fig. 9
figure 9

The laser scanning microscope analyzed the surface and morphology of Inthanin bok dyes coated on TiO2 layers (1 layer and 100 °C)

Fig. 10
figure 10

The laser scanning microscope analyzed the surface and morphology of Inthanin bok dyes coated on TiO2 layers (1 layer and 300 °C)

Table 3 The area under a graph (μm2) of Inthanin bok dyes coated on TiO2 layers

In general, for annealing used, the low temperature for the fabrication DSSCs should override two main problems for improving photovoltaic performance: the first problem is the defective connection of TiO2 particles (Miyasaka et al. 2007) and the second issue is the residuals of the organic binder within the TiO2 film. During the preparation of TiO2 paste usually added organic binder, thus the residuals of the binder would become an insulting core in an annealing process using the low temperature and would block the transportation path of electrons that result in the electron transport rate and electron lifetime would decrease (Longo et al. 2002; Lin et al. 2012). It can be seen that, in Fig. 10c, the surface area and morphology of Inthanin bok dyes coated on TiO2 layers (1 layer and 300 °C) using the laser scanning microscope has a roughness than the surface area and morphology of Inthanin bok dyes coated on TiO2 layers (1 layer and 100 °C) in Fig. 9c, due to the difference in temperatures during the annealing process.

The results of the area under a graph of the natural pigments extracted from Inthanin bok leaves were found that the condition of the thickness of TiO2 layer; 1 layer and annealing at 300 °C has the higher result which is two times of TiO2 layer; 1 layer and annealing at 100 °C as shown in Table 3. This recommends that the binder’s residuals within the TiO2 paste decompose during the annealing process at high temperatures. There could be correlated with increasing the layer’s surface area. It can increase the dye adsorption and high photocurrent generation (Krašovec et al. 2009).

Table 4 indicates the values of Isc, Voc, FF, and η obtained from the photovoltaic device (DSSCs) employing photoanodes with sensitizer from natural dye extracts (Shalini et al. 2015; Tributsch 1972; Chang et al. 2010; Gómez-Ortíz et al. 2010). Electric current and voltage on DSSC are generated by irradiation using tungsten lamps, and then, changes in the current and voltage generated are measured the performance of DSSC. It was based on natural dyes added with nano-TiO2 that were successfully made. The presence of carbon, oxygen, and phosphorus elements in TiO2 causes the charge delivery distance to be shorter to increase the electric current. Our best device, one layer of TiO2 and annealing at 300 °C, has the highest performance than other dye pigments extracted from different plants.

Table 4 The DSSC parameters of the devices obtained with different natural dyes extraction

Conclusion

In this study, Inthanin bok leaves dye consists of natural pigments and these pigments are used as natural dyes sensitizers for solar cells. The energy-dispersive X-ray spectroscopy was confirmed the elemental of the TiO2 nanoparticles and natural dyes from Inthanin bok leaves. SEM images result clearly indicate the surface and morphology of natural pigments and TiO2 nanoparticles. The laser scanning microscopy results also revealed that the noninvasive spectroscopic methods are important for monitoring the physiological state of natural dyes coated on the nano-TiO2 assembled DSSC. Moreover, the highest efficiency of the pigments extracted from Inthanin bok leaves is 1.138% ± 0.018, which the condition of 1 layer of TiO2 nanoparticles and the temperature; 300 °C. Thus, this study recommends that chlorophylls and carotenoids have good potential to be photosensitizers in DSSC. Natural pigments are cheap, safe, environmentally friendly, easily found, and easy extraction process. It can be concluded that naturally synthesized pigment-based DSSC will be the next generation of bio-solar in the near future, overcoming conventional energy sources.