Introduction

Poly (3,4-ethylenedioxythiophene), PEDOT, is one of the conductive polymers that is intensively studied due to its excellent properties, such as good electrochemical and thermal stability, biocompatibility, flexibility, and high conductivity, just to name a few [1,2,3].

It is well known that organic charge transport materials, a class to which the conductive polymers belong, can be divided into p-type and n-type materials. Usually, the conductive polymers can be doped via chemical and the electrochemical approaches [4], so that both states, p-doped (oxidized) and n-doped (reduced), can be realized. The process involved in p-doping is equivalent to withdrawing electrons from the π-system of the polymer backbone. This results in a positively charged unit in the conductive polymer [4, 5]. Electrons are introduced into the π-system of the polymer backbone for n-doping, and a negatively charged unit in the conjugated system is thus formed [4, 5].

p-doped PEDOT films can be used as positive electrodes in batteries [6,7,8,9], in microlithography [10], for corrosion inhibition [11], in solar cells [12] or in sensors [13,14,15,16,17,18,19,20,21].

It was observed that some conformational changes occur in a conductive polymer film when it is immersed in an electrolyte. Otero et al. [22, 23] suggested a model called “electrochemically stimulated conformational relaxation” to explain this. The conductive polymers should keep their electroneutrality, even under electric current flow [24, 25]. Therefore, application of an anodic potential to a neutral conjugated polymer may cause an expansion of the polymeric structure [23]. Partial oxidation takes then place and counterions from the solution enter into the conductive polymer under the influence of the electric field [23]. During reduction, opposite processes occur, the positive charges on the polymer are neutralized and counterions are expelled. Diffusion of the counterions becomes more and more difficult, as the structure closes. The degree of compaction depends on the cathodic potential applied to the polymer and will be more efficient at more negative potentials. The compact structure hinders counterion exchange with the solution [23]. The oxidation process is completed by diffusion of counterions through the already opened structure of the polymer, due to an applied anodic potential.

It is important to know which ions are expulsed or enter in a conductive polymer during its charging/discharging, as this will also influence other properties of the films, such as their morphology, electrochemical response, ionic conductivity, capacitance, or stiffness.

The mechanism of ion transport during charging and discharging of conductive polymers has been studied using several techniques, including electrochemical quartz crystal microbalance (EQCM) [26,27,28,29], secondary ion mass spectrometry (SIMS) [30] or atomic absorption, and X-ray photoelectron spectroscopy (XPS) measurements [31, 32], just to mention a few.

Numerous studies proved that EQCM is a powerful technique to investigate surface processes and to study the ionic and solvent exchange at the polymer/solution interface [33, 34]. We also choose the EQCM technique in this study, to investigate the effect of SDS and ClO4 anions on the cation exchange ability of electrochemically prepared PEDOT films.

Several studies showed that when PEDOT was electrodeposited in the presence of relatively small anions (ClO4, NO3, citrate, SO42−, BF4, PF6), the film acts as anion exchanger, the movement of cation being most of the time neglected [35, 36]. Some reports call attention to the role of solvent, more precisely that beyond the obvious effect of solvation of the electrolyte ions, ionic movements are usually accompanied by solvent expulsion during doping and solvent incorporation during de-doping [33, 37, 38]. Hillman et al. studied PEDOT films in 0.1 M acetonitrile lithium perchlorate solutions using EQCM [38] and showed that the solvent movement during of p-doping does not occur monotonously: at first the film is oxidized at high positive potential and the solvent is expelled; then the solvent flux changes direction, when a negative potential is applied. Hillman et al. concluded that the reduced film is strongly solvated and the fluxes of solvents and ion dopants are not interrelated [38].

It has been shown that although anion incorporation is the simplest phenomenon in the charge compensation during the oxidation of conductive polymers, the process involves also cation and solvent motion, depending on the deposition conditions, e.g., electrode potential applied during the electrodeposition [33, 39, 40]. Cations can participate in the processes of the PEDOT film p-doping. This was proven by Toth et al. [39], where ion transfer was studied at the polymer film interface with aqueous solution of complex electrolytes containing cations such as Na+, K+, and Ru+ and by Fuentes et al. [40] for PEDOT films doped with metallacarborane [Co(C2B9H11)2] , in the presence of Cs+, Na+, K+, Li+, and H+ cations. However, a number of recent studies indicated a complex mechanism, according to which larger ions can also move in the layer during the redox process.

Conductive polymers can be used as active materials for the positive electrodes of rechargeable aluminum batteries [41, 42]. The chemistry of the batteries was based on chloroaluminate ionic liquids, and the electrodes were electrochemically prepared polypyrrole and polythiophene in [41], and PEDOT films in [42], respectively. The doping level of anions from the solutions was measured in both cases by EQCM. The conductive polymers were doped/de-doped with chloroaluminate anions. The doping level was approximated to four monomer units per anion dopant molecule in [41]. Schoetz et al. showed [42] that the doping of PEDOT film consists of a mixture of Cl and AlCl4 anions. The mixed participation of the electrolyte cations and anions in the charge transfer processes in the PEDOT layer has also been discussed in [20, 38,39,40].

