Introduction

The conjugated polymers on account of their unique electrical, optical and chemical properties have emerged as a novel class of synthetic materials ideally suitable for a variety of technological applications such as solar cells [1,2,3], sensors [4], electromagnetic shield coatings [5], OLEDs and in energy storage devices [6, 7]. Among these different conjugated polymers, polyaniline (PA) and its derivatives have been studied extensively ever since its’ discovery through the pioneering works by renowned MacDiarmid group [8, 9]. Polyaniline is popular owing to its ease of synthesis in aqueous media, reversible proton doping, highly tunable electrical conductivity, relative environmental stability and advanced optoelectronic properties [8,9,10]. Different micro- and nanostructures of PA have displayed versatile applications in diversified fields of organo-electronics [11,12,13,14,15].

However, the foremost problem in applying in using PA pristine form is its poor solution processability. The polymer is exceedingly less soluble in common solvents and suffers degradation prior to melting on thermal treatment [16, 17]. Many researchers have opted various way outs in overcoming the above problems by generating polyaniline-based composites or blends with different metal oxides; various nanocarbon forms like fullerenes, CNTs, graphenes and others can show better stability, processability and mechanical strength along with superior optoelectronic properties [18,19,20]. These fabricated materials have their own benefits as well as limitations, but still large-scale cost-effective strategies for effective designing of these composites as required for desired applications are still on continuous search [21,22,23,24,25,26,27,28].

Copolymerization technique offers a simple, cost-effective way of improving the processability of polymers to an appreciable extent. It greatly enhances the scope for polymer scientists and considerably improves the properties of the derivatives compared to that of the homopolymers [29]. Moreover, it yields materials with uniform composition and the properties can be modified plainly by adjusting the ratio of concentration of starting monomers [30, 31]. Literature survey reveals that copolymerization procedure at present has become an effective way out for polymer engineering especially at the molecular level [32, 33]. The copolymerized polyaniline family is very challenging because of its tunable conductivity and solubility in polar organic solvents that depend not only on the oxidation state but also on the degree of protonation and nature of dopants [34, 35]. The properties of the poly (substituted anilines) like toluidine, anisidine and halogen-substituted anilines, etc., significantly vary with the nature of substitution (R) which may be either electron-withdrawing or electron-donating groups. Electron-withdrawing groups generally tend to reduce the electron density in aniline moiety, while electron-donating groups enhance the electron density in the phenyl ring of aniline. The present authors have also reported many works based on physicochemical properties study on copolymers of aniline with halogen-substituted anilines in the recent past [36,37,38]. The resultant copolymers exhibited impressive results with respect to solubility, viscosity, magnetic properties, although they possess very low electrical conductivity for practical utility. Thus, attempt for advanced materials is always in the continuous run! [39, 40]. In this regard, it is worth mentioning that an ab initio study employing DFT was carried out to elucidate the effect of polyaniline backbone functionalization on its properties in the recent past [41]. They reported that the energy characteristics of HOMO and LUMO levels of the polymers get affected due to functionalization, as a result of which the polarity also gets modified depending on the nature of functional moieties. Thus, functionalizing polymer backbone with proper functional groups in correct proportions may be an effective approach to achieve tailored conductive polymers with desirable properties [41].

It is well documented that poly3-nitroaniline (P-3-NA) is easily obtainable, and fairly stable in neutral, acidic or alkaline solutions unlike PA and is classified as “not readily biodegradable” with “low bioaccumulation potential” [42]. Copolymers of aniline with 3-nitroaniline, i.e., poly(aniline-co-3-nitroaniline), have been readily synthesized in various molar ratios of comonomers by chemical and electrochemical polymerization. It is true that both aniline and nitroanilines are reported to be toxic, but polymerization with aniline has been opted as an efficient method for removal of m-nitroaniline from wastewater [43]. The copolymerized products due to lower solubility owing to the larger size of the polymer compared to monomers are less toxic/carcinogenic as well [44]. Thus, this copolymerization method may be considered as an effective green step for proper usage and disposal of toxic by-products obtained from various dyes and textile industries.

Studies revealed that the kinetics of copolymerization varies with monomer concentration. The copolymerization rate decreased with an increasing ratio of 3-nitroaniline in the monomer [45]. Recent investigations reported that –NO2 group substitution into PA chains modifies the electronic and vibrational spectra of the resultant macromolecule [46]. Lately, it has been established that both the polymerization rate and yield of poly (nitroaniline) gets enhanced in the presence of trace amount of aniline acting as an initiator/promoter for the reaction [47, 48]. Nevertheless, systematic investigation regarding variation of physicochemical properties by introducing controlled proportions of strong electron-withdrawing such as –NO2 groups as substituents in PA chain segments yet remains unexplored. Thus, in this work, poly (aniline-co-3-nitroaniline) was prepared by simple chemical oxidative polymerization procedure with varying monomeric compositions and the resultant copolymers are characterized using sophisticated instrumental techniques such as UV–visible spectroscopy, FTIR spectroscopy, TGA, AFM imaging, particle size analyses for better understanding of their characteristics to be employed in various organo-electronics applications. The current study emphasizes on tuning the physicochemical properties such as UV–visible absorption, solubility, thermal stability, electrical conductivity, particle size distribution and surface smoothness of the resulting copolymer compositions so that, in the near future, such copolymers may claim substantial implication for their contribution in the various challenging fields of science and technology.

Experimental section

Chemicals and materials

Aniline (99.5%), 3-nitroaniline (98.0%) and ammonium peroxodisulphate (98.0%) were purchased from the Sigma-Aldrich Chemical Company and used as supplied. Analytical grade hydrochloric acid (HCl) (95.0%) and spectroscopic grade N-methylpyrrolidone (NMP) (99.5%) and methanol (MeOH) (99.9%) were used as received. Double-distilled water was used in the preparation of aqueous solutions in all cases.

Synthesis of polyaniline derivatives

The polyaniline (PA) and poly(3-nitroaniline) (P-3-NA) homopolymers were synthesized by oxidation of aniline and 3-nitroaniline separately with ammonium peroxodisulphate in 1 M hydrochloric acid according to modified procedure reported [39, 40] and schematically represented in Scheme 1. In a typical reaction, aniline (20 mmol, 1.86 g) was added to 200 mL of 1 M HCl and the mixture was cooled to 0–4 °C in an ice bath. An ice-cold solution of (20 mmol, 4.56 g) ammonium peroxodisulphate, dissolved in 200 mL of 1 M HCl, was then added dropwise into the pre-cooled monomer solution with constant stirring under nitrogen atmosphere. Maintaining of low pH (~ 1 M HCl) medium during polymerization process promotes head-to-tail coupling of aniline monomers to form the desired linear polymers with head-to-tail coupling and helps in avoiding tail–tail coupling leading to undesired benzidine-type segment formation [49]. The reaction mixture was further stirred for another 5 h and maintained at room temperature for 24 h which ultimately resulted in a dark green precipitate of the polymer in emeraldine salt form (PA-HCl). The resultant polymer was then filtered, washed with small volumes of 1 M HCl and dried in an air oven for 8 h at 80 °C. Likewise, poly (3-nitroaniline), (P-3-NA) was obtained by oxidative polymerization of 3-nitroaniline using ammonium peroxodisulphate, treated with similar procedure as stated above, that ultimately produced a brown colored powder.

Scheme 1
scheme 1

Steps involved in the copolymerization process

Copolymers of aniline and 3-nitroaniline (PA-co-3-NA) were obtained by chemical oxidative coupling of the monomers in 1 M HCl using ammonium peroxodisulphate in a similar procedure as stated above. To the aqueous solution of aniline and 3-nitroaniline in 1 M HCl, ammonium peroxodisulphate as an oxidant (molar ratio of monomers to oxidant 1:1) was added to carry out oxidation to obtain the copolymers of different composition; the mole fraction of 3-nitroaniline in the reaction mixture was varied from 0.2 to 0.8. The precipitate formed of the as-synthesized copolymer was properly filtered off and subsequently washed with adequate amount of 1 M HCl and dried in oven for 8 h at 80 °C. An Emeraldine blackish-brown salt was obtained in each case.

Characterization techniques used

The solubility of the homopolymers and the copolymer samples was determined by dissolving 10 mg of polymer in powdered form in the organic solvent such as in N-methyl pyrrolidone (NMP), and was allowed to dissolve thoroughly in 100 mL of solvent. The dispersion is kept for few hours at the room temperature of 25 °C; the polymer dispersion is now being filtered through sintered glass crucible (porosity 2 micron). UV–visible absorption spectra of dilute solutions of the polymer samples in NMP were recorded at room temperature on a Thermofisher scientific Genesys 10S UV–visible spectrophotometer, USA. Moreover, PerkinElmer 783/883 FTIR spectrophotometer, USA, was used to record the FTIR spectra of the samples in the form of KBr pellets. The electrical conductivity of the compressed pellets of the different polymer samples was recorded by the two-probe method using a Keithley 617 electrometer. An Auto Hi-Res Q500, California, USA, and PerkinElmer Pyris, USA, were used to study the relative thermal stability of polymer by heating the polymer at a rate of 10 °C min−1 under the nitrogen atmosphere. To investigate the surface topology of the materials, Nanoscope III SPM scanning probe atomic force microscope (AFM), USA, was employed using films of the polymers on silicon wafer. The dilute solution of few μM concentrations of the polymers in NMP solvent was prepared by sonication and centrifugation and dropped on silicon wafer for imaging AFM. Particle size distribution curve measured in NMP solvent by Malvern Instruments Ltd, Zetasizer ver. 7.10, UK.

Results and discussion

Synthesis and yield

The copolymers were synthesized using varying mole ratios of aniline and 3-nitroaniline monomers, as mentioned in Table 1. The chemical structure of the homopolymers and copolymer is shown in Fig. 1a, b. The yield of the copolymers is lower compared to PA but similar to that with P-3-NA as observed from Table 1. Even the yields of the different copolymers are comparable among themselves. This could be due to the highly electron-withdrawing nature of the nitro group (–NO2) which reduces the electron density on the ring inhibiting oxidative polymerization process. Well-established oxidative polymerization mechanism suggests that oxidatively formed cation radicals get rearranged and two cation radicals add head-to-tail fashion at the para-position to form first dimer with release of protons; the chain propagation process eventually repeats leading to polymeric species [50]. Due to high electron-withdrawing nature of –NO2 group, 3-nitroaniline is less prone to oxidation compared to aniline, and thus, formation of the corresponding cation radical species is less favorable. Moreover, steric interferences of bulky –NO2 group considerably subdue the chain propagation step during oxidative polymerization. In addition, strong intramolecular/intermolecular interaction through hydrogen bonding between the oxygen of the –NO2 group and the (–NH–) imine hydrogen on PA chains (Fig. 1c) can lead to the formation of favorable six-member chelate ring, which may localize the electron density on the ring leading to further decrease in the rate of polymerization, thereby decreasing the product %-yield [51].

Table 1 Mole ratio of monomers taken, percent yield, solubility and electrical conductivity data of various sample polymers synthesized
Fig. 1
figure 1

Schematic representation of the general molecular structure of a homopolymers (R=H for aniline, –NO2 for 3-nitroaniline) and b for copolymers of aniline and 3-nitroaniline. c Schematic representation showing hydrogen bonded six-member chelate ring formation between the oxygen of the –NO2 group and hydrogen of the –NH imine group in the copolymer

FTIR spectroscopic data analysis

To ascertain the nature of functionalities present in the as-synthesized homopolymers and copolymer samples, FTIR spectra of PA, P-3-NA and doped copolymers with extreme compositions, i.e., PA-co-3-NA80, PA-co-3-NA20, respectively, are carried out and represented in Fig. 2. Neat PA shows characteristic peaks at 3608, 3447 (due to free and hydrogen bonded N–H stretching frequencies), 1652 (–NH2 bending vibration), and characteristic peaks at 1586 cm−1 and at 1522 cm−1 are assigned to the stretching vibrations of quinoid and benzenoid rings that play vital role in assigning the conductivity states in PA systems. It is also claimed that the highest conducting (metallic), emeraldine oxidation state of polyaniline contains 50% of the nitrogen atoms in protonated state that consists of equal numbers of reduced, i.e., benzenoid diamine as well as oxidized, i.e., quinoid diamine repeat units in the polymer skeleton [52,53,54]. In the present case, optimum protonation of the imine nitrogen and improved chain alignment of polymer strands leads to the ideal ratio of intensities of these peaks, indicating the presence of emeraldine form of PA. This is further supported by the band near 1351 cm−1 and is assigned to the C=N+ stretching adjacent to the quinoid structure, and a medium intensity band at 1310 cm−1 is associated with C–N stretching vibration in the alternate units of quinoid–benzenoid–quinoid rings, respectively. The band of conducting protonated form is observed at 1272 cm−1 while around 1165 cm−1 is attributed to B–(NH+) =Q structure which is formed during the protonation process. In addition, the peak at 675 cm−1 is attributed to –NH2 wagging and the band at 1090 cm−1 is assigned to the C–H in plane bending, respectively. Thus, the above assigned peaks designate the presence of emeraldine salt form of PA in accordance with previous literature reports [51, 55, 56]. In P-3-NA, additional bands characteristic of asymmetric and symmetric stretching vibrations of –NO2 group is located at around 1530 cm−1 and 1335 cm−1, respectively. The spectra of the copolymers show the main bands in the region of 1590 cm−1, 1508 cm−1 and 1308 cm−1 corresponding to the ring-stretching vibrations of the quinoid and benzenoid rings of nitroaniline, respectively. The peaks at 1292 cm−1 and 1210 cm−1 correspond to N–H bending and the symmetric component of the C–C (or C–N) stretching modes, respectively [57]. The band around 1170 cm−1 is attributed to B–(NH+) =Q structure which is formed as a result of copolymer protonation in acid medium. The bands ~ 825 cm−1 can be attributed to out-of-plane C–H bending modes, respectively. The significant broadening along with intensity lowering of the frequencies around 3000 cm−1 can be related to the hydrogen bonds formed between the oxygen of the nitro group and the hydrogen of the amine group (Fig. 1c), in agreement with similar reports Moreover, the intensity of the relative peak for asymmetric and symmetric stretching vibrations of –NO2 group at around 1530 cm−1 lies in the order: P-3NA > PA-co-3-NA80 > PA-co-3-NA20, subsequently confirming the formation of the desired copolymers.

Fig. 2
figure 2

FTIR spectra of (a) PA, (b) PA-co-3-NA80, (c) PA-co-3-NA20 and (d) P-3-NA

Comparative study of solubility of the homopolymers and copolymers

As already stated PA has vivid potential applications, but the major problem in employing these systems commercially is due to their poor processibility by solvent. Most of them have exceedingly low solubility in common solvents. Copolymerization offers a way of improving the processibility of PA [58]. The poor solubility of PA in common solvents is due to strong cohesive interaction through π–π interactions and strong interchain hydrogen bonding. On the other hand, P-3-NA exhibits higher solubility, owing to its side substituent –NO2 (also polar group) that reduces these interchain cohesive interactions considerably. Thus, introduction of 3-NA segments in the skeleton of PA in the copolymer increases the affinity for dissolution in common organic solvents like NMP as observed in Table 1. Thus, the solubility order stands as P-3-NA ≫ PA-co-3-NA80 > PA-co-3-NA60 > PA-co-3-NA40 > PA-co-3-NA20 ⋙ PA in NMP solvent at 25 °C.

Electrical conductivity comparative study

Table 1 highlights the comparative study of the DC electrical conductivity of the pristine as well as copolymer samples, measured at room temperature. It is evident that the DC conductivity of the copolymer increases with increasing concentration ratio of aniline to 3-nitroaniline in the copolymer. The values are considerably lower than that of PA but greater than P-3-NA. The higher conductivity of PA exhibited is because of the existence of emeraldine salt form as evident from the FTIR studies. Moreover, the presence of dopant ion (Cl) as evident from EDX study, Supporting Information-1A, further supports the formation of the emeraldine salt form of PA. The quinoid-to-benzenoid peak intensity ratios as revealed from FTIR studies are 1.00 (PA), 1.14 (P-3-NA), 1.02 (PA-co-3-NA20) and 1.09 (PA-co-3-NA80), respectively. However, this ratio is nearly similar for other samples too, but still a large variation in conductivity is observed. Even the doping level is similar to that of PA as evident from EDX study, Supporting Information-1B.

It has been recently proved that parallel alignment of polymeric chains is very crucial for superior charge transport properties [54]. Thus, low conductivity in copolymers and P3NA may be attributed to the presence of –NO2 group in the PA segments that disrupts the polymer chain alignment; as a result, the π-conjugation is hindered, which in turn inhibits long-range π-electron delocalization and thus decreases the charge transport characteristics. Again, increased separation of the copolymer chain due to the presence of side groups along with the presence of electron-withdrawing –NO2 group in the copolymer chain decreases the interchain charge transport that further lowers the electrical conductivity. Thus, increasing substitution in the copolymers experiences lower charge transport is in accordance with the reports obtained from the literature [49, 57,58,59]. So, tuning of degree of substitution in these systems is very important. Moreover, favorable six-member chelate ring formation through strong intermolecular as well as intramolecular hydrogen bonding interactions between –NO2 groups and the polaronic nitrogen atoms of imine group in PA skeleton as discussed in the previous section (Fig. 1c) promotes localized structure resulting in a lowering electrical conductivity as well. Consequently, the electrical conductivity order stands as PA ⋙ PA-co-3-NA20 > PA-co-3-NA40 > PA-co-3-NA60 > PA-co-3-NA80 ≫ P-3-NA at room temperature. Thus, the electrical conductivity in P-3-NA as well as in these copolymers is thus dominated by the extent of –NO2 group present therein the polymer chains. Therefore, we infer that tuning the proportions of –NO2 groups as well as quinoid-to-benzenoid ratio are essentially to be tuned simultaneously so as to achieve desirable electrical conductivity in these copolymers.

AC conductivity

Figure 3 displays the comparative study of the conductivity impact of homopolymer PA and copolymer PA-co-3-NA80 with varying frequency range from 10−3 to 108 Hz at room temperature. The conductivity of PA is observed to be higher than the copolymer. This is attributed to incorporation of bulky –NO2 group onto the polymer backbone in the latter. This leads to break in π-conjugation as the alignment of polymer chains get disrupted and entangled on substitution with such bulky groups that causes alteration in the HOMO–LUMO energy band gap. It has also been observed that optimum proportions of side groups can, however, modify and lower the HOMO–LUMO band energy gap leading to increased conductivity compared to pristine PANI as discussed for PA-co-3-NA20 sample in our previous work [59]. Thus, it is obvious that choice of proper composition is essential in tuning the conductivity in these copolymers.

Fig. 3
figure 3

Comparative study of AC conductivity of PA and PA-co-3-NA80 within the frequency range of 10−3 to 108 Hz, measured at room temperature

Dielectric measurements

Figure 4a, b shows relative variations of ε′ and ε″ against a range of frequency at room temperature of PA and PA-co-3-NA80 samples, respectively. In both samples, at low frequency, both ε′ and ε″ have high magnitude but becomes almost invariant at higher frequencies. Such signature confers that interfacial polarization contribute mostly at lower frequencies, while at higher frequencies, the dipolar relaxation contribution predominates [60, 61]. In HCl-treated PA, doping effect generates polarons/bipolarons that trigger charge delocalization along the polymer chain lengths, which augments the interfacial polarization resulting in large dielectric responses, well in agreement with previous reports [62]. However, at high frequencies, rapid periodic reversal of electric field restricts ion diffusion that diminishes the interfacial polarization, thus causing decrease in response. Doping is present in both PA-co-3-NA80 and pristine PA (EDX study, Supporting Information-1A-B). EDX of copolymer shows relatively more intense peaks for Cl (dopant ion) and is expected to exhibit higher dielectric signature. However, the bulky –NO2 groups considerably restrict proper orientation of the polymer chains, leading to low value. Thus, overall dielectric signature for the PA and copolymer is similar except the fact that the copolymers exhibit intermediate dielectric values at lower frequency compared to the homopolymers. It is worth notifying that the observed dielectric features in these systems are superior to various other conducting polymers complexes based on MEH-PPV hybrid systems as well as conducting polymer-based composite systems [63,64,65], which makes these systems interesting materials for next-generation organo-electronics.

Fig. 4
figure 4

a, b Relative variations of ε′ and ε″ against a range of frequency at room temperature of PA and PA-co-3-NA80 samples

Thermogravimetric analysis

Figure 5 shows the TGA profiles of all the PA, P-3-NA and copolymer samples. The initial mass loss up to 200 °C is negligible for P-3-NA homopolymer compared to about 14% for PA homopolymer attributed to loss of adsorbed water and moisture content in the samples [66]. Beyond 200 °C, PA undergoes another large weight loss at ~ 280 °C owing to cleavage of intermolecular hydrogen bonds, carbon skeleton and spontaneously degrades to ~ 25% of the initial mass at 800 °C (with mass loss ~ 60% at this step). However, in P-3-NA, two-step decomposition occurs at 260 °C and at 400 °C, respectively, showing an overall mass loss of ~ 63% at 800 °C. The higher thermal stability of P-3-NA compared to PA indicates appreciable intermolecular interactions (hydrogen bonding between –NO2 and –NH groups on PA skeleton) (Fig. 1c) induced by the nitro group substituents [67]. The gradual loss (260 °C for P-3-NA) is assigned to some morphological change, possibly crystallization of the polymers due to annealing condition followed by subsequent loss of dopants and decomposition of the polymer material with rising temperatures. The nitro group in the copolymers introduces aforesaid additional interactions bringing the polymer chains together, thereby imparting stronger cohesive forces that lead to extra thermal stability. In the present case, PA-co-3-NA20 shows such optimized cohesive interactions. However, with the increasing proportion of bulky –NO2 groups, segregation of PA and P-3-NA phases occurs that widens the interchain separation leading to inverse effect. The above justification supports the observed increasing order of thermal stability and thus stands as PA ≪ PA-3-NA < PA-co-3-NA80 < PA-co-3-NA60 < PA-co-3-NA40 < PA-co-3-NA20.

Fig. 5
figure 5

TGA profile of (a) PA, (b) P-3-NA, (c) PA-co-3-NA80, (d) PA-co-3-NA60, (e) PA-co-3-NA40 and (f) PA-co-3-NA20

UV–Vis spectroscopic data analysis

Figure 6 shows the UV–visible spectra of the pristine PA, P-3-NA and its copolymer samples. PA is reported to exhibit peak at 280–295 nm due to the π–π* transition of the benzenoid ring associated with the extent of conjugation between the adjacent phenyl rings in the polymer chain [68]. The peak at 605–635 nm is attributed to the quinoid ring transition (charge transfer from HOMO of the benzenoid ring to LUMO of the quinoid ring) and is dependent on the overall oxidation state of the polymer. A characteristic band for polaron-π* transition appeared at 450 nm, indicating that the resulting PA emeraldine salt was in the doped state, which further supports the findings from FTIR studies [68, 69]. In our sample, the intermediate peak at 331 nm is attributed from the contribution of overlapping peaks of both π–π* transition and polaron-π* transition, respectively. In P-3-NA, the presence of –NO2 substituent causes entangling of polymer chains that disrupt the conjugation length and leads to hypsochromic shift of π–π* transition at around 270 nm, polaron-π* transition at ~ 352 nm and quinoid ring transition to ~ 550 nm, respectively. In the copolymers, due to random substitution of the monomers, the conjugation length is further shortened that results in further hypsochromic shift of π–π* transition to ~ 263 nm. The polaron-π* transition as well as the quinoid ring transition is highly influenced by the extent of intrinsic doping of PA with 3-NA residues and accordingly shows peak shifts for the copolymer samples. PA-co-3NA80 shows obvious similar features with P-3-NA due to the presence of greater proportion of 3-NA segments. Thus, the study narrates that compared to homopolymers; the copolymers absorb energy almost throughout the full range of visible region of energy spectrum (200–800 nm) and are thus obviously going to play important role in polymer-based solar cell applications. Again, the solubility of the copolymers varies: PA-co-3NA60 > PA-co-3NA40 > PA-co-3NA20 and so absorbance will vary accordingly. Thus, the above study indicates that controlled incorporation of –NO2 groups moieties onto PA segments appreciably modifies the optoelectronic structure in the resultant copolymers.

Fig. 6
figure 6

UV spectra of P-3-NA, PA, PA-co-3-NA80, PA-co-3-NA60, PA-co-3-NA40 and PA-co-3-NA20 recorded in NMP solvent

AFM analysis (morphology study)

The topography of surface of the polymer samples of PA, P-3-NA and the PA-co-3NA60 copolymer at nanometer scale was studied using AFM as shown in Fig. 7. The dimension of the film used in this case is (3 × 3) μm2 produced on drop casting from NMP solution. The surface profile of PA indicates non-uniform surface of the polymer. Such poor quality film formation results from poor dispersion in solution. On the contrary, better dispersion leads to smoother and more uniform, continuous and defect-free surface characteristics in P-3-NA as well as copolymer PA-co-3NA60. Such superior smooth surface film formation through simplistic route recommends their applications in the challenging areas of device fabrication for chemical sensing, bio-sensing and other superior electronic devices [70,71,72,73].

Fig. 7
figure 7

AFM images of a PA, b P-3-NA and c PA-co-3-NA60

Particle size analysis

Particle average-size determination is crucial for correlating various physicochemical properties of systems. Figure 8a–c shows the particle size distribution curves of polyaniline PA, P-3-NA and the PA-co-3NA60 copolymer in NMP solvent, respectively. For PA, the curve indicates that the particle size varies in the range 5–9000 nm and a small fraction of particles possess a size in the range of 5–10 nm. A large fraction of polyaniline possesses the particle size in the range of 100–1000 nm. An average particle size varies in the range of 1000–9000 nm. For P-3-NA, the particle size varies in the range 100–1000 nm and 2000–8000 nm with larger fraction in the latter range. The PA-co-3NA60 copolymer shows a large fraction of the sample in the 5000–8000 nm range and a small fraction of the particles lie in less than 5 nm and 80–500 nm ranges. The particle size varies on account of the degree of –NO2 functional groups present in polyaniline segments. Owing to the larger proportions of bulky –NO2 substituents in the copolymer, the particle sizes vary in the range of 5000–8000 nm under the observed conditions with narrow range of distribution. It can be realized that owing to the dominance of narrow range of particle size in PA-co-3NA60, the copolymer film adopted smoother morphology as revealed in AFM studies and thus ideally suited for improving film-fabrication technology associated with sensors, optoelectronic and energy storage applications [56,57,58,59].

Fig. 8
figure 8

Particle size distribution curve of a PA, b P-3-NA and c PA-co-3-NA60

The average particle size distribution as it stands as PA < P-3-NA < PA-co-3NA60 also can be well correlated with their thermal properties too. Since the copolymer sample possesses larger average particle size value compared to their homopolymers, the heat of degradation is higher, leading to improved thermal stability. The improved results are in well agreement with that expected from DFT studies carried out by other workers [30].

Thus, from the above-studied physicochemical trends explored for all the as-synthesized copolymer samples of varied compositions, a statistical survey of the relative percentage with respect to the yield, solubility, solubility in NMP solvent and thermal stability at 800 °C, respectively, was carried out and is displayed in Fig. 9. The results inferred that the PA-co-3NA20 sample possesses the optimized properties among all and is therefore ideally suitable for multifunctional applications.

Fig. 9
figure 9

Statistical survey of the relative percentage with respect to the yield, solubility, solubility in NMP solvent and thermal stability at 800 °C, respectively, of the copolymers of different compositions

Conclusions

Thus, we report here a series of copolymers of aniline and 3-nitroaniline that are chemically synthesized by varying the molar ratio of the monomers via oxidative copolymerization reaction. The characterization studies confirm the presence of both the monomer units employed in the copolymer formation for the all compositions presently studied. The solubility in polar organic solvent and the charge transport of copolymers can be effectively modified and optimized accordingly by varying the monomer composition through controlling the proportion of (–NO2) functional groups as substituents in the polymer chains. Dielectric measurements conferred that the degree of functionalization of side groups (–NO2) essentially regulates polarization behavior in the derived polymers. The copolymers also exhibited higher thermal stability attributed to larger yet narrow average particle size possession compared to the homopolymers. Moreover, the copolymers manifest smoother surface film formation compared to PA or P-3-NA homopolymers, ideally suited for smart device fabrication. Thus, the above features achieved through copolymerization make the material enormously potential for applications for the fast-developing areas of organo-based photovoltaics, energy storage, sensing and allied technological fields.