1 Introduction

The conducting polymers have been focused in recent years for many applications because their electrical conductivity ranges from semiconductors to metals. The polymer-based materials are flexible, lightweight, less toxic, cost-effective, easy to synthesize, and ease of processability than inorganic materials [1,2,3]. Moreover, the electrical conductivity of the conducting polymers can be tuned by doping in the polymeric matrix [4, 5]. Owing to the many attractive features, conducting polymers are being focused in many applications such as flexible electronics [1], flexible thermoelectrics [6], electrochemical energy storage and conversion [7], electromagnetic shielding [8], sensors [9,10,11,12], actuators [13], and hydrogen storage [14] etc. Although there are many advantages, some drawbacks such as low electrical conductivity, thermal stability, and solubility of the polymers in solvents are limiting their use in many applications [15]. The electrical conductivity of the conducting polymer can be improved in different ways, such as doping the polymer matrix with appropriate dopant material [2, 16], changing the concentration of the dopant material in the polymer matrix [17], and changing the structural morphology of the polymer chain [18]. Moreover, the doping of the polymer matrix improves the solubility of the polymer and makes it easy for the solution processability of the polymer [15].

Doping in the polymer matrix is one of the easiest ways to improve the electrical conductivity of the conducting polymer [19, 20]. The type of dopant material (p-type or n-type) decides whether the polymer matrix is a p-type or n-type material [21, 22]. The p-type doping removes an electron from the HOMO and creating a hole in the polymer backbone. The n-type doping adds an electron to the LUMO and creates an electron in the backbone of the conducting polymer [23]. The electrical conductivity of the polymer matrix can also be tuned by changing the doping concentration in the polymer matrix, which can be improved from 10−8 Scm−1 (undoped state) to 104 Scm−1 (doped state). Many organic and inorganic acids have been used as doping molecules, such as hydrochloric acid (HCl) [17], camphor sulfonic acid (CSA) [24, 25], naphthalene sulfonic acid [26], phosphoric acid [27], and other organic acids [28]. In case of polyaniline, the protonic acid dopants initially protonate the nitrogen atoms in the quinonoid structure and form the bi-polaron structure. Then, the bi-polaron dissociates immediately and forms polaron structure (radical cation) and this polaron separates and forms a polaron lattice. The polarons’ moves in the lattice lead to improved electrical conductivity in the polymer [29]. However, in thermoelectric applications, the higher concentration of the doping increases the carrier concentration in the polymer matrix, leads to increases in electrical conductivity, but this pushes the Fermi energy inside the conduction band, and it leads to decreases in the Seebeck coefficient [22]. This trade-off relationship between the electrical conductivity (σ) and Seebeck coefficient (S) strongly influences the power factor (P = σS2) of the polymers.

The one-dimensional polymer nanostructures, such as nanowires, nanofibers, and nanorods, show improved electrical conductivity [18, 26, 30]. The electrical conductivity (σ) of a semiconductor depends on the concentration of the charge carriers (n) and the mobility of the charge carriers (µ), i.e., σ = neµ [6]. These one-dimensional polymer nanostructures show higher charge carrier mobility due to the ordered arrangement of polymer chains as compared with the entangled polymer chains in the bulk structures [31]. In thermoelectrical applications, the recent research is focusing on improving the power factor (P = σS2) of the polymer-based materials by decoupling the interdependent parameters such as electrical conductivity (σ) and Seebeck coefficient (S) by making polymer nanostructures and nanocomposites with the polymer [31, 32]. Improving electrical conductivity without increasing the charge carriers has been achieved by making the nanostructures of polymers such as nanowires, nanorods, and nanosheets. In chemiresistor or conductometric sensor applications, the one-dimensional nanowire shows high sensitivity and fast current response. The smaller diameter of the nanowire improves the current response in the axial direction, and the high surface area of the nanowire improves the sensitivity of the nanowire [33]. The one-dimensional conducting polymer nanowires and their composite nanowires are recently being focused on the energy storage and conversion devices such as supercapacitors and batteries [34].

Out of various conducting polymers, polyaniline (PANI) has many attractive features over the other conducting polymers such as inexpensive, environmental stability, easy synthesis protocol, easy processability, and tunable electrical conductivity [15, 35, 36]. The conducting polyemeraldine salt shows conductivity of 1–5 Scm−1, and the conductivity of the polymers can be tuned up to 400 Scm−1 by doping with acids in the polymer matrix. In the present work, we have synthesized the HCl-doped polyaniline at different dopant (HCl) concentrations by simple oxidative polymerization method and studied the effect of dopant concentration on the electrical properties of polyaniline. We also prepared HCl-doped, CSA-doped, and citric acid (CA)-doped polyaniline nanofibers using the interfacial polymerization method and studied the effect of doping materials on the electrical properties of the polyaniline. Moreover, we also prepared the polyaniline in different morphologies with the same doping material and studied the effect of morphology on the electrical properties of the polyaniline.

