Introduction

The global crisis caused by fossil fuel–based energy and its climate impact has played an important role in shaping research and development activities in the field of renewable energy conversion and storage. This challenge requires the improvement of conventional energy storage systems such as lead-acid batteries and the discovery of other technologies. Competing with carbon used in Li-ion batteries, polymers are excellent materials with high performance, better cyclic stability and durability and a good contribution to green energy. Recently, a variety of polymers have been developed for use in batteries such as polyvinylidene fluoride used as collector (Shi et al. 2020), polyethylene as separator (Gu et al. 2021), Nafion as membrane (Okonkwo et al. 2021), poly(3-hexylthiophene) in photovoltaic cells (Dang et al. 2011), and polyaniline (P. Liu et al. 2019; Ryu et al. 2002; Zhou et al. 2005) and polypyrrole (Muthulakshmi et al. 2006; Sharma et al. 2008) as dielectric capacitors (Wang et al. 2010). Supercapacitors occupy an intermediate place between accumulators and capacitors with an energy density that can reach hundreds of kilojoules per kilogram and a power density ranging from 10 W/kg to 100 kW/kg (Lokhande et al. 2020), which allows them to store a large amount of energy and to release it quickly and therefore to fill the energy deficit of capacitors and the power deficit of accumulators. A supercapacitor is also characterized by its specific capacitance, which depends essentially on the materials making up its electrodes, of which we distinguish carbon materials (graphene oxide 425 F/g in a symmetric cell) (Zhao et al. 2017), metal oxides (RuO2 1400 ~ 2000 F/g) (Chen et al. 2013), MnO2 1370 F/g (Jabeen et al. 2016), and conducting polymers (Snook et al. 2011). Energy storage in these so-called pseudocapacitive materials is achieved by two processes, in the electrochemical double layer and by rapid and reversible redox reactions at the electrode/electrolyte interface. In polymers, or more precisely in the polyaniline which is the subject of this work, the charging/discharging mechanism is mainly due to the existence of three oxidation states, leucoemeraldine (the most reduced state), pernigraniline (the most oxidized state), and emeraldine (intermediate state) (Angelopoulos et al. 1988; Nakajima et al. 1989). This doping/undoping process is also produced by the insertion and de-insertion of counter ions into the polymer chain (Snook et al. 2011). In addition to its use in supercapacitors particularly and energy storage generally, polyaniline finds its applications in many other fields such as nanoelectronic devices (field effect transistors) (Salikhov et al. 2015), chemical (Fratoddi et al. 2015) or biological sensors (Dhand et al. 2011), catalysis or electrocatalysis (Eskandari et al. 2020), microwave absorption and electromagnetic shielding (Saini et al. 2009), electrorheological fluids (Yin et al. 2008), and biomedicine (Zare et al. 2019).

It is well known that polyaniline is a material whose physical and chemical characteristics (morphology, conductivity, degree of crystallinity) depend strongly on the method of preparation, experimental parameters, and synthesis procedure. In the present work, we have studied the effect of counter-ion, electrodeposition potential, and monomer concentration on the electrochemical performance of polyaniline. For this purpose, we have elaborated polyaniline films by electrodeposition using cyclic voltammetry in four acids H2SO4, HCl, HNO3, and H3BO3 and, then, by the potentiostatic method at different potentials and various monomer concentrations. The specific capacitance measurements are performed by cyclic voltammetry and galvanostatic charge–discharge.

Materials and experimental

Materials and reagents

All chemicals used were of analytical grade. Aniline C6H5NH2 99.5% (ACS reagent), sulfuric acid H2SO4 98% (ACS reagent), nitric acid HNO3 65% (ACS reagent), hydrochloric acid HCl 37% (ACS reagent), boric acid H3BO3 99.5% (ACS reagent), sodium sulfate Na2SO4 (Merck), and indium tin oxide (ITO)–coated glass (20 Ω/cm) were purchased from SOLEMS. The ITO was used as the working electrode, the emerged extremity of the ITO in the electrolyte has an area of 1 cm2 (1 cm × 1 cm), and the other extremity was used to establish electrical contact with an alligator clip.

