Introduction

In recent decades, rising environmental pollution and the overuse of natural resources have heightened the urgency to develop sustainable and innovative green energy solutions1,2. This shift aims not only to preserve the dwindling reserves of fossil fuels but also to mitigate the progression of climate change, particularly the harmful effects associated with the use of fossil fuels3,4. Among the potential alternatives, hydrogen (H₂) gas has garnered significant attention as a clean energy source5,6. Its appeal lies in its ability to generate energy without releasing harmful by-products, making it a cornerstone in the pursuit of eco-friendly energy solutions7,8. The continued development of advanced photocatalytic materials and electrode designs holds great promise for the future of sustainable energy. By overcoming the current challenges in stability and charge recombination, researchers can provide a sustainable solution to the global energy crisis9. The development of cost-effective, durable, and highly efficient photocatalysts will be essential for the large-scale deployment of H₂ production technologies10.

Hydrogen gas stands out under high energy density for sustainable production via photocatalysis. By harnessing solar energy, photocatalysis in the form of specialized electrodes is applied for the H2 gas. Despite its promise, the commercial adoption of H₂ production through photocatalysis faces significant challenges, particularly in maintaining stability and achieving efficient production rates. Addressing these issues is critical for the widespread implementation of H₂ as a viable green energy alternative11. Water electrolysis under an applied voltage is a primary method for producing H₂ gas. This technique accelerates oxygen production, a crucial step in H₂ production. Recent advances have introduced innovative approaches that combine photocatalysis with water splitting to enhance efficiency and reduce energy consumption12. By employing various types of electrodes, such as metal sulfides, metal oxides, and polymer-based semiconductors, researchers have developed cost-effective solutions with superior optical properties for H₂ generation13,14. Enhancing active sites is one key strategy for estimating the efficiency of photocatalytic materials15,16,17. This has been evaluated by developing novel material morphologies, including core-shell structures, mushroom-like shapes, and satellite configurations. These unique designs facilitate excellent photon absorption and more effective charge separation, which are critical for efficient photocatalytic reactions18. However, despite these advancements, challenges such as material degradation and rapid photogenerated charge recombination carriers continue to limit the performance of photocatalytic systems19.

To evaluate the photocatalytic properties of these materials, promising semiconductors such as Bi2WO6, Bi₂MoO6, and Bi2O3 have been extensively studied due to their remarkable photocatalytic activity20. These materials are known for their narrow bandgaps, efficient charge carrier separation, and strong light absorption in the visible spectrum, making them highly suitable for photocatalytic applications. Among these, Bi₂MoO6 and Bi₂WO₆, belonging to the Aurivillius oxide family, exhibit excellent optical properties, with bandgaps typically ranging from 2.4 eV to 2.8 eV, allowing them to absorb a significant portion of visible light. Their layered structures facilitate efficient charge transfer, which is crucial for enhancing photocatalytic performance. Meanwhile, Bi₂O₃, with its superior electron mobility and oxidative potential, further enhances the efficiency of photocatalytic reactions. These semiconductors can be effectively utilized as photocathodes for the water-splitting reaction under reduction conditions21,22. When exposed to light, they generate electron-hole pairs, which drive the hydrogen evolution reaction (HER) by reducing water molecules into hydrogen gas. Their ability to efficiently harness solar energy and convert it into chemical energy makes them promising candidates for renewable hydrogen production, contributing to the development of sustainable energy solutions.