2 Experimental

2.1 Materials

For the synthesis of polyaniline with different doping and different morphology, aniline, ammonium persulfate (APS), camphor sulfonic acid (CSA), citric acid (CA), ferric chloride are purchased from Aldrich Chemicals and used without any further purification. Hydrochloric acid (HCl) and toluene are purchased from Merck chemicals and used without any further purification. The double-distilled water was used throughout the synthesis procedure.

2.2 Synthesis

2.2.1 Synthesis of highly entangled PANI chains

Synthesis of polyaniline (polyemeraldine) involves simple oxidative polymerization of aniline hydrochloride using ammonium persulfate salt (APS) [37]. In a typical synthesis, 100 ml of 1 mol of HCl is mixed with 0.87 mol of aniline and taken in a 250 ml round bottom flask. The aniline hydrochloride mixture is kept at 0 °C (ice-cold temperature) and maintained at that temperature with constant stirring. Ammonium persulfate salt (1 mol) dissolved in water was added slowly to the aniline hydrochloride mixture; the reaction mixture slowly turns in to blue color which indicates the oxidative polymerization of aniline. The blue-colored solution turns in to green precipitate, which is conducting polyaniline (polyemaraldine phase). The stirring was continued for 90 min at ice-cold temperature. After completion of the reaction, the green precipitate was separated from the reaction medium by the centrifugation method, washed three times with water, and then dried in a hot air oven at 65 °C for 24 h. The dried sample was grounded and labeled as PANI-ED, and used for further characterization studies.

2.2.2 Synthesis of PANI nanowhiskers by simple oxidative polymerization

Polyaniline nanowhiskers are synthesized by a similar oxidative polymerization aniline hydrochloride using ammonium persulfate ((NH4)2S2O8) and ferric chloride (FeCl3) [38]. In a typical synthesis, 0.02 mol of aniline is dissolved in 200 ml of 0.05 M dilute HCl; to this, 0.02 mol of ammonium persulfate and 0.015 mol of ferric chloride were added. The reaction mixture was maintained at 30 °C for 24 h and then washed with water and dried at 65 °C in an air oven for 24 h. The dried undoped polyaniline sample is labeled as PANI-NW. The HCl-doped polyaniline samples PANI-NW-0.1 M HCl, PANI-NW-0.5 M HCl, and PANI-NW-1.0 M HCl were prepared by treating the as-synthesized samples with dilute HCl of 0.1, 0.5, and 1.0 M concentrations respectively.

2.2.3 Synthesis of PANI nanofibers by interfacial polymerization

Polyaniline nanofibers are synthesized by the polymerization of aniline using oxidizing agent at the interface of aqueous and non-aqueous solution [39]. In a typical synthesis procedure, ammonium persulfate is dissolved in 100 ml of 1 M dilute HCl and taken in a 500 ml beaker as an aqueous layer, and 1 M of aniline monomer dissolved in toluene is taken as a non-aqueous layer. The non-aqueous layer was slowly added over the aqueous layer through the walls of the beaker. After the complete addition, these two immiscible layers form an interface, and the polymerization starts at the interface after 5 min. The green precipitate started to form at the interface and the formed precipitate moves toward the bulk aqueous layer. The polymerization process is allowed to continue for 24 h without any physical disturbance. After completing the reaction, the precipitate was separated from the aqueous layer and washed three times with water, and centrifuged. Finally, the precipitate was dried in an air oven for 24 h at 60 °C, and the dried sample was appropriately grounded. The prepared sample is labeled as PNF-HCl.

Similarly, the polyaniline was formed using CSA and CA as dopants instead of HCl, and the remaining procedures are same as in the case of HCl-doped polyaniline nanofibers. The HCl-, CSA-, and CA-doped samples were named as PNF-HCl, PNF-CSA, and PNF-CA, respectively.

2.3 Characterization techniques

