1 Introduction

Creation of hybrid interfaces such as at the hetero-junctions of inorganic/organic (IOI) or organic/organic interfaces (OOI) has attracted attention because of its potential applications in spintronics, drug delivery using nanoparticles, and solar energy harvesting [1,2,3,4,5,6,7,8,9]. The hetero-junctions in these assemblies can affect their chemical, electrochemical, optical, magnetic, and mechanical properties. Surface modification through the formation of these interfaces can also be a very effective way to create or eliminate defects and alter the energy bands at inorganic/organic interfaces. Surface modification will also alter the donor/acceptor character of these assemblies. The charge production, separation, and transfer at these interfaces was the subject of several investigations [10,11,12,13,14,15,16,17,18]. Some investigations were focused on the study of the magnitude of the barrier for charge (hole or electron) injection and the band energy alignments at these interfaces [10,11,12,13,14].

Energy-level alignment at different photoactive interfaces, such as in organic/organic assemblies [11, 14], has been investigated. Assemblies involving cadmium chalcogenides such as CdSe, CdS with polythiophenes, and other photoactive organic compounds [15,16,17,18]. Further, carbon nanotubes in interface with CoS2 [19] and N-based organic polymers interfaced with ZnS [20] or organic/metal assemblies [21] were investigated. Using these interfaces to build organic electronics or hybrid organic solar cells [10, 18, 22] has been achieved.

Building photoactive assemblies of hybrid thin film interfaces can be done by methods such as the layer-by-layer method, co-electrodeposition, and occlusion electrodeposition (OE). However, when the guest material is inactive to oxidative or reductive electrodeposition, and when co-electrodeposition would involve multiple steps that might alter the final composition of the hybrid films, OE is the optimum solution. Composite films containing occluded TiO2 [23,24,25] or CdS [26, 27] particles within a Ni matrix have been previously prepared using an occlusion method. Other metal matrices such as Ni, Cu, Ag, and In [28] and organic matrices such as poly-pyrrole [29] have also been used for immobilizing TiO2 particles.

Polythiophene, polyaniline, and their derivatives have noticeable stability, good electrical conductivity, and excellent electrochromic properties. These properties makes them useful components in electronic devices and electrode materials in solar harvesting cells.

The monomers 2,2 bithiophene (BTh) and 3-(2-thienyl) aniline (ThA) as derivatives of thiophene and aniline were used to prepare their corresponding polymers: poly 2,2 bithiophene (PBTh) and poly 3-(2-thienyl) aniline (PThA), respectively. The combination of ionic sulfur in CdS with covalent sulfur in organic polymers may affect the charge transfer processes in assemblies containing these systems. In this paper, we aimed to investigate what differences in optical and photoelectrochemical behaviors can be caused by the occlusion of CdS in organic polymers PThA and PBTh. In particular, we studied the changes in the photocurrent generation as an indicator for this assembly’s ability to cause the photoinduced charge separation. The host matrix was produced by electro-polymerization of 2,2 bithiophene (BTh) which forms polymeric networks suitable for efficient occlusion. The optical parameters such as the optical conductivity (σopt), optical absorption coefficient (α), refractive index (n), extinction coefficients (k), real dielectric constants (εr), and imaginary dielectric constants (εi) were also investigated. Furthermore, we explored the possible effects that can be caused by applying a magnetic field to the assembly.

2 Experimental

2.1 Reagents

All the reagents were of analytical grade. All of the solutions were prepared using deionized (DI) water unless otherwise stated.

2.2 Preparations

The O/O/II thin films were prepared as follows:

  1. 1.

    Photopolymerization of 3-(2-thienyl) aniline (ThA) on CdS nanoparticles to create an I/O/I of CdS/PThA

Colloidal suspensions of CdS coated with/PThA (CdS/PThA) interface were prepared as follows: 0.05 g of CdS nanoparticles prepared as reported previously [30] were suspended in the solution of ThA in acetonitrile. The mixture was subjected to a 10-min sonication followed by stirring for 1.0 h to allow maximum adsorption of ThA on the CdS nanoparticles. The excess PThA was removed by centrifugation. CdS nanoparticles with adsorbed PThA were re-suspended in deionized (DI) water containing few drops of H2O2 and subjected to UV radiation under constant stirring for 3.0 h. The resultant CdS/PThA was rinsed several times with DI water and allowed to dry at 120 °C for 2.0 h. The product of this step was used for the occlusion electrodeposition process.

  1. 2.

    Occlusion method