A broad spectrum of electrodes to optimize H₂ production, including noble metals, non-metals, carbon-based materials, and polymer-based semiconductors. Doped transition metal oxides combined with polymer matrices are of particular interest, demonstrating the ability to achieve a high-band vacuum energy level of approximately 1.2 eV. This energy level is ideal for facilitating effective photocatalytic reactions. Nevertheless, the performance of polymer-based materials is highly dependent on the electrolyte used, which directly impacts the resulting current density. Optimizing the interaction between the polymer-electrolyte is essential for maximizing the efficiency of H₂ production23. Despite the progress in developing advanced materials and novel electrode designs, several challenges persist in the large-scale production of H₂ gas through photocatalysis. Material stability remains a significant concern, as many photocatalysts suffer from degradation over time due to exposure to harsh reaction conditions. Additionally, the rapid photocarrier recombination reduces the overall efficiency of the process. To address these issues, researchers are focusing on developing robust photocatalysts with enhanced stability and strategies to suppress charge recombination24,25. Porous nanostructures have gained significant attention for their exceptional performance in photocatalytic H₂ production. Their high porosity offers an expanded surface area, facilitating enhanced light absorption and more efficient charge transport. Integrating materials with diverse morphologies—such as nanowires, nanotubes, and nanoplatelets—not only increases the number of active sites but also optimizes light-harvesting efficiency. This synergistic effect significantly boosts the overall effectiveness of hydrogen generation, making these nanostructures highly promising for sustainable energy applications25,26.

Previous studies have explored various materials for H₂ gas generation, including TiO₂ and MoS₂27,28. However, a significant limitation of these materials is their reliance on potent acidic or basic agents, such as H₂SO₄, as sacrificial reagents. These harsh conditions can induce corrosion in the electrodes, ultimately reducing the lifespan of the photocathodes and compromising their long-term efficiency. This issue presents a substantial barrier to the practical application of these materials in sustainable H₂ production.

In contrast, our research team has focused on developing polymer-based composites to address these challenges. Recent work includes using polypyrrole-graphene oxide and poly-2-aminothiophenol-metal oxide composites29,30. These polymers offer enhanced stability and corrosion resistance as great applied photocatalysts. However, despite these advantages, the overall production of H₂ remains limited, indicating that further optimization is needed to achieve higher efficiency. Our ongoing efforts aim to enhance the performance of these polymer composites by improving their active surface area, charge transport properties, and stability to overcome current limitations and advance the field of green hydrogen production.

Herein, a novel and highly efficient photocathode of spherical Bi2MoO6-Bi2O3/P1HP C-S nanocomposite is fabricated through a two-step process. The synthesis involved the initial formation of Bi2MoO6-Bi2O3 nanostructures, followed by the polymerization of P1HP to create the final composite. Comprehensive analyses were conducted to evaluate elemental oxidation states, particle size, crystallite size, and optical properties, confirming the nanocomposite’s suitability for photocatalytic applications. The Bi2MoO6-Bi2O3/P1HP C-S photocathode is tested for hydrogen gas (H₂) production using sanitation water as an electrolyte in a three-electrode electrochemical cell. Electrochemical measurements are performed under various lighting conditions, utilizing full-spectrum white and single-wavelength photons to assess the photocathode’s performance. This innovative photocathode offers a significant dual benefit: it supports eco-friendly hydrogen production while utilizing sanitation water, a harmful waste source, contributing to sustainable energy generation and wastewater management. Its straightforward, cost-effective fabrication process, broad optical absorption spectrum, and high catalytic efficiency for large-scale applications in green hydrogen production align with global efforts toward renewable and sustainable energy solutions.

Materials and methods

Materials and devices used

1 H-pyrrole (99.9%, Across, USA), sodium molybdate (Na2MoO4, 99.9%, El-Nasr, Egypt), dimethylformamide (DMF, 99.9%, Sigma Aldrich, USA), hydrochloric acid (37%, Merck, Germany), bismuth nitrate (Bi(NO3)3, 99.9%, Pio-Chem Co., Egypt), ammonium persulfate ((NH4)2S2O8, 99.9%, Pio-Chem, Egypt), acetic acid (CH3COOH, 99.9%, Merck, Germany), ethanol (C2H5OH, 99.9%, Pio-Chem, Egypt), and ethylene glycol (C2H6O2, 99.9%, El-Nasr, Egypt).

