1 Introduction

In light of the terrible spread of multiple industries and the widespread use of different toxic elements, the level of pollution in the world increases with days. For this, the protection of the environment by developing global standards increases alongside [1], in order to reach easy and inexpensive solutions to reduce the spread of pollution and try to control it. Many researchers are trying to find simple and leading solutions to remove organic compounds from industrial waste that affect the ecosystem and pollute water [2].This is what made the global market compete to produce easy-to-manufacture, highly effective materials.

It is now recognized that materials are often the limiting factor in bringing a new technical concept to fruition; thus, conducting and semiconducting polymers are frequently the materials of choice in these demanding applications. Among the most widely employed polymers are polyaniline (PANI) [3], polypyrrole [4], and polythiophene [5], due to their high conductivity efficiency, high stability, unique electrical, optical, and electro-optical properties, simple ease of preparation technique, and also their potential applications.

Moreover, PANI is one of the most commonly used polymers in many different applications [6,7,8] and has been widely mentioned in much literature as an effective polymer from semiconductors [9], to eliminate dyes and improve the rate of photocatalytic activity [10].

Recently, the photocatalytic degradation technique has attracted wide attention for the removal of organic dyes and toxic organic compounds as compared to other methods due to its effectiveness, ease of operation, lower cost, non-selective degradation, and high efficiency [11]. Photocatalysis is based on absorbing the light of semiconductor photocatalysts by exciting the electrons from the valence band (VB) to the conduction band (CB) and then creating electron–hole pairs [12]. Those electrons and holes degrade the organic dye molecules absorbed on the surface of the photocatalyst by starting a redox reaction with water and oxygen [13].

The high mobility of charge carriers and the high absorption efficiency of PANI in visible light indicate good electron donors and electron–hole vectors when excited by visible light [14]. Moreover, to achieve effective results, more efforts are being dedicated to preparing multi-component nanocomposites based on PANI for better functionality efficiency and wider applications rather than being dependent on mono-compounds. Shaheen et al. [15] reported that the fabrication of PANI nanocomposite with nanostructured compounds is an efficient approach that not only tunes the conductive feature of the hybrid but also improves the stability of the PANI against the tedious cyclic tests. Therefore, carbon nanocomposites such as graphene [16], graphene oxide (GO) [17], and reduced-graphene oxide (rGO) [18] are often incorporated due to their high efficiency. Chaudhary et al. [19] mentioned that the addition of graphene to nanoscale ZnO enhanced its photo-catalytic property due to the significant co-catalyst ability of graphene to exhibit good pollutant adsorption.

The rGO is one of the most widely used compounds in removing dyes under visible light and photocurrent processes and has also been widely applied to remove and detect heavy metals, which has been mentioned in many kinds of literature [9] thanks to its high active surface area (2630 m2 g−1) and superior charge carrier mobility (200,000 cm2 vs−1) [15] with excellent structural, electronic, mechanical, and optical properties. Ng et al. [20] have synthesized in one step a PANI–rGO nanocomposite by an electropolymerization process. Thanks to the π–π interactions of graphene, it can act as a rapid electron transfer channel in the nanocomposite, leading to a remarkable improvement in photoconversion efficiency. Therefore, PANI is attached to the rGO nanosheets to support further photoconversion sites for pollutant ions by nitrogen-containing functional moieties such as amine (–NH–) and imine (=N–) [21, 22]. However, the accumulation of graphene nanosheets with PANI also enhances the mechanical strength of the resulting composites [23].

Interestingly, the bonding between graphene and PANI leads to the strengthening of the quality of conductivity, allowing more surface recognition sites to be solidified and achieving a high affinity for binding polluting ions when PANI is combined with rGO [24]. The rGO-based composites have been used for the degradation of various anionic [25] and cationic [26] dyes under visible light.

In addition, antibacterial properties were reported for both PANI and PANI–rGO films [27]. As is well-known, graphene and its other derivatives have extraordinary potential for many applications, including biological applications. Several researchers have investigated their antibacterial properties, which are demonstrating their promise in the biomedical and smart food packaging fields [28,29,30]. Consequently, many studies are being prepared on new nanocomposite thin films by integrating the rGO with a base material, such as PANI, to enhance the antibacterial properties of these nanocomposites and improve their sterilization capabilities, where the photocatalysts interact with the active species under photo-irradiation, which can degrade toxic dyes and bacterial cell walls into nontoxic simple constituents because of their similar organic composition. The active species, especially hydroxyl free radicals, degrade lipids, carbohydrates, and protein contents of the bacterial cell wall, damaging its membrane and releasing the K+ ion, which in turn leads to the death of the bacteria [31]. Rahman et al. [32] concluded in their experimental results that these materials can be used as effective photocatalysts for the photodegradation of dye pollutants under sunlight irradiation and as antibacterial agents against Klebsiella pneumonia, Proteus vulgaris, and Staphylococcus aureus.