Theoretical approaches describing ion exchange in conductive polymer film during charging processes have been proposed by Vorotyntsev et al. in [25]. One model assumes the existence of two types of ions in the polymer film: one that are free to move, and the other that are bound to the film, due to thermodynamic, kinetic, or geometrical reasons. Correspondingly, the second model treats both anions and cations in the polymer film as being free to move and to be exchanged with the solution. Three cases can be then defined: (i) when there is a complete ionic equilibrium with the solution, (ii) when there is only an irreversible anion transfer, and (iii) when cation exchange also occurs [25]. This model was used previously by us to study the p-doping and the de-doping process of PEDOT films in ionic liquids [21] and aqueous solution [37].

Why is SDS added in solutions for electrochemical preparation of PEDOT films? Due to the low solubility of the EDOT monomer in water (2.1 g/L at 20 °C), an efficient oligomerization in aqueous solutions can only be achieved by the addition of surfactants [43]. It was shown that the current density during polymerization increases significantly in the presence of micelles of different surfactants [37, 43,44,45,46]. The monomer oxidation is also shifted to lower values in micellar media [43, 46]. Systematic studies from Sakmeche et al. showed that the oxidation potential in anionic micellar solutions like SDS is lowered, whereas no significant changes occur for cationic, like cetyltrimethylammonium chloride, CTAC, as well nonionic, like Triton X100, surfactants [43]. This invariance of the monomer oxidation potential is explained by Sakmeche et al. that no or repulsive interactions took place between cationic or nonionic surfactants and the radical cations formed during the first step of the polymerization. The variation of the oxidation potential in anionic micellar solutions demonstrates the existence of specific stabilizing interactions between anionic surfactants and the reacting radical cations [43, 46]. SDS anions can be trapped inside the polymer layer during its formation, providing a cation exchange behavior [39, 43, 47]. Lyutov et al. showed that polymerization rates of PEDOT in the presence of SDS are smaller than in PEDOT/ PSS (polystyrene sulfonate) solutions, due maybe to the hydrophobic interactions between the dodecyl aliphatic tail and the PEDOT film [48]. The PEDOT layers obtained in SDS solutions were more rigid than those obtained in PSS or PAMPS (poly(2-acrylamido-2-methyl-l-propane sulfonate)) solutions. The deposited PEDOT films were in the form of folded lamellas when SDS was present in solution, while in solutions containing PPS or PAMPS they looked like a gel [48].

Two types of PEDOT layers were investigated with EQCM in this study: one synthesized from an electrolyte containing SDS and the second one from an electrolyte without SDS. The supporting electrolyte was 0.2 M LiClO4 in both cases. This study focusing on electropolymerization and cation exchange behavior of PEDOT films contains two parts. First, we investigate the effect of SDS on the stiffness and polymerization rate of the PEDOT films. The optimal SDS concentration that should be added to the electrolyte during polymerization was identified for obtaining the highest polymerization rates. Finally, the obtained PEDOT films were transferred in different aqueous solutions containing cations with different molar mass, such as H+, Na+, Li+, K+, and Cs+. Cyclic voltammetry experiments were performed in these electrolytes to show the individual and cumulative effect of SDS and ClO4 anions which could be incorporated in the PEDOT film during electropolymerization, on further doping/de-doping processes with cations of different masses.

The results presented here contribute to a better understanding on the effect of the electrolyte composition on the properties of the polymer films.

Experimental

Chemicals and electrolytes

All chemicals were purchased from Alfa Aesar in their highest purity available and were used as received. Deionized water having a resistivity of 18.2 MΩ cm at 25 °C was freshly prepared before each experiment with a Milli-Q® Direct 8 device from Merck.

Two types of electrolytes were used in electropolymerization experiments, one consisting of 8 mM 3,4-ethylenedioxythiophene (EDOT), and 0.2 M LiClO4, and the second one containing also sodium dodecyl sulfate (SDS) in different concentrations. The EDOT was used as functional monomer, LiClO4 as supporting electrolyte, and SDS as surfactant. The solution was stirred using a magnetic stirrer for 1 h in a covered beaker of 100 mL, to assure the complete mixing of all compounds. The pH of the electrolyte was 4.2.

Table 1 gives the solutions used for studying the ions exchange behavior during the redox switching of the PEDOT layer. The pH of the solutions was measured with a portable pH meter SevenGo from Mettler Toledo.

Table 1 Composition of solutions used to study the cation exchange behavior of PEDOT films

Electrochemical setup

The electrochemical setup consisted of a three-electrode cell. AT-cut quartz crystals of 15-mm diameter and 165-μm thickness from Vectron International, Germany, with key-shaped gold electrodes of ca 0.22 cm2 and 100-nm thickness on each surface, were used as working electrodes. The counter electrode was a platinum foil of approximately 3.7 cm2 and 0.2-mm thickness and the reference electrode, an Ag/AgCl in 3 M KCl electrode (Meinsberg, Germany). All measurements were performed at room temperature (25 °C ± 2 °C). Prior to all experiments, the solutions were purged with argon, for more than 30 min, and an argon blanket was maintained over the electrolytes during the entire measurement. A Teflon cylindrical cell with 3.6-cm inner diameter and 4.2-cm height was used for the electrochemical experiments [49].

All electrochemical measurements were performed with an EG&G Versastat II potentiostat/galvanostat (USA) controlled by lab-made software [15, 50]. The PEDOT layers were synthesized by potentiostatic step and potentiodynamic techniques. Potentiostatic step deposition was performed from 0.1 V (for 30 s) to 0.84 V vs Ag/AgCl. The potential of 0.84 V was chosen to avoid overoxidation of the polymer. Cyclic voltammetry experiments at a scan rate of 50 mV/s were used for the deposition of PEDOT, and at 0.1, 1, and 20 mV/s for studying the ion exchange behavior of the films. A minimum of eight measurements was performed for each individual experimental condition in order to check the reproducibility of the results.