The devices used for estimating the chemical structure include the FTIR device (Bruker, Germany), with analysis performed over the range of 500 to 4000 cm⁻¹, and the XRD X Pert (Holland) for crystalline estimation and size evaluation in the range of 10 to 80°. The XPS device (Kratos, UK) was also used for surface analysis. Morphological evaluations were carried out using SEM (Zeiss, Germany) and TEM (JEOL, Japan), while optical properties were assessed using the Perkin Elmer optical device (USA). The electrochemical measurements were conducted using a CHI608E device (USA).

The Preparation of Bi2MoO6-Bi2O3 nanomaterials

The synthesis of Bi2MoO6-Bi2O3 nanomaterials is carried out through a reflux process at 200 °C. The starting materials, correspondingly, include Bi(NO3)3 and Na2MoO4 of 0.04 M and 0.02 M. These materials are combined with a solution containing acetic acid, ethanol, and ethylene glycol, each of which is added in a volume of 20 ml to the mixture. The reaction mixture is subjected to reflux for 6 h, during which a deposition forms, indicating the successful synthesis of Bi2MoO6-Bi2O3. The resulting product is a pale yellow suspension of fine nanomaterials. This pale yellow color suggests the formation of Bi2MoO6-Bi2O3 nanoparticles suspended uniformly in the solution. The use of acetic acid, ethanol, and ethylene glycol not only helps in maintaining the appropriate pH but also aids in controlling the morphology of the nanomaterials during the reflux process. The controlled temperature of 200 °C and the reflux duration are critical in promoting the effective interaction between Bi(NO3)3·5H2O and Na2MoO4, resulting in the desired nanocomposite.

Bi2MoO6-Bi2O3/P1HP C-S nanocomposite fabrication

The fabrication of the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite is achieved through the direct oxidation of 1 H-pyrrole, which forms a shell around the suspended Bi2MoO6-Bi2O3 particles, acting as the core. This core-shell nanocomposite is synthesized in a 1.0 M acetic acid (CH3COOH) medium. 1 H-pyrrole is first dissolved in 20 ml of the Bi2MoO6-Bi2O3 suspension to initiate the reaction. In a separate beaker, the oxidizing agent, ammonium persulfate ((NH4)2S2O8), is dissolved to a final concentration of 0.14 M. Once both solutions are prepared, the oxidizing agent is gradually added to the 1 H-pyrrole solution for the P1HP shell construction that effectively coats the Bi2MoO6-Bi2O3 particles. As a result, the Bi2MoO6-Bi2O3/P1HP core-shell nanocomposite is formed on the glass slide substrate, as depicted in Fig. 1(a). This material is fabricated as a photocathode for light trapping and photocatalytic hydrogen generation.

Bi2MoO6-Bi2O3/P1HP core-shell nanocomposite photocathode for the electrochemical hydrogen generation

Green hydrogen generation relies on water splitting, but using unconventional sources such as wastewater presents a significant challenge, as it transforms waste into renewable energy resources. The metals in wastewater motivate ions’ mobility when applying an external potential, thereby promoting the water-splitting reaction. The composition of these metals is outlined in Table S1. The sanitation water is third-stage treated water provided by the Water and Sanitation Company of Beni-Suef University, Egypt.

To effectively carry out the water-splitting process through a three-electrode constructed cell, in which the Bi2MoO6-Bi2O3/P1HP core-shell nanocomposite thin-film photocathode is immersed in the wastewater electrolyte (sanitation water). The construction details of the cell are illustrated in Fig. 1(b). The cell operates under light illumination, where photons are absorbed and trapped by the surface of the Bi2MoO6-Bi2O3/P1HP thin-film photocathode. These absorbed photons are used to drive the water-splitting reaction, leading to the generation of H2 on the photocathode’s surface because of the reduction reaction with a rate determined by the Jph, which reflects the number of hot electrons generated during the water-splitting process. These values are measured using linear sweep voltammetry with a CHI station. The higher the Jph value, the more efficiently the photocathode converts light into chemical energy, producing more hydrogen gas.

