Introduction

Conducting polymers (CPs) containing π-conjugated aromatic rings throughout the polymer main chains are an attractive class of materials for their potential use in organic electronic devices [1, 2]. Oxidative electrochemical polymerization (known as electropolymerization) of aromatic monomers, including thiophene derivatives, is commonly regarded as a facile method to obtain CPs as deposited films on a working electrode, since the aromatic monomer undergoes anodic oxidation to generate its radical cation, followed by repeated coupling reactions [3, 4]. This methodology is very useful to obtain CP films because it is generally difficult to prepare thin films of such polymers by solution processes due to their low solubility in solvents.

Poly(3,4-ethylenedioxythiophene), commonly known as PEDOT, is an important derivative of polythiophene. Compared with other CPs, such as polypyrrole and polyaniline, PEDOT possesses better electrochemical properties, higher environmental stability in its doped state and faster doping–undoping process [5,6,7,8,9]. The dioxyethylene bridging group across the 3- and 4-positions of the heterocycle prevents the possibility of α–β′ coupling, thereby ensuring its electrochemical stability [10]. Moreover, the electron-donating effects and the geometric restrictions induced by both the cyclic substituent and attractive S···O intramolecular noncovalent interactions enhance the planarity and promote the self-rigidification observed in this CP [10]. These characteristics make PEDOT highly attractive for electronic devices, for example, thermoelectric devices [11, 12], solar cells [13], supercapacitors and ultracapacitors [14,15,16], field-effect transistors [17], electroluminescent devices [18, 19] and electrochemical sensors [20, 21].

On the other hand, carbazole is an aromatic tricyclic organic compound bearing two benzene rings fused on either side of a pyrrole ring. Polycarbazoles (PCBs), which are CPs based on the polymerization of carbazole or its derivatives functionalized at the 3,6-, 2,7- and/or N-positions, are used in a variety of applications such as light-emitting diodes [22], electrochromic devices [23, 24] and field-effect transistors [25]. Indeed, carbazole-based CPs exhibit very good optoelectronic properties (i.e. photoconductive, electroluminescent, electrochromic and photorefractive) as well as high thermal, morphological and photochemical stabilities [26, 27]. Early studies showed that the direct electropolymerization of carbazole derivatives in aprotic solvents presents severe disadvantages since a high potential for oxidation is required and the polymerization proceeds sluggishly, leading to short oligomers [28, 29]. However, the oxidative electrochemical polymerization was successful in protic environments, such as alcoholic media under acidic conditions [30].

Copolymers derived from the combination of 3,4-ethylenedioxythiophene (EDOT) and carbazole monomers are expected to capture the excellent properties of both PEDOT and the corresponding PCB. Three different synthetic approaches have been tried for the copolymerization of EDOT and carbazole units: direct oxidative electrochemical polymerization of EDOT and carbazole mixtures [31]; arylation polycondensation reactions using dibromocarbazoles and EDOT [32]; and the chemical synthesis of a carbazole–EDOT monomer that is subsequently used in electropolymerization reactions [33,34,35,36,37,38,39,40]. Within this context, it should be noted that heteroaromatic EDOT substituents can be introduced at the 2,7- or 3,6-positions of the carbazole derivatives, even though the most exploited strategy is the preparation of 3,6-EDOT-substituted carbazole derivatives [32,33,34,35,36,37,38].

Sadki and Chevrot [31] showed that the oxidative electrochemical polymerization of monomers mixtures is unsuccessful since the electropolymerization of carbazoles is much more efficient than that of EDOT. Thus, PCBs were the only products, even when EDOT was in excess in the initial mixtures [31]. Regarding the second synthetic approach, EDOT was copolymerized with a series of dibromocarbazoles by the phosphine-free and microwave-assisted direct arylation polycondensation [32]. This procedure successfully produced linear polymers when the 3,6-dibromocarbazole monomer was used, while monomers with different substitution patterns, such as 2,7-dibromocarbazole, did not afford linear polymers due to the occurrence of undesired crosslinking reactions, the poor reactivity caused by the steric hindrance and/or unsuitable catalysts.

