Introduction

Functionalized conducting polymers and copolymers have been in the focus of considerable attention due to their interesting electrical and optical properties and conceivable applications in the last three decades [13]. Among them, considerable attention has been drawn to polymers and copolymers of pyrrole and indole prepared by electrochemical oxidation [46] due to several advantages, especially fairly good thermal and electrochemical stability [7, 8] and high redox activity [9]. Moreover, PIn is a good candidate for applications in electronics, as electrode in batteries, in electrocatalysis as anticorrosion coating and in pharmacology [10].

Interest in the electrochemical polymerization of indole is further simulated by its close structural similarities with pyrrole; actually many statements about polyindole structure and polymerization mechanisms are obtained from polypyrrole studies. Electrocopolymerization of pyrrole, substituted pyrroles and indole has been applied by several groups to generate copolymers [1214] and has offered a wide array of materials with high redox activity, stability and different conductivity [3, 11]. In situ characterization and, more specifically, in situ spectroelectrochemistry of polymers of pyrrole, substituted pyrrole and related polymers have been described previously [1517].

The electrosynthesis of indole–pyrrole copolymers on a platinum electrode has been reported in the literature [11, 18]. The higher redox potentials of pyrrole–indole copolymers provided the possibility of increasing the energy density when they were used as cathode in rechargeable batteries [11, 19]. We have reported the in situ UV–Visible spectroelectrochemistry and cyclic voltammetry analysis of conducting polymers of N-methylpyrrole, indole and their copolymers on gold electrodes in non-aqueous solution recently [20]. Previously, pyrrole–indole copolymers were synthesized on platinum electrodes with switching the potential up to 0.75 and 0.85 V. The applied potential was not increased further due to avoid film degradation during growth [11, 18]. In situ resistivity of the produced conducting polymer films (as an important parameter) was not measured [11].

In other work [18], the copolymer films were synthesized potentiostatically and electrochemical behavior of the samples was studied at different temperatures. The indole/pyrrole in acetonitrile was mixed in different ratios at constant indole concentration with different pyrrole amounts. The effect using different ratios of each monomer on the properties of the synthesized conducting copolymer was significant. Moreover, only a copolymer with an equimolar ratio was used for resistivity measurements [18].

Here, we describe results of the electrosynthesis of poly(pyrrole-co-indole) prepared by electrochemical copolymerization of mixtures of pyrrole and indole on gold electrodes in non-aqueous media and compared their properties with those of N-methylpyrrole–indole copolymers. For the first time, we demonstrated that pyrrole–indole copolymers can be electropolymerized in the range 0.10–0.90 V on gold electrodes without any film degradation. We prepared homopolymers and copolymers with different ratios of monomer in the similar range of applied potentials and characterized them carefully. The discussion is based on results of cyclic voltammetry, in situ UV–Vis spectroscopy, in situ resistance measurements and morphological analysis of mono- and copolymers. For better comparison with previous results on P(NMPy-In) [20], the molar ratios of pyrrole and indole monomers in the polymerization solution were set at (Py:In) 1:1, 2:1, 3:1, 1:2, 1:3. Significant differences were observed between P(Py-In) and P(NMPy-In) copolymer films according to in situ UV–Vis spectroscopy and in situ conductivity measurement results. Based on a detailed study of the electrocopolymerization of pyrrole and N-methylpyrrole with indole, we propose that a substituent on the pyrrole ring and its position affect the properties of the polymer and its growth during copolymerization.

Experimental

Materials

Pyrrole and N-methylpyrrole (Aldrich, 99 %) were vacuum distilled before use. Indole (Aldrich, USA) was purified by recrystallization from petrol ether. LiClO4 (Aldrich, USA) was used as an electrolyte and dried under vacuum. Acetonitrile (Merck, Germany) with water content <0.05 % (determined by the Karl Fischer method) was used as received and kept over molecular sieve.

Characterization

Cyclic voltammetry (CV) was performed using a Behpajoh BHP/2062 (Iran) and an Autolab model PGSTAT 20 potentiostat/galvanostat. A saturated calomel electrode (SCE) was used as reference electrode; the working and auxiliary electrodes were gold sheets of ~0.4 and 1.0 cm2 surface areas (AZAR electrode Co, Iran), respectively. The reference potential of SEC was stable (without drift) for electropolymerization. The calomel electrode was frequently checked against another references. Several of these samples were prepared and frequently checked.