The total amount of hydrogen gas generated is estimated under Faraday’s law of electrolysis, which quantifies the charges passing through the cell to calculate the H2 produced during the reduction reaction. Faraday’s law directly correlates the electric charge and the amount of hydrogen generated, ensuring an accurate assessment of the process. This relationship is expressed in Eq. 131, allowing for precise monitoring and optimization of the hydrogen production rate. By leveraging the metals in wastewater and the efficient photocatalytic properties of the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite, this method offers a promising approach for generating green hydrogen, potentially turning wastewater into a viable energy source. In conjunction with light-driven photocatalysis, the system’s design makes this technology a forward-thinking solution in the renewable energy landscape. The F is the faraday constant that reflects the total electric charge carried by one mole of electrons.

$${H_2}\,\,mole = \int_0^t {{J_{ph \cdot }}} dt/F$$
(1)
Fig. 1
figure 1

(a) Synthesis process and (b) photo-electrochemical cell used for H2 production from sanitation water, utilizing the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite.

Results and discussion

Physicochemical characterization

The functional groups of the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite, relative to its components, Bi2MoO6-Bi2O3 and P1HP, are analyzed through vibrational bands using FTIR spectroscopy, as shown in Fig. 2(a). For P1HP, distinct bands are identified, with the N-H group appearing at 3390 cm−1. Additional bands related to the polymer’s ring structure are observed at 1545, 1463, 1312, 1177, and 1045 cm−1 1. The Bi2MoO6-Bi2O3 inorganic material shows characteristic bands corresponding to the interactions between Bi or Mo and oxygen atoms, where the Bi-O bond appears at 875 cm−1, and Mo-O bonds are detected at 1081 and 1204 cm−1. Also, the Mo-O-Bi bond is evaluated at 1390 and 1644 cm−1.

When forming the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite, the bands associated with P1HP and the Bi2MoO6-Bi2O3 material are present, with slight shifts. These shifts indicate a strong interaction between the components, as the inclusion of the inorganic materials significantly influences the bond vibrations in P1HP, leading to these shifts. Table 1 provides a detailed summary of these shifts. The out-of-plane bands initially observed at 910 nm appear at 877 cm⁻¹ and 782 cm⁻¹. These vibrations correspond to the aromatic backbone of P1HP, signifying the presence of well-organized polymeric chains32.

Table 1 The estimated band related to the FTIR for the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite relative to both the Bi2MoO6-Bi2O3 and P1HP materials.

The crystallinity of the fabricated Bi2MoO6-Bi2O3/P1HP C-S nanocomposite is analyzed using XRD pattern (Fig. 2(b)). The XRD-evaluated peaks indicate the nanocomposite’s high crystallinity. The distinct crystalline peaks correspond to the various materials inside the composite. Bi2MoO6 exhibits prominent crystalline peaks at 12.4°, 20.0°, 28.1°, 34.8°, 38.7°, 47.3°, 55.5°, and 58.5°, which align with the growth directions (020), (111), (131), (006), (151), (202), (331), and (262), respectively, JCPDS card no. 21–010236. Alongside this, the presence of Bi2O3 is confirmed by the crystalline peaks at 32.0°, 41.5°, 43.4°, 51.5°, 64.1°, 68.8°, 75.3°, and 76.9°, corresponding to the growth directions (123), (332), (422), (530), (136), (642), (800), and (028), respectively37. These peaks appear in the XRD pattern of the Bi2MoO6-Bi2O3 material (red curve), though at lower intensities, reflecting the total crystalline behavior of the composite. The composite’s crystallinity improvement suggests strong chemical interactions between the organic polymer P1HP and Bi2MoO6-Bi2O3. The pure P1HP itself exhibits an amorphous broad peak structure estimated at 26.6°. This peak is slightly shifted to 26.5° in the composite, signifying enhanced crystallinity due to composite formation33. When the Bi2MoO6-Bi2O3 components are integrated into a P1HP structure, interactions between the materials can lead to changes in the lattice parameters, which may cause shifts in the diffraction peaks. This indicates a change in the crystallographic structure, often leading to improved crystallinity. The crystalline size (D) of the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite was determined by Scherrer equation (Eq. 2)38,39, based on the peak at 2θ = 28.1° and the full-width half maximum (β). The calculated 35 nm of the crystal, highlighting the nanoscale nature of the composite.