Herein, we successfully fabricated efficient electrochemical thin films by combining PANI’s electro-catalytic properties and the extended surface sites with high kinetics of charge exchange and high rGO conductivity on the ITO substrate by the electrodeposition method. We modified the well-known Hammer method to synthesize a high-quality rGO. The efficiency of electronic transmission of composite nanomaterials was improved by increasing the 3D structure of the rGO groups, which increased their effective surface area. The interaction between nanomaterials and the electrochemical activities of the prepared ITO/PANI and ITO/PANI–rGO composite photocatalysts were tested. Consequently, the behavior of ITO/PANI and ITO/PANI–rGO thin films was studied, and their photocatalytic performance was validated to degradation of Congo red (CR), analyzed their photocurrent generation, also improved antibacterial applications and their performance.

2 Experimental Details

2.1 Chemicals

All analytical reagents and aqueous solutions grades were used with distilled (DI) water. Graphite (size < 150 μm), Aniline (C6H5NH2) (99%), sulfuric acid (H2SO4) (96%), Potassium Permanganate (KMnO4), Hydrazine hydrate (N2H4), Hydrochloric acid (HCl) (37%), Hydrogen peroxide (H2O2) (30%), Acetone (C3H6O), and Ethanol (C2H5OH) were purchased from Sigma-Aldrich. KCl (0.1 M) was prepared in the laboratory. All culture media were purchased from Biochem (chemopharma). The gram-negative bacterium strain (E. coli ATCC 25922) was obtained from the biological laboratory of microbiology at Belhadj Bouchaib Aïn Temouchent University and preserved on Muller–Hinton agar at − 4 °C.

2.2 Synthesis of rGO

First, GO was synthesized chemically via a modified Hummers method [33]. In a typical procedure, concentrated sulfuric acid (24 ml) was placed in an ice bath, and graphite (1 g) was added with proper constant stirring. Under vigorous agitation, 3 g of potassium permanganate KMnO4 was added very slowly to keep the temperature lower than 20 °C. Subsequently, the mixture was transferred to a 40 °C bath with vigorously stirred for 30 min. at 90 °C, DI water (50 ml) was slowly added while stirring for 10 min. The color change to dark-brown, which indicates the formation of GO. A volume of 170 ml of DI water was added dropwise, followed by the slow addition of H2O2 (10 ml, 30%), after a few seconds, the color of the obtained solution changed to yellow. Finally, the GO precipitate collected was washed with DI water and HCl solution. The resulting solid was air-dried and stirred overnight in DI water, followed by sonication for 25 min. In order to remove the unexfoliated particles, the dispersed GO was centrifuged for 40 min.

After the synthesis of GO, it is transformed into rGO. GO (100 mg) was mixed with 100 ml of DI water, giving a yellowish–brown and inhomogeneous dispersion. Complete dispersion on this mixture was carried out using an ultrasonic homogenizer. Then a volume of 1 ml of hydrazine hydrate was added to the solution and the mixture was heated at 105 °C. A black solid precipitate of reduced OG gradually formed. The rGO is filtered off and washed thoroughly with DI water and EtOH.

2.3 Preparation of the Thin Films

The electrochemical measurements were made with a potentiostat/galvanostat Autolab PGSTAT 204 at room temperature. A multi-necked electrochemical cell (three-electrode assembly) was employed for the electrochemical deposition and measurements. The ITO substrates, saturated calomel electrode (SCE), and plate platinum were used as working, reference, and counter electrodes, respectively.

The thin film substrate was prepared following the protocol as shown in Scheme 1. Before starting thin film preparation, the ITO-coated glass substrates (20 mm × 10 mm × 1 μm) were carefully cleaned with acetone and DI water in an ultrasonic bath.

Scheme 1
scheme 1

Schematic illustration of the process of elaboration of the ITO/PANI–rGO thin film

