Introduction

With the increase of resource and energy consumption and the enhancement of production capacity, the research of energy storage components with high specific capacitance, high conductivity, and long life has become an important issue in achieving sustainable development [1, 2]. In this condition, supercapacitors have received more and more attention and become one of the research hotspots in the field of electrochemistry [3, 4]. Electrode materials used in supercapacitors can be classified into inorganic materials (metal oxides [5], metal hydroxides [6], and carbon materials [7], etc) and organic materials (polyaniline [8], polythiophene [9], and polypyrrole [10], etc). Nanostructured electrodes have higher utilization efficiency than conventional electrodes, and the combination of organic and inorganic nanomaterials is the key to improving electrode performance [11, 12].

Recently, titanium dioxide nanotube arrays (TiO2 NAs) having excellent aspect ratio, good mechanical stability, and controllable size can be used as substrates composited with conductive polymer having high electrochemical activity, thereby obtaining nanocomposite electrodes that can be used in the field of supercapacitors [13,14,15]. Wang et al. fabricated high-performance polyaniline/bulk abundant Ti3+ self-doped TiO2 nanotubes (PANI/MR-TiO2 NAs) for supercapacitors by microwave-assisted self-doping and electrochemical deposition [16]. Although the specific capacitance of the composite electrode prepared by this method can reach 1084 F g−1, the cycle stability is still not very satisfactory. The surface of the TiO2 NAs is very smooth, and PANI accumulates on the surface of TiO2 NAs by simple physical action, so the adhesion between PANI and TiO2 NAs substrate is weak [16,17,18]. During the process of charging and discharging, PANI will expand and contract repeatedly, which will cause PANI to fall off the surface of TiO2 NAs easily, thus showing poor cycling stability [19]. There are two ways to make the organic/inorganic nanocomposite more stable. The first way is direct surface grafting. The polymers with active end groups are directly introduced into the active sites on the surface of inorganic nanomaterials through chemical bonding [19,20,21]. The second way is connection by coupling agent. The coupling reaction occurs on the surface of the inorganic nanomaterial to form an initiation point of polymerization; then, the polymers are prepared by electrochemical polymerization and attached to the surface of inorganic nanomaterials [22, 23].

Diazonium salts, as a new type of coupling agent, can be used for surface functionalization to attach polymers to the substrate surface [24]. The use of diazonium salts for surface modification was first introduced by Delamar et al. in 1992 [25]. Electrochemical reduction can be performed on the diazonium salt and its derivatives attached to the substrate surface to achieve surface functionalization [24, 26, 27]. Aryl diazonium salts composed of anions, aryl groups, azide groups, and other functional groups are widely used in the field. During the grafting process, the azide groups leave in the form of nitrogen while the aryl moieties form covalent bonds with the substrate surface [28, 29]. Through the grafting process, not only the target groups can be directly introduced into the surface of substrate, but also subsequent reactions can be carried out on the grafted groups to obtain a surface with different chemical properties. And the functional groups can be used as graft initiators for subsequent polymerization routes or binding sites for preformed polymers [24, 27, 30].

In this paper, TiO2 NAs are firstly prepared by electrochemical anodic oxidation of titanium foils; then, TiO2 NAs are modified by the diazonium salt though electrochemical method. One end of the diazonium salt is tightly linked to TiO2 NAs through the covalent bond after grafting process, and the other end is electrochemically reduced to an aniline group, which provides an active site for subsequent electrochemical polymerization of PANI. Finally, PANI is electropolymerized and deposited on modified electrodes to obtain PANI/DZ/TiO2 NAs. The mechanism of modification by 4-nitrobenzene diazonium tetrafluoroborate and the preparation procedure are shown in Fig. 1.

Fig. 1
figure 1

a Mechanism of modification by 4-nitrobenzene diazonium tetrafluoroborate. (b) Preparation procedure of PANI/DZ/TiO2 NAs

Experimental section

Materials synthesis

Preparation of TiO2 NAs