Powder X-ray diffraction (XRD) studies on the prepared powder samples were carried out using a Bruker D8 Advance X-ray diffractometer having a Cu metal target (K-α radiation, 1.5406 A). The size and morphology of the prepared samples were analyzed by a transmission electron microscope (JOEL JEM-2100) with a working accelerating voltage at 200 kV. Fourier-transform infrared (FTIR) spectra of the prepared samples were done using BrukerCary 600 series spectrometer from Agilent Technologies. The samples are mixed with KBr and made into thin pellets for the IR measurements. Thermogravimetric analysis (TGA) of the prepared powder samples was done using the METTLER TOLLEDO thermogravimetric analyser (model TGA/DSC-I) under the N2 atmosphere. The weight loss was measured from room temperature to 800 °C with the heating rate of 10 °C min−1. Differential scanning calorimetric (DSC) measurements of the prepared samples were measured using Perkin Elmer STA8000 instrument under nitrogen atmosphere from room temperature to 350 °C with the heating rate of 10 °C min−1. Proton NMR (1H-NMR) spectra of the HCl-doped polyaniline samples were recorded using Bruker 400 Ascend NMR spectrometer. The samples were dissolved in deuterated dimethyl sulfoxide (DMSO-d6) solvent and the tetramethyl silane (TMS) is used as an internal reference. The dilute reflectance spectrum (DRS-UV) of the prepared samples were done using Shimadzu UV-2600 Spectrophotometer, and BaSO4 was used as a blank. The electrical conductivity measurements of the prepared samples were done using four-probe method. The samples were made into cylindrical pellets by pressing in a hydraulic press, by applying pressure. To make electrical connection, gold pattern was made as four points on the edges of the pellet using EXCEL electron beam lithography. The I–V measurements were done for the prepared cylindrical sample using KEITHLEY2450 SourceMeter. The electrical conductivity was calculated from the slope of the I–V curve and the dimension of the cylindrical pellet. The electrical conductivity at different temperatures (80–300 K) is also measured using a cryogenic system (JANIS Research Co.inc. the USA) by filling with liquid nitrogen, and the temperature near the sample is monitored using the Lakeshore Model 335 temperature controller.

3 Results and Discussion

Figure 1 shows the powder XRD pattern of the polyaniline samples synthesized using different synthesis methods. There are three peaks observed in all the samples between the 2θ values 10° and 30°, and all the three peaks are broad that indicates the formation of the amorphous or semi-crystalline nature of polyaniline. Moreover, the observed patterns for the polyaniline samples are due to the parallel and perpendicular periodicity of the polymer. The peaks observed at the 2θ values 15.3°, 20.8°, and 25.4° correspond to the reflection from the planes (011), (020), and (200), respectively, and the corresponding d-spacing values are 5.786, 4.267, and 3.504 Ǻ, respectively. The sample prepared using simple oxidative polymerization (PANI-ED) shows sharp peaks, and this could be due to the formation of semi-crystalline polyaniline, as shown in Fig. 1a. Whereas, the peak broadness is observed in the samples prepared by oxidative polymerization (PANI-NW) and interfacial polymerization (PNF-HCl, PNF-CSA, and PNF-CA) indicates that the amorphous nature of the polyaniline (Fig. 1b, c). Moreover, the intensity of the peaks at 15.3°, 20.8°, and 25.4° are considerably reduced for those samples. The amorphous nature and the reduction in the intensity could be due to the formation of the smaller size (nanosize) particles.

Fig. 1
figure 1

Powder XRD pattern of the polyaniline samples synthesized by a the oxidative polymerization using APS, b oxidative polymerization using APS + FeCl3 and c interfacial polymerization using APS

The TEM images of the prepared polyaniline samples are shown in Fig. 2. The images show the formation of different morphologies for the samples synthesized using different synthesis methods. The simple oxidative polymerization of aniline using ammonium persulfate (PANI-ED) shows highly entangled polymer chains and forms microsized particles, as shown in Fig. 2a. But, the similar oxidative polymerization is carried out using a mixture of ammonium persulfate and ferric chloride (PANI-NW) shows the formation of nanowhiskers with a diameter ~ 50 nm and length ~ 200 nm, as shown in Fig. 2b, c. The interfacial polymerization of aniline with APS produces fine nanofibers, and the diameter of nanofibers is ~ 50 nm and the length of the nanofibers is ~ 500 nm, as shown in Fig. 2d–f, and this is due to the controlled exposure of aniline to the oxidizing agent at the aqueous and non-aqueous interface. Figures 2d–f are the nanofibers of polyaniline prepared by doping with HCl, CSA, and CA, respectively. From the TEM image, it is clearly seen that the CA-doped nanofibers (PNF-CA) have a rough surface as compared to HCl-doped (PNF-HCl) and CSA-doped (PNF-CSA) polyaniline nanofibers. The observed rough surface could be due to the irregular orientation of the polymer chains at the surface of the polyaniline nanofibers. From the microscopic images of prepared polyanilines, it is clear that the oxidative polymerization with different oxidants forms different morphologies, and also the different method of polymerization produces the different morphologies of polymer.