Preparation of electrodes

Electrochemical measurements were performed using a three-electrode cell connected to a Versa STAT 3 potentiostat–galvanostat combined with Versa Studio software. The platinum (Pt) electrode was used as the counter electrode, the saturated calomel electrode (SCE) as the reference electrode (all potentials are given relative to this reference), and indium tin oxide (ITO) as the working electrode. Prior to electropolymerization, the ITO substrate was cleaned in an ultrasonic bath using acetone for 10 min ethanol for 10 min and finally distilled water for 5 min. The surface area of the working electrode was set at 1 cm2.

Counter-ion effect

The electropolymerization of polyaniline (PANI) was carried out by cyclic voltammetry (CV) using 0.2 M aniline dissolved in different acidic electrolytes (H2SO4, HNO3, HCl, and H3BO3) of the same concentrations (1 M) using cyclic voltammetry for two cycles.

Effect of electrodeposition potential

The elaboration of PANI/ITO electrodes was carried out by galvanostatic method (at 0.80, 0.85, 0.90, 0.95, and 1.0 V/SCE) using 0.2 M aniline dissolved in acidic electrolyte (H2SO4 1 M, Na2SO4 0.5 M).

Effect of monomer concentration

To study the effect of monomer concentration on the electrochemical performance of PANI/ITO electrodes, we developed them from different concentrations of aniline (0.05, 0.1, 0.2, and 0.4 M) dissolved in acidic electrolyte (H2SO4 1 M, Na2SO4 0.5 M) by the potentiostatic method at the same electrodeposition potential 0.95 V/SCE.

Electrochemical measurement and characterization

The electrochemical performances of PANI electrodeposited (noted PANI/ITO in the following) were characterized using the same three electrodes system. However, the electrodeposited film changed the working electrode and a solution of H2SO4 1 M/Na2SO4 0.5 M was used as electrolyte. Cyclic voltammetry measurements were performed at different scan rate 5, 10, 20, 30, 40, and 50 mV/s. The morphology of the PANI samples was studied by scanning electron microscopy (SEM) using a Philips XL 30FEG.

Results and discussions

Cyclic voltammetry

In order to study the effect of the counter ion on the polyaniline electrodeposited on the ITO, we registered in Fig. 1a the first cyclic voltammograms from − 0.2 to 1 V/SCE with scan rate 15 mV/s in each acid (HNO3, H2SO4, HCl, and H3BO3). All four cycles exhibit a single oxidation peak corresponding to the oxidation of aniline to PANI (pernigraniline) during the scan to the anodic potentials. During the return to the cathodic potentials, we found two peaks corresponding successively to the reduction of pernigraniline to emeraldine and the reduction of emeraldine to leucoemeraldine (Córdova et al. 1994; Sayah et al. 2021; Aynaou et al. 2022). A nucleation loop appears in the case of HNO3 and H3BO3 and not in the case of H2SO4 and HCl. On the other hand, the position and the current density of oxidation peak of aniline to PANI in its pernigraniline form vary from one acid to another (the peak starts at 0.7, 0.8, 0.85, and 0.9 V/SCE for H3BO3, H2SO4, HCl, and HNO3 respectively).

Fig. 1
figure 1

Cyclic voltammograms at a scan rate of 15 mV/s of ITO substrate in 0.2 M aniline and the different acids H2SO4, HNO3, HCl, and H3BO3: a first cycles, b second cycles

On the second cycles, shown in Fig. 1b, to the aniline oxidation peak in PANI are added two anodic waves attributed to the oxidation of leucoemeraldine to emeraldine and emeraldine to pernigraniline. The current density of the anodic peak (aniline to PANI) on second cycle increases strongly compared to the first cycle in the case of H2SO4, HNO3, and HCl, while it decreases in the case of H3BO3 because of the low electrical conductivity of polyaniline elaborated in the latter (Yakuphanoglu and Şenkai 2008). Borate ions are likely to form bonds with polyaniline (Scheme 1), which limits the movement of radicals along the polymer chain and thus the decrease in electrical conductivity (Suematsu et al. 2000; Yakuphanoglu and Şenkai 2008).