Briefly, titanium foils (purity 99.9%, size 13 × 10 × 1 mm) were used as raw materials to prepare TiO2 NAs samples by two-step anodization at room temperature [31]. During pretreatment before anodizing, the titanium foils need to be ground smooth with 500 and 1200 sandpapers and rinsed in a 2 wt% HF solution for about 6 s. The experimental system used in the electrochemical process is a two-electrode cell that uses direct current as the power source and a Pt foil as the counter electrode. The first anodization was carried out in ethylene glycol electrolyte (0.5 wt% NH4F and 2 vol% deionized water) at 60 V for 2 h. Next, the oxidized sample was subjected to remove the oxide films by ultrasonic treatment in deionized water to obtain titanium foils having base patterns. Afterwards, the second anodization of the well-patterned titanium foils was carried out in another ethylene glycol electrolyte (0.5 wt NH4F 2 vol% deionized water and 0.5 wt% H3PO4) at 60 V for 30 min. Finally, the two-step oxidized TiO2 NAs were calcined in air at 450 °C for 2 h to transform the amorphous TiO2 NAs into anatase.

Fabrication of DZ/TiO2 NAs

The surface modification of TiO2 NAs with the diazonium salt was carried out by cyclic voltammetry (CV) at room temperature in a three-electrode cell (Pt foil as a counter electrode, saturated calomel electrode (SCE) as a reference electrode, TiO2 NAs as a working electrode). The first step was completed in acetonitrile electrolyte (2 mM 4-nitrobenzenediazonium tetrafluoroborate and 0.2 M TBAPF6) with a scanning rate of 10 mV s−1 ranging from 0.4 to − 0.7 V for 2 cycles. The reduction of the diazonium salt was carried out in a water–ethanol electrolyte (90:10 vol%, 0.1 M KCl) with a scanning rate of 50 mV s−1 ranging from − 1.2 to 0.2 V for 1 cycles.

Fabrication of PANI/DZ/TiO2 NAs

PANI/DZ/TiO2 NAs were prepared by electrochemical polymerization in the same three-electrode cell as “Fabrication of DZ/TiO2 NAs.” Firstly, the DZ/TiO2 NAs needed to be immersed in acetone solutions (0.5 M H2SO4 and 0.2 M aniline) for 12 h. After rinsing with ethanol and deionized water, the polymerization process was carried out by CV in an aqueous solution (0.5 M H2SO4 and 0.1 M aniline) with a scanning rate of 25 mV s−1 ranging from − 0.4 to1.3 V for 5 cycles. After washing the PANI/DZ/TiO2 NAs electrode with deionized water, dry it naturally in the air.

For comparison, TiO2 NAs was subjected to the same immersion and electrochemical polymerization deposition processes to prepare PANI/TiO2 NAs.

Electrochemical measurements

The measurements of electrochemical properties were taken on an electrochemical workstation (CHI608E, USA) in an aqueous solution (1.0 M HCl) in the same three-electrode cell as “Fabrication of DZ/TiO2 NAs.” The test methods included cyclic voltammetry (CV) and galvanostatic charge–discharge (GCD). The scanning range of CV was − 0.2 to 1.0 V, the current density of GCD ranged from 0.6 to 1.2 A g−1. The cycle stability of PANI/DZ/TiO2 NAs samples was measured by GCD at 12.0 A g−1 and the voltage varied between 0 and 0.65 V up to 2000 times.

Characterization

The microtopography of electrodes was observed by a field emission scanning electron microscopy (FE-SEM, Hitachi SU-8220, Japan) at an acceleration voltage of 10 KV. The crystallization and chemical compositions were measured by X-ray diffraction (XRD) and Raman spectrums. XRD spectrums were recorded by an X-ray diffractometer (Bruker D8 ADVANCE, Germany) at 40 KV and 40 mA using Cu Kα radiation. The Raman spectrums were obtained by a Raman spectrometer (HORIBA Jobin Yvon LabRAM Aramis, France) and the incident power of line was 10.4 mW and the excitation wavelength was 532 nm. The weight of electrodes was weighed by a precision electronic balance (Mettler Toledo, MX5).

Results and discussion

Surface microtopography