The synthetic approach based on the combination of chemical and electrochemical processes has become the most popular one in recent years [33,34,35,36,37,38,39,40]. However, although polymers based on 2,7-diheteroaromatic carbazoles are expected to have more extended effective conjugation length than polymers based on 3,6-diheteroaromatic carbazoles, such studies have been focused on 3,6-EDOT carbazole derivatives [33,34,35,36,37,38] rather than on the 2,7-ones [39, 40]. Regarding to the latter, Kawataba and Goto [39] reported the synthesis of a monomer made of the N-butyl carbazole with 2,7-linked EDOT ends (i.e. N-butyl-2,7-di(2-(3,4-ethylenedioxythienyl))carbazole). The corresponding polymer, which was obtained by CV (i.e. the polymer film coated the Pt-electrode after 10 consecutive cycles) in acetonitrile with 0.1 M tetrabutylammonium perchlorate (TBAClO4), showed good electrochemical and optical stability. Cansu-Ergun and Önal [40] used an identical strategy for the synthesis of the N-unsubstituted monomer, 2,7-di(2-(3,4-ethylenedioxythienyl))carbazole, even though in the polymerization the TBAClO dopant was replaced by tetrabutylammonium tetrafluoroborate (TBABF4).

In this work, we report the synthesis of N-methyl-2,7-di(2-(3,4-ethylenedioxythienyl))carbazole monomer (Scheme 1), hereafter EMCzE, and the 2,7-EDOT N-methylcarbazole copolymer (PEMCzE) derived from the corresponding oxidative electrochemical polymerization. The latter has been conducted using both CV and chronoamperometry (CA), which are the methodologies usually employed to produce PCBs and PEDOT, respectively.

Scheme 1
scheme 1

Chemical structure of the EMCzE monomer

Methods

Materials

Reagent and solvents were purchased from Sigma-Aldrich Co. Silica gel used for the column chromatography was purchased from Merck SA (0.063–0.200 mm and 200–400 mesh). Compounds were used without further purification. Anhydrous LiClO4, analytical reagent grade from Aldrich was stored in an oven at 70 °C before use in electrochemical experiments.

Synthesis of the monomer

Synthesis of 4,4′-dibromo-2-nitrobiphenyl (2)

To a solution of 4,4′-dibromobiphenyl (1; 5.0 g, 16.0 mmol) in glacial AcOH (100 mL) at 100 °C was added slowly a 1:2 HNO3 (4 mL):H2SO4(8 mL) mixture of fuming. Once 1 is completely dissolved, the resulting solution was left to reflux for 1 h. After this, the solution was cooling down and the resulting yellow solid was collected by filtration and washed until neutral pH is reached. Recrystallization from EtOH resulted in small pale yellow spherulites, which were subsequently dried at 60 °C (12.0 mmol; 75% Yield); mp: 122–123 °C.

FTIR (KBr, cm−1): 3074–3091 (str., C–H arom), 1602–1465 (str., C = C arom), 1524 (str., C–NO2 arom asymm.), 1152 (str., C–N arom), 524 (str., C–Br).

1H NMR (CDCl3, TMS): δ (ppm) =7.29 (d, J = 8.31 Hz, 2H, CH), 7.50 (d, J = 8.31 Hz, 1H, CH), 7.66 (d, J = 8.32 Hz, 2H, CH), 7.98 (d, J = 8.31 Hz, 1H, CH), 8.27 (s, 1H, CH).

Synthesis of 2,7-dibromocarbazole (3)

A mixture of compound 2 (3.22 g, 9.01 mmol) and triethyl phosphite (P(OEt)3; 60 mL) was heated under reflux for 18 h in a N2 atmosphere. The excess of P(OEt)3 was distilled off, and the product was purified by column chromatography (silica gel as stationary phase and a 20:1 hexane/ethyl acetate mixture as eluent phase) to obtain 1.64 g of 3 as a white solid (5.04 mmol; 56%); mp: 236 °C.

FTIR (KBr, cm−1): 3399 (str., N–H, amine), 3072 (str., C–H, arom), 1600-1450 (str., C = C arom), 1325-1312 (str., C–N arom), 527 (str., C–Br).

1H NMR (CDCl3, TMS): δ (ppm) =7.30 (d, J = 8.31 Hz, 2H, CH), 7.70 (s, 2H, CH), 8.08 (d, J = 8.31 Hz, 2H, CH), 11.52 (s, 1H, NH).

Synthesis of 2,7-dibromo-N-methylcarbazole (4)