Thin films of CdS/PThA/PBTh were generated electrochemically using cyclic voltammetry (CV) by repetitive cycling of the FTO electrode’s potential between − 0.5 and 1.7 V vs Ag/AgCl in an acetonitrile suspension of PThA/CdS and 1 mM of the BTh monomer and 0.5 M LiClO4.

2.3 Instrumentation

All electrochemical experiments were carried out using a conventional three-electrode cell consisting of a Pt wire as a counter electrode, Ag/AgCl as a reference electrode, and FTO with surface area 2.0 cm2 as working electrode. Photoelectrochemical studies on the thin solid films were performed on an experimental setup as illustrated in Fig. 1. A BAS 100-W electrochemical analyzer (Bioanalytical Co.) was used to perform the electrochemical studies. Optical parameters were carried out studying the steady-state reflectance spectra using a Shimadzu UV-2101PC spectrophotometer. An Olympus BX-FL reflected light fluorescence microscope working with polymerized light at wavelengths ranging between 330 and 550 nm was used to explore surface imaging of the film. Irradiation was performed with a solar simulator 300.0-W xenon lamp (Newport, NJ) with an IR filter. Magnetic measurements were performed using a Frederiksen digital Tesla meter − 4060.50, with 0.01–2 T, with 1-mT resolution.

Fig. 1
figure 1

a Magnetic field source applied on the electrochemical cell. b The lid for the electrochemical cell that gives the option of making the magnetic field parallel or perpendicular to the electrode surface

2.4 Photolysis cell

The electrolysis cell was a one-compartment Pyrex cell with a quartz window facing the irradiation source.

2.5 Measurement of electron lifetime (τ n) in an organic/organic/inorganic interface

Because electron lifetime plays an important role in energy conversion efficiency in solar cells, we used the following equation that relate τn with the open circuit potential (Voc) decay [31]:

$$ {\tau}_{\mathrm{n}}=-\left({k}_{\mathrm{B}}\ T/e\right)\times {\left(\mathrm{d}{V}_{\mathrm{oc}}/\mathrm{dt}\right)}^{-1} $$
(1)

where kB is the Boltzmann constant, e is the electron charge, T is the temperature in K, and Voc is the open circuit potential in volts.

2.6 Magnetic field effects

Magnetic excitation was created by placing the FTO (2 mm thick), modified with the CdS/PThA/PBTh in parallel to the magnetic field generated by two circular disk magnets with a power of 0.200 T. The cell was positioned to face the light source as shown in Fig. 1. The magnetic field was measured by placing the Tesla meter on the assembly’s surface before immersing it into the electrolyte. For comparison, the current and potential generated in the absence of the magnetic field were also measured.

3 Results and discussion

3.1 Optical studies

Optical parameters such as σopt, α, n, k, εr, and εi have been calculated and plotted as a function of photon energy. The results are displayed in Figs. 2, 3, 4, 5, and 6.

Fig. 2
figure 2

a Absorption spectra of (a) PBTh and (b) CdS/PThA/PBTh. b α½ (cm−1/2) vs photon energy. c (α × hν)2, (eV cm)2 vs photon energy

Fig. 3
figure 3

a Extinction coefficient k vs photon energy. b Refractive index n vs photon energy of (a) PBTh and (b) CdS/PThA/PBTh

Fig. 4
figure 4

a Imaginary εi and b real εr components of dielectric constant. (a) PBTh and (b) CdS/PThA/PBTh

Fig. 5
figure 5

Loss factor (εi/εr) vs photon energy for (a) PBTh and (b) CdS/PThA/PBTh

Fig. 6
figure 6

Optical conductivity vs photon energy for (a) PBTh and (b) CdS/PThA/PBTh

3.1.1 Optical band gap studies

The results displayed in Fig. 2a are the absorption spectra of the CdS/PThA/PBTh assembly, and of the host polymer PBTh where absorption is plotted against photon energy of incident light. Figure 2b, c were prepared after treatment of the absorption data as plots of α½ vs photon energy (hν) and (α × hν)2 vs hν respectively as described in previous studies [32]. The value of α was calculated using a film thickness of 1.0 μm. Both the host polymer, PBTh, and the assembly show greater absorption in the range of photon energies between 2.3 and 2.6 eV. The results also indicate that the range of absorbance of the assembly is greater than that of the host polymer PBTh. This can be attributed to the closer band gap of CdS and of PThA.