Figure 2 shows the top and cross-sectional SEM images of pristine TiO2 NAs, DZ/ TiO2 NAs, PANI/TiO2 NAs, and PANI/DZ/TiO2 NAs. It can be seen that, by the anodization process, the highly ordered and well-separated TiO2 NAs with an interior diameter of about 100 nm. Figure 2 b shows the surface morphology of DZ/TiO2 NAs with no significant change compared with TiO2 NAs in Fig. 2a, because the graft layer is a monolayer. The structure of PANI/TiO2 NAs is shown in Fig. 2c, f, the top of TiO2 NAs is coated and blocked by disordered PANI, the nanotube wall is also covered by a thin layer of PANI, and the original structure of TiO2 NAs is not destroyed compared with Fig. 2e. Because the surface of TiO2 NAs is very smooth, PANI accumulates on the surface of nanotube by a simple physical action. As shown in Figs. 2d, g, with diazonium salts as connecting agents, PANI/DZ/TiO2 NAs exhibits the same regular surface as the original TiO2 NAs. The top and cross-sectional of PANI/DZ/TiO2 NAs are rough, the top of the nanotubes is not blocked by PANI, and the sample maintains a highly ordered nanotube morphology, because PANI grows longitudinally along the surface of DZ/TiO2 NAs. This structure is significant to the properties of the composite materials and provides a fast channel for ion diffusion and electronic transmission, thus greatly improving the electrochemical performance of composite electrode materials [15].

Fig. 2
figure 2

Top and cross-sectional SEM images of a, e pristine TiO2 NAs, b DZ/TiO2 NAs, c, f PANI/ TiO2 NAs, and d, g PANI/DZ/TiO2 NAs

The compositions of TiO2 NAs, DZ/TiO2 NAs, and PANI/DZ/TiO2 NAs can be analyzed by energy-dispersive X-ray analyzer (EDX) installed in the SEM device. As shown in Fig. 3b, the DZ/TiO2 NAs contains O, Ti, and C elements, indicating the existence of the diazonium salt on the nanotubes, because of the additional C element compared with TiO2 NAs (Fig. 3a). However, no N element is detected, which may be due to the content of N element being too low to be detected or the characteristic peak is covered by O element. In Fig. 3c, compared with DZ/TiO2 NAs, the content of C element in PANI/DZ/TiO2 NAs is greatly increased and N element is detected, indicating that PANI has been deposited on DZ/TiO2 NAs. In addition, PANI/DZ/TiO2 NAs also contain the S element, because the electrochemical polymerization process was carried out in the aqueous solution containing sulfuric acid.

Fig. 3
figure 3

EDX spectrums of a TiO2 NAs, b DZ/TiO2 NAs, and c PANI/DZ/TiO2 NAs

Crystallization and chemical compositions

The XRD spectrums of TiO2 NAs, DZ/TiO2 NAs, and PANI/DZ/TiO2 NAs are shown in Fig. 4. The characteristic peaks (25.3, 37.8, 47.9, 54.4, and 55.5 cm−1) corresponding to anatase TiO2 (JCPDS file 71-1167) and other characteristic peaks corresponding to Ti (JCPDS file 05-0682) indicate that annealing can convert amorphous TiO2 NAs into anatase and subsequent reactions do not affect the anatase crystal form [32, 33].

Fig. 4
figure 4

XRD spectrums of TiO2 NAs, DZ/TiO2 NAs, and PANI/DZ/TiO2 NAs

However, compared with TiO2 NAs, no additional characteristic peaks of the diazonium salt and PANI are found in the XRD patterns of DZ/TiO2 NAs and PANI/DZ/TiO2 NAs, which may be due to the content of the diazonium salt being too low to be detected and PANI is amorphous or the introduction of the TiO2 hampers the crystallization of the PANI molecular chains [34, 35].