To a stirred mixture of 3 (1.00 g, 3.07 mmol) and anhydrous dimethylformamide (DMF; 15 mL) was added slowly NaH (0.15 g, 3.75 mmol). The solution was kept under stirring for 30 min. After this, methyl iodide (15.6 mmol) was added and the system was bubbled with N2 for 10 min. The solution was stirred for 18 h under Ar atmosphere. The reaction was quenched with water and extracted with CH2Cl2. The organic phase was dried with CaCl2. After filtering, the solvent was partially removed (~ 2/3) under reduced pressure. The remaining product was purified by column chromatography (10:1 hexane/ethyl acetate) to give 4 as a red light solid, which after recrystallization in ethanol formed white crystals with a needle-like morphology (1.83 mmol; 60%); mp: 196–198 °C.

FTIR (KBr, cm−1): 3057 (str., C–H, arom), 2925 (str., C–H, alkyl), 1586-1489-1451 (str., C = C, arom), 1327 (str., C–N, arom).

1H NMR (CDCl3, TMS): δ (ppm) =7.30 (d, J = 8.31 Hz, 2H, CH), 7.70 (s, 2H, CH), 8.08 (d, J = 8.31 Hz, 2H, CH), 11.52 (s, 1H, CH).

Synthesis of 2-tributyl-stannylated 3,4-ethylenedioxythiophene (5)

To a solution of commercial EDOT (1 mL, 1.29 g, 9.00 mmol) in THF (50 mL), n-butyl-lithium (1.6 M, 10.0 mL) in THF was added dropwise at − 78 °C under Ar. After stirring for 30 min, 1.10 mL of chlorotributyltin (9.20 g, 28.1 mmol) was injected with a syringe, and the resulting solution was stirred for 4 h. Then, the mixture was warmed to 0 °C and stirred at this temperature for 30 min. The mixture was washed with dichloromethane, and the solvent was evaporated to obtain a yellow viscous liquid. This product was employed in the following reactions without characterization.

Synthesis of EMCzE

The solution of 5 was transferred to a solution containing 24 0.7 g (2.06 mmol) and catalyst Pd(PPh3)4 (10% in mol). The mixture was heated to reflux for 24 h. After addition of water, the reaction mixture was extracted with CH2Cl2 (20 mL), and the organic phases were dried (MgSO4) and evaporated under reduced pressure. The crude product was purified by column chromatography on silica gel with a mixed solvent of n-hexane and ethyl acetate (v/v = 9/1) as an eluent to afford a yellow solid (0.57 g, 1.24 mmol). Yield: 60%. Characterization data for EMCzE are provided in the main text.

Synthesis of PEMCzE

Both anodic polymerization and electrochemical assays were performed with a potentiostat–galvanostat Autolab PGSTAT101 equipped with the ECD module (Ecochimie, The Netherlands) using a three-electrode compartment cell under nitrogen atmosphere (99.995% pure) at room temperature. Steel AISI 316 sheets of 1 × 1 cm2 in area were used as working and counter electrodes. To prevent interferences during the electrochemical assays, the working and counter electrodes were cleaned with acetone and ethanol before each trial. The reference electrode was an Ag/AgCl electrode containing a KCl saturated aqueous solution (offset potential versus the standard hydrogen electrode, E0= 0.222 V at 25 °C), which was connected to the working compartment through a salt bridge containing the electrolyte solution.

PEMCzE films were prepared by chronoamperometry (CA) under a constant potential of 0.70 V. The cell was filled with 50 mL of a 10 mM EMCzE acetonitrile solution containing 0.1 M LiClO4 as supporting electrolyte. Before conducting the anodic polymerization of EMCzE to produce PEMCzE films, the overall solution was stirred at 500 rpm for 40 min and purged with nitrogen. The polymerization time, θ, was kept fixed at 200 s, which was the time necessary to obtain a complete and homogeneous coating of the steel electrode. Polymerization of EDOT monomer to obtain PEDOT was conducted using identical experimental conditions with exception of the potential, which was kept fixed at 1.40 V.

Additionally, PEMCzE films were also prepared using the potentiodynamic sweep technique. Accordingly, cyclic voltammetry (CV) was used to apply consecutive potential scans and directly deposit the polymer film on the surface of the steel electrode. For this purpose, PEMCzE films were electropolymerized using a 10 mM EMCzE acetonitrile solution containing 0.1 M LiClO4 and applying potentials between − 0.5 V and 0.7 V at a scan rate of 100 mV/s. The number of consecutive voltammetric cycles was adapted to a polymerization charge of 0.01732 C, which corresponds to the charge applied when the polymer was prepared by CA under a constant potential of 0.70 V.

Characterization