For UV–Vis spectroscopy, an ITO (Indium Tin Oxide) coated glass sheet (Präzisions Glas & Optik, Germany, R = 20 ± 5 Ω cm−2) was used and for in situ resistance measurements a bandgap gold setup described elsewhere [21] (AZAR electrode Co, Iran) was used as working electrode. The two strips of the bandgap electrode can be easily bridged by the deposition of conducting polymers due to a few micrometer distance between them. Since the surface area of both strips is very small, only thin films can be deposited because thicker ones may be formed in non-uniform shape, which may considerably affect the experimental results [22].

The instrument for resistance measurement was made by Sama Research Center (Iran). UV–Vis spectra were recorded of the polymer films deposited on an optically transparent ITO-glass electrode in the supporting electrolyte solution (acetonitrile + 0.1 M LiClO4) in a standard 10 mm cuvette using a UV–Vis spectrophotometer Perkin Elmer 55 OSD (USA). A cuvette with the same solution and an uncoated ITO glass sheet was placed in the reference beam. Spectra were recorded at increasingly positive electrode potentials; in a few cases, spectra were recorded in the negative-going potential direction to test reversibility.

The morphological study was carried out with a Hitachi model S-4160 (Japan) scanning electron microscope. For this purpose, film samples were peeled off from the gold electrode and glued with graphite cement to a copper holder.

Infrared spectra were recorded on a Perkin Elmer FTIR GX spectrometer (USA) using KBr pellets prepared from polymer peeled off the working electrode in a neutral state dried subsequently. All experiments were performed at room temperature with nitrogen-purged solutions.

Electrosynthesis of homo- and copolymer films

Monomer concentrations were always maintained at 0.1 M either of pyrrole, N-methylpyrrole, indole or of comonomer mixtures with 1:1, 2:1, 3:1, 1:2, 1:3 molar ratios of pyrrole:indole in acetonitrile with 0.1 M LiClO4 electrolyte solutions. After vigorous mixing and nitrogen purging (for 10 min), electropolymerization was started by scanning the electrode potential initially towards positive potentials and then between −0.10 < E SCE < 0.90 V at a scan rate of 50 mV s−1. The electrosynthesis of PPy, PIn, P(Py-In) (1:1) (CopA), (2:1) (CopB), (3:1) (CopC), (1:2) (CopD) and (1:3) (CopE) films was stopped after 60, 400, 100, 120, 150, 200 and 450 cycles, respectively, because after the stated number of cycles no further growth of polymer was observed. The thickness of the films was controlled by integration of the electrical charge passed during the electropolymerization and film growth.

Results and discussion

Cyclic voltammetry (CV)

Initial CV plots of a gold electrode in monomer-containing electrolyte solution (acetonitrile and 0.1 M LiClO4) in the potential range of −0.10 < E SCE < 0.90 V at dE/dt = 50 mV s−1 are displayed in Fig. 1. The first step is related to the formation of cation radicals followed by dimerization and associated loss of protons, subsequently cation-radicals of the dimers were formed, resulting again in coupling between cation-radicals, etc. followed by the nucleation and growth which resulted in a continuous film [23, 24].

Fig. 1
figure 1

Initial CV plots of a gold electrode in solutions of a 0.1 M Py, b 0.1 M In, c 0.1 M Py-In (1:1 mol), d 0.1 M Py-In (3:1 mol), e 0.1 M Py-In (1:3 mol), in acetonitrile and 0.1 M LiClO4 solution, dE/dt = 50 mV s−1

The first CV curves of the monomers mixtures with high fraction of one monomer [i.e., Py:In = 3:1 (Fig. 1, curve d) and Py:In = 1:3 (Fig. 1, curve e)] were very similar to those of the solutions containing only the respective comonomers alone. Indole oxidized more easily, i.e., at approximately the same electrode potential, but with a higher rate compared with pyrrole. The mixtures prepared with different ratios of pyrrole and indole yield CV curves where their oxidation currents reflected this behavior.