Scheme 1
scheme 1

Illustration of the cross-linking of polyaniline by complexation with borate ions

This suggests that the nature of the acid influences the electrochemical behavior of the polymer. The growth rate of PANI films therefore depends on the acid anion (in the following order: H2SO4 > > HCl > HNO3 > H3BO3) and the pH (oxidation of protonated aniline is easier than non-protonated) which is in agreement with previous studies (Arsov et al. 1998; Lippe & Holze 1992). It should be noted that the influence of the counter-ion and the ionic strength of the medium on the initial stages of nucleation and growth are manifested mainly in the intensity and shape of the redox peaks, the amplitude of the nucleation loop, the redox potential of the monomers, and the evolution of current beyond the first cycle.

In order to compare the effect of the acid on the electrochemical performances of polyaniline, the PANI films are electrodeposited by CV for two cycles in the four acids (H2SO4, HNO3, HCl, and H3BO3).

Counter-ion effect

The electrochemical performance of the obtained PANI/ITO electrodes was studied by CV in an electrolytic bath containing H2SO4 1 M and Na2SO4 0.5 M. Figure 2 shows the evolution of the cyclic voltammograms as a function of the scan rate for each electrode. Cyclic voltammetry shows comparable electrochemical responses for the electrodes elaborated in H2SO4, HCl, and HNO3; the quasi-rectangular shapes of the voltammograms with symmetrical redox peaks reflect the pseudocapacitive nature of these three electrodes (Mathis et al. 2019a, b).

Fig. 2
figure 2

Cyclic voltammograms at scan rates 5, 10, 20, 30, 40, and 50 mV/s for PANI/ITO electrodes elaborated in different acids H2SO4, HNO3, HCl, and H3BO3

During the charge, the polyaniline undergoes oxidation, which creates positively charged sites in the polymer skeleton (Le et al. 2017). During the discharge, the polyaniline undergoes a reduction and the charged sites return to the neutral state; it thus behaves like a battery (Gannett et al. 2021). Simultaneously with these processes of oxidation/reduction (charge/discharge), we witness the insertion/disinsertion of anions of the electrolyte in the porous matrix of the polymer, which behaves like a capacitor (Schoetz et al. 2018; Le et al. 2017). This pattern is modified in the case of the electrode prepared in H3BO3; it can be seen that the redox peaks are no longer symmetrical, and hence, this electrode tends to have a battery-type behavior; more precisely, the faradic process prevails over the capacitive character (Pu et al. 2021).

We can use cyclic voltammetry to determine the predominant process of charge storage. A representative power law relationship between peak current ipeak and scan rate v gives an overview of the charge storage mechanism in PANI/ITO electrodes using Eq. 1 (J. Liu et al. 2018).

$${i}_{\mathrm{peak}}=a{v}^{b}$$
(1)

We introduced the logarithm to linearize this equation:

$$\mathrm{log}\left({i}_{\mathrm{peak}}\right)=\mathrm{log} \left(a\right)+b \mathrm{log}(v)$$
(2)

a and b are adjustable parameters which can be calculated from a plot of log(i) vs. log(v); log a is determined by the ordinate at the origin and b from the slope. A b value of 0.5 corresponds to a process totally controlled by diffusion, and a value of 1.0 indicates the dominance of the capacitive process (J. Liu et al. 2018).

On Figs. 3 and 4, we have plotted log(ipic) versus log(v) of the anodic and cathodic peaks for each electrode. It is clear that these curves are straight lines with correlation coefficients close to one (1) which is in agreement with Eq. 2. We can therefore easily determine the values of b from the slopes.

Fig. 3
figure 3

Functional relationship of the peak current (i/mA) vs the scan rate (v/mV s−1) for different electrodes