EQCM gravimetry and acoustic impedance measurements

The resonance frequency of the unloaded AT-cut quartz crystals was ca. 10 MHz. The quartz crystal was placed at one end of the cell, and fixed between an O-ring (Viton, solution side) and a silicone gasket on air side. Acoustic admittance spectra were recorded with an Advantest R3753BH network analyzer (Advantest, Tokyo, Japan) in the reflection mode. Each admittance spectrum was transferred to a computer via GPIB interface and then fitted with a Lorentzian function [50]. Besides the resonance frequency of the quartz crystal, the full width at half maximum of the resonance curve was also measured. This is proportional to the damping of the quartz crystal, w, and represents dissipated energy.

As shown by Sauerbrey, changes in the resonance frequency are proportional to the mass accumulated on the crystal (Eq. 1) [51]:

$$ \Delta f=-\frac{2{f}_0^2}{Z_{\mathrm{q}}}\Delta m $$
(1)

In Eq. 1, ∆f is the shift in the resonance frequency of the quartz crystal when a rigid mass density, ∆m, is deposited on one side of the resonator, Zq is the mechanical impedance of quartz, and f0 is the resonance frequency of the unloaded quartz.

The Sauerbrey equation can be applied for thin rigid deposits if: (i) the deposited layer has a uniform thickness; (ii) if the mechanical impedance of the deposited layers does not differ strongly from that of the quartz crystal. Other factors such as roughness of the electrode, changes in the viscoelasticity of the deposit due to changes in morphology and swelling of the films or surface hydration changes as a function of the applied potential should be taken into account if the deposited films are either rigid-thick or soft [51,52,53,54]. However, Eq. 1 can be applied to calculate the deposited mass of conductive polymer if the change in resonance frequency is much larger than the change in the damping of the quartz, Δw. The value of Δw can be correlated with the mechanical properties of the film like viscosity, roughness or rigidity. As a rule of thumb, high damping values indicate a soft film and low values a more rigid film [49].

The electropolymerization experiments were stopped when the resonance frequency of the quartz crystal decreased by approximately 20 kHz from the initial value. At the same time, the damping of the quartz crystal increased only by 150 ̶ 400 Hz, indicating that a rigid PEDOT film had been deposited. The total electric charge density for the deposition was between 115 and 143 mC/cm2.

Results and discussion

Influence of SDS on electropolymerization of PEDOT

The critical micelle concentration (cmc) for SDS in aqueous solutions containing 0.1 M LiClO4 is 1.25 mM, as obtained by fluorescence measurements [46]. Cyclic voltammetry (CV) at 50 mV/s scan rate and 298 K between − 0.3 and 1.3 V in parallel to the EQCM measurements were performed in order to assess the effect of SDS (below or above the cmc) on the polymerization rates of EDOT. The deposited mass calculated from the EQCM data with the Eq. 1 [49, 55] indicated that ca. 52 μg/cm2 and 25.6 μg/cm2 PEDOT were deposited in 14 cycles from solutions containing 2 mM and 4 mM SDS, respectively. However, only 7 cycles were needed to obtain ca. 100 μg/cm2 in a solution containing 1 mM SDS. After this amount of PEDOT was deposited on the quartz crystal, the EQCM frequency signal became noisy, maybe due to the thick films grown and due to partial detachment from the Au electrode. Thus, the frequency changes produced during the last 7 cycles in the CVs were not evaluated in the electrolyte with 1 mM SDS, but this concentration was chosen for further studies.

SDS is an anionic surfactant, which means it has a hydrophobic and a hydrophilic end group, which could be adsorbed at the metal electrode/solution interface [43]. The adsorption mechanism depends on the nature of the electrode material, on the charge of the electrode, besides the concentration of SDS or pH of the bath [44]. AFM studies showed that SDS will not adsorb on negatively charged silica surfaces, but it can be adsorbed at Au surfaces with positive charge or modified with hydrophobic groups, such as hexadecyl mercaptan [44]. The surface charge will change from positive to negative with increasing the SDS concentration in the electrolyte, a fact that indicates a change in the adsorption mechanism. No significant effects could be observed in the AFM force curves for SDS concentration above 1 mM, indicating that the surface of the Au electrode was completely covered with SDS, or that the increased repulsions between the charged head groups of SDS will limit the further adsorption [44].

We did not investigate in this study the adsorption mechanism of SDS on the Au electrode, but we can assume, as pointed out in the literature [43, 44], that SDS could be adsorbed in form of hemimicelles or as a bilayer with surface micelles, depending on its concentration in electrolyte. The SDS adsorbed on the Au surface can decrease the polymerization rate when its surface concentration is high enough, as we observed in our measurements for the 2 and 4 mM SDS containing solutions. Further growth of the PEDOT film is then partially suppressed probably due to the hydrophobic interactions between the dodecyl aliphatic tails and already polymerized PEDOT chains [43, 48].

The frequency shift (Δf) measured by EQCM and the normalized change in the damping (w0/w) of the quartz crystal obtained during potentiodynamic PEDOT synthesis in the presence of three different concentration of SDS are shown in Fig. 1a and b as a function of the passed electric charge (Qpoly). Here, w0 represents the damping of the unloaded quartz, and w is the damping of the quartz during CV experiments.