$$\:\text{D}\:=\:0.9{\uplambda\:}\:/\:{\upbeta\:}\:\text{c}\text{o}\text{s}{\uptheta\:}$$
(2)
Fig. 2
figure 2

(a) XRD and (b) FTIR of the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite compared to its components, Bi2MoO6-Bi2O3 and P1HP.

XPS is employed to further analyze the oxidation states and the estimated primary heavy metals within the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite. The total survey, shown in Fig. 3(a), provides an overview of the material, specifically Bi, Mo, O, C, and N, that identified their characteristic binding energies corresponding to their respective orbitals. In the pristine P1HP polymer, the atomic structure consists mainly of C and N detected at 285 eV and 400 eV, for the 1 s orbitals of carbon and nitrogen, respectively.

The doublet peaks in Fig. 3(b) identified the Bi element. The peaks at 159.8 eV and 160.8 eV estimated to Bi4f5/2, indicate the presence of Bi3+ in both Bi2MoO6 and Bi2O3. Additionally, the Bi4f7/2 peaks at 164.8 eV and 165.8 eV, further support this assignment. The presence of Mo6+ within Bi2MoO6 was detected through the Mo3d orbital, with peaks at 232.7 eV and 235.7 eV for Mo3d3/2 and Mo3d5/2, respectively (Fig. 3(c)). Based on these evaluations, the chemical structure of the synthesized Bi2MoO6-Bi2O3/P1HP C-S nanocomposite is confirmed for the composite formation. The elemental composition analysis revealed that molybdenum, bismuth, and oxygen were present at approximately 1.08%, 2.21%, and 24.12%, respectively. In addition, carbon, nitrogen, and chlorine were detected with corresponding percentages of 60.07%, 12.42%, and 1.09%.

The optical properties of the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite are evaluated by analyzing its absorbance in comparison to its components, Bi2MoO6-Bi2O3 and P1HP (Fig. 3(d)). The nanocomposite demonstrated strong absorbance, extending into the IR region, which is attributed to the synergistic optical behavior of its organic and inorganic constituents. This enhanced absorbance is due to electron transitions triggered by light exposure to generate active electrons on the composite’s surface under photon illumination. The nanocomposite’s morphology further amplifies this absorbance.

In contrast, the inorganic materials exhibit absorbance predominantly in the visible region, while pristine P1HP shows absorbance limited to the UV spectrum. Through these absorbances, the evaluated bandgap is calculated through Fig. 3(c) based on Eq. 340,41. The Bi2MoO6-Bi2O3/P1HP C-S nanocomposite has a bandgap of 1.75 eV that is promising for optical and photocatalytic applications. Through this evaluation, the absorption coefficient (α), positions the composite as an ideal material for such evaluations.

$$\:{\upalpha\:}\text{h}{\upnu\:}\:=\:\text{A}(\text{h}{\upnu\:}-{E}_{g}{)}^{1/2}$$
(3)
Fig. 3
figure 3

XPS spectra of the synthesized Bi2MoO6-Bi2O3/P1HP C-S nanocomposite: (a) survey spectrum, (b) Bi4f orbital, (c) Mo3d orbital, and (d) optical analysis of the composite.

The P1HP polymer exhibits a spherical, highly porous structure that reflects its extensive and uniform surface area, as shown in Fig. 4(a). This porous nature provides an additional advantage by enabling the incorporation of other materials into its framework, facilitating the formation of high-quality composite materials42. Similarly, the SEM image of Bi2MoO6-Bi2O3, presented in Fig. 4(b), reveals uniformly distributed nanoparticles with distinct features of irregular shape and porosity, further highlighting its large surface area, which is well-suited for composite formation.