Fig. 4
figure 4

a Specific capacitance values of PANI/ITO electrode elaborated in different acids, b separation of capacitive contribution (gray area) for PANI/ITO electrode elaborated in H2SO4 at a scan rate of 5 mV/s, cf percentages of pseudocapacitive contribution at different scan rates for PANI/ITO electrodes elaborated in H2SO4, HCl, HNO3, and H3BO3 respectively

We note that b converges towards 1 in the case of the electrodes elaborated in H2SO4, HCl, and HNO3, which confirms the predominance of the capacitive character for these electrodes. While in the case of the electrode elaborated in H3BO3, the charge storage under diffusional control is justified by the value of b, close to 0.5.

The specific capacitance was estimated from the cyclic voltammograms using Eq. 3:

$$C+\left(\int jdE\right)/2v\Delta E$$
(3)

where C is the specific capacitance (mF/cm2), ∫jdE is the voltammetric charge obtained by integration of curve in (CV), ΔE = Einitial − Efinal = 0.7 (V/SCE) – 0.0 (V/SCE) = 0.7 V is the potential window, and v is the scan rate (V/s).

In Fig. 5a, we have plotted the variation of the specific capacitance of each electrode as a function of the scan rate. The specific capacitance of the electrodes electrodeposited in the different acids decreases with the increase of the scan rate from 5 to 60 mV/s. This evolution can be explained by the decrease of the faradic process contribution when the scan rate increases. In other words, the redox reactions do not have enough time to take place. Recent in situ atomic force microscopy studies have demonstrated that the pseudocapacitive behavior of conductive polymers is favored for high charge conditions and battery behavior at low charge (Schoetz et al. 2018). On the other hand, we note that the specific capacitance of the PANI/ITO electrode electrodeposited in H2SO4 is higher than those electrodeposited in the other three acids (65 mF/cm2 at 5 mV/s). Previous studies have found that the electrochemical performance of PANI depends on its structure and morphology, which in turn depends on the nature of the doping anion, which justifies the difference in specific capacitance depending on the acid used (Li et al. 2014).

Fig. 5
figure 5

SEM image of polyaniline films obtained by cyclic voltammetry in different acid: a H2SO4, b HCl, c HNO3, and d H3BO3

Using Dunn’s method, we can quantify the ratios of the capacitive contribution. This method consists to separate the contributions of the surface reaction and the diffusion control to the total current. At a fixed scan rate, in cyclic voltammetry measurements, the total current can be interpreted as the sum of the capacitive current related to the charge of the electrochemical double layer and/or the fast redox reactions at the interface (icap) and the current related to the slow diffusion-controlled processes (idiff)(Guo et al. 2018).

$$i={i}_{\mathrm{cap}}+{i}_{\mathrm{diff}}$$
(4)

For a strictly diffusion-limited redox reaction, the current is proportional to the square root of the scan rate:

$$i={i}_{\mathrm{diff}}={k}_{d}{v}^{0.5}$$
(5)

whereas, the capacitive current from the double layer and pseudocapacitance varies linearly with the scan rate according to equation:

$$i={i}_{\mathrm{cap}}={k}_{c}v$$
(6)

From which the total current can be described by the following empirical equation:

$$i={{k}_{c}v+k}_{d}{v}^{0.5}$$
(7)
$$(i/{v}^{0.5})={k}_{d}+ {k}_{c}{v}^{0.5}$$
(8)

where kc and kd are constants, kcv indicates the capacitive contribution to the overall current, and kdv0.5 indicates the diffusion-controlled contribution.