Characterization of the organic intermediates and the EMCzE monomer was performed using the following equipment. Melting points were recorded using a Melt-Temp II equipment. FTIR analyses were conducted using a PerkinElmer Spectrophotometer, Spectrum RX FTIR model. 1H and 13C NMR spectra were obtained using a Brucker Avance 300 MHz, while mass spectra were recorded in a Varian 1400.

All electrochemical assays were performed in acetonitrile with 0.1 M LiClO4 as supporting electrolyte. Cyclic voltammetry (CV) assays were performed to evaluate the electrochemical activity and stability of PEMCzE. A scan rate of 100 mV/s was used in all cases. The electrochemical stability was evaluated by conducting up to 100 consecutive cycles using a potential ranging between − 0.50 and + 1.00 V. On the other hand, galvanostatic charge/discharge (GCD) curves using different currents were also run to examine the cycling stability.

Electrochemical impedance spectroscopy (EIS) measurements were taken in potentiostatic mode at open circuit (OCP) using an AUTOLAB-302N potentiostat/galvanostat. The amplitude of the EIS perturbation signal was 50 mV, and the studied frequency ranged from 10 kHz to 10 mHz. All EIS assays were carried out in an acetonitrile solution containing 0.1 M LiClO4.

Scanning electron microscopy (SEM) studies were performed to examine the surface morphology of PEDOT and PEDOT/Al2O3 films. Dried samples were placed in a Focussed Ion Beam Zeiss Neon 40 scanning electron microscope operating at 3 kV, equipped with an energy-dispersive X-ray (EDX) spectroscopy system.

Atomic force microscopy (AFM) images were obtained with a Molecular Imaging PicoSPM using a NanoScope IV controller under ambient conditions. The tapping mode AFM was operated at constant deflection. The row scanning frequency was set to 1 Hz. AFM measurements were taken on various parts of the films, which provided reproducible images similar to those displayed in this work. The statistical application of the NanoScope Analysis software was used to determine the root mean square roughness (Rq), which is the average height deviation taken from the mean data plane.

Contact angle measurements were taken using the sessile drop method at room temperature on an OCA 15EC with SCA20 software (Data Physics Instruments GmbH, Filderstadt, Germany). The solvent used for these experiments was deionized water, contact angle being determined for the first drop. For measurements, the sessile drop was gently put on the surface of sample discs using a micrometric syringe with a proper metallic needle (Hamilton 500 μL). The ellipse method was used to fit a mathematical function to the measured drop contour. This procedure consists in approximating the drop contour to the line of an ellipse, deviations from the true drop shape being in the range of a few per cent. The ellipse method provides accurate measure of the contact angle and holds the advantage that it is extremely fast. For each sample, no less than fifteen drops were examined.

Results and discussion

Synthesis of monomer

Several synthetic strategies have been developed over the years to add functional groups at the 2,7- and N-positions of the carbazole unit [41]. In this work, we followed three-step procedure reported by Aristizabal et al. [42] (Scheme 2), which can be summarized as follows: (i) reaction of the commercially available 4,4′-dibromobiphenyl (1) into 4,4′-dibromo-2-nitrobiphenyl (2) through nitration; (ii) transformation of 2 into 2,7-dibromocarbazole (3) by a reductive Cadogan ring closure reaction; and (iii) alkylation of the nitrogen atom of 3 with methyl iodide in presence of sodium hydride to afford 2,7-dibromo-N-methylcarbazole (4). Then, the Stille coupling reaction of 2-tributyl-stannylated 3,4-ethylenedioxythiophene (5), which was prepared by stannylation of EDOT according to previously reported procedure (Scheme 2) [43], and 4 was performed in dry THF with Pd(PPh3)2Cl2 as the catalyst under dry N2 atmosphere and constant stirring. The reaction proceeded with a reaction time of 24 h and relatively high yield (60%) to afford EMCzE (Scheme 2).

Scheme 2
scheme 2

Synthetic route used for the preparation of PEMCzE

The chemical structure of EMCzE was confirmed by 1H NMR, 13C NMR and mass spectroscopy. In the 1H NMR spectrum (Fig. 1a), the aromatic peaks were ascribed to the 2,7-carbazole unit. In addition, the methyl group directly attached to the nitrogen atom of the carbazole and ethylene groups of EDOT were detected at 3.85 and 4.32 ppm, respectively. This interpretation is fully consistent with the 13C NMR spectroscopy (Fig. 1b) and ion mass spectrometry (available upon request) characterization.