Fig. 1
figure 1

Frequency change (a) and normalized damping change (b) as a function of the polymerization charge for PEDOT layers obtained in aqueous solution containing 8 mM EDOT + 0.2 M LiClO4 with addition of 4 (black curve), 2 (red curve), and 1 mM (blue curve) SDS, measured during CV experiments at 50 mV/s and 298 K

The formation of PEDOT films by CVs is characterized by a sharp decrease in the frequency shift of the quartz crystal with increasing the polymerization charge, Qpoly, which seems to be almost identical in the first several cycles of the experiment, independent on the amount of SDS in the electrolyte. This indicates a homogeneous growth of PEDOT and incorporation of the same amount of dopant species and solvent molecules in this stage of growth. The absolute values of Δf measured at the end of 14 CV cycles (Fig. 1a) increase with decreasing SDS concentration in the electrolytes.

The damping of the quartz crystal indicates a significant difference in the rigidity of the PEDOT layers synthesized in the presence of different concentrations of SDS (Fig. 1b).The w0/w values above 0.90 (blue curve in Fig. 1b) indicate that a PEDOT layer with a high rigidity is synthesized in a submicelle solution (1 mM SDS). The PEDOT/SDS layers synthesized from micelle solutions (2 mM SDS and 4 mM SDS) are characterized by a rapid and strong decrease in the normalized damping, indicating significant viscoelastic properties (red and black curves in Fig. 1b).

It was shown in previous studies that PEDOT/SDS has a significant stiffness compared with PEDOT films synthesized in the presence of ClO4, PSS, or PAMS [48, 56, 57]. The plasticity of the polymer is expected to depend on the number of solvent molecules that are expulsed when anions are incorporated. It was reported in [56] that PEDOT/SDS is more stiff compared with other films, due to the fact that weak transport of solvent molecules is implied in this case, as proven by the EQCM data. The dodecylsulfate is much heavier than the perchlorate ions (molar mass 265.38 g/mol for dodecylsulfate and only 99.45 g/mol for perchlorate, ClO4). According to Lyutov et al. [56], being bigger, they could be washed out during PEDOT polymerization by CV, and thus their incorporation in the film could be much smaller compared with the other doping ions.

Sukchol et al. showed by FTIR measurements that the anionic surfactant SDS added during PEDOT/PSS film formation or after polymerization interacts strongly with the PEDOT film [47]. Some of the SDS molecules could replace the PSS and thus influence the distortion of PEDOT segments in water. This chain deformation of PEDOT in water will normally be produced by the coiled structure of PSS, which due to its positive charge has a distorted structure in water. The PEDOT will follow the structure of PSS, becoming itself distorted. When SDS replaces the PSS molecules, this disorder will be reduced. The strong interaction between SDS and PEDOT was proven by the increased conductivity of the films and by the broadening and shifting to lower wavelengths of the FTIR peaks [47].

The value of the normalized EQCM damping was above 0.9 not only in the potentiodynamic measurements, but also for the PEDOT layers obtained by potentiostatic and pulse deposition at different polymerization potentials and pulse durations, if a solution containing 1 mM SDS was used (not shown). This indicates that these PEDOT films are rigid. The rigidity of the PEDOT films obtained in our measurements in 1 mM SDS solution can be explained by the fact that SDS acts as dopant competing with ClO4 anion during growing of the chain network. The doping with SDS and ClO4 anion is possible due to presence of positive charge in molecular subunits of the polymer chain. As a final effect, the stiffness of the films is strongly influenced by the amount of SDS present in the electrolyte. Besides this, the presence of SDS makes the PEDOT layer to act as a membrane with selectivity for cations (discussion in the “Cation exchange behavior” section).

It is well known that the morphology of the PEDOT films depends not only on the doping materials, but also on the deposition technique used [13, 58,59,60]. The morphology of the PEDOT films obtained by potentiodynamic and potentiostatic deposition from an electrolyte containing 1 mM SDS can be seen in Fig. 2.

Fig. 2
figure 2

Scanning electron micrographs of pristine PEDOT films obtained in 8 mM EDOT+1 mM SDS + 0.2 M LiClO4, at 298 K by: a CV technique, after 14 cycles between − 0.3 and 1.3 V (vs. Ag/AgCl), at a scan rate of 50 mV/s. b potentiostatic deposition at 0.84 V

A porous PEDOT film was obtained after 14 cycles by the potentiodynamic method, which grew steadily with the number of cycles (Fig.2a), while a compact and rough layer was obtained in the potentiostatic deposition (Fig.2b).

Cation exchange behavior

As discussed in the “Introduction” section, most of the times only the anions are considered to participate in doping/de-doping processes of conductive polymer films [35, 36]. The mass of the film should increase during the oxidation because anions enter the film and it should decrease during the reduction, when the anions move out.

In some excellent papers, Bruckenstein and Hillman proposed the so-called “scheme-of-cubes approach” [20, 61,62,63,64]. The coordinates of a 3-D cube were associated to electron/anion transfer, solvent transfer, and polymer reconfiguration. No salt transfer was considered when analyzing the p-doping of PEDOT films [63]. The corners of the cube represent the chemical species (reactants, intermediates, and products at energy minima), and the edges were the elementary steps connecting them. Individual steps have individual time characteristics. The model was successfully applied to visualize and identify the complex and competing mechanistic pathways in redox transitions of different conductive polymers. Anions and solvent fluxes, reconfiguration of the polymer film as a function of the potential and charge of the films during CV experiments, and the potential scan rate were considered. Thus, one should carefully prepare his experiments in order to be able to get the temporal resolution of solvent transfer and polymer reconfiguration.