The plot of i(E)/v0.5, as a function of v0.5, allows to determine kc and kd and thus the separation of the capacitive charges and the diffusion-controlled charge. The contribution ratios of the two processes at different scan rates for each electrode were also determined and presented in Fig. 5c–d. It is noted that the pseudocapacitive contribution gradually increases with increasing scan rate. This can be explained by the fact that at high scan rates, i.e., high driving force, the diffusion of anions into the polymer matrix cannot keep up with the rate of creation of positive sites (Schoetz et al. 2018). Therefore, the redox process is governed by the diffusion of counter ions within the film. The capacitive contribution ratios at scan rates of 5, 10, 20, 30, 40, and 50 mV/s are higher for the electrodes developed in H2SO4, HCl, and HNO3 (75.8%, 82.2%, and 89.2% respectively at 50 mV/s), suggesting that the capacitive process is more contributory in charge storage for these electrodes. For the electrode developed in H3BO3, the percentage of capacitive charge is less than 1% and therefore the diffusion-controlled capacitance plays a decisive role in the charge storage performance in this electrode.

To confirm these findings, we analyzed the morphology of the four films using the SEM technique (Fig. 5). A particulate (granular), less porous and very dense structure, was revealed in the case of the electrode developed in H3BO3, which justifies its low specific capacitance. This structure is slightly modified in the case of the HNO3 electrode, in which the presence of large clusters and micropores is marked. The hierarchical structure of polyaniline and the existence of large pores in the case of the electrodes elaborated in HCl and H2SO4 facilitate the incorporation of ions and electrons within the electrode and thus a relatively high doping/undoping degree. This results in an improved specific capacitance (Cui et al. 2014).

These findings are in agreement with the results of Yang et al. (2017) studying the relationship between pore size and charge transfer resistance of carbon aerogels for organic double-layer capacitor electrodes.

The galvanostatic charge–discharge curves of each electrode (Fig. 6) were carried out over the 0–0.7-V window for the current density 0.2 mA/cm2. Quasi-linear and symmetrical variations of the voltage with time observed during the charging and discharging phase confirm the pseudocapacitive nature of PANI/ITO electrodes developed in H2SO4, HNO3, and HCl. However, the galvanostatic charge–discharge curve of the electrode prepared in H3BO3 shows a horizontal part characteristic of battery-type electrodes (Storage 2018).

Fig. 6
figure 6

a Galvanostatic charge–discharge of PANI/ITO electrodes elaborated in different acids between 0 and 0.7 V in H2SO4 (0.5 M)/Na2SO4 (0.1 M) at 0.2 mA/cm2. b Specific capacitance of four PANI/ITO electrodes at 0.2 mA/cm.2

Figure 6 b shows the specific capacitance (evaluated by Eq. 9) of the PANI/ITO electrodes electrodeposited in the different mediums.

$$C=j\Delta t/\Delta E$$
(9)

where j is the applied current density (A/cm2), ∆t is the discharge time (s), and ∆E = 0.7 (V) is the potential window.

The galvanostatic charge–discharge confirms the results of the cyclic voltammetry. The highest specific capacitance is that of the PANI/ITO electrode elaborated in H2SO4 medium. This justifies the choice of this acid as an electrodeposition medium in the following work to study the effect of the electrodeposition potential on the electrochemical performance of the PANI/ITO electrode.

Effect of electrodeposition potential and monomeric concentration

In a first step, the elaboration of PANI/ITO electrodes was performed by the potentiostatic method at 0.80 V, 0.85 V, 0.90, 0.95, and 1.0 V/SCE potentials from a fixed concentration of monomeric aniline (0.2 M). The recorded current density-time transients (j-t), which are presented in Fig. 7a, exhibit the same pattern, a rapid decay part corresponding to the charging of the electrochemical double layer and adsorption of ions onto the substrate, followed by an increase in current density whose speed depends on the electrodeposition potential and, finally, the current density converges towards a plateau. On the exponentially ascending part, we note the presence of a more or less discernible inflection point, which indicates that the growth of polyaniline films goes through two stages. The first one corresponds to the processes of nucleation and growth of a polyaniline layer on the ITO until its complete coverage and during the second one the electropolymerization continues by growth of the polymer chains, accompanied by the ramifications (Aynaou et al. 2022; Bade et al. 1992). This interpretation can be completed by the intervention of an autocatalytic radical growth mechanism (Stilwell & Park 1988). Often, electropolymerization starts with the formation of soluble oligomers in the solution followed by a nuclei formation step on the substrate surface. This step can be done in two ways, successive additions of monomers or oligomers on the oxidized monomers attached to the surface or by precipitation of dissolved oligomers on the electrode. The first way is similar to the electrocrystallization of metals and metal oxides; the nucleation rate depends directly on the potential. While in the second way, the potential acts only on the generation of oligomers in the solution (Komsiyska et al. 2007). By analyzing Fig. 1a, we can see that the current density and thus the electropolymerization rate depend significantly on the potential, which validates the hypothesis of successive additions. Figure 7 b highlights the dependence of the growth rate of polyaniline films on the potential in conformity with previous studies that have found that the electropolymerization is first order in aniline concentration (aniline) (Eq. 10) (Wei et al. 1989):