Fig. 1
figure 1

a1H and b13C NMR spectra of EMCzE

1H NMR (300 MHz, CDCl3, δ ppm) = 3.85 (s, 3H, CH3), 4.32 (dd, J = 20.7, 3.91 Hz, 8H, ethylene), 6.33 (s, 2H, Thio), 7.63 (d, J = 6.61 Hz, 2H, Cbz), 7.75 (s, J = 0.92 Hz, 2H, Cbz), 8.01 (d, J = 8.19 Hz, 2H, Cbz).

13C NMR (100 MHz, CDCl3, δ ppm) = 28.02 (A), 64.10 (B), 64.35 (C), 97.58 (D), 106.12 (E), 118.56 (F), 119.07 (G), 120.43 (H), 122.09 (I), 131.10 (J), 138.97 (K), 142.86 (M), 143.12 (N).

HRMS (APCI) m/z calcd for C25H19NO4S2 ([M + H]+) 461.08, found 461.55.

Anodic polymerization

Figure 2a compares the cyclic voltammograms recorded for 10 mM of the EMCzE monomer in acetonitrile for increasing values of the final potential (i.e. from + 0.30 to + 1.40 V), whereas the initial and final potentials are kept at − 0.50 V. Uniform, adherent, insoluble and dark blue PEMCzE films clearly grew on the steel AISI 316 sheet used as working electrode. Three anodic peaks, O1, O2 and O3, with anodic peak potentials of 0.31 V, 0.59 V and a value higher than the reversal potential were detected, which have been attributed to earlier stages of the polymerization process and the oxidation of the polymer to polarons and bipolarons, respectively. The peaks of the cathodic processes, R3 and R2, at the reduction scans appear at 0.71 and 0.37 V, respectively, indicating that the formation of bipolarons and polarons are quasi-reversible processes.

Fig. 2
figure 2

a Cyclic voltammograms (second cycle) of a 10 mM EMCzE solution in acetonitrile with 0.1 M LiClO4 on steel electrodes. Initial and final potentials: − 0.50 V; reversal potential: from 0.30 to 1.40 V in increments of 0.10 V. b Control voltammograms in acetonitrile with 0.1 M LiClO4 of PEMCzE generated by CA at 0.60, 0.70, 0.80 and 0.90 V on steel electrodes. Initial and final potentials: − 0.50 V; reversal potential: the potential used for the chronoamperometric polymerization. c Variation of the weight per area unit of PEMCzE films deposited in steel from a 10 mM 1 solution in acetonitrile with 0.1 M LiClO4 at a constant potential of 0.70 V against the polymerization charge consumed. In all cases, the scan rate and temperature were 100 mV/s and 25 °C, respectively

Figure 2b compares the voltammograms recorded for PEMCzE films prepared by CA in acetonitrile with 0.1 M LiClO4 at a constant potential of 0.60, 0.70, 0.80 or 0.90 V, which was also used as the reversal potential in the CV. Voltammograms indicate that the maximum current intensity at the O2 peak occurs for the material prepared using 0.70 V. Thus, the electrochemical activity, which indicates the ability of the CP to exchange charge reversibly and is determined by comparing the cathodic and anodic areas of the voltammogram, decreases above such threshold value. Such loss of electrochemical activity, which is maintained for polymers prepared using reversal potentials higher than 0.90 V (not shown), reflects that the entrance and escape of dopant ions during the oxidation and reduction of PEMCzE, respectively, become more difficult. This behaviour is probably due to an increment in the structural compactness, at least in the surface. According to these observations, hereafter PEMCzE has been prepared by CA choosing a constant potential of 0.70 V. This value is lower than the potential optimized for the chronoamperometric polymerization of EDOT in the same reaction medium, which was 1.40 V [44].

The kinetics for the anodic polymerization of the EMCzE monomer was studied by generating films of PEMCzE under a constant potential of 0.70 V and considering different polymerization times (tpol). Reproducible film weights, Wox (in mg/cm2), were always obtained. The polymerization charge, Qpol (in C/cm2), consumed in each process was directly calculated on each the chronoamperogram. The variation of Wox against Qpol, which is represented in Fig. 2c, provides a linear correlation with an excellent regression coefficient (i.e. R2 = 0.998) when an independent term is considered (i.e. Qpol = a·Wox+ b), decreasing to R2 = 0.901 when such term is eliminated (i.e. Qpol = a·Wox). This feature reflects a deviation from the ideal Faradaic behaviour, which has been attributed to the monomer diffusion contribution. The slope of this plot, which corresponds to the current productivity, indicates that 9.51 mg of PEMCzE is produced per coulomb of charge consumed during the polymerization, independently of the electrode area.