For all monomer solutions at different potentials, scan trace crossing can be observed between the steep current increase in the positive-going scan and the negative-going scan. The potential values of the trace crossing for indole, pyrrole and 1:1 Py-In mixture were 0.58, 0.63 and 0.60 V, respectively. This crossing has been attributed to nucleation overpotentials [21]. Alternatively, a local increase in the concentration of oligomers which oxidized easier (i.e., at lower electrode potentials) close to the electrode has been suggested as the reason [25].

Effects of polymerization solution compositions with similar trends on CV curves have been observed elsewhere with NMPy-In mixtures [20]. In that case, also the first CV curve of solutions with an excess of one comonomer (3:1 and 1:3 NMPy:In) was very similar to that of the respective single comonomer solutions.

The cyclic voltammetry curves of PPy, PIn and copolymers (CopA, CopB, CopC, CopD and CopE) on the gold electrode in the range of −0.10 < E SCE < 0.90 V at dE/dt = 50 mV s−1 recorded during electropolymerization are displayed in Fig. 2.

Fig. 2
figure 2

CV curves during the formation of a PPy, b PIn, c CopA, d CopB, e CopC, f CopD and g CopE in solutions of 0.1 M Py, 0.1 M In, P(Py-In) (1–1 mol), P(Py-In) (2–1 mol), P(Py-In) (3–1 mol), P(Py-In) (1–2 mol) and P(Py-In) (1–3 mol) in acetonitrile and 0.1 M LiClO4 solution, −0.10 < E SCE < 0.90 V, gold electrode, dE/dt = 50 mV s−1

Films grew on the electrode surface during the electropolymerization process. Oxidation peaks or waves caused by redox processes involving the polymer were observed around E SCE = 0.40 V and E SCE = 0.66 V for PPy and PIn films [20] during further oxidative polymerization, respectively (Fig. 2a, b). The oxidation waves of CopA, CopB, CopC, CopD and CopE films were observed around 0.20 < E SCE < 0.80 V, 0.20 < E SCE < 0.80 V, 0.40 < E SCE < 0.60 V, E SCE = 0.42 V and 0.56 < E SCE < 0.64 V, respectively (Fig. 2c–g). There were slight differences between the shape and position of oxidation and the respective reduction peaks for different copolymers.

In PPy, PIn, CopA, CopB, CopC, CopD and CopE films, no further increase in the current and corresponding film growth was observed and conditions reached the steady state after about 60, 400, 100, 120, 150, 200 and 450 potential cycles, respectively. Thus, the scans were stopped at these cycle numbers. The number of cycles necessary to reach this state for indole was higher than for pyrrole.

The study of kinetic (electrooxidation rate) and thermodynamic (electrooxidation potential) parameters of conducting polymers as a function of cycle number and monomer concentration is still at a developing stage [20]. The rate of electrooxidation and growth depends on the individual monomer concentrations (the total concentration was kept at 0.1 M) and cycle number. Due to the widely differing shape of the CV curve conditions, the amount of ICP which had been developed was impossible to define.

For further experiment, we have thus taken the polymer films formed at this “stationary state” as samples. The electrooxidation rate increased at higher monomer concentration. The effect of concentrations on the electrocopolymerization of the Py-In film was in good agreement with the results with the combination NMPy-In reported elsewhere [20]. The cyclic voltammetry values of PPy, PIn, CopA, CopC and CopE films obtained after transfer into monomer-free background electrolyte solution in the potential range of −0.10 < E SCE < 0.90 V at dE/dt = 50 mV s−1 are displayed in Fig. 3a–c.

Fig. 3
figure 3

CV curves of a gold electrode coated with a CopA, b CopC and c CopE with PPy (curve 1) and PIn (curve 2) as reference in acetonitrile and 0.1 M LiClO4 solution, dE/dt = 50 mV s−1

Differences can be observed, especially in the position of the oxidation peaks. The shape of CV curves of CopC and CopE films were similar to those of PPy and PIn, respectively. This was presumably due to the relatively higher amount of pyrrole and indole in monomer mixtures during electrosynthesis and consequently in the polymer. The effect of relative concentration of monomers in electrocopolymerization may be rationalized when taking into account the polymerization mechanism. By increasing the concentration of pyrrole, electrooxidation of pyrrole and subsequent incorporation became statistically more likely yielding a copolymer with a higher amount of pyrrole units in the chain. A lower concentration of pyrrole had opposite effects.