$$r={k}_{\mathrm{app}}[\mathrm{aniline}]$$
(10)

where r is the electropolymerization reaction rate, and kapp is the apparent reaction rate constant. The rate of electropolymerization depends on the concentration of oligomers [oligomers] according to an autocatalysis mechanism (Eq. 11) (Mondal et al. 2007).

Fig. 7
figure 7

Chronoamperometric curves obtained on ITO electrode, a in 0.2 M aniline at 0.8, 0.85, 0.9, 0.95, and 1.0 V/SCE and b in 0.05 M, 0.1 M, 0.2 M, and 0.4 M of aniline at 0.95 V/SCE

$$r=k\left[\mathrm{aniline}\right]{[\mathrm{oligomers}]}^{{~}^{1}\!\left/ \!{~}_{2}\right.}$$
(11)

We retain that the concentration and the potential (via the creation of oligomers) affect the rate of formation of polyaniline films, and thus their morphologies and textures.

In Fig. 8a, we have plotted the cyclic voltammograms recorded at the scan rate 20 mV/s for the five electrodes over the electrochemical window 0–0.7 V. We notice that these voltammograms keep the same shape, an almost rectangular shape with the presence of oxidation and reduction peaks which is a characteristic of pseudocapacitive materials (Wang et al. 2016; Gogotsi and Penner 2018; Nguyen et al. 2021).

Fig. 8
figure 8

a Cyclic voltammograms at scan rate 20 mV/s for PANI/ITO electrodes elaborated at different potentials; b evolution of the specific capacitance as a function of the scan rate

We have plotted in Fig. 8b the variation of the specific capacitance of each electrode as a function of the scan rate. The specific capacitance of the electrodes electrodeposited at the different potentials decreases with the increase of the scan rate from 5 to 60 mV/s. This evolution can be explained by the decrease of the faradic process contribution when the scan rate increases (Lindstrom et al. 1997; Wang et al. 2007). In other words, the redox reactions do not have enough time to take place. On the other hand, the specific capacitance increases with the electrodeposition potential; it passes by a maximum at 0.95 V/SCE, and then, it decreases. These findings can be justified by the density of polarons and the form of polyaniline electrodeposited on each electrodeposition potential range [28, 29]. In the zone of increase of the specific capacitance (potential lower than 0.95 V/SCE), one obtains mainly the emeraldine salt, the most conductive form, within which the density of the polarons increases with the potential. In the range of potential higher than 0.95 V/SCE, we obtain mainly the less conductive pernigraniline. For potentials below 0.95 V/SCE, the increase of specific capacitance with potential can be correlated to the morphology of the films. At low potentials, the radical activation and therefore the electropolymerization are slow; we obtain a denser and less porous structure and hence a less important stored charge (Andrade et al. 1998).

The galvanostatic charge–discharge curves of each electrode (Fig. 9a) were carried out over the 0–0.7-V window at different current densities. Quasi-linear and symmetrical variations of the voltage with time observed during the charging and discharging phase confirms the pseudocapacitive nature of PANI/ITO electrodes.

Fig. 9
figure 9