Figures 4(c) and 4(d) display the SEM and TEM images of the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite, respectively. The SEM images show a mushroom-like morphology characterized by roughness with ~ 200 nm in size and large agglomerated structures separated by small pores. These rough surfaces significantly enhance the active site area, which reflects the high efficiency of photocatalytic reactions and hydrogen (H₂) gas production.

The TEM images further validate the high integration of Bi2MoO6-Bi2O3 within the P1HP polymer matrix. The dark regions observed, averaging around 35 nm in size, confirm the well-dispersed blending of the polymer and nanoparticles. This seamless incorporation contributes to the superior properties of the nanocomposite, making it highly effective for photocatalysis and sustainable H₂ production. The SEM and TEM analyses underscore the composite’s unique structural features, enhancing its functionality and potential for advanced applications.

Due to its optimal and promising particle size, this composite is highly effective for light absorption. The small particles with abundant active sites efficiently capture photons and facilitate photon energy transfer to these active regions. This process drives the generation of photocarriers through energy level splitting. Thus, the well-designed particle size is a key advantage, making the composite highly suitable for photon reception and energy conversion.

Fig. 4
figure 4

SEM images showing the 3D morphological analyses of (a) P1HP, (b) Bi2MoO6-Bi2O3, and (c) Bi2MoO6-Bi2O3/P1HP C-S nanocomposite, along with (d) TEM image of the nanocomposite.

Photocathodic efficiency of Bi 2 MoO 6 -Bi 2 O 3 /P1HP C-S nanocomposite for H₂ gas generation

The Bi2MoO6-Bi2O3/P1HP C-S nanocomposite photocathode demonstrates exceptional efficiency in hydrogen (H₂) gas generation through electrochemical evaluation under light illumination. Using linear sweep voltammetry (LSV), the performance of this photocathode is illustrated by comparing the current density produced under various light conditions. This nanocomposite’s remarkable efficiency is attributed to its minimal material requirements and a narrow bandgap of 1.75 eV. The small bandgap harnesses over 50% of the sunlight spectrum, absorbing photons across different optical regions. These photons provide energy to excite electrons, driving them to higher energy states, thereby creating a strong electric field that permeates the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite.

The generated electric field fluctuates under varying optical conditions, producing additional “hot” electrons that interact with the surrounding solution, enhancing the reduction to H₂O. To further evaluate the photocathode’s performance, current densities under both dark and illuminated conditions are recorded (Fig. 5(a)). The evaluated − 0.34 mA/cm² in the dark and − 0.45 mA/cm² under illumination for Jph, indicate the electron-hole pairs that drive in opposite directions under an applied potential, ultimately facilitating the reduction process in wastewater, where electrons contribute to H₂ gas production43.

The dark current reflects the intrinsic properties of the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite, composed of semiconducting materials. Each component contributes its electrons to establish the overall semiconducting nature of the composite. The observed variations in current density under illumination highlight the photocathode’s sensitivity to incident light. Figure 5(b) illustrates the sequential rise and fall of current density as light alternates on and off, emphasizing the photocathode’s responsiveness to light and its ability to generate H₂ gas efficiently.

The alternating current densities reflect the photocathode’s high sensitivity and demonstrate its stability. These fluctuations indicate that the composite materials, including oxides and polymers, maintain their structural integrity and performance under varying light conditions. The consistent response under controlled potential further suggests that the photocathode is well-suited for practical applications in hydrogen production. Combining Bi2MoO6 and Bi2O3 with the P1HP polymer provides a synergistic effect that enhances the optical absorption and the catalytic activity necessary for sustainable hydrogen generation.