Further analysis of Fig. 2a has been performed using Tauc plots. Figure 2b shows that the indirect band gap in PBTh is larger than that of the assembly. This is because the occlusion of CdS modified with PThA created hybrid sub-bands with smaller band gaps between the highest occupied molecular orbitals (HOMO) and lowest unoccupied molecular orbitals (LUMO) of the host polymer. Furthermore, the plot of photon energy vs (α × hν)2 (Fig. 2c) confirms the same phenomena discussed in Fig. 2b. The direct band gap of PBTh is greater than that of the CdS/PThA/PBTh assembly.

3.1.2 Optical parameters

  1. a)

    Refractive index, n, extinction coefficient, k

Figure 3a displays the plot of extinction coefficient k vs photon energy. Figure 3a indicates (1) the value of k of PBTh is greater than that of CdS/PThA/PBTh, (2) the value of k increased when the photon energy for both materials was increased, and (3) the value of k shows a sharp increase at a photon energy greater than 2 eV. Figure 3b displays the plot of refractive index n vs photon energy. Although both materials exhibit a large increase in n when the photon’s energy is greater than 2.0 eV, the value of n for CdS/PThA/PBTh is slightly greater than that of PBTh.

  1. b)

    Dielectric constants, real εr and imaginary εi

The calculated εr and εi are plotted against photon energy. The results are displayed in Fig. 4a, b. Figure 4a shows that the change in εi vs photon energy follows the same pattern described in Fig. 3a, due to the direct relation with k (εi = 2nk). The plot of the εr vs photon energy is displayed in Fig. 4b. This figure shows a pattern similar to that displayed n in Fig. 3b. As εr was calculated from the relation εr = n2− k2, and as n ≫ k, we can approximate that εr is directly proportional to n.

The results displayed in these figures show that the εi of CdS/PThA/PBTh assembly is less than that calculated for PBTh (host polymer). Because εi is associated with dissipation of energy into the medium, the modified CdS nanoparticles occluded into PBTh inhibit the energy dissipation process [33]. The εi is indication of the influence of dipole motion on energy absorption by the dielectric material from an electric field. Figure 4b shows that the εr of PBTh and that of CdS/PThA/PBTh assembly have closer values around a photon energy range between 1.9 and 2.3 eV. Above and below this range, the real dielectric part for CdS/PThA/PBTh exceeds that of PBTh. As the real part of the dielectric is related to polarization and anomalous dispersion, it indicates how much occlusion of CdS/PThA slows down the speed of light in the material [34].

The ratio εi/εr is called loss factor and was calculated for both PBTh and CdS/PThA/PBTh assemblies. Figure 5 displays the loss factor vs photon energy. The occlusion of CdS/PThA into the matrix of PBTh contributes to the decrease of εi, and the increase of εr.

  1. c)

    Optical conductivity σopt

Calculated σopt as described in previous work [34] are displayed in Fig. 6. The decrease of σopt with increasing photon energy is due to the presence of modified CdS nanoparticles as a dopant in PBTh network structure. Figure 6b indicates that the dopant lacks the ability to provide the host polymer with an additional charge transfer [35]. The interaction between incident light and charges of the material will take place as a result of absorption of photon energy by the assembly [36]. Modified CdS impeded the process that leads to polarizing the charges of the material. This means that the CdS/PThA/PBTh negatively affected the dissipation of energy into the host PBTh film. This is consistent with the results for imaginary part vs photon energy displayed in Fig. 4a.

3.2 Photoelectrochemical behavior

Photoelectrochemistry of the host polymer PBTh has been discussed in previous work [37]. For comparison, we used this information to conclude the contribution of the occluded CdS/PThA nanoparticles to the photoactivity outcome of the whole assembly. Unless otherwise stated, the photoelectrochemical behavior was investigated in the dark and under illumination by cycling the potential of FTO/CdO2/CdO/PBTh between − 1.0 and 1.0 V vs Ag/AgCl at a scan rate of 0.10 V/s in a given electrolyte.

3.2.1 Electrochemical behavior of the FTO/CdS/PThA/PBTh assembly in aqueous acetate electrolyte