Those observations clearly demonstrated that by increasing the concentration of pyrrole monomer in the comonomer mixture (i.e., decreasing the N-methylpyrrole concentration), the resistance of the copolymer was decreased. That may be caused by a larger amount of pyrrole units in the copolymer backbone yielding a more extended π-conjugation system along the copolymer. When the monomer ratio was 1:1, the copolymer showed a resistance similar to that of PNMPy, which was higher than that of PPy. This also implied that PNMPy induced a decrease in the degree of PPy backbone conjugation.

In situ resistivity measurements of homopolymers and copolymers films

For in situ resistivity measurements, polymers and copolymers films were deposited potentiodynamically by cycling the potentials from −0.10 < E SCE < 0.90 V in supporting electrolyte solution at 50 mV s−1 on a gold bandgap electrode. A problem associated with the in situ resistivity technique was the deposition of different polymer films of identical thickness across the insulating gap. As mentioned elsewhere [22], this inherent problem was approximately solved by adjusting experimental conditions (e.g., number of electrode potential cycles or time of electrolysis during deposition) which resulted in comparable films with similar redox capacities.

Because of the selected steady-state criterion used here, the amounts of film deposition were not exactly equal to the estimated amount from the anodic current in the CV curves in Fig. 3a–c. Thus, results pertaining to minimum resistivities cannot be compared directly. The resistivity versus applied electrode potential plots of homopolymers (PPy and PIn) and copolymers (CopA, CopC, and CopE) films shows rapid decreases in resistivity with positive-going electrode potential (Fig. 4). When the potential shift direction was reversed, the resistivity values of the polymers and copolymers were almost completely restored. The results of the resistivity measurement showed that the behavior of the synthesized copolymers was basically similar to that of homopolymers.

Fig. 4
figure 4

Resistivity versus electrode potential for a PPy, b PIn, c CopA, d CopC and e CopE films prepared potentiodynamically on double bond gold electrode by cycling the potential in acetonitrile and 0.1 M LiClO4 solution, −0.10 < E SCE < 0.90 V, respectively

The plot for PPy (Fig. 4a) shows a single sharp resistivity decrease by 4.4 orders of magnitude at E SCE = 0.10 V; at higher potentials, it remains almost constant up to E SCE = 0.80 V. The plot of PIn (Fig. 4b) shows a single resistivity change by only one order of magnitude at E SCE = 0.40 V. This resistivity remains almost constant up to E SCE = 0.80 V. The resistance–potential curves for PPy and PIn show a minimum in the range of 0.20 < E SCE < 0.80 V and 0.45 < E SCE < 0.80 V, respectively. These potentials correspond to the ranges of maximum currents in the CV curves and confirmed that neutral or fully oxidized films are poor conductors while partially oxidized films are excellent conductors. Consequently, films were not fully oxidized at the upper potential limits of CV measurements; this was corroborated by the observation that in CV curves, no decrease in the currents was observed at the positive limit.

As mentioned elsewhere, the resistance of PIn was higher than that of PPy, but its thermal stability was better with respect to PPy or polyaniline [26, 27]. The higher resistance of PIn may be rationalized when taking into account the polymer structures. Although the structure of PIn is basically similar to PPy, the increased steric hindrances impeded conjugation and thus charge transport.

The effect of charge-transfer doping on the geometric and electronic structures of the conjugated polymers has been investigated [28]. The charge transfer of conjugated PPy film was better than that of PIn. The resistance of CopA film (prepared from Py:In = 1:1 molar ratio of Py-In solution) showed a single sharp decrease by 2.4 orders of magnitude at E SCE = 0.30 V; at higher potentials, it remained almost constant up to E SCE = 0.70 V and then increased up to E SCE = 0.90 V. Minimum resistance can thus be observed in the range of 0.40 < E SCE < 0.70 V. The copolymer showed a resistance similar to that of PIn and higher than that of PPy. This result implies that PIn induced a decrease in the degree of PPy backbone conjugation.

The CopC film (prepared from Py:In = 3:1 molar ratio of Py-In solution) showed a single resistance change by 3 orders of magnitude at E SCE = 0.40 V. This resistance remained almost constant up to E SCE = 0.90 V. Minimum resistance can be observed in the range of 0.40 < E SCE < 0.90 V.