So, the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite photocathode exhibits high efficiency in using light energy to estimate chemical energy for H₂ gas production. Its narrow bandgap, ability to utilize sunlight, and stable current response under varying illumination conditions allow it to convert this wastewater into H2 efficiently. The robust performance under all light conditions highlights its potential for large-scale hydrogen production using renewable energy sources.

Fig. 5
figure 5

Performance of Bi2MoO6-Bi2O3/P1HP C-S nanocomposites under different optical conditions: (a) comparison of current density in dark and illuminated environments, and (b) response to chopped light illumination.

To further evaluate the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite photocathode performance in hydrogen (H₂) gas production, the current density generated under various optical wavelengths was analyzed, as illustrated in Fig. 6(a). The impact of varying wavelengths on H₂ generation is evident through changes in current density, with the production of “hot” electrons driven by incident photons. This behavior is characteristic of semiconductor materials, making the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite an ideal candidate for photogeneration processes.

The optimal current density of −0.42 mA/cm² is achieved at a wavelength of 340 nm. This wavelength corresponds to high photon energy and frequency, significantly enhancing photogeneration. The elevated photon energy at 340 nm facilitates the excitation of many electrons, thereby promoting effective reduction reactions and increasing the current density to its peak value.

The current density gradually declines as the wavelength increases from 340 nm to 730 nm. This reduction is a direct consequence of the diminishing photon energy, which becomes less effective in exciting electrons to higher energy states. Despite the reduced photon energy, the absorbed photons still provide enough energy to drive the transition of electrons. These electrons contribute to the electric field estimation within the nanocomposite, enabling the continued production of H₂ gas.

The relationship between photon energy, frequency, and current density is further demonstrated through the sequential decrease in current density as the wavelength increases. This trend confirms the ability of the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite to harness photon energy effectively, transferring it to electrons for further excitation and subsequent electric field estimation. The resulting field provides a crucial role in facilitating the reduction process necessary for H₂ gas production21.

Under these conditions, the photocathode’s interaction with wastewater is critical, as the generated electrons participate in the reduction reactions required to produce H₂ gas. Figure 6(b) illustrates the various current density values through different wavelengths, highlighting the nanocomposite’s sensitivity to changes in optical energy. The gradual decline in current density through 340 to 730 nm reflects the reduced availability of photon energy, which impacts the overall efficiency of H₂ gas generation.

Fig. 6
figure 6

The behavior of Bi2MoO6-Bi2O3/P1HP C-S nanocomposites under various optical wavelength conditions: (a) current density measurements across different wavelengths.

The Bi2MoO6-Bi2O3/P1HP C-S nanocomposites demonstrate remarkable behavior in wastewater splitting due to their sequential electron and hole transport mechanism, as illustrated in Fig. 7(a). The energy level differences between P1HP, Bi2MoO6, and Bi2O3 facilitate electron cloud formation on Bi2O3 material (dark area), while holes migrate to P1HP (opposite direction) (grey area). This process results in the formation of electron clouds on the Bi2O3 surface, creating a robust electric field that encapsulates the nanomaterials. These “hot” electrons are then primed to induce reduction reactions, specifically targeting the wastewater for hydrogen (H₂) production. This sequential electron flow ensures a continuous and efficient H₂ generation44.

The porous nature of the Bi2MoO6-Bi2O3/P1HP C-S nanocomposites enhances their capacity for photon trapping, making them highly effective in absorbing incident photons. The pores within the composite capture photons and facilitate the transfer of photon energy to the material, thereby promoting the electron-hole estimation. This photon-induced splitting phenomenon significantly contributes to the wastewater splitting process. The incorporation of P1HP significantly enhances the performance of the nanocomposite by acting as both an effective hole acceptor and a protective coating. This dual functionality plays a crucial role in suppressing charge carrier recombination, thereby improving the overall efficiency and stability of the hydrogen evolution process. Simultaneously, it provides anticorrosion properties, enhancing the composite’s durability and efficiency45.