Raman spectrums of TiO2 NAs, DZ/TiO2 NAs, and PANI/DZ/TiO2 NAs are presented in Fig. 5. In all samples, there are four anatase peaks at about 143, 386, 504, and 624 cm−1, consistent with the result of XRD [36]. Compared with TiO2 NAs, DZ/TiO2 NAs has no obvious additional characteristic peaks, because the content of the diazonium salt monolayer is too low to be detected. PANI/DZ/TiO2 NAs have the characteristic peaks of PANI. The characteristic peaks located in 1518 cm−1 and 1590 cm−1 are caused by the C=N expansion vibration of the quinone unit and the C=C expansion vibration in the quinonoid ring, respectively, while the two characteristic peaks in 1170 and 814 cm−1 are due to the C–N vibrations of the polarized carrier. The C–H vibrational peaks of the benzene ring are located at 814 and 1170 cm−1. The other three peaks at 713, 588, and 294 cm−1 are also characteristic peaks of PANI according to other literatures [35, 37]. Raman spectrums strongly confirm that PANI has been successfully deposited on TiO2 NAs.

Fig. 5
figure 5

Raman spectrums of TiO2 NAs, DZ/TiO2 NAs, and PANI/DZ/TiO2 NAs

The weight of TiO2 NAs, DZ/TiO2 NAs, and PANI/DZ/TiO2 NAs are weighed by a precision electronic balance, and the results are shown in Table 1. The mass of DZ/ TiO2 NAs is larger than TiO2 NAs, indicating the existence of the diazonium salt. And the mass of PANI/DZ/TiO2 NAs is significantly larger than that of DZ/TiO2 NAs, which is the result of PANI deposition.

Table 1 The weight of TiO2 NAs, DZ/TiO2 NAs, and PANI/DZ/TiO2 NAs

Electrochemical performance

CV is commonly applied to test and characterize the capacitance performance of electrodes. Capacitance values under test conditions can be obtained by calculating the cycle curves using the following formulas [8]:

$$ {C}_{\mathrm{S}}=\left(\int IdV\right)/\left(v\times S\times V\right) $$
(1)
$$ {C}_{\mathrm{m}}=\left(\int IdV\right)/\left(\mathrm{v}\times m\times V\right) $$
(2)

where Cs is the unit-area capacitance (mF cm−2), Cm the unit-mass capacitance (F g−1), I the current intensity (A), v the scanning rate (mV s−1), V the electric potential (V), S the surface area of a measured sample (cm2), and m the mass of active substances on the measured sample (g).

Figure 6 presents the CV profiles of grafting the diazonium salt onto TiO2 NAs in an acetonitrile solution (2 mM 4-nitrobenzenediazonium tetrafluoroborate and 0.2 M TBAPF6) with a scanning rate of 10 mV s−1 between 0.4 and − 0.7 V. The irreversible cathode peak appears at about − 0.2 V in the first curve indicating that the diazonium salt is reduced. On the second cycle curve, the cathode peak disappears because the organic layer has blocked the surface and hindered the continuous reactions, so the graft layer is a monolayer [38, 39]. This result confirms that diazonium salt has been successfully grafted onto the surface of TiO2 NAs and the graft layer is a monolayer [40, 41].

Fig. 6
figure 6

Two consecutive CV profiles of grafting the diazonium salt with a scanning rate of 10 mV s−1 and a potential range of 0.4 to − 0.7 V (vs. SCE)