A single resistance change was also observed with CopE (prepared from Py:In = 1:3 molar ratio of Py-In solution). The resistance decreased sharply by 1.2 orders of magnitude at E SCE = 0.20 V; it remained almost constant up to E SCE = 0.70 V and then increased up to E SCE = 0.70 V. The resistivity of the CopE film was higher than that of CopA film by 2.1 orders of magnitude. These observations clearly demonstrated that with increasing the concentration of pyrrole monomers in the comonomer mixture, the resistance of the copolymer was decreased. This was most likely due to a larger number of pyrrole units in the copolymer backbone yielding a more extended π-conjugation system along it.

Comparing P(NMPy-In) and P(Py-In) films implied that the NMPy induced a decrease in the degree of copolymer backbone conjugation. The resistivity of P(NMPy-In) film was higher than that of P(Py-In). The lack of planarity or increasing chain separation in the copolymer resulting from the larger size of the methyl group relative to hydrogen was pronounced as already suggested when comparing only the homopolymers [20].

In situ UV–Visible spectroscopy

In situ UV–Vis spectra of PPy and PIn films in a solution of acetonitrile and 0.1 M LiClO4 as a function of applied potential from E SCE = −0.20 to E SCE = 0.70 V are shown in Fig. 5a, b. The films were prepared potentiodynamically on an ITO-glass electrode by cycling the electrode potential in the range of −0.20 < E SCE < 0.70 V.

Fig. 5
figure 5

UV-Vis spectra of a PPy, b PIn, c CopA, d CopC and e CopE films deposited potentiodynamically at −0.10 < E SCE < 0.90 V in a solution of acetonitrile and 0.1 M LiClO4 at different electrode potentials, respectively

The main features in the PPy and PIn spectra including the assignment of the major electronic transitions A and B were essentially the same as those reported in our previous works [20, 21]. The color of the as-grown film of PPy (Fig. 5a) changed from black-brownish to black when switched from the neutral to the oxidized state. In the oxidized state, a decrease in the absorption band around λ = 350 nm attributed to the π → π* transition was observed (labeled A on the figures). A broad absorption band with a maximum absorbance around λ = 780 nm (labeled C on the figures) referred to the fully oxidized black form of PPy [21]. The spectra around λ = 505 nm were assigned to the transition from the valence band to the anti-binding polaron state.

Figure 5b shows the spectra of PIn film on an ITO-glass electrode in the potential range −0.10 > E SCE > 0.7 V. The color switched from light yellow-green to greenish black. During the oxidation process of PIn film, a decrease in the absorbance around λ = 365 nm, λ = 420 nm (assigned to the π  π* transition) and an increase in the absorbance between λ = 420 nm and λ = 520 nm (labeled B on the figures, assigned to the transition from the valence band to the anti-binding polaron state) and between λ = 750 nm and λ = 850 (assigned to the transition from the bonding to the anti-binding polaron state [21, 26, 29]) were observed.

The in situ UV–Vis spectra of the copolymers, i.e., CopA, CopC and CopE films are shown in Fig. 5c–e. The spectral features indicated the effects of concentration of monomers on the composition and thus properties of the polymer backbones. At higher concentration of pyrrole, a decrease in the absorbance around λ = 320 nm, and an increase in the band around λ = 500–520 nm and λ = 800 nm during oxidation of copolymer films as in the PPy spectra were observed. The position of the absorption band around λ = 320 nm was different from those for PPy and PIn, suggesting the formation of copolymer.

When the concentration of indole monomers was increased (Fig. 5e), a decrease in the absorbance between λ = 330 and 410 nm and an increase in the absorbance between λ = 700 and λ = 900 nm were observed during oxidation which were observed in the spectra of PIn sample as well. At intermediate concentrations of monomers (1–1 mol) (CopA), the behavior of the film was similar to both PPy and PIn films (Fig. 5c).

According to the literature [21], the observed spectral features were attributed to electronic transitions between several states: The valence band, conduction band, and polaron or bipolaron levels or bands. The bandgap transition A (labeled A around λ = 320–365 nm on the spectra) was assigned to the π  π* of the neutral polymer. The transition B (labeled B on the spectra around λ = 410–520 nm) was related to the transition from the valence band to the anti-binding polaron state. The long wavelength transition C (labeled C on the spectra around 700–900 nm) was associated with a transition from the bonding to the anti-binding polaron state [21, 26, 30].