The rGO stock solution was prepared by dispersing 20 mg of rGO in 20 ml of DI water. The electrolyte bath, which was well stirred, was composed of 0.5 M aniline, 1.0 M sulfuric acid, and 0.375 mg ml−1 rGO. The PANI and PANI–rGO nanocomposites were formed on the working electrodes using cyclic voltammetry (electropolymerization) with a scan rate of 50 mV s−1. After that, the electrodes were carefully rinsed with DI water.

2.4 Characterization Methods

The morphology was recorded by Field Emission Scanning Electron Microscopy (JEOL JSM 7600F). X-ray photoelectron spectroscopy (XPS) measurements were executed using a Thermo Scientific Kratos Axis Ultra spectrometer with monochromated AlKα radiation. Optical absorption spectra were carried out at 300–800 nm using a UV–Vis spectrophotometer (Cary 60 UV–Vis).

2.5 Photoelectrochemical Performance

The photoelectrochemical performance of these electrodes was recorded by illuminating the obtained electrodes from the solution side in an intermittent mode using a Xe lamp. Photocurrent-time responses of ITO/PANI and ITO/PANI–rGO under intermittent light on and off were investigated at increasing applied potentials values in a 0.1 M KCl solution.

2.6 Photocatalytic Activity

The performance of photocatalytic degradation was investigated using CR dye as an organic contaminant. Typically, CR adsorption is performed in the dark before exposing the solution to irradiation for photocatalysis. To evaluate the adsorption and photocatalysis of CR, the same-sized ITO/PANI and ITO/PANI–rGO thin films were dipped in CR dye under irradiation. The photocatalytic rate was studied by measuring the color intensity of the CR pollutant. 10 ml of different concentrations of CR solution are placed with ITO/PANI and ITO/PANI–rGO substrates at different irradiation intervals as a sample of the solution is withdrawn every 30 min and passed for evaluation using a UV–Vis spectrophotometer.

2.7 Antibacterial Activities

The antimicrobial activity of the prepared thin films has been tested against gram-negative bacteria E. coli ATCC 25922 by using the macrobroth method, following the procedure of the Time-kill method with some modification [34], by measuring the number of surviving microorganisms with time after exposure to the antibacterial agent. This procedure involves preparing a fresh suspension of tested microorganisms from pure spores grown overnight in nutrient broth at 37 °C. First, 1 ml of each suspension was mixed with 9 ml of Muller–Hinton agar in sterile test tubes and adjusted to 0.5 McFarland’s standards to obtain about 106 cells ml−1, and then the sterile thin film was put in and incubated at 37 °C. As a control test, we also treated the E. coli suspension with pure PANI and other E. coli cell aliquots. After that, a 100 µL aliquot was taken every 12 h and added to the 500 µL of the Muller–Hinton agar in sterile test tubes. Then, the mixture was incubated at 37 °C for 24 h. The bacterial colonies at different times were counted to estimate the number of surviving cells using the colony-forming unit (CFU) method by measuring the optical density of growth with a spectrophotometer (Agilent Technologies Cary 60 UV–Vis) at 600 nm.

3 Results and Discussion

3.1 Electropolymerization and Deposition Studies

The PANI electropolymerization is based on the redox equations at the working electrode interface. The basic reactions mechanism can be as follows:

$${\text{H}}_{{2}} {\text{SO}}_{{4}} \to {\text{2H}}^{ + } \, + \,{\text{SO}}_{{4}}^{{{2} - }}$$
(1)
$${\text{PANI}}\, + \,{\text{nSO}}_{{4}}^{{{2} - }} \to {\text{PANI}}^{{ + {2}}} :{\text{SO}}_{{4}}^{{{2} - }} \, + \,{\text{2ne}}^{ - }$$
(2)
$${\text{PANI}}^{{{2} + }} :{\text{SO}}_{{4}}^{{{2} - }} \, + \,{\text{2ne}}^{ - } \to {\text{PANI}}\, + \,{\text{nSO}}_{{4}}^{{{2} - }}$$
(3)