It was shown by DFT (density functional theory) and FTIR-ATR (Fourier transformed infrared spectroscopy-attenuated total reflection) spectroscopy [39] that the Cl ions, generated in a solution containing these ions, can be bound to C atoms from the PEDOT backbone. EQCM [42] studies also showed that not only ClO4 ions but also Cl ions participate in doping. XPS spectra [32] showed the presence of both perchlorate ClO4 and ClO3 ions as dopant in PEDOT films. The ClO4 ions were present in higher amount in the PEDOT films obtained by pulse deposition, and ClO3 ions were observed more in the films obtained by potentiostatic deposition. The doping levels of the Cl-containing samples was shown to be lower and the PEDOT will be then forced to behave as a cation exchanger [39, 65].

Previous reports showed that the cation transport in the PEDOT layer is predominant at potentials below 0.0 V (vs. Ag/AgCl) and the anion transport is predominant in the range of more anodic potentials [38, 39, 63]. Exchange of anions or cations may be detected as variations in the film mass. EQCM is a very sensitive technique, with which small masses in order of 4.4 ng/cm2 can be detected with a 10 MHz quartz crystal for a shift in frequency of 1 Hz.

PEDOT films obtained in this study by potentiostatic step deposition were synthetized on a gold electrode of a quartz crystal. The mass changes in the deposits during redox transitions were determined from the EQCM results, based on Eq. 1.

We investigated here if with EQCM measurements the detection of cation incorporation in PEDOT films is sensitive enough for small, as well as for big cations. For this, after we deposited the PEDOT films from solutions with or without SDS, we transferred the polymer films in solutions containing cations of different molar masses. The first step was to wait in each new solution at open circuit potential, OCP, until the resonance frequency and the damping of the quartz did not change significantly. Afterwards, cyclic voltammograms were performed in HCl, HClO4, and in solutions containing Li+, Na+, K+, and Cs+ (Table 1). The PEDOT film was rinsed carefully many times with deionized water between transferring it in the next solution. The cathodic limit of the potential was fixed to − 0.54 V in solutions containing Li+, Na+, K+, and Cs+ cation and − 0.2 V in HCl and HClO4 solutions. The anodic potential limit was 0.8 V in all CV measurements.

The exchange behavior of PEDOT films in Li+ containing solutions is presented in Table 2, and for Na+, K+, and Cs+ solutions, in Table 3, respectively.

Table 2 Apparent molar masses of the transferred species in PEDOT films obtained by potentiostatic deposition at 0.84 V, as determined from EQCM data in LiClO4 solutions
Table 3 Apparent molar masses of the transferred species in PEDOT films obtained by potentiostatic deposition at 0.84 V, as determined from EQCM data in NaPBS, KPBS, and CsHO solutions

The potentyodynamic measurements were performed at different scan rates: 0.1 mV/s (Figs. S5 and S6), 1 mV/s (Figs. S7 and S8) , and 20 mV/s (Figs. 4 and 5) for the solutions containing Li+, and only at 20 mV/s for the solutions containing other cation than Li+ (Figs. 6 and 7, S1, S2, S3, S4, and S9). Systematic studies on the effect of scan rate on net mass change in the polymer films were reported by Bruckenstein, Brzezinska, Daisley, and Hillman [61,62,63]. They showed that if the polymer film is swept at low scan rates, the net mass change upon film reduction was negative. However, if the scan rate was high, the net mass change upon film reduction was positive. At ca. 25 mV/s, they identified that a net zero mass change will occur. Also, Lyutov et al. chose a scan rate of 20 mV/s in [48] when studying doping/ de-doping of conductive polymers. Based on these previous literature observations, we decided to perform our measurements at 20 mV/s. The equilibrium for the reduced state of polymer was observed to be reached at 2 mV/s in [61, 62]. Therefore, for the small sized Li+, we decided to perform also CV at lower scan rates, where the exchange process can be assumed to be stationary, in the hope that we could better detect the cation and anion exchange.

A typical CV and the frequency response for a PEDOT film on the quartz crystal during sweeping at 20 mV/s in 0.2 M LiClO4 solution can be seen in Fig. 3 a and b. Broad anodic and cathodic currents were obtained in the CV for all solutions containing different cations, which indicated a capacitive behavior (Fig. 3 a). Oxidation and reduction of the film occurred over a wide potential range. We could also see that the frequency increases when sweeping the potential towards more cathodic values and decreases afterwards (Fig. 3b). The inflection points where the change in the frequency behavior happens lay between 0 V and 0.1 V, as described also in Tables 2 and 3. An increase in frequency indicates that some mass of the film is lost, while the decrease in frequency indicates an increase in mass, probably due to incorporation of cations. During the anodic sweep, the frequency increased until 0 or 0.1 V and decreased afterwards. In this case, the frequency decrease could be due to incorporation of anions in the film. It is well accepted that conductive polymers support a certain degree of oxidation. Therefore, a certain amount of anions will be incorporated into the polymer film during its synthesis, to compensate this positive charge. Some of the anions will leave the polymer during reduction, but some can remain trapped in the film. Cations that are strongly bound to the anion can be also introduced in the polymer film during its synthesis [40], thus influencing the conductive polymer the properties, such as its ionic and electronic conductivity, or its electrochemical response. Certain amount of cations can be inserted during reduction, too, in order to neutralize the trapped anions. At the same time, it is generally accepted that beside ions, also the solvent molecules can participate in doping/de-doping processes [63]. Solvent expulsed from the film during doping, which re-enter during de-doping, influences the overall redox process [63].