Figure 7 a shows the CV profiles of TiO2 NAs and DZ/TiO2 NAs with a scanning rate of 50 mV s−1 in 1.0 M HCl aqueous solution. The CV profiles of the two samples are similar and exhibit similar pseudocapacitive characteristic properties [8]. The electrochemical properties of TiO2 NAs are not significantly affected by the use of the diazonium salt alone. Figure 7 b shows the CV profiles of PANI/TiO2 NAs and PANI/DZ/TiO2 NAs. Two pairs of redox peaks are found in PANI/TiO2 NAs and PANI/DZ/TiO2 NAs, indicating the pseudocapacitive characteristics of PANI [42]. The first pair of redox peaks (EpcI/EpaI) at about 0.205/0.335 V is due to the transition of PANI between leucoemeraldine and emeraldine states, and another pair of redox peaks (EpcII/EpaII) at approximately 0.535/0.815 V is due to the transition between emeralidine and pernigraniline states. Compared with PANI/TiO2 NAs, the area of CV curve of PANI/DZ/TiO2 NAs is larger, and after calculation, PANI/DZ/TiO2 NAs have a specific capacitance of 841.8 F g−1 more than that of PANI/TiO2 NAs (715.5 F g−1). Because the diazonium salt acts as a bridge between PANI and TiO2 NAs, one end of the diazonium salt is connected to TiO2 NAs through the covalent bond, and the other end can provide an active site for subsequent reactions. Thus, the morphology and structure of PANI/DZ/TiO2 NAs are more orderly, resulting in higher specific capacitance. From the CV curves shown in Fig.7c, it can be seen that PANI/DZ/TiO2 NAs have similar redox peaks at different scanning rates. The first pair of redox peaks is caused by a redox reaction inside the electrode, and the second pair is caused by redox reaction at the surface or near the surface. And the redox peaks are shifted by polarization at different scanning rates, the anode peaks move positively, and the cathode peaks move negatively, which indicates the occurrence of irreversible redox reaction [19]. The specific capacitance of PANI/DZ/TiO2 NAs and PANI/TiO2 NAs calculated by CV profiles at different scanning rates are shown in Fig.7d. With the scanning rate increasing from 5 to 100 mV s−1, the specific capacitance of PANI/DZ/TiO2 NAs decreased from 1020.1 to 778.3 F g−1, retaining 76.3% of the initial capacitance, while the value of PANI/TiO2 NAs is only 54.9%, indicating PANI/DZ/TiO2 NAs have high specific capacitance, good stability, and high rate performance, because the diazonium salt makes TiO2 NAs and PANI connect closely by converting physical deposition into chemical covalent grafting [23].

Fig. 7
figure 7

CV profiles a of TiO2 NAs and DZ/TiO2 NAs with a scanning rate of 50 mV s−1 and a potential range of − 0.2 to 1.0 V (vs. SCE), CV profiles b of PANI/TiO2 NAs and PANI/DZ/TiO2 NAs with a scanning rate of 50 mV s−1 and a potential range of − 0.2 to 1.0 V (vs. SCE), CV profiles c of PANI/DZ/TiO2 NAs at different scanning rate from 5 to 100 mV s−1 with a potential range of − 0.2 to 1.0 V (vs. SCE), and the specific capacitance d of PANI/TiO2 NAs and PANI/DZ/TiO2 NAs in terms of the scanning rate

High power performance is a key issue for supercapacitor applications. The capacitance can be calculated from GCD profiles using the following formulas [18]:

$$ {C}_{\mathrm{S}}=\left(I\times \Delta t\right)/\left(S\times \Delta V\right) $$
(3)
$$ {C}_{\mathrm{m}}=\left(I\times \Delta t\right)/\left(m\times \Delta V\right) $$
(4)

where Cs is the unit-area capacitance (mF cm−2), Cm the unit-mass capacitance (F g−1), I the constant current intensity (A), Δt the discharge duration (s), ΔV the potential range (V), S the surface area of measured sample (cm2), and m the mass of active substances on the measured sample (g).

Figure 8 a shows the GCD profiles of PANI/TiO2 NAs and PANI/DZ/TiO2 NAs. At the same current density of 1.2 A g−1, the specific capacitance values of PANI/DZ/TiO2 NAs and PANI/TiO2 NAs are 1058.8 F g−1 and 872.3 F g−1, respectively. The voltage drop (IR) in the positive branch is caused by the total resistance along the electric circuit, including the resistance of a working electrode material and electrolyte solution, so the IR drop of both electrodes is about 130 mV. And the IR drop in the negative branch is caused by internal resistance of the electrode material, so the IR drop of PANI/DZ/TiO2 NAs is only 1.03 mV, slightly smaller than that of PANI/TiO2 NAs (63.84 mV), indicating that PANI/DZ/TiO2 NAs has higher specific capacitance, smaller internal resistance, and better charge transfer capability after being modified by the diazonium salt. In addition, it can be seen that the faradaic reaction occurred in both samples because the charge–discharge curves are non-linear [43].

Fig. 8
figure 8

GCD profiles a of PANI/TiO2 NAs and PANI/DZ/TiO2 NAs at the current density of 1.2 A g−1, GCD profiles b of PANI/DZ/TiO2 NAs at different current density from 0.6 A g−1 to 12 A g−1, the specific capacitance c of PANI/TiO2 NAs and PANI/DZ/TiO2 NAs in terms of current density, the first d 10 cycles and the e last 10 cycles GCD profiles of PANI/DZ/TiO2 NAs for 2000 cycles at the current density of 12 A g−1