Figure 1a shows the cyclic voltammograms of ITO substrate in an acidic solution containing 0.5 M of aniline. The voltammograms were recorded under scanning potential ranges from − 0.1 to + 1.2 V vs. SCE. The growth of PANI on ITO substrates is shown on the typical with the redox peak attributed located during the potentiodynamic electropolymerization of PANI at around + 0.2 V and + 0.5 V for the first cycle. And the following scans in the next cycles showed increasing peaks corresponding to the oxidations and reductions of the PANI films (oxidative peaks (a1 and a2) coupled with reductive peaks (b1 and b2). However, the cyclic voltammograms well agreement with those already reported in the literature on the electro-polymerization of PANI [35]. The pair peaks are observed at 0.3 and 0.9 V vs. SCE in the third cycle clearly are associated with both PANI redox couples from its semiconducting state (leucoemeraldine) and to its conductive state (emeraldine), and the emeraldine to its full oxidation form (pernigraniline) [36].

Fig. 1
figure 1

Cyclic voltammograms of a PANI and b PANI coupled with rGO on ITO substrate. c The first and the last cycles of the PANI/rGO thin film

Figure 1b shows the voltammogram of ITO/PANI–rGO thin films recorded between − 0.56 and 1.2 V vs. SCE to favor the nanocomposite growth. During the electropolymerization process of PANI film, rGO diffused slowly to the PANI sites simultaneously where redox reactions take place. The good solubility and stability of the rGO suspension in the electrolyte allow a better insertion of the rGO into the PANI and the formation of more homogeneous thin films.

The rGO is formed in situ with the PANI on the ITO substrate after ion exchange subjected to 10 scans in the potential range. The results show two pairs of redox peaks increasing continuously with each cycle due to the transition between quinone/hydroquinone groups in rGO, which is typical for carbon [37]. Aniline monomers can be attached to rGO nanosheets via these functional groups of rGO. Moreover, the rGO nanosheets have good conductivity, which helped dramatically increase the current of the voltammogram cycles, as shown in Fig. 1b. The cycle voltammogram profile in Fig. 1c shows the oxidation peak of PANI–rGO located at 0.3 V and 0.5 V vs. SCE and the reduction peak at 0.05 V and 0.3 V vs. SCE for the first and last cycles. The large transition between the first and the last cycle demonstrates the increased electroactivity of the growth of the PANI–rGO film on the surface of ITO compared to the voltammogram of Fig. 1a, thus confirming the better conductivity of the PANI/rGO film and improving the electrical performance of the film. Although the high conductivity of PANI, the rGO sheets improve the high contact interface between the PANI and the electrolyte [38] and thus explain the difference in the voltammogram cycles due to the formation of the PANI–rGO film with a high specific surface area.

3.2 Surface Morphological Analysis

FESEM images were used to characterize the morphologies of the elaborated thin films, as indicated in Fig. 2. The Fig. 2a and b shows the appearance of the rGO surface and confirms the deposition of rGO layers on ITO. As can be observed in Fig. 2b, the wrinkle-like structure, crumpled, thin, and agglomerated sheets are closely associated with each other. The wrinkled structure observed in rGO sheets is due to the removal of intercalated functional groups in graphitic oxide during exfoliation. An average thickness of several nanometers significantly increased the thin film’s effective surface area. Thus, this result confirms that hydrazine hydrates have chemically reduced GO to form rGO [39].

Fig. 2
figure 2

SEM images of the thin films: a, b ITO/rGO layers, b, c ITO/PANI nanorods and d, e ITO/PANI–rGO

While Fig. 2c and d shows the surface morphology of the ITO/PANI thin film, which constitutes an interconnected network of PANI nanorods (NRs), represents a well-arranged and orderly uniform polymer chain structure, which makes this network useful for electron transport at the electrolyte–thin film interface [40]. Figure 2d shows an enlarged view of ITO/PANI NRs, which clearly shows the diameter of the PANI (around 110 nm) and the length of uniform size of about 1 μm. The acquisition of a more regular and uniform microstructure offers more active sites for the fixing of pollutants.

Figure 2e and f show the surface morphology of the ITO/PANI–rGO and an enlarged view of that thin film, respectively. It is noticeable in Fig. 2e that the layers of rGO that have been covered by PANI NRs are formed well-arranged and evenly dispersed. In Fig. 2f, with an enlarged view, we could observe the NRs of PANI that largely cover the layers of rGO and are embedded with them. We can say that it has formed bonds interaction between rGO and PANI NRs, this is what facilitates the electron transfer process. The point of the merging process is to form a fertile platform for the transfer of electrons and accelerate the electrical response.

3.3 XPS and UV–Vis Analysis

Figure 3 shows the XPS spectra of ITO–PANI and ITO/PANI–rGO electrodes. As is visible from Fig. 3a, and through the presented materials, the peaks centered at 290 eV (C1s), 400 eV (N1s), and 540 eV (O1s) are all visible a wide range in the spectrum. The presence of N1s confirms the presence of PANI in all synthesized nanocomposites. Figure 3b, c displays the deconvoluted C1s peak of PANI and PANI–rGO, revealing the presence of three different types of carbon functional groups: nonoxygenated carbon, nitrogenated carbon, and oxygenated carbon [41, 42].

Fig. 3
figure 3

a XPS spectra of ITO/PANI and ITO/PANI/rGO. b C1s XPS spectra of ITO/PANI and c C1s XPS spectra of ITO/PANI–rGO

Figure 4 represents the optical absorption spectra of ITO/rGO, ITO/PANI, and ITO/PANI–rGO films. The peak in the spectra of rGO at 340 due to the π–π* absorption band demonstrates the elimination of oxygen functions in the outer portion of the GO and the electron conjugations of C–C in the basal levels of the recovered GO, rendering it as rGO [43, 44]. This is in contrast to what Aadil et al. [45, 46] mentioned in their papers about the UV spectra of rGO that the maximum absorption peak of rGO is between 265 and 268 nm. While Sabeeh [47] reported that the highest absorption peak was at 271 nm, then the absorption peak completely disappears that can be explained by the removal of oxygen atoms.

Fig. 4
figure 4

UV–Visible spectra of ITO/rGO, ITO/PANI, and ITO/PAN-rGO

PANI exhibits well-defined three strong absorption peaks at approximately 371, 427, and 773 nm, which correspond to the formation of PANI. The peaks observed at 317 and 427 nm are attributed to the transition of electrons from the HOMO to the LUMO. These peaks correspond to the π–π* electronic transitions of the bipolar ion, benzenoid rings, and polar ion excitations of the quinoid rings. The peak at 773 nm is credited to the n–π* electronic transitions between benzenoid and quinoid units [48,49,50]. In the UV–Vis spectra of the ITO/PANI–rGO electrode, two kinds of characteristic peaks were observed at 371 nm and 410 nm, which are attributed to the PANI and rGO, respectively.

3.4 Photoelectrochemical Performance

The photoelectrochemical performance of ITO/PANI and ITO/PANI–rGO nanocomposites is estimated according to the ability to absorb light with intermittent light on and off. It is noticed in Fig. 5a that the current density under dark conditions is straight and near to zero, whereas, under illumination, there is a significant increase in photocurrent with a rectangular vertical response. Rapid and uniform photocurrent responses to all switch-on and switch-off cases were observed across all electrodes. The positive values of photocurrents are a characteristic of the n-type semiconductor [51, 52].This is explained by the presence of charge carriers that transfer from HOMO to LUMO under light irradiation [53, 54]. As the lighting continues, the generation of photo-excited electrons annihilates the internal electric field, as electrons and holes accumulate and lead to recombination of the charge [55]. It was noted that the photocurrent intensity of the PANI–rGO electrodes was significantly improved compared to the pure PANI electrodes.

Fig. 5
figure 5

a Photocurrent response curves of ITO/PANI and ITO/PANI–rGO electrodes at a constant potential. b Photocurrent amplitude versus the applied potential for ITO/PANI–rGO

Figure 5b shows the photocurrent variation as a function of the applied potential for the synthesized ITO/PANI–rGO. A range of different potentials have been used to study thin film photocurrent performance. It has been shown that rGO with high electron conductivity could aid electron transfer and suppress the electron–hole combination [56], reaching a much higher photocurrent and faster photo response. According to Henni et al. [39], the rGO may have led to the broadening of the band gap of the PANI–rGO sample by increasing the carrier intensity in the VB. However, it is observed that the photocurrent intensity of the electrodes increases reasonably with the increase in the potential range.

3.5 Photocatalytic Activity

The prepared ITO/PANI and ITO/PANI–rGO thin film photocatalysts were investigated by following the degradation of CR pollutants under light irradiation with studies on the influence of pH and temperature on the degradation of dyes organic (Fig. 6). First, the maximum absorbance of the dye, in the absence of any catalysts at T = 30 °C and pH 6.05, was measured scanned in the range of 300–800 nm, and it was observed at a wavelength of 498 nm, ascribed to CR dye. The resulting spectrum is shown in Fig. 6a. The change in absorbance was used to evaluate the photo-degradation efficiency. For 10 min in the dark, the adsorption process is achieved for adsorption–desorption equilibrium before exposing the CR to irradiation as reported by [39]. The same procedure was used by Baruah et al. [57] and Rahman et al. [32], who measured the equilibrium after 30 min.

Fig. 6
figure 6

a UV–Vis spectra of Congo Red. b The photocatalytic degradation of Congo Red dye against specific time intervals under visible light irradiation. The pH effect c and temperature effect d on photo-degradation rate. e Illustration suggested photocatalytic degradation of Congo Red by ITO/PANI–rGO thin films

As shown in Fig. 6b, the degradation rate of CR dye increased significantly when ITO/PANI–rGO electrodes were used instead of ITO/PANI electrodes. Rapid degradation has been observed for ITO/PANI–rGO electrodes. After 60 min, the degradation of the CR reached close to 70%. As for the ITO/PANI electrodes, the degradation of CR reached 40%. Regarding the ITO/PANI–rGO curves, it is noticeable that the degradation rate of CR suspension increased well compared to the curves of ITO/PANI. The presence of rGO in the PANI structure has enhanced the photocatalytic activity. This is explained by the synergistic effect between rGO and PANI. The same effect was observed in our previous study when the rGO was incorporated into ZnO thin layers [39] and El-Sharkaway et al. [18] reported that PANI/rGO composites show a higher adsorption capacity of MB dye compared with the PANI adsorbents. Therefore, the improved substrate performance can be assigned to the interesting electroactive properties of PANI and the excellent electrical conductivity of rGO [58, 59].

The pH factor is also considered a very important factor and helps speed up and change the photocatalytic process. The photocatalytic degradation activity of CR by ITO/PANI and ITO/PANI–rGO at different pH is shown in Fig. 6c. It is observed that the CR showed high degradation efficiency in a short irradiation time in an acidic medium (reached about 90% for both ITO/PANI and ITO/PANI–rGO). This is due to the PANI behavior that works well in an acidic medium compared to the basic medium. While in the medium with pH equal to 7, the degradation rate was close to 60% for ITO/PANI and 75% for ITO/PANI–rGO.

Figure 6d shows the effect of temperature on the photocatalytic process. It was observed that at T = 20 °C the degradation rate was 58% and 66% for ITO/PANI and ITO/PANI–rGO, respectively, and while the temperature increased to 40 °C, the rate of degradation increased and reached 80% for ITO/PANI–rGO while maintaining the same conditions. While it reached more than 80% for the ITO/PANI–rGO while continuing to rise in temperature (T = 60 °C). The effect of temperature plays a very important role in photocatalytic processes as a catalyst and accelerator for the degradation of dyes. The photocatalytic mechanism of CR degradation is presented in Fig. 6e, with the mechanism of the basic reaction of the proposed photocatalytic degradation as follows:

For the photocatalysts (A) and dyes (B), the absorption of light causes the reactions below:

(A)

$${\text{PANI}}\mathop{\longrightarrow}\limits^{{{\text{h}}\upsilon }}\left( {{\text{e}}^{ - }_{{{\text{CB}}}} \, + \,{\text{h}}^{ + }_{{{\text{VB}}}} } \right)\,{\text{PANI}}$$
$$\left( {{\text{e}}^{ - }_{{{\text{CB}}}} } \right)\,{\text{PANI}} \to {\text{rGO}}\,\left( {{\text{FL}}} \right)\,\left( {{\text{e}}^{ - } } \right)$$
$$\left( {{\text{e}}^{ - }_{{{\text{FL}}}} } \right)\,{\text{rGO}}\, + \,{\text{O}}_{{2}} \to \cdot {\text{O}}_{{2}}^{ - }$$
$${\text{H}}_{{2}} {\text{O}}\, + \cdot {\text{O}}_{{2}}^{ - } \to \cdot {\text{OOH}}\, + \,{\text{OH}}^{ - }$$
$$\cdot {\text{OOH}}\, + \,{\text{H}}_{{2}} {\text{O}} \to \cdot {\text{OH}}\, + \,{\text{H}}_{{2}} {\text{O}}_{{2}}$$
$${\text{H}}_{{2}} {\text{O}}_{{2}} \, + \,\left( {{\text{e}}^{ - }_{{{\text{FL}}}} } \right)\,{\text{rGO}} \to \cdot {\text{OH}}\, + \,{\text{OH}}^{ - }$$
$${\text{H}}_{{2}} {\text{O}}_{{2}} \, + \,\left( {{\text{h}}^{ + }_{{{\text{VB}}}} } \right)\,{\text{PANI}} \to \cdot {\text{OOH}}\, + \,{\text{H}}^{ + }$$
$${\text{H}}_{{2}} {\text{O}}_{{2}} \, + \, \cdot {\text{OOH}} \to \cdot {\text{OH}}\, + \,{\text{H}}_{{2}} {\text{O}}\, + \,{\text{O}}_{{2}}$$

(B)

$${\text{Congo}}\,{\text{red}}^{*} \to {\text{Red Congo}}^{ + } \, + \,\frac{{{\text{PANI}}}}{{{\text{rGO}}\left( {{\text{e}}^{ - }_{{{\text{FL}}}} } \right)}}$$
$$\left( {{\text{h}}^{ + }_{{{\text{VB}}}} } \right)\,{\text{PANI}}\, + \,{\text{Congo}}\,{\text{red}} \to {\text{Congo}}\,{\text{red}}^{ + } \, + \,{\text{PANI}}_{{{\text{VB}}}}$$
$$\cdot {\text{OH}}\, + \, \cdot {\text{O}}_{{2}}^{ - } \, + \,{\text{Red}}\,{\text{Congo}}^{ + } \to {\text{the}}\,{\text{degraded}}\,{\text{products}}\,{\text{without}}\,{\text{colors}}$$

The CB potential of PANI is more negative than that of rGO. Therefore, electrons flow downhill from the CB of PANI to the Fermi level (FL) of rGO, leading to suppression in the charge pair recombination process. At the same time, since the VB potential of rGO is more positive than the VB potential of the PANI, the holes are more easily transferred from the VB of rGO to the PANI, forming a similar closed-loop reaction system [60, 61]. Therefore, photo-generated electrons and holes are effectively separated at the heterojunction. Photogenerated holes occupy the main photon energy, react with hydroxide or water molecules attached to the catalyst surface to generate active hydroxyl radicals, and photogenerated electrons transfer to form superoxide radicals with the oxygen in the adsorption solution. CR dye molecules can be oxidized by hydroxyl radicals and superoxide radicals, both of which are strong oxidative reactive groups.

The point of zero charge pHpzc is very important in studying the adsorption mechanism process as well as determining the effect of pH on adsorption. When the pH is higher than pHpzc, the catalyst surface is negatively charged and attracts cations, while it is positively charged and repels cations at pH lower than pHpzc [62]. The pHpzc of ITO/PANI and ITO/PANI–rGO was found to be 2.76 and 3.09 respectively as shown in Fig. 7a and b. Since the adsorbent surface was positively charged according to the results, ITO/PANI and ITO/PANI–rGO preferred to remove the color dye at pH > pHpzc.

Fig. 7
figure 7

Curves of point of zero charge of a ITO/PANI and b ITO/PANI/rGO electrodes

The adsorption kinetics of ITO/PANI and ITO/PANI/rGO was examined for RC by plotting the Ct/Co values on the function of irradiation time (Fig. 8a). As shown in the Fig. 8a, the photocatalytic activity gradually decreased in presence of thin films after the 60 min of contact time under UV irradiation. At the equilibrium time, a significant lower value of Ct/Co obtained using the lower initial concentration of RC by comparing between the two samples. The lower values for ITO/PANI–rGO electrodes of Ct/Co have been obtained which confirmed that the affinity of the dye pollutant towards the ITO/PANI–rGO thin film surface with enhanced photocatalytic degradation of CR at the surface.

Fig. 8
figure 8

Plot of a (Ct/C0) and b ln(C0/ct) versus reaction time, Langmuir–Hinselwood model in the presence of the c ITO/PANI and d ITO/PANI–rGO nanocomposites

The kinetic data were used to fit the pseudo-first-order equation [63] which have expressed as follows:

$${\text{r}} =-\frac{\mathrm{d}\left[\mathrm{RC}\right]}{\mathrm{dt}}= {\mathrm{k}}_{\mathrm{app}} \left[{\mathrm{k}}_{\mathrm{photolysis }}+{\mathrm{k}}_{\mathrm{photocatalysis }}\right] ={\mathrm{k}}_{\mathrm{app}}\left[\mathrm{RC}\right]$$
(4)

where [RC] is the concentration of Dye, t is the time expressed in minutes and kapp is the pseudo-first-order rate constant (min−1). It is obvious that the kapp depends on the concentration of RC.

The plot of ln(C0/Ct) against time (Fig. 8b) display a straight line, indicating the good coincidence with the pseudo first-order equation and suggesting that the nanocomposite (ITO/PANI and ITO/PANI–rGO) owns high catalytic activity. On the other hand, the correlation coefficient of the pseudo-first-order model is nearly R2 = 0.99 for all electrodes.

In order to better understand the adsorption properties of adsorbed species on the surface of the thin-film photocatalyst, the photolysis kinetics of RC were provided with a linear formula from the Langmuir–Hinshelwood (L–H) equation (6) [64], and that is illustrated by Fig. 8c and d.

$${\mathrm{r}}_{0}=\frac{{\mathrm{k}}_{\mathrm{r}}.\mathrm{K}.{\mathrm{C}}_{0}}{1+\mathrm{K}.{\mathrm{C}}_{0}} {\text{Or}} \frac{1}{{\mathrm{r}}_{0}}=\frac{1}{\mathrm{K}.{\mathrm{k}}_{\mathrm{r}}}+\frac{1}{{\mathrm{C}}_{0}}+\frac{1}{{\mathrm{k}}_{\mathrm{r}}}$$
(5)

where 1/r0 and 1/C0 and are the dependent variables, 1/kr is the linear coefficient, and [1/(kr K)] the angular coefficient of the straight line.

The calculated value of the L–H adsorption constant and the rate constants were obtained from the straight lines by plotting 1/r0 versus 1/C0 as illustrated in Fig. 8c and the result listed in the Table 1.

Table 1 Kinetic study of adsorption of the Red Congo with ITO/PANI and ITO/PANI–rGO

Then the data of photocatalytic degradation of RC (kr and K) using ITO/PANI and ITO/PANI–rGO thin films was fitted logically well with the Langmuir–Hinselwood model with a higher correlation coefficient.

The ITO/PANI–rGO nanocomposite exhibits a better photocatalytic performance due to the kinetic synergistic effect between PANI and rGO. According to the previous experimental studies, PANI can easily form a favorable π-conjugation structure with graphene layer [65, 66], and the rGO can directly capture the photogenerated electrons Under the ultraviolet light irradiation, which additionally lead to a more effective charge separation and improved photodecomposition of CR by ITO/PANI–rGO nanocomposite. The same result was found by Miao et al. [67] (Table 2).

Table 2 Comparison of the kinetics parameters of Congo red photodegradation with other photocatalyst

3.6 Antibacterial Activity

The antibacterial activities of the ITO/PANI and ITO/PANI–rGO thin films were studied against one gram-negative bacterium, E. coli ATCC 25922 by the time-kill method. The results of the antimicrobial assay at the following contact times are presented as CFU of surviving cells and rate of reduction compared with the negative test without simple as shown in Fig. 9a and b. The results showed clearly that all thin films exhibited antibacterial activity against the growth of E. coli gram-negative bacteria. In contrast, treatment with PANI thin film showed a statistically significant reduction in the growth of cells compared with untreated cells, as reported by recent studies [68, 69]. Furthermore, a noticeable difference was observed between the effects of each nanocomposite. The antibacterial efficiency of ITO/PANI/rGO was higher than ITO/PANI, and that seems similar to the resultants reported by Shi et al. [70]. Furthermore, ITO/PANI–rGO demonstrated the highest bactericidal activity, with a 50% reduction in E. coli numbers after 60 h of exposure compared to ITO/PANI (33%), indicating a synergistic effect of rGO and PANI. We can say that the results are acceptable compared with the area of the substrate.

Fig. 9
figure 9

Antibacterial activities of the ITO/PANI and ITO/PANI–rGO nanocomposites

4 Conclusion

In this study, ITO/PANI and ITO/PANI–rGO thin films were successfully prepared by electropolymerization of aniline in the presence of rGO. The chemical states and morphological analysis of synthesized PANI–rGO nanocomposites have been studied comprehensively. The elaborated nanocomposites were tested to be effective adsorbers for CR dye and to improve photocurrent generation. The synergistic effect between PANI and rGO in the nanocomposite improved light catalytic activity compared with PANI alone due to the superior separation efficiency of the electron–hole pairs. In the acidic and basic medium, the PANI–rGO thin film has exhibited effective behavior in removing the dye. In comparison with the PANI NRs, the rGO-PANI composite demonstrated an interesting improvement in generated photocurrent. The PANI–rGO composite is a promising material for the degradation processes of dye pollutants. The coupling of the PANI with the rGO removed 77% of the dye after 120 min, and 90% in the acidic medium. The elaborated thin film exhibited good antibacterial activity against the growth of E. coli bacteria.