Fig. 3
figure 3

a Cyclic voltammetry (20 mV/s) of a PEDOT (black line) and of PEDOT/SDS film (red line) in 0.2 M LiClO4. Both films were obtained by potentiostatic deposition at 0.84 V. b Change in the resonance frequency of the quartz corresponding the CV measurements presented in (a)

Our experiments showed that the frequency did not return to its original value after the potential was swept back towards the anodic potential region, indicating that some anions remained trapped in the film (Fig. 3b). At the same time, the current does not change significantly (Fig. 3a), indicating that the ionic species that remained in the film will not interact with the parts of the polymer that are responsible for the generation of current [66].

Normally, the changes in the damping of the quartz during CVs measurements were below 50 Hz, and the changes in frequency were above 500 Hz. The shape of the mass changes calculated from the frequency shift and plotted against electrical potential resembles often the shape of a butterfly wing (Figs. 4, 5, 6, and 7, S1–S8), similarly to other previous reports [67]. Only when the PEDOT films were cycled in HCl and HClO4, the shape of the frequency vs potential looks like one single butterfly wing (Fig. S9).

Fig. 4
figure 4

Mass changes calculated from EQCM data during CV measurements (20 mV/s) in 0.2 M LiClO4, for PEDOT/SDS layer as a function of charge density (a) and as a function of electrical potential (b). Red line in b graph presents the changes in the damping of the quartz crystal

Fig. 5
figure 5

Mass changes calculated from EQCM data during CV measurements (20 mV/s) in 0.2 M LiClO4, for PEDOT layer synthesized without SDS as a function of charge density (a) and as a function of electrical potential (b). Red line in b graph presents the changes in the damping of the quartz crystal

Fig. 6
figure 6

Mass changes calculated from EQCM data during CV measurements (20 mV/s) in 0.1 M NaPBS, for PEDOT layer synthesized with SDS as a function of charge density (a) and as a function of electrical potential (b). Red line in b graph presents the changes in the damping of the quartz crystal

Fig. 7
figure 7

Mass changes calculated from EQCM data during CV measurements (20 mV/s) in 0.1 M NaPBS, for PEDOT layer synthesized without SDS as a function of charge density (a) and as a function of electrical potential (b). Red line in b graph presents the changes in the damping of the quartz crystal

No significant mass change could be observed in the cathodic potential region, but only in the anodic one in HCl and HClO4 solutions. The effective mass of H+ is small, even if it is surrounded by a hydration shell. When the sweeping was performed in HCl or HClO4 solutions, we can assume that if the H+ enter in the film during the cathodic sweep in the negative potential region, they will remain strongly bound to the anions.

We could observe a gradual mass decrease with successive potential cycles if the PEDOT films were cycled in solutions containing Li+, Na+, K+, and Cs+. The mass remained almost constant if the PEDOT was cycled in HCl, and even increased slightly in HClO4. This can be explained based on the absolute masses and sizes of the anions involved. Chloride has a relatively small mass compared with ClO4. Therefore, during the reduction of the polymer film, the Clcan be expulsed easily, and during oxidation, they are inserted in the film in such amount as needed to compensate the positive charge. Some of the bigger anions, such as ClO4, will however remain trapped in the film. Then cations need to be driven in, in order to maintain the neutrality of the layer. The mass of the film will increase with increasing cycle number, due to the increase number of anions that remained trapped in each cycle. The mass will decrease if the anions are not trapped in large number in the film; in this case, during their expulsion, they may take out also cations which are strongly bounded to them, and, as a final effect, the total mass of the film may decrease in time.

At the same time, we could observe that independently if the PEDOT film was synthesized in a solution containing SDS or without SDS, the mass variation in the anodic potential regime was more significant than in the cathodic potential region in Li+, Na+, and K+ containing solutions (Figs. 4, 5, 6, and 7, S1 and S2). This can be due to the fact that the anions that enter in the film during the anodic sweep have much bigger effective mass than the cations. For solutions containing Cs+, the mass change in the cathodic potential region is bigger than that from the anodic potential region (Fig. S3, S4). This can be explained with the large relative mass of Cs+ compared with the anions present. Only exception being SDS, which has a larger mass than Cs+.

From the ratio of the mass change to the passed electrical charge ΔmQ (Figs. 4, 5, 6, and 7), the apparent exchanged molar mass, Mapp, can be calculated using Eq. 2.

$$ {M}_{\mathrm{app}}= zF\frac{\Delta m}{\Delta Q} $$
(2)

In Eq. 2. z is the charge of the anion and F is the Faraday constant. The value of Mapp is the sum of all species which move in or out of the polymer during oxidation or reduction. In other words, Mapp is the weighted sum of the molar masses of all involved species, Manion, Msolvent, and Mcation, each of them being multiplied with a factor, which defines how many of the respective species are transferred per ion. These factors must not be integers and can be either positive or negative. [19, 55].