Utilizing wastewater as an electrolyte offers a sustainable and economically viable approach, as it converts a potentially harmful resource into a valuable one. The ions present in the wastewater exhibit high mobility under an applied potential, driving the formation of hydroxide (OH⁻) ions, which are subsequently reduced to H₂ gas46. Beyond the technical benefits, wastewater’s abundant and cost-free nature underscores its potential as a green and eco-friendly resource. This approach belongs to the principles of green chemistry, emphasizing sustainability and environmental stewardship. This study serves a dual purpose: first, addressing the treatment of sanitation water, and second, converting it into green hydrogen gas, offering both environmental and energy benefits.

The amount of H₂ gas produced is determined using Faraday’s law of electrolysis, as represented by Eq. 1 in Fig. 7(b). This estimation is based on the total charge passing through the system, which is directly related to the behavior of the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite photocathode during wastewater reduction. The transferred charge is reflected in the measured Jph, which is utilized in Faraday’s law to calculate the amount of hydrogen gas generated. The results indicate a production of approximately 2.5 µmol h−1 cm−2 of H₂ gas, a substantial yield generated on the surface of the Bi2MoO6-Bi2O3/P1HP photocathode. This significant production rate highlights the potential of polymer-based nanocomposites as cost-effective materials for hydrogen generation, particularly in remote or underserved areas. The study demonstrates that these materials can efficiently provide renewable energy solutions, making them highly promising for future applications in sustainable energy production. These advantages position the fabricated Bi2MoO6-Bi2O3/P1HP C-S nanocomposite photocathode as a state-of-the-art material for photocatalytic H₂ production. It performs better than previously reported materials like CuO-C/TiO₂ and polypyrrole-graphene oxide composites30,47, achieving a H₂ generation rate of approximately 1.0 µmol h−1 cm−2. Additional studies, as presented in Table 2, highlight the notable efficiency of this study in comparison to related literature.

Fig. 7
figure 7

(a) Sequential transfer of electrons and holes across the surface of the Bi2MoO6-Bi2O3/P1HP photocathode, and (b) the amount of H₂ generated in moles by this photocathode.

Table 2 Compared to other studies, the electrochemical performance of Bi2MoO6-Bi2O3/P1HP C-S nanocomposite photocathode.

Conclusions

A two-step process has prepared a highly promising Bi2MoO6-Bi2O3/P1HP C-S nanocomposite. The first step involved the preparation of Bi2MoO6-Bi2O3 nanostructures, followed by the polymerization of poly(1 H-pyrrole) on their surface to form the complete composite. This nanocomposite exhibits exceptional structural and optical properties, with nanoparticles of approximately 200 nm, a crystalline size of 35 nm determined by XRD, and a well-defined optical bandgap of 1.7 eV. These attributes make it an excellent material for renewable energy, particularly in photocatalytic hydrogen production. The Bi2MoO6-Bi2O3/P1HP C-S photocathode was evaluated for hydrogen gas (H₂) production using sanitation water as the electrolyte inside the electrochemical cell. The photocathode demonstrated impressive catalytic performance, achieving an H2 rate of 2.5 µmol h−1 cm−2. To assess its efficiency further, the Jph, which is directly related to the rate of hydrogen evolution, was measured under various lighting conditions. Under full-spectrum white light, the Jph reached − 0.45 mA/cm², while monochromatic light at 340 nm maintained a high Jph of −0.42 mA/cm². These results highlight the photocathode’s consistent efficiency across different wavelengths, confirming its versatility in solar energy harvesting.

In addition to its high efficiency, this photocathode offers significant environmental benefits. It enables eco-friendly hydrogen production while utilizing sanitation water, a harmful waste source, as an electrolyte. The straightforward, cost-effective fabrication process, with its wide optical absorption range and excellent catalytic properties, positions the Bi2MoO6-Bi2O3/P1HP C-S nanocomposite as a promising solution for sustainable H2 and wastewater valorization. Our team is currently working on designing a prototype capable of sustained hydrogen gas generation over extended periods, with plans to conduct large-scale performance evaluations in the near future.