FTIR analysis

FTIR transmission spectra of PPy, PIn, CopA, CopC and CopE films in the range of 500–4000 cm−1 are displayed in Fig. 6. The FTIR spectra of PPy and PIn polymer films have already been discussed by various researchers; it has been observed that the spectra of the films prepared in different laboratories do not match completely [3133]. The major FTIR bands for polymers and copolymer are listed in Table 1.

Fig. 6
figure 6

FTIR spectra of a PPy, b PIn, c CopA, d CopC and e CopE films

Table 1 Major infrared band and their assignments for PPy, PIn, CopA, CopC and CopE films

The characteristic vibrational bands associated with PPy and PIn are present in copolymers, but the considerable shift indicated the formation of copolymers instead of mixtures of homopolymers [15, 21]. The C=C stretching vibration modes observed in the PPy spectrum at 1638–1621 cm−1 were shifted to 1690, 1698 cm−1 in the PIn spectrum and to 1712 cm−1 in the copolymers spectrum.

The C=C bending vibration modes in the PPy spectrum at 1491 and 1460 cm−1, were shifted to 1552, 1539 and 1567 cm−1 in the PIn spectrum, respectively. The bands at 1275 and 1300 cm−1 corresponding to the C–N in-plane bending vibration modes in the PPy and PIn spectra were shifted to higher wavenumbers in the copolymers spectrum. The band at 735 cm−1 corresponding to the C–H in-plane bending vibration mode of alkene groups (C=C double band) in the PIn spectrum was shifted to the 740 and 741 cm−1 in CopA and CopE spectra, respectively. The FTIR results in this work for PPy and PIn samples were in good agreement with the results reported elsewhere [18, 20].

Morphological studies and mechanism of copolymerization

SEM micrographs of the PPy, PIn, CopA, CopC and CopE films are shown in Fig. 7a–e, respectively. Detailed investigations on polymer and copolymers showed that the film morphology depended on the preparation condition, counter ion, etc. [20]. The PPy film had a smooth surface with isolated nodules and large particle aggregates with a cauliflower form growing over it (Fig. 7a). Detailed investigation of PIn film showed that the polymer morphology depended on the preparation condition, nature of solvent and counter ion [34]. We observed a “dry mud cracks texture” shape for PIn sample (Fig. 7b) [20].

Fig. 7
figure 7

SEM micrographs of a PPy, b PIn, c CopA, d CopC and e CopE films

The micrographs of CopC film (prepared from 3 mol pyrrole and 1 mol indole) (Fig. 7c) show dispersed granular morphology with porosity. The micrographs of CopE film (prepared from 1 mol pyrrole and 3 mol indole) (Fig. 7e) are similar to those of PIn. The films had a smooth surface and a low porosity. The micrographs of CopA sample (Fig. 7c) were slightly similar to those of PPy and Pin films, possibly due to equimolar concentration ratio of the monomers in copolymerization solution.

A formation mechanism proceeding via radical cations of pyrrole [35, 36], indole [37] and of a possibly formed pyrrole-indole dimers taking into account the previous reports [38] for PIn, PPy and P(Py-In) is depicted in Scheme 1.

Scheme 1
scheme 1

Suggested mechanism of formation of P(Py-In) copolymer

FT-IR spectra confirm [28] the synthesis of copolymer.

Conclusion

Pyrrole and indole can be electrocopolymerized on gold electrodes in the potential range of −0.10 < E SCE < 0.90 V. The behavior of P(Py-In) and (P(NMPy-In) copolymers, during electrochemical synthesis, their in situ UV–Vis spectroscopy and in situ resistivity data have been evaluated. UV–Vis and FTIR results showed spectroscopic properties of the copolymers, in particular with samples at equimolar ratio in the electropolymerization solution, which were intermediate compared to those of the homopolymers. The in situ resistance of copolymers was increased with increasing (In)/(Py) ratio in the feed solution. The resistivity of P(Py-In) was lower than that of the P(NMPy-In). Morphology studies showed the similarity between homopolymers and copolymers. The results showed effects of monomer concentrations on electropolymerization process and polymer properties. Finally, a polymerization mechanism was suggested.