a Galvanostatic charge–discharge of PANI/ITO electrodes elaborated at different potentials between 0 and 0.7 V in H2SO4 (0.5 M)/Na2SO4 (0.1 M) at 0.2 mA/cm2. b Evolution of the specific capacitance as a function of current density

Figure 9 b shows the specific capacitance (evaluated by Eq. 9) (Mathis et al. 2019a, b; Shieh et al. 2016) of the PANI/ITO electrodes electrodeposited at different potentials.

The galvanostatic charge–discharge confirms the results of the cyclic voltammetry. The highest specific capacitance is that of the PANI/ITO electrode developed at 0.95 V/SCE. It varies from 23.6 mF/cm2 for 0.2 mA/cm2 to 18.8 mF/cm2 for 1.0 mA/cm2.

Using the galvanostatic charge–discharge curves, we can also determine the coulombic efficiency defined as the ratio between the discharge time tD and the charge time tC when the charge–discharge current densities are equal (Eq. 12):

$$\mathrm{coulombic}\;\mathrm{efficiency}=\frac{t_D}{t_C}\times100$$
(12)

By analyzing Fig. 10 representing the coulombic efficiency as a function of current density for each electrode, it can be seen that it increases with the current density, that is to say that the galvanostatic charge–discharge curves become more and more symmetrical. This evolution is explained by the predominance of the capacitive character at high current densities. On the other hand, the highest specific capacitance is obtained for electrodes elaborated at low electrodeposition potentials.

Fig. 10
figure 10

Coulombic efficiency as a function of current density of different electrodes

To study the influence of the monomer concentration on the electrochemical properties of the PANI/ITO electrode, we have elaborated by the potentiostatic method for electrodes at 0.95 V/SCE, from different concentrations of monomeric aniline (0.05, 0.1, 0.2, and 0.4 M) dissolved in 1 M H2SO4. In Fig. 11a, b, the evolution of the specific capacitance serves as a function of the scan rate and discharge current density respectively. We can see that the specific capacitance increases with increasing aniline concentration over this range. The amount of monomer near the substrate affects the morphology of the film and the way the deposit is formed. For low concentrations, the film that forms slowly is relatively ordered and has a less porous structure. At high concentrations of aniline, the film forms rapidly, which makes it less ordered and more porous. The SEM images (Fig. 12a, b) confirm these findings.

Fig. 11
figure 11

Evolution of the specific capacitance values of PANI/ITO electrode: a with the scan rate, b discharge current density

Fig. 12
figure 12

SEM image of polyaniline films obtained at 0.95 V, a [aniline] = 0.2 M, b [aniline] = 0.4 M

Conclusion

The analysis of the specific capacitance values obtained by cyclic voltammetry and galvanostatic charge–discharge shows that the counter ion acts directly on the electrochemical performance of the PANI/ITO electrode. For the same rate, the specific capacitance increases in the following order of the counter ion BO33− < < NO3 < Cl < SO42−. It increases from 1.6 mF/cm2 in case BO33− to 64.8 mF/cm2 in case SO42− for a scan rate of 5 mV/s. This result was also confirmed by the galvanostatic charge–discharge. SEM images show a granular structure for the PANI/ITO electrode developed in H3BO3 and more or less porous structures for the other electrodes. The calculation of capacitive and faradic contributions confirmed the pseudocapacitive nature of the electrodes elaborated in H2SO4, HCl, and HNO3, while the electrode elaborated in H3BO3 can be used as a cathode in batteries. The polyaniline electrodeposition potential considerably affects the electrochemical performance of PANI/ITO electrodes. The specific capacitance determined by cyclic voltammetry and galvanostatic charge–discharge method is maximum in the case of PANI/ITO electrode elaborated at 0.95 V/SCE. For this electrode, the specific capacitance which decreases with current density and scan rate, increases from 23.6 mF/cm2 at 0.2 mA/cm2 to 18.8 mF/cm2 at 1 mA/cm2, and from 24.3 to 19.6mF/cm2 when the scan rate varies from 5 to 60 mV/s.