For example, considering the PEDOT/SDS film cycled at 0.1 mV/s in LiClO4 solution between 0.8 and 0.0 V (Table 2), the apparent molar mass obtained, 16 g/mol can indicate that the one ClO4 ion enters in the film and approximately four water molecules are expulsed. Another explanation is that one Cl and one ClO4 enter in the film and seven water molecules are expulsed. The calculation becomes more difficult if the Li+ and the SDS ions are also considered as taking part in parallel to the reaction, so that the electroneutrality of the PEDOT film is fulfilled. Calculating the number of water molecules that are expulsed from PEDOT film only based on the EQCM results does not give a unique solution. One would need another independent measurement, in order to get a better solution. Henderson et al. used probe beam deflection in parallel to the EQCM [68]. Combining these two in situ techniques, they could get quantitative information on the co-ion and/or solvent transfer in the exchange processes at a poly(o-toluidine) electrode. In the following, we give only the apparent molar masses, as calculated from the EQCM measurements.

It was shown in [25] that there can be significant differences in the EQCM signal when studying the charging process of polymer films by potentiodynamic experiments between the first cycle and the next ones, due to relaxations effects. Therefore, we will report the apparent molar mass values obtained from both first, as well as the last cycle from the potentiodynamic measurements (Tables 2 and 3).

Incorporation of small ions, such as H+ or Li+, into the films is more challenging to be detected by EQCM than the incorporation of bulky ones [65]. However, small ions are more extensively solvated than the larger ones. Thus, ions that have a small ionic radius could have a large hydrodynamic radius, because they drag many solvent molecules as they migrate through the solution.

The apparent molar masses of the mobile species, calculated with Eq. 2 from the slopes of mass vs. electrical charges plots, are presented in Tables 2 and 3. In the tables, the inflection points are given as delimiting points between the two reported values for apparent molar masses. However, the apparent molar masses were calculated from the linear regions of the deposited mass vs. passed charge graphs, i.e., between 0.2 and 0.6 V during the cycling in the positive potential regions, and between − 0.54 and − 0.3 V when cycling in the negative potential regions.

The theoretical values for the apparent molar mass for H+, Li+, Na+, K+, and Cs+ are 1.01, 6.94, 22.98, 39.07, and 132.9 g/mol, respectively. The theoretical values for apparent molar mass for Cl and ClO4 anions are 35.5 and 99.45 g/mol. Other anions that could participate in the exchange reactions are the PO43− and OH, which have the apparent molar masses 94.97 and 17.01 g/mol, respectively. The molar mass of dodecylsulfate is 265.38 g/mol.

The values of the apparent molar masses obtained from EQCM measurements (Tables 2 and 3) are generally bigger than the theoretical ones, maybe because cations have also a hydration shell around them [39, 66]. Paik et al. showed that the lighter Na+ ions can produce the same mass increase as the heavier K+ ions in a polypyrrole—P2W18O62 film [67]. They attributed this to the fact that the Na+ ions are more hydrated than the K+ ions in the polymer and the solution. The hydrodynamic radius and their mobility will be similar for both ions.

Cations bring thus inside the film water molecules in the course of film reduction [39]. The degree of solvation may change when the ion becomes incorporated into the polymer. The change of solvation will depend on a variety of factors such as the charges of the ion and the surrounding polymer. In addition, steric effects may play a role [49]. If the apparent molar mass is smaller than the naked ion, the ions replace some water molecules in the neutral film, as we could show in this study (Tables 2 and 3). However, one can see that in some cases, Mapp is relatively close to the theoretical molar masses for anions and cations investigated, such as for Li+, Na+, Cs+, Cl, or ClO4.

If the slope of the mass vs. charge plot is positive during oxidation and negative during reduction, it can be assumed that the anions are predominantly responsible for keeping the electroneutrality of the film. However, if the opposite is seen, this could indicate that the cations have the predominant role [61, 62]. Based on the slopes we obtained in this study (Tables 2 and 3), it seems that the anions are the species mainly responsible in doping/de-doping processes. However, the frequency of the quartz crystal did not vary linearly with the normalized charge (Fig. S10), indicating that besides anions, also cations participate in doping process.

We expected that the anion exchange occurs at low scan rates and the cation effect can be seen firstly at higher scan rates. Other factors that could play a role in doping/de-doping are the state of oxidation of the PEDOT film when it was synthesized, as well as the hydrophilic or hydrophobic nature of the cations present in the electrolyte. As example, for the measurements in 0.2 M LiClO4 solution, we expect that during redox transitions, the dopant ClO4 ions will migrate, accompanied by the water molecules, but definitely the Li+ will also play a role (Figs. 4 and 5). This cation exchange behavior in the presence of ClO4 is rather surprising since this anion was proved to be involved in the charge compensation [19, 39].

The experimental value for Mapp was approx. 6.5 g/mol when the PEDOT/SDS layer was cycled with 0.1 mV/s, value which is close to the theoretical value of Li+, 6.9 g/mol (Fig. S5). The potentiodynamic experiments performed for PEDOT layers synthesized in the absence of SDS, at very low scan rate, v = 0.1 mV/s indicate only the movement of anions, ClO4, and solvent (water) molecules (Fig. S6).

In all potentiodynamic experiments in LiClO4 electrolyte, the electrical charge, ΔQ, was negative. This is an indication that an irreversible process takes place in the polymer film. One could attribute such behavior to oxygen reduction [66 and references 44 and 45 within]. The electrical charge, ΔQ, increased in absolute value with cycling. Obviously, argon purging during the measurements could not completely remove all traces of oxygen. However, according to Tóth et al. [39], the contribution of oxygen electroreduction to the overall current in CV measurements can be negligible.