The behavior of the FTO/CdS/PThA/PBTh assemblies was investigated in 0.2 M acetate electrolyte (pH 8). Figure 7a shows that in the cathodic scan at ≈ 0.20 vs Ag/AgCl, the recorded photocurrent is greater than the current recorded in the dark. These results indicate that the approximate Efb (flat band potential) of the assembly is at 0.20 V or 0.40 V vs SHE. (Table 1). However, in the anodic scan, the photocurrent recorded is smaller than that in cathodic scan and exceeds the current recorded in the dark at ≈0.20 vs Ag/AgCl. We assume that 0.40 V vs SHE is the value of the hybrid sub-band created upon occlusion of CdS nanoparticles in PThA suspended within an acetate electrolyte. Figure 7b shows the photocurrent-time curve generated by subjecting the FTO/CdS/PThA/PBTh assembly to a constant potential (− 0.5 V vs Ag/AgCl) under illumination for a long duration. Upon illumination of an oxygenated electrolyte, a sudden increase in the current (≈ 16 μA) followed by a slight increase in the photocurrent is indicated by the formation of a positive linear slope (Fig. 7b (a)). When the electrolyte was deoxygenated (using N2 gas), the illumination generated less photocurrent and a more negative linear slope than that observed with the presence of O2 (Fig. 7b (b)). Such behavior was reproducible. It is important to notice that the absence of O2 decreased the photocurrent and reduced the capacitive current as evident from the smaller dark current in deoxygenated electrolyte than in the oxygenated electrolyte. When a magnetic field was applied, the photocurrent vs time outcome is shown in Fig. 7b-inset box. It should be noticed that (1) these photocurrent curves generated in the presence and in the absence of O2 indicate the importance of O2 role in enhancing charge separation during the illumination period (in absence of O2, photocurrent decreases), (2) the magnetic field’s only effect is elimination of the low frequency noises, shown in the recorded photocurrent in the absence of O2., (3) the magnitude of the photocurrent did not change upon applying the magnetic field, and (4) a small increase in the capacitive current was observed.

Fig. 7
figure 7

Photoelectrochemical behavior of FTO/CdS/PThA/PBTh in 0.2 M acetate electrolyte a CV at 0.1 V/s, (a) illumination, (b) dark. b Photocurrent vs time curve at − 0.5 V vs Ag/AgCl (a) with O2 and (b) after purge with N2 in frame curves were collected in the presence of a magnetic field

Table 1 Photoelectrochemical data for the CdS/PThA/PBTh

3.2.2 Electrochemical behavior of the FTO/CdS/PThA/PBTh assembly in aqueous citrate electrolytes

The electrochemical behavior of FTO/CdS/PThA/PBTh was investigated in aqueous citrate electrolyte (pH 8) in the dark and under illumination. The results are displayed in Fig. 8. This shows that at 0.25 V vs Ag/AgCl, the photocurrent exceeds the current recorded in the dark for citrate electrolyte (Fig. 8a) in the cathodic scan, and at ≈ 0.35 V in the anodic scan. We assume that 0.45 V vs SHE is the value of the hybrid sub-band created upon occlusion of CdS nanoparticles in PThA in the citrate electrolyte.

Fig. 8
figure 8

Photoelectrochemical behavior of FTO/CdS/PThA/PBTh in 0.2 M Citrate electrolyte (pH 8) a CV at 0.1 V/s (a) illumination, (b) dark. b Photocurrent vs time curve at − 0.5 V vs Ag/AgCl (a) with O2 and (b) after purge with N2 in frame curves were collected in the presence of a magnetic field

The photocurrent vs time curve generated by subjecting the FTO/CdS/PThA/PBTh assembly to long-time illumination under a constant potential (− 0.500 V vs Ag/AgCl). A behavior comparable to that observed in Fig. 7b (acetate electrolyte) was recorded in Fig. 8b. However, upon illumination of the oxygenated citrate electrolyte (Fig. 8b), a sharp anodic current spike is observed. Such behavior can be explained by fast charge recombination because of hole accumulations at the outermost layers of the assembly/electrolyte interface [38]. Such phenomena were more noticeable in the deoxygenated electrolyte (Fig. 8b (b)). When the light is off, there is no evidence for reversed transient current. This means that no backflow of electrons from the substrate FTO to the assembly body took place.

When the electrolyte was deoxygenated, illumination generated much less photocurrent (10–12 μA). Such behavior was reproducible through multiple cycles of illumination and darkness. When a magnetic field was applied (Fig. 8b-inset box), the recorded photocurrent in the deoxygenated citrate electrolyte was less than that in the absence of magnetic field). The assembly generated more photocurrent in citrate than in acetate electrolyte.