Fig. 2
figure 2

TEM images of the polyaniline prepared by simple oxidative polymerization (ac) and interfacial polymerization (df)

The infrared spectra of the prepared HCl, CSA, and CA-doped polyaniline samples are shown in the Fig. 3. All the three samples show almost similar pattern of transmittance, and the bands are observed at 3225 cm−1, 1557 cm−1, 1488 cm−1, 1288 cm−1, 1225 cm−1, 1122 cm−1, 801 cm−1, and 590 cm−1. The bands at 1557 cm−1and 1488 cm−1 correspond to the C = C stretching frequencies of quinoid and benzenoid structures of polyaniline, respectively. The band at 801 cm−1 corresponds to the out-of-plane bending vibration of the C–H bond in the 1,4-disubstituted benzene ring. The band at 1122 cm−1 is due to the in-plane bending vibration of the C–H bond in the quinoid structure. The bands at 1288 cm−1 and 1225 cm−1 correspond to the C–N stretching frequencies of the benzenoid ring in the polyaniline. The broad band centered at 3225 cm−1 is due to the N–H stretching frequency. The bands from 590 cm−1 correspond to the chloride ions in the polyaniline samples which could be from the doped HCl [40, 41]. The observed bands in the prepared polyaniline samples indicate that the formation of the emeraldine base (EB).

Fig. 3
figure 3

Infrared spectra of polyaniline samples synthesized using different acids

The formation of polyaniline structure is further confirmed by the proton nuclear magnetic resonance spectroscopy (1H-NMR). The 1H-NMR spectra of HCl-doped polyaniline nanowhisker sample synthesized using simple oxidative polymerization (PANI-NW 0.5MHCl), and the polyaniline nanofiber sample synthesized using interfacial polymerization (PNF-HCl) method are given in the Fig. 4. The 1H-NMR spectrum of the polyaniline samples that are prepared in different polymerization methods show similar pattern. The three sharp peaks of equal intensities and at equidistance are observed at 7.08 ppm, 7.21 ppm, and 7.34 ppm for the PANI-NW 0.1 M HCl sample and at 6.97 ppm, 7.10 ppm, and 7.22 ppm for PNF-HCl sample. The observed sharp three singlet peaks are due to the 1H coupled with 14N nucleus and indicates the protonation of nitrogen (N–H protons) in the backbone of the acid-doped polyaniline chain. Similar NMR pattern has been observed for the polyaniline doped with different dopants in the literature [42]. The peaks at 7.36 ppm, 7.38 ppm, 7.42 ppm, and 7.44 ppm for the PANI-NW 0.1 M HCl sample and the peaks at 7.38 ppm, 7.42 ppm, and 7.48 ppm for the PNF-HCl sample correspond to the protons in the benzenoid and quinonoid rings. The peaks observed at the δ values 5.79 ppm, 8.13 ppm, and 9.33 ppm in both the acid-doped samples correspond to the heterojunction structure of polyaniline, secondary amine (N–H protons), and the intermolecular hydrogen bonding between water and the –NH groups in the polyaninline, respectively [43]. The peak at 2.5 ppm corresponds to the 1H residual solvent chemical shift for DMSO-d6 and the 1H HOD chemical shift is observed at ~ 3.4 ppm for DMSO-d6 [44].

Fig. 4
figure 4

The 1H-NMR spectra of hydrochloric acid (HCl)-doped polyaniline samples synthesized using a simple oxidative polymerization and b the interfacial polymerization