The GCD profiles of PANI/DZ/TiO2 NAs between 0 and 0.65 V at different current densities are shown in Fig.8b. As shown in Fig.8c, with the current density increasing 20 times to 12 A g−1, the specific capacitance of PANI/DZ/TiO2 NAs and PANI/ TiO2 NAs decreases. The drop is caused by the kinetic limitation of the pseudocapacitance redox reaction of PANI. With the increase of current density, the charging and discharging time become shorter, and the electrochemical reaction rate lags behind the electron transport, resulting in the decrease of pseudocapacitance [15]. At the same time, during the charging and discharging cycles, the doping or de-doping of H+ in the PANI chains leads to the expansion, shrinkage, and drop of polymer materials, resulting in the reduction of electrode capacitance [44]. The value of specific capacitance of PANI/DZ/TiO2 NAs drops from 1108.5 to 859.0 F g−1(Fig.8c), remaining 77.5%, more than that of PANI/TiO2 NAs (54.0%), again indicating the better rate performance of PANI/DZ/TiO2 NAs. To investigate the cycling stability, Figs.8d, e respectively show the GCD curves of the first 10 cycles and the last 10 cycles of PANI/DZ/TiO2 NAs during the 2000 charge–discharge process, when the voltage range is 0~0.65 V and the current intensity is 12 A g−1. It can be observed that the IR drop increases with the cycling time and is more pronounced in the negative branch than in the positive branch as the cycle time increases, because the conductivity of the electrode is more affected than the ion diffusion process. After 2000 cycles of charge and discharge, the capacitance value of PANI/DZ/TiO2 NAs is calculated to be 719.1 F g−1, which is 83.7% of the initial value and shows excellent cycling stability. Excellent cycle stability is attributed to the highly ordered and well-separated nanocomposite structure. After surface modification by the diazonium salt, PANI can uniformly connect to the surface of TiO2 NAs, so that the nanotubes can support PANI effectively and avoid structural collapse [17, 45].

The specific energy density (E) and power density (P) of samples can be calculated from GCD profiles using the following formulas [43]:

$$ E=\left(I\times \Delta V\times \Delta t\right)/2m $$
(5)
$$ P=\left(I\times \Delta V\right)/2m $$
(6)

where E is the specific energy density (Wh Kg−1), P the power density (W Kg−1), I the constant current intensity (A), Δt the discharge duration (s), ΔV the potential range (V), and m the mass of active substances on the measured sample (Kg).

As shown in Fig. 9, at the same power density, the energy density of PANI/DZ/TiO2 NAs is higher than that of PANI/TiO2 NAs. At the current density of 1.2 A g−1, when the power density is 390 W Kg−1, the energy density of PANI/DZ/TiO2 NAs and PANI/TiO2 NAs are 62.13 Wh Kg−1 and 51.19 Wh Kg−1, respectively. PANI/DZ/TiO2 NAs has better energy storage capability and can be used in the field of supercapacitors, because the organic polymer and the inorganic electrode substrate are connected more closely.

Fig. 9
figure 9

Ragone plots of PANI/DZ/TiO2 NAs and PANI/TiO2 NAs

Conclusions

In summary, the PANI/DZ/TiO2 NAs nanocomposite, with PANI growing along the surface of nanotubes, can be obtained via three steps: anodization, surface modification, and electrochemical polymerization. After surface modification of the diazonium salt, PANI/DZ/TiO2 NAs have higher specific capacitance and conductivity, better electron transport capability cycling stability, and energy storage capability than PANI/TiO2 NAs. This result is attributed to the highly ordered structure of PANI/DZ/TiO2 NAs, which increases the effective specific surface area of the interfacial reaction, and provides fast and efficient channels for ion diffusion and electron transport. Otherwise, PANI and TiO2 NAs are covalently linked by the diazonium salt and PANI can be supported by TiO2 NAs effectively, which enhances the stability of the nanocomposite greatly.