3.2.3 Electrochemical behavior of the FTO/CdS/PThA/PBTh assembly in aqueous phosphate electrolyte

The electrochemical behavior of FTO/CdS/PThA/PBTh was investigated in 0.2 M phosphate electrolyte (pH 6). Figure 9a shows that at ≈ 0.4 V vs Ag/AgCl, the recorded photocurrent is greater than that recorded in the dark during the cathodic scan. The manual chopping of light indicates that the assembly is highly responsive to the illumination-dark cycles. The sudden decay of photocurrent upon blocking the illumination every other second may indicate a shorter life-time of the electron before its consumption by further elementary steps of photochemical reactions. Figure 9b shows the photocurrent-time curve under a constant potential (ca − 0.500 V vs Ag/AgCl) under illumination for a longer period of time. Upon illumination of the oxygenated phosphate electrolyte (Fig. 9b), a sharp anodic current spike, similar to that which was noticed in the citrate electrolyte, is observed. Such behavior can be explained by fast charge recombination because of hole accumulations at the outermost layers of the assembly electrolyte interface. Under darkness, there is no evidence for reversed transient current. This means that no backflow of electrons from the substrate FTO to the assembly body took place.

Fig. 9
figure 9

Photoelectrochemical behavior of FTO/CdS/PThA/PBTh in 0.2 M phosphate electrolyte (pH 6). a CV at 0.1 V/s (a) illumination and (b) dark. b Photocurrent vs time curve at − 0.5 V vs Ag/AgCl (a) with O2 and (b) after purge with N2 and c photocurrent vs time curve of FTO/PBTh only at − 0.5 V vs Ag/AgCl (a) with O2 and (b) after purge with N2 in box curve indicate the presence of a magnetic field

Upon illumination of the oxygenated phosphate electrolyte (Fig. 9b (a)), a sudden increase in the photocurrent was recorded (≈ 60 μA) followed by a steady decrease in photocurrent to about 40 μA. The initial decay reflects some e/h recombination. In contrast, when the electrolyte was deoxygenated using nitrogen gas (Fig. 9b (b)), less photocurrent was recorded with behavior similar to that observed in the oxygenated solution. In the presence of a magnetic field (Fig. 9b-inset box) a small change in the recorded photocurrent in absence of O2 was seen. Figure 9c shows the photocurrent vs time curve for the host polymer PBTh. It clearly shows lower photocurrent than that observed in Fig. 9b. This indicates that occlusion of CdS enhanced the photocurrent generation as a result of improvement of the photoinduced charge separation.

The photocurrent generated in the phosphate electrolyte is greater than that in the tested carboxylic acid electrolytes. We further investigated the effect of changing the pH on the Efb of this assembly. We found no changes in Efb were observed within the pH 5–8 range. We believe that a change of approximate 2 pH units did not affect the position of Efb in sulfur-based assembly. The relation between Efb and pH in oxide-based semiconductors is given by the following equation [39], which represents 25 mV per change in 1 pH unit:

$$ {E}_{\mathrm{fb}}=\mathrm{constant}-\left( kT/e\right)\ \mathrm{pH} $$
(2)

The observed change in photocurrent is due to the nature of the anion of the electrolyte, not to other factors such as change in the surface states or the coexisting OH anion. The fact that the electrolyte anion concentration is > 0.1 M, much greater than the OH concentration (10−6 M) at pH 8, so the anion of greater concentration would be predominantly adsorbed on the electrode surface.

The role of oxygen in the photochemical activities of the assembly is highlighted in the electron consummation processes illustrated by the equation:

$$ {\mathrm{O}}_2+2\mathrm{e}+{2\mathrm{H}}^{+}\rightarrow {\mathrm{H}}_2{\mathrm{O}}_2 $$
(3)

The conjugated organic semiconductor PBTh acts as p-type semiconductor where holes are the charge carrier. When suitable photon energy hits the outermost layers of the assembly, the photogenerated holes will have a shorter diffusion course that reaches the adsorbed anions on the surface of the assembly. This suggests that the hole consummation by the used electrolyte anions is an important step in the mechanism of charge separation.

The following explains the oxidation of the studied anions at the electrolyte CdS/PThA/PBTh/electrolyte interface.

In phosphate electrolyte, formation of phosphate radical anion is one way to prevent the e/h recombination process according to Eq. 3:

$$ \mathrm{HPO}{{{}_4}^{-2}}_{\left(\mathrm{aq}\right)}+\mathrm{h}\dots \rightarrow \mathrm{HPO}{{{}_4}^{-}}_{\left(\mathrm{aq}\right)} $$
(4)

The formation of HPO4 has been reported by others [40]. Equations 2 and 3 explain how oxygen and phosphate participate in the charge separation process that lowers the e/h recombination.

In the presence of acetate or citrate electrolyte, the photooxidations of acetate or citrate anions achieve a Kolb-type reaction [41]. In the presence of simple R (COO) ions such as acetate, the following reaction takes place [41] as illustrated in Eq. 4:

$$ R\ {\left({\mathrm{CO}\mathrm{O}}^{-}\right)}_{\left(\mathrm{aq}\right)}\dots +\mathrm{h}\rightarrow R.{}_{\left(\mathrm{aq}\right)}\dots +{\mathrm{CO}}_{2\ \left(\mathrm{gas}\right)} $$
(5)

The large concentration of the studied anions (0.2 M) allowed these anions to dominate the hole consumption process as illustrated in Eqs. 3, 4, and 5. This increased the charge separation as indicated by the recorded large photocurrent at more negative potential than − 0.5 V vs Ag/AgCl.

3.2.4 Electron lifetime (τ n) in FTO/CdS/PThA/PBTh

The changes in the open circuit potentials (dVopn) of photoelectrochemical cells in acetate, citrate, and phosphate electrolytes were used in Eq. 1. An estimation of electron life-time at this interface in each electrolyte was obtained. The results are listed in Table 1.

The data listed in Table 1 indicate that τn is the shortest in the phosphate and acetate electrolytes and longest in the citrate electrolyte. The comparison of the magnitude of the photocurrents during the illumination period in the photocurrent vs time plots (Figs. 7, 8, and 9b) shows that the phosphate electrolyte produced the largest photocurrent (≈ 41 μA). The electron lifetime (τn) represents the electron recombination time constant. This relates to an electron diffusion length L according to the following formula [42]:

$$ L={\left({D}_{\mathrm{e}}\ {\tau}_{\mathrm{n}}\right)}^{\frac{1}{2}} $$
(6)

where De is the electron diffusion coefficient. Efficient collection of photogenerated electrons requires that L should be greater than the film thickness. The results listed in Table 2 suggest that De is ≈ 3.0 × 10−6 cm2/s in acetate, is ≈ 2.96 × 10−6 cm2/s in phosphate, and is ≈ 9.9 × 10−7 cm2/s in citrate. The assembly films do not possess even thickness but rather irregular surfaces with minimum and maximum thicknesses (Fig. 10). This suggests that most of the photoactivities took place within the film minima as the electron diffusion length is longer than film thickness at these locations. The host polymer, PBTh in phosphate electrolyte, the τn was 500 ms. Equation 5 shows that De within the host polymer PBTh only in phosphate electrolyte is ≈ 6.27 × 10−7 cm2/s. This value leads to an estimate of τr (electron transport time) of 200 ms. Comparing this with the data listed in Table 2 clearly indicates that occlusion of CdS decreased τr and increased both De and L, which enhances the generation of photocurrent.

Table 2 Charge transport data for the CdS/PThA/PBTh (5.094 μm)
Fig. 10
figure 10

microscopic image of 6 μm of the CdS/PThA/PBTh Film on FTO

3.2.5 Magnetic field effect on the OOI

The experimental setup for the magnetic study is displayed in Fig. 1. The photocurrent of FTO/CdS/PThA/PBTh in the absence and presence of a magnetic field is displayed in Figs. 7, 8, and 9 (inset boxes). Little change of photocurrent can be noticed when a 0.2-T magnetic field is applied. These result suggest that the electrolyte’s anions are an important factor in CdS/PThA/PBTh assembly’s response to the magnetic field. For example, during the illumination period, the photocurrent decreased in all studied electrolytes except acetate. Upon illumination, unpaired electrons are generated. This creates organic paramagnetism with a random spin. The response of organic paramagnetism to the magnet depends on several factors, such as the spin of electron/hole pairs, existence of singlet and triplet states, interaction of donor anions (HPO4−2, C3H5O (COO)33−, and CH3COO) with the excitons generated at this interface, and the intersystem crossing. The fact that the magnetic field has no effect on the illuminated thin film of CdS suggests that both the PBTh and PThA components of this assembly were responsible for the behavior recorded in these figures. The presence of oxygen in the electrolytes helps in charge separation by the formation of O2. During its life time, this anion radical acted as a temporary molecular paramagnet [36] that interfered with the applied magnetic field and generated the inconsistent photocurrent outcome shown in Figs. 6, 7, 8, and 9b. Previously detailed studies on magnetic field effects on the dye-sensitized solar cells [43] concluded that the presence of a magnetic field causes slowing of the spin of interfacial electron/hole pairs at a frequency dependent on a field strength. Previous studies [44] suggested that a low-intensity magnetic field can induce enhancement of electrolyte ion movement and reduce charge transfer resistance resulting in an increase of both capacitance and energy density.