Thermogravimetric analysis curves of the undoped and different acid-doped polyaniline samples are shown in Fig. 5a and c, and the corresponding derivative curves are shown in Fig. 5b and d. The TGA curves of undoped polyaniline sample (PANI-NW) and the HCl-doped samples at different concentration are (see Fig. 5a) following almost similar trend in the weight loss. The TGA curves in Fig. 5a and DTG curves in Fig. 5b clearly indicate that there are three-step weight losses for the prepared polyaniline samples. Similar kinds of weight loss have been reported in the literature for the acid-doped polyanilines [45, 46]. The first weight loss (~ 10%) below 120 °C for all the samples is due to the loss of adsorbed water molecules in the polymer matrix, unreacted monomers. The second weight loss from 120 to 380 °C (~ 19%) for the sample PANI-NW (undoped) is due to the water molecules attached to the polymer matrix as dopants, and the weight loss from 120 to 315 °C (~ 7%) for HCl-doped samples could be due to the loss of dopant materials and the loss of lower molecular weight oligomers in addition to the water molecules attached to the polymer matrix. The third weight loss from 380 to 650 °C for the undoped sample (~ 20%) and 315 to 650 °C for the HCl-doped samples (~ 25%) could be due to the decomposition of the polymer matrix (see Fig. 5a, b) [45]. The thermogravimetric curves of polyaniline samples prepared by interfacial polymerization with different dopant materials (PNF-HCl, PNF-CSA, and PNF-CA) also show similar pattern of weight loss (Fig. 5c), but the position of the weight loss in the temperature scale is different for different dopant materials. The first weight loss below 120 °C is almost same (~ 9%) for all the three different acid-doped polyaniline samples. But the second and third weight losses are different for different acid-doped polyaniline nanofiber samples. The observed second weight loss for the HCl-, CA-, and CSA-doped polyaniline samples are ~ 16% (120 to 360 °C), ~ 22% (120 to 375 °C), and ~ 25% (120 to 400 °C), respectively (see Fig. 5d), and the difference in the weight loss is due to the difference in the thermal stability of the dopant materials [46, 47]. The observed third weight loss for the HCl-, CA-, and CSA-doped samples are ~ 25% (360 to 650 °C), ~ 21% (375 to 650 °C), and ~ 31% (400 to 650 °C), respectively, and this corresponds to the structural decomposition of the polymer matrix.

Fig. 5
figure 5

a TGA curves of polyaniline doped with different concentrations of HCl and the corresponding b DTG curves, and c the TGA curves of polyaniline doped with different dopant materials and d the corresponding DTG curves

The DSC studies of all prepared polyaniline samples show three endothermic peaks (see in Fig. 6). The first low-intensity endothermic peak below 100 °C could be due to the removal of moisture or solvent molecules present in the sample, and the corresponding weight loss is observed below 120 °C in TGA [48]. The second more intense endothermic peak around ~ 150 °C corresponds to the removal of water molecules attached to the polymer matrix as secondary dopants [46, 49] and the less-intense endothermic peak around ~ 300 °C corresponds to the removal of the dopant materials and oligomers present in the sample. The weight loss corresponds to these second and third endothermic peak observed between 120 and 350 °C in the TGA analysis. The endothermic peak corresponds to the breakage of amine bonds in the polymer chain (decomposition of the polymer) is not seen in the DSC data and it may be appear at higher temperature (above 400 °C) [48]. The observed intensity of the endothermic peak at ~ 150 °C decreases with increasing the concentration of the doping in polymer matrix (as shown in Fig. 6a) which indicates decreasing the concentration of the water molecules attached to the polymer matrix as secondary dopants. The intensity of the endothermic peak at ~ 300 °C increases with increasing the doping concentrations indicates that the peak corresponds to the removal of the dopant molecules in the polymer matrix. The peak positions of the less-intense endothermic peak at ~ 300 °C in polyaniline nanofiber samples doped with different dopant materials are different (as shown in Fig. 6b), and this could be due to the difference in the thermal stability of the dopant materials.

Fig. 6
figure 6

DSC curves of polyaniline samples doped a with different concentration of dopping material and b with different types of dopant materials

The UV–Visible spectrum of the entangled polyaniline sample (PANI-ED) shows two absorption bands, one at 379 nm and another at 648 nm, as shown in Fig. 7a. The first absorption band at the lower wavelength (379 nm) corresponds to the ππ* transition in the benzenoid segment of the polyaniline and the band at a higher wavelength (648 nm) corresponds to the nπ* transition in the quinoid segment, i.e., the transition from the HOMO of the benzenoid ring to LUMO of the quinoid ring and this band indicates the oxidation state of the polyaniline [50, 51]. The observed intensity of the quinoid band is larger than the intensity of the benzenoid band, which indicates that the degree of oxidation of polyaniline could be slightly higher than that of the emeraldine base (EB) phase. The corresponding optical band gap calculated using tauc plot is 3.1 eV and 1.7 eV for the benzenoid and quinonoid segments, respectively, as shown in Fig. 7b.

Fig. 7
figure 7

The absorption spectrum (a) and their corresponding optical band gap (b) of entangled polyaniline sample (PANI-ED), c absorption spectra of the HCl-doped polyaniline nanowhiskers with different concentrations and d the possible energy transitions

The UV–Visible spectra of the prepared polyaniline nanowhisker samples (PANI-NW) treated with HCl solution of different concentrations is shown in Fig. 7c. The freshly prepared polyaniline nanowhiskers treated only with water (PANI-NW) show two absorbance bands, one at 364 nm and another at 726 nm. The band at the lower wavelength (364 nm) corresponds to the ππ* transition in the benzenoid segment of the polyaniline, and the band at a higher wavelength (726 nm) corresponds to the nπ* transition in the quinoid segment, as observed in the sample PANI-ED (see Fig. 7a) [50]. But, the observed difference in band positions could be due to the formation of nanowhiskers morphology in the PANI-NW sample (as seen from the TEM image in Fig. 2c, d). In case of HCl-treated samples, the first absorbance band at 364 nm is red-shifted, which indicates that the doping of HCl in polyaniline matrix, and this reduces the ππ* band energy. Moreover, new absorbance bands are appeared around ~ 650 nm and ~ 480 nm (only in PANI-NW 0.5 M HCl), and these new bands at longer wavelength region (~ 480 nm and ~ 650 nm) are due to the excitonic-type transition such as polaron and bi-polaron transition in the doped polyaniline samples, as shown in Fig. 7c and d [49, 52]. Moreover, the intensity of the band at 364 nm decreases with increasing the concentration of HCl, which indicates that the excitonic-type transitions due to polarons and bi-polarons are dominated in the doped polyaniline samples over the ππ* transition. In case of the PANI-NW 0.5 M HCl sample, the intensity of the band at ~ 360 nm (ππ* transition) has almost diminished, and the polaron bands are dominating in the transitions. Moreover, the observed intensity ratio of the quinoid to the benzenoid band, i.e., quinoid (π-polaron)/benzenoid (ππ*), increases with the concentration of the HCl and indicates that doping increases with the concentration of the HCl [53].

The optical band gap calculated from the absorption bands of the HCl-doped polyaniline nanowhisker samples at different concentrations is shown in Fig. 8. In the pure polyaniline sample, two optical band gaps are observed, one at 1.44 eV, which corresponds to the nπ* transition in the quinonoid segment, and another at ~ 2.81 eV due to the ππ* transition at the benzenoid segment [54]. The observed bandgaps are less than that of the bandgaps in the PANI-ED (1.77 eV and 3.01 eV) sample, as shown in the Fig. 7b. This could be due to the formation of nanowhisker morphology in the PANI-NW sample. The bandgap due to the ππ* transition decreases with increasing dopant (HCl) concentration, and which reduces from 2.8 to ~ 2.5 eV for the concentration from 0 M HCl to 1.0 M HCl. But, the trend was not followed for the π-polaron band at ~ 650 nm (~ 1.5 eV), and this could be attributed to the contribution of the high-energy polaron-π* transitions in addition to the low energy π-polaron transition (as shown in the Fig. 7d). The observed low bandgap (2.47 eV) in the PANI-NW 0.5MHCl sample corresponds to the polaron-π* transition (479 nm), as shown in Fig. 7d. The polaron-π* and π-polaron transitions are more dominated in the PANI-NW 0.5MHCl sample as compared to the ππ* transition, that could be the reason for the absence of the transition at high-energy region (ππ*). The variation absorption position and the optical bandgap of the doped samples are compared in Table 1.

Fig. 8
figure 8

The optical bandgap of the acid-doped polyaniline nanowhiskers

Table 1 The bands observed in the absorption spectra and their corresponding optical bandgap

The absorption spectra of the polyaniline nanofiber samples (PNF) synthesized by interfacial polymerization (IP) with different dopants (HCl, CSA, and CA), and their corresponding optical band gaps are shown in Fig. 9. The exact band positions and their corresponding bandgaps are shown in Table 1. All the three samples show almost similar absorption pattern with three absorption bands which correspond to the ππ*, polaron-π*, and π-polaron transitions [51, 53, 55]. The position of the polaron-π* band is observed at ~ 480 nm for all the samples with the band energy gap 2.4 eV, but the positions of the π-polaron and ππ* absorption bands are different for the different acid-doped samples. The π-polaron bands at a higher wavelength region are 665 nm (1.59 eV), 695 nm (1.55 eV), and 611 nm (1.77 eV) for the PNF-HCl, PNF-CSA, and PNF-CA samples, respectively. This indicates that the energy gap for π-polaron transition is large for PNF-CA (1.77 eV) sample as compared to the PNF-HCl and PNF-CSA polyaniline nanofibers. The ππ* band for the PNF-HCl sample is observed at 326 nm (3.08 eV), and this absorption band is not visible clearly for the PNF-CSA and PNF-CA samples, but a small shoulder is observed below 300 nm (i.e., ~ 290 nm). This low intensity ππ* bands at low wavelength region (< 300 nm) also confirmed by the calculated larger band energy for the PNF-CSA (3.37 eV) and PNF-CA (3.80 eV) samples as compared with the PNF-HCl (3.08 eV) samples. This indicates that the polaron transitions are more prominent in the CSA- and CA-doped samples as compared to the larger bandgap ππ* transition. The difference in the absorption spectrum in the three different acid-doped samples could be due to the extent of doping and the difference in the degree of oxidation state in the polyaniline structure, i.e., the difference in the benzenoid and quinonoid rings ratio [52, 56]. This indicates that the different types of doping in the polyaniline matrix alter the electronic transitions in the backbone of the polymer.

Fig. 9
figure 9

The absorption spectra and the optical bandgap of the HCl-, CSA-, and CA-doped polyaniline nanofiber samples

The electrical conductivity of the polyaniline nanowhiskers (PANI-NW) doped with different concentrations of HCl is measured at different temperatures, from 80 to 300 K (as shown in Fig. 10). The electrical conductivity increases with increasing the temperature for all the samples, but the rate of increase is different for the different HCl-doped samples. The measured electrical conductivities at 300 K for the HCl-doped samples PANI-NW, PANI-NW 0.1 M HCl, PANI-NW 0.5 M HCl, and PANI-NW 1.0 M HCl are 1.94 Scm−1, 3.14 Scm−1, 9.8 Scm−1, and 10.2 Scm−1, respectively. The observed increase in electrical conductivity with the doping concentration could be due to the increase in polaron formation (bands at ~ 480 nm and at ~ 650 nm in Fig. 7c), as observed from the absorption studies. The electrical conductivity of polyaniline increases up to 10.2 Scm−1 for the higher concentration (1.0 M HCl) of the acid doping, which is almost five times higher than that of the pure polyaniline (PANI-NW) electrical conductivity (1.94 Scm−1). However, from Fig. 10, it is seen that the electrical conductivity of the 0.5 M HCl-doped polyaniline shows a higher value at all temperatures except at 300 K. The excess concentration of HCl could lead to structural distortion and that could be the reason for the observed decrease in electrical conductivity beyond the 0.5 M HCl concentration [17]. The maximum electrical conductivity for the sample doped with 0.5 M HCl is due to the increased exciton (polaron/bi-polaron) transition as compared with the other samples, and it is clearly seen from the new polaron band (polaron-π*) observed at 480 nm, and also the intensity of the ππ* transition is diminished considerably (see in Fig. 7c). The electrical conductivities of all the samples are compared with the optical bandgap of the different transitions in Table 1.

Fig. 10
figure 10

Electrical conductivity of the polyaniline nanowhisker samples doped with different concentration of HCl

The electrical conductivities of the polyaniline nanofiber samples prepared by interfacial polymerization (IP) with different acid dopants are shown in Fig. 11. All these samples are prepared in the same conditions, washed with water to remove the excess acids in the sample, and the only difference is dopant acid. The temperature-dependant electrical conductivity results show that the rate of variation is different for different acid-doped polyaniline nanofibers, which is larger for the PNF-HCl sample and smaller for the PNF-CA sample. The electrical conductivity at 300 K for the samples PNF-HCl, PNF-CSA, and PNF-CA are 1.75 Scm−1, 1.28 Scm−1, and 0.22 Scm−1, respectively. The observed difference in the electrical conductivity could be due to the difference in the band energies of the polymer samples. The electrical conductivity values are in-line with the optical bandgap of the ππ* transitions which are 3.03 eV, 3.37 eV, and 3.80 eV for PNF-HCl, PNF-CSA, and PNF-CA samples, respectively, i.e., the electrical conductivity decreases with increasing the band energy. Similarly, the electrical conductivity values are in-line with the optical band gap of π-polaron transition (> 600 nm) of the samples. The observed lowest electrical conductivity for the PNF-CA (0.22 Scm−1) sample is attributed to the larger bandgap (1.77 eV), and the higher electrical conductivity values for the PNF-HCl (1.75 Scm−1) and PNF-CSA (1.28 Scm−1) samples are attributed to the smaller bandgap (~ 1.55 eV). But the polaron-π* transition for all the samples observed at ~ 480 nm with the optical band gap around ~ 2.4 eV (see Fig. 9). Moreover, the electrical conductivity is also strongly influenced by the charge carrier mobility at the polymer backbone. From the TEM image (see Fig. 2), the PNF-CA sample shows more roughness at the surface of the nanofibers as compared to the PNF-HCl and PNF-CSA nanofiber samples. This could be due to the larger CA molecule induce disorder at the surface of the polyaniline nanofibers, and this may be the reason for the observed lowest electrical conductivity (0.22 Scm−1) for the PNF-CA sample [57]. From the above discussion, it is clear that the type of dopant material alters the electronic energy levels which leads to changes in the electrical conductivity.

Fig. 11
figure 11

Electrical conductivity of polyaniline nanofibers with different acid doping

From the TEM images (see Fig. 2), it is clear that the simple oxidative polymerization of aniline using APS produces highly entangled polyaniline (PANI-ED) chains, whereas the oxidizing agent APS + FeCl3 produces the nanowhisker (PANI-NW) of length 200 nm and diameter 50 nm. But, the interfacial polymerization produces the nanofibers (PNF-HCl) of ~ 500 nm length and ~ 50 nm diameter. The electrical conductivity of polyaniline samples with different morphologies, prepared under different synthesis conditions was studied, and the results are shown in Fig. 12. In all three cases, HCl was used as dopant acid. From the electrical conductivity studies, it is clear that the polyaniline samples PANI-NW (nanowhisker) and PNF-HCl (nanofiber) show electrical conductivities 1.98 Scm−1and 1.75 Scm−1, respectively, which is almost eight times higher than that of the electrical conductivity of the highly entangled polyaniline chains in PANI-ED (0.26 Scm−1) sample. The larger electrical conductivity for the nanowhisker and nanofiber samples could be attributed to the ordered arrangement of polymer chains as compared with the entangled polyaniline chains. The ordered arrangement of the polymer chains in the nanowhisker and nanofiber morphologies promote the charge carrier mobility, and this leads to an increase in electrical conductivity [26]. From the above studies, it is clear that the concentration of the dopant materials and type of the dopant materials changes the electrical properties of the polyaniline. Moreover, making the one-dimensional nanostructures improves the electrical conductivity by increasing the charge carrier mobility, which is one of the prime requirements for the thermoelectrical materials to improve the electrical conductivity without much affecting the Seebeck coefficient.

Fig. 12
figure 12

Electrical conductivity of polyaniline in different morphologies

4 Conclusion

In this paper, we have studied the effect of the concentration of dopant material, type of dopant material, and the morphology of the polymer on the electrical conductivity of polyaniline. The experimental electrical conductivity results are compared with the electronic transition and optical band gap observed in the absorption spectra. The electrical conductivity of the polyaniline increases from 1.98 to 10.2 Scm−1 while increasing the concentration of the dopant acid from 0 to 1.0 M. The observed five-fold increase could be attributed to the generation of polarons in the polymer chain with increasing the acid doping. The absorption spectra and the calculated optical band gap are also in-line with the experimental electrical conductivity results, i.e., the intensity of the ππ* band and corresponding optical band gap decreases while the intensity of the polaron band increases with the doping.

The electrical conductivity of polyaniline nanofiber doped with different acids show higher conductivity for PNF-HCl (1.75 Scm−1) and PNF-CSA (1.27 Scm−1) samples and lower conductivity for the PNF-CA sample (0.22 Scm−1). The observed lower electrical conductivity for the PNF-CA sample could be due to an increase in the optical band gap in the ππ*(3.8 eV) as well as π-polaron (1.77 eV) transition. Moreover, the reduced electrical conductivity in the PNF-CA sample could also be attributed to the reduced charge carrier mobility due to the disordered polyaniline chains at the surface of the nanofibers.

The nanowhisker and nanofiber morphology polymer samples show larger electrical conductivity as compared to the entangled polymer chains as larger particles. This could be due to the ordered arrangement of the polymer chains in nanowhiskers and nanofibers improves the charge carrier mobility compared with the entangled polymer chains. Overall, many factors need to be considered for achieving higher electrical conductivity with high charge carrier mobility of the polymers. We hope that our findings will be useful for the researchers to choose the proper dopants with optimum concentration to achieve high electrical conductivity and high charge carrier mobility in polyaniline for flexible electronics and flexible thermoelectric applications.