Electrochemical characterization

Films of PEMCzE were prepared by CA under a constant potential of 0.70 V using a polymerization time of 200 s. Figure 3a displays the variation of cyclic voltammograms recorded for PEMCzE in acetonitrile with 0.1 M LiClO4 using a potential ranging between − 0.50 and + 1.00 V against the number of consecutive oxidation–reduction cycles. It should be mentioned that the polymerization time and the potential range were optimized to achieve the maximum electrochemical activity. The anodic peak potential of O2 appears at 0.44 V, while O3 overlaps the oxidation potential of the medium. In addition, two reduction peaks, R2 and R3, are detected in the cathodic scanning with peak potentials of 0.27 and 0.69 V, respectively, indicating the presence of reversible redox pairs. The electrochemical activity decreases with the number of redox cycles, as the area of the voltammogram decreases. After the first 10 consecutive redox cycles, the system self-stabilizes and the loss of electroactivity (LEA) is ~ 7%. The LEA increases to ~ 24% after 100 cycles (Fig. 3b), indicating a linear progressive reduction of the electrochemical stability, which amounts to 1.6% every 10 cycles. Although both the electrochemical activity and stability of PEMCzE are significantly higher than those of many other CPs (e.g. polythiophene and polypyrrole derivatives) [1], the electrochemical performance of the former is lower than that of PEDOT [15, 45], which is among the most important and used CPs.

Fig. 3
figure 3

a Cyclic voltammograms in acetonitrile with 0.1 M LiClO4 of PEMCzE. The second voltammogram is displayed in red, even though up to 100 consecutive redox cycles were applied. For clarity only one of every 10 cycles is represented in the graph (in black). b Loss of electroactivity (LEA) against the number of consecutive redox cycles. c Galvanostatic charge–discharge curves for PEMCzE in acetonitrile with 0.1 M LiClO4 at 5 mA. In all cases, PEMCzE was prepared by CA using a constant potential of 0.70 V and a polymerization time of 200 s

Galvanostatic charge–discharge (GCD) curves at 0.10 and 0.12 mA (available upon request) showed a typical triangular shape with a small voltage drop at the beginning of the discharging step. In general, PEMCzE displays quasi-symmetric charge–discharge curves, evidencing good capacitive properties. As it was expected, the cell voltage increases with the current intensity and the response was retained after several consecutive charge–discharge cycles, reflecting that the ions movement is not altered. Figure 3c displays the GCD curves obtained at 5 mA, in which the cell voltage increased to more than 2.50 V. This evidences that the polymer is stable and preserves the structure, as will be proved in the next sections by comparing the morphology of PEMCzE as prepared and after a large number of consecutive redox cycles.

EIS was employed to obtain more information about the capacitive properties of the PEMCzE. Figure 4 shows the Nyquist plots recorded for PEMCzE as prepared, as well after 50 and 100 consecutive oxidation–reduction cycles in the potential range from − 0.50 to 1.00 V at a scan rate of 100 mV/s. In all cases, Nyquist plots show three well-defined regions: (1) a depressed capacitive semicircle at high frequencies related to the polymer–electrolyte interface; (2) a linear region with a slope around 45° is observed, which reflects a Warburg diffusion behaviour, at intermediate frequencies; and (3) a nearly vertical line at low frequencies, which has been related to the Faradaic pseudo-capacitance of the ultracapacitors. Indeed, the EIS spectra displayed in Fig. 4 are pretty similar to those reported for PEDOT as prepared and after consecutive redox cycles [46].

Fig. 4
figure 4

Nyquist diagrams of PEMCzE as prepared and after both 50 and 100 consecutive oxidation–reduction cycles in the potential range between − 0.90 and 1.00 V at a scan rate of 100 mV/s. The inset in the right side displays the magnification of the Nyquist diagram for the as-prepared polymer

The diameter of the semicircle at high frequencies extrapolated in the Nyquist diagram represents the charge transfer resistance RCT, which indicates the facility to exchange anions between the polymer and the electrolyte. Thus, the larger the diameter of the semicircle, the higher the polarization resistance is. As it can be seen, the polarization resistance is very low for the as-prepared polymer, increasing very rapidly with the number of redox cycles. This indicates that the resistance to mass transfer increases with the number of redox cycles (i.e. the diffusion of ions between the polymer and the electrolytic medium becomes more difficult), which is in agreement with the cyclic voltammograms displayed in Fig. 3a. Moreover, Warburg slope diminishes partially with the increasing number of redox cycles, indicating an increment of insulating properties.

The RCT determined for as-prepared PEMCzE is 44 Ω. Although this value is one of order of magnitude higher than that reported for as-prepared PEDOT (RCT = 3–5 Ω, depending on the dopant ion [47, 48]), it should be remarked that the thickness of the film, as determined by profilometry, is lower for PEMCzE (~ 0.4 μm) than for PEDOT (~ 1.7 μm). The PEMCzE film conductivity (\( \sigma \)) was estimated from Eq. 1:

$$ \sigma = \frac{{L}}{{R_{\text{CT}} A}} $$
(1)

where σ is the conductivity (S/cm), L is the thickness of the film (in cm), and A is the area of the electrode (1 cm2). Accordingly, the σ values derived for PEMCzE and PEDOT are ~ 1 × 10−9 and ~ 5 × 10−5 S/cm, respectively.

Surface characterization

Figure 5a displays representative high- and low-magnified scanning electron microscopy (SEM) micrographs of PEMCzE. As it can be seen, polymer chains grow forming very compact films from which aggregates with a globular morphology stand out. The low amount of empty spaces among aggregates results in a low surface porosity. This represents an important difference with respect to PEDOT films prepared using a fixed potential of 1.40 V and a polymerization time of 200 s, which shows a sponge-like surface (Fig. 5b). As it can be seen, emerging PEDOT agglomerates exhibit angled corners that are typically associated with the formation of dense networks of sticks with a fibre-like morphology. As a consequence, the surface of PEDOT presents a large amount of tortuous pores forming a continuous open structure, which facilitates the access and escape of electrolyte ions during electrochemical redox processes.

Fig. 5
figure 5

Low- and high-magnification SEM images of a PEMCzE and b PEDOT. 3D topographic AFM image of c PEMCzE (25 × 25 μm2) and d PEDOT (20 × 20 μm2). PEMCzE and PEDOT were prepared by CA in acetonitrile with 0.1 M LiClO4, using a polymerization time of 200 s, and applying constant potential of 0.70 and 1.40 V, respectively

3D topographic atomic force microscopy (AFM) images of PEMCzE and PEDOT, which are provided in Fig. 5c, d, respectively, are fully consistent with SEM observations. Thus, the topography of PEMCzE is less abrupt that that of PEDOT, aggregates being bigger and more abundant for the latter than for the former. Moreover, the root mean square roughness (Rq) is lower for PEMCzE (Rq = 280 nm) than for PEDOT (Rq = 445 nm).

Figure 6a, b displays SEM and AFM images of PEMCzE after 50 and 100 consecutive redox cycles, respectively. As it can be seen, the surface morphology and topography are affected by such aggressive electrochemical treatment. Specifically, globular aggregates tend to collapse with increasing number of redox cycles, closing the surface porosity and making more difficult the transport of ions during the oxidation (i.e. entrance of ions from the electrolytic medium into the film) and reduction processes (i.e. escape of ions from the film to the electrolytic medium). This closing is also evidenced by the Rq, which decreases from 322 to 217 nm after 100 redox cycles. Indeed, in some cases the collapse of the aggregates produces strong tensions in the surface of the films and induces the apparition of areas of physical breakage (micrographs available upon request). The reduction in the surface roughness causes a slight decrease in the hydrophilicity, as it is shown by water contact angle (WCA) measurements. Thus, the WCA of as-prepared PEMCzE, 75° ± 1°, increases to 82° ± 3° and 83° ± 5° after 50 and 100 consecutive redox cycles, respectively. Besides, the WCA of PEDOT electropolymerized in acetonitrile under a constant potential of 1.40 V, 65° ± 6°, is lower than that of as-prepared PEMCzE. The higher hydrophilicity of PEDOT should be mainly attributed to the relative concentration of oxygen atoms, which is higher than for PEMCzE.

Fig. 6
figure 6

SEM micrographs (left and centre) and 3D topographic AFM image (right; 25 × 25 μm2) of PEMCzE after a 50 and b 100 consecutive redox cycles

Comparison with the morphology obtained by potentiodynamic sweep

It is worth noting that, in previous studies, the electropolymerization of 2,7-EDOT carbazole monomers was conducted using the potentiodynamic sweep technique [39, 40] rather than at a constant potential, as in this work. Accordingly, multistep CV was used to apply consecutive potential scans and directly deposit the polymer film on the surface of the working electrodes. In this section, we compare the surface properties of PEMCzE films prepared by potentiodynamic sweep with those of films obtained by CA (previous section). For this purpose, PEMCzE films were electropolymerized using a 10 mM EMCzE acetonitrile solution containing 0.1 M LiClO4 and applying potentials between − 0.5 V and 0.7 V at a scan rate of 100 mV/s. The number of consecutive CV steps was adjusted to that required for a polymerization charge of 0.01732 C, which corresponds to the charge applied by CA under a constant potential of 0.70 V during 200 s. This comprised between 96 and 101 steps.

Figure 7a displays representative SEM and AFM micrographs of PEMCzE films as prepared by potentiodynamic CV. As it can be seen, the surface morphology and topography are very heterogeneous and completely different from that of films prepared by CA (Fig. 5c). Thus, PEMCzE chains grown by CV arrange forming nanometric globules, which in turn group into bigger and relatively porous aggregates. These aggregates, which do not present any defined shape, distribute randomly onto the substrate. Although a large number of cycles are used in the electropolymerization, the disposition of the copolymer onto the surface is very heterogeneous and the steel substrate is not completely covered by PEMCzE aggregates. As a consequence of this particular organization, the surface roughness of films prepared by CV, Rq = 567 nm, is significantly higher than that of for films produced by CA.

Fig. 7
figure 7

SEM micrographs and AFM images of PEMCzE electropolymerized by multistep CV a as prepared, and after b 50 and c 100 consecutive redox cycles

Figure 7b, c shows SEM and AFM images of potentiodynamically prepared PEMCzE films after 50 and 100 consecutive redox cycles, respectively. Apparently, the morphology of the aggregates does not change with increasing number of cycles and the above-mentioned surface heterogeneity is maintained. Because of the existence of uncovered electrode regions, the structural changes induced by the entrance and escape of dopant ions do not cause alteration in the roughness of the aggregates, which remains at Rq ≈ 550 nm. On the other hand, the WCA of PEMCzE prepared by CV is 56° ± 2°, increasing to 65° ± 3° and 67° ± 5° after 50 and 100 redox cycles, respectively. These values are smaller (16°–19°) than those determined for the polymer prepared by CA, which has been attributed to the effect uncovered steel zones. Thus, steel AISI 316 is highly hydrophilic, exhibiting a WCA of 48° ± 1°.

Overall, comparison of the copolymers obtained by CA and multistep CV indicates that the former electrochemical methodology is the most appropriate one to obtain homogeneous PEMCzE films from acetonitrile monomer solutions and using LiClO4 as dopant agent. In the potentiodynamic electrosynthesis, the copolymer films continuously change from its neutral state to its doped state as the potential is swept back and forth. This process is not only accompanied by the continuous absorption and desorption of the dopant agent and solvent to stabilize the system, but also by changes in the monomer diffusion and, consequently, in the diffusion-controlled processes. These cause a loss in the efficiency of the deposition of formed species onto the steel electrode, as compared with the potentiostatic electropolymerization.

Conclusions

As a conclusion, the regular copolymer formed by EDOT units linked at the 2,7-positions of N-methyl-carbazole units was successfully synthesized by oxidative electrochemical polymerization of the chemical synthesized EMCzE monomer. Electrochemical polymerization of EMCzE by CA at a constant potential of 0.70 V has been found to be much more effective than by potentiodynamic CV. Thus, PEMCzE films deposited using the latter technique are not homogeneous and do not completely cover the steel electrodes, even after apply the 100 voltammetric cycles required to achieve the same polymerization charge than by CA. Electrochemical, electrical and surface properties of the copolymer have been evaluated and compared to those of PEDOT prepared using the same polymerization medium and a constant potential of 1.40 V. Finally, the advantages of the CA with respect to the multistep CV, which is the technique usually employed for the electropolymerization of carbazole–EDOT monomers, have been shown. Thus, potentiodynamic CV results in the formation of incomplete heterogeneous films. Overall, copolymers formed by N-methylcarbazole and 2,7-linked EDOT units are suitable candidates for the development of applications requiring functionalized CPs with excellent electrochemical and electrical properties, which can be easily synthetized.