3.3 Band-energy map of CdS/PThA/PBTh

The data obtained from optical and electrochemical measurements in Figs. 2, 7, 8, and 9 were used to calculate the ionization potential (IP) and electron affinity (EA) and Fermi level (Efb) of CdS/PThA/PBTh. These important parameters, along with the approximate value of the band gap (Eg), were used to draw an energy map of CdS/PThA/PBTh. These parameters are also needed to explain the electrical and optical properties of the film. The IP, EA, and Efb were calculated using formulas derived elsewhere [10].

These results are discussed in terms of how possible band alignment between the p-type organic polymers with its diffusional HOMO/LUMO border and the amorphous n-type CdS nanoparticles may affect the generation of unpaired electrons upon illumination of the interface. The PBTh, PThA, and amorphous CdS have band gaps that allow absorption of wavelengths in the visible spectrum which makes both materials and their I/O/O/I assemblies potentially useful as photoelectrochemical device components.

A list of photoelectrochemical data for PBTh, PThA, CdS, and CdS/PThA/PBTh is summarized in Table 1 and Fig. 11a. Figure 11a insets illustrates the formation of a hybrid sub-band energy level that facilitates charge transfer at the CdS/PThA/PBTh. At the I/O/O/I, a strong hybridization between electron-like and hole-like sub-band states occurs in close proximity to the Fermi energy level. The hole barrier height calculated from the difference between the energy level of the hybrid band and valance band (VB) of CdS is ~ 1.5 eV. This is ~ 1.5 V more negative than the CdS VB. With the hybrid band at this more negative potential attraction, the hole is stronger and makes the charge transfer process possible. In contrast, the electron barrier height is ~ 0.9 eV which is ~ 0.9 V more positive than the potential of the electrons in the LUMO of PThA. However, if we consider that electrons in the organic part of the IOOI are concentrated at a lower energy level than the LUMO, due to indirect band gaps existing in the assembly, then, the electron barrier height will be even lower than the calculated value (~ 0.9 eV). This would also make hole transfer more thermodynamically favorable than electron transfer, as 1.5 V is more attractive for holes than 0.9 V is to electrons. We realize that our conclusions are just a general outline of the possible energy map in the created assembly. The photoactivity outcome from the assemblies CdS/PThA/PBTh can be simplified by Fig. 11b. The outcome character of the assemblies was of a p-type. The charge transfer process involved reduction of O2 to H2O2 and oxidation of the electrolyte anions. Figure 11b suggests charge activities between CdS/PThA and charge activities between PBTh/PThA interfaces. The details of the charge transfer mechanism may follow a Dexter-type [45] mechanism that can be viewed as a pair of simultaneous hole and electron-transfer events.

Fig. 11
figure 11

a Energy map for CdS/PThA/PBTh interface. b Heterojunction hole/electron activities.[] electron accumulation, [] hole accumulation, [−] hole depletion)

4 Conclusion

Table 1 indicates that the presence of CdS in organic films of polybithiophene did not cause large changes in the energy band structure compared with that of the host thiophene polymer. The photoelectrochemical outcome was dominated by the polybithiophene. The optical properties of the created assemblies indicates that occlusion of modified CdS nanoparticles into the network structure of PBTh inhibits the energy dissipation process and decreases the optical conductivity of the host polymer. Photoelectrochemical results show that the behavioral outcome of the assemblies reflects formation of hybrid sub-bands as a product of band alignments between the organic film and CdS. Furthermore, inclusion of CdS in the thiophene-based polymers played an important role in the charge separation and transfer processes by enhancing the charge separation and consequently increasing the resulted photocurrent. The magnetic field affected the photogeneration of singlet/triplet radical pairing process.