The PEDOT/SDS and PEDOT layers were cycled between − 0.54 and 0.8 V at 20 mV/s also in the electrolytes containing Na+, K+, and Cs+. Only the data obtained for the NaPBS solution are presented here. The data for the remaining cations is in the supplementary information.

The incorporation of heavier cations (such as Na+) can be seen clearly for a PEDOT/SDS layer, starting at 0.1 V when sweeping the potential towards the negative regime. The mass of the film increases then due to incorporation of cations (Fig. 6). From the EQCM data (Figs. 6 and 7), one can see that cations have now a significative role in the charge compensating process, beside the anions.

The mass of the films decreases in the potential range − 0.5 V until 0.1 V in our measurements, which can be explained by predominant removal of anions, which could also expulse strongly bound cations. Solvent molecules could also leave the film within this potential range, but they should have a secondary role. Between 0.1 and 0.8 V, a monotonous and a linear mass increase is observed with increasing anodic charge.

The mass decrease of the PEDOT films at the initial stage of their oxidation is probably due to structural modifications in the polymer and resulting in the displacement of solvent. Previous literature showed the film volume changes during oxidation [19, 35, 36, 38, 39]. It was found that the film first compresses abruptly at the transition from the de-doped to the doped state and then grows slowly [19, 35,36,37,38,39]. Herewith, a drastic decrease in the PEDOT film volume corresponds to the potential range between − 1.0 and 0.1 V. Similar conclusions regarding the important role of the PEDOT film structure reorganization on redox processes at the variation of its oxidation degree in different aqueous electrolytes were made by Efimov et al. [37].

We could prove in our study the cation exchange behavior of PEDOT layer, as shown before in some literature reports just for specific cases [19, 35,36,37,38,39]. The EQCM measurements showed the importance of electrolyte used for the electropolymerization process. Our results show that PEDOT films deposited from electrolytes without large anions (like SDS) can act as cation exchangers.

The model proposed by Vorotyntsev et al. [25] in order to detect the ratio of trapped anions in the polymeric film, as well as the ratio between the molar masses of the anions and cations that are exchanged in different electrolytes, was also applied to our measured data. Some of the obtained results are presented in Table S1 in the supplementary information. An exemplary plot of the shift in resonance frequency of the quartz crystal, Δf, as a function of θ, is shown in Fig. S10. The θ, is defined by the electronic charge in the film, normalized to the maximum electronic charge Fcemax. The values of θ are between zero and one [21, 25, 37]. The fitting was performed for sweeps towards negative potentials, i.e., from 0.8 V towards − 0.54 V.

Independent if the PEDOT was synthesized with or without SDS, the fitting with the above-mentioned model indicates that generally a small number of trapped anions remains in the film (Table S1). This can be read in the values of the parameter θb, which is the normalized charge of immobile incorporated anions. A θb equal to 0.2 means that only 20% of the anions remain bound in the film, and their charge will be compensated by insertion of cations. Therefore, the anions exchange seems to be responsible mostly for the neutralization of the film according to the Vorotyntsev et al. model [25].

In Table S1, θ* is the ratio of ionic concentrations in the completely reduced film to the maximum electronic concentration. This parameter depends also on the differences in standard chemical potentials of ions (anions and cations) in the solution and in polymer [21, 25, 37]. Thus, from θ* values, one can calculate the re-solvation energies. However, here, we refrain to further discussion on this parameter.

The ratio of molar masses of anions, Ma, and cations, Mk, is also an important parameter in this fitting. Normally, we kept fixed as a fitting parameter the mass of the cation. However, if the ratio between the Ma and Mk is kept constant, but Ma is given the molar mass value of the anion that could be exchanged, we will obtain also a good quality fit and normally similar values for θb and θ*. For lightweight cations such as H+ and Li+, it was most of the time difficult to obtain a good fit. For H+, the fitting did not converge, independent if the mass of cation, or that of possible anions, was kept fixed.

Conclusions

We could show that the solution used for polymerization of PEDOT films plays an important role for the properties of the polymer. SDS added during the polymerization influences the stiffness of the PEDOT layers. The less SDS was added, the stiffer was the PEDOT film. The technique used for electropolymerization (potentiodynamic or potentiostatic deposition) influences the properties of the deposited films, such as their morphology and mechanical properties.

The ion exchange behavior of PEDOT was studied in solutions containing cations of different sizes. In all electrolytes used in this study, PEDOT behaves not only as an anion exchanger, but also cations seem to be exchanged. Based solely on the EQCM measurements, it is difficult to obtain a unique solution on how many water molecules are exchanged during potentiodynamic experiments, as well to identify which of the anions and in which amount participate in the redox transitions. Insertion of heavy cations, such as Cs+, into the polymer film induces an increased mass during the sweeping towards negative potentials. A stronger mass increase was observed for the light cations when sweeping the potential towards the anodic direction, indicating the insertion of anions and/or water molecules from the electrolyte, after a partial removal of some of previously inserted anions and/or cations. In most of the experiments, except the cycling in HCl and HClO4 solutions, the total mass of the film decreased with cycling, indicating that more species are removed from the film when compared with the inserted species, for keeping the electroneutrality of the polymer film. The final mass did not change when cycling the polymer film in HCl solution, and slightly increased when cycling it in HClO4. Thus, a reversible insertion/expulsion of ions and solvent molecules could be detected in HCl solution.