Among conducting polymers, polyaniline has been extensively studied due to its high environmental stability, controllable electrical conductivity and interesting redox properties associated with chain nitrogen. Potential applications of polyaniline include organic lightweight batteries [1], microelectronics [2, 3], electrochromic displays [4], electromagnetic shielding [5] and sensors [69].

Polyaniline can be prepared by the electrochemical or chemical oxidation of aniline [10, 11]. Ammonium persulfate is generally used as the oxidizing agent for the preparation of polyaniline from aniline.

The incorporation of metal in the form of nanoparticles in the polymer matrix forms composite materials, which have proved to exhibit improved performances over those of the polymer alone [12].

The preparation of gold nanoparticle–polyaniline composite material has been reported using preformed polyaniline by exploiting the multi-oxidative states of the polymer [13, 14]. Recently, it was found that chloroaurate ions (AuCl 4 ) can also be applied as an oxidant for the oxidative polymerization of pyrrole [15, 16], leading to the formation of gold particles together with polypyrrole. Reports are also available regarding the oxidative polymerization of o-anisidine [17] and hexadecylaniline [18] by using chloroaurate ions as an oxidant. In the above mentioned work special emphasis was given on the structure and properties of gold nanoparticles, and little attention has been paid to the morphology and properties of the polymer simultaneously generated with the gold particles. Use of hydrogen peroxide, which acts as both oxidizing and reducing agent, has been reported to produce a gold–polyaniline composite [19] having gold particle sizes of 26 nm (as evidenced by XRD analysis). Recently, the preparation of gold–polyaniline composite material has been reported using HBF4, with gold particle sizes in the 0.8–1.0 μm size range [20]. Recently, we reported [21] a gold–polyaniline composite material in toluene solution by using a phase transfer catalyst, where polyaniline nanoballs with few microns in size become decorated by gold nanoparticles (10–50 nm). The methods reported to date tend to produce relatively large gold particles. There is, therefore, a need to develop synthetic approaches that readily enable nanosized metal particles to be obtained.

In this communication, we describe a simple and in-situ route for the synthesis of polyaniline–gold thin composite film by using aniline and auric acid as the precursors. The average sizes of the resulting gold nanoparticles are 6–7 nm, which are dispersed in the polyaniline film. During the synthesis AuCl 4 behaves as an oxidizing agent causing the conversion of aniline to polyaniline and reduction of AuCl 4 leads to gold nanoparticles that are stabilized by the polymer matrix.

Aniline was purchased form BDH (London) and distilled at a reduced pressure over zinc metal. The middle fraction was collected and stored at −10 °C under argon. Methanol was obtained from Merck. HAuCl4 (Aldrich) was used to prepare a stock solution of HAuCl4 (10−2 mol dm−3) in distilled water.

In a typical experiment, 0.08 g aniline was dissolved in 0.005 dm3 methanol. To this solution 0.0035 dm3 of the HAuCl4 stock solution was added dropwise. A gradual change in colour (from colourless to red) was observed initially. After that the solution became turbid and viscous. At this stage a sample was collected for TEM and UV–vis spectroscopic analysis. In addition, the solution was dried under vacuum and the resulting solid mass was characterized using IR and Raman spectroscopy. The entire reaction was carried out with continuous stirring conditions and at ambient temperature (25 °C).

The TEM images (Fig. 1a, b) show spherical gold nanoparticles stabilized by the polymer. In a higher magnification TEM image (Fig. 2, a portion of Fig. 1b), three areas, marked as K, L, and M are chosen for a deeper understanding of the orientation of the gold particles and the polymer matrix. The particle (dark in colour) inside the box K is not covered by the polymer. The particle (less dark in colour) inside the box L is fully covered by the polymer. The box M is marked as the reference; it is an image of polymer alone. From Fig. 2, it is clear that most of the gold particles are located inside the polymer matrix.

Fig. 1
figure 1

TEM images of gold–polyaniline composite material with highly dispersed gold nanoparticles

Fig. 2
figure 2

High magnification TEM image of the gold–polyaniline composite

The histogram (Fig. 3, particle size vs. particle frequency) indicates a broad size distribution of the gold nanoparticles formed during the reaction between aniline and HAuCl4. From the histogram it is also clear that only 5% gold particles are above 10 nm in size and 95% of particles are within the range 2.5 to 10 nm. The histogram was calculated using the image depicted in Fig. 1b.

Fig. 3
figure 3

Histogram (particle size vs. particle frequency) indicates the size distribution of the gold nanoparticles, which are present in metal–polymer composite material. The histogram is calculated on the basis of Fig. 1B

Figure 4 shows the Raman spectrum of the gold–polyaniline composite in the range 1700–1100 cm−1, where the bands are sensitive to the polyaniline structure. An intense overlapping feature between 1500 cm−1 and 1650 cm−1 has been observed that can be assigned to the C–C deformation bands of benzenoid rings, which are characteristic of the semiquinone structure. A small peak at 1450 cm−1, corresponds to the C=N stretching mode of the quinoid units. A high intensity peak at 1355 cm−1 corresponds to C- stretching modes of delocalized polaronic charge carriers and confirms the high concentration of this form in the polymer [22]. The band at 1250 cm−1 can be assigned to the C–N stretching modes of the polaronic units. The 1210 cm−1 band corresponds to the C–N stretching mode of single bonds. The position of the CH benzene deformation mode falls at 1160 cm−1, indicating the presence of quinoid or benzenoid rings [23].

Fig. 4
figure 4

Raman spectrum of the composite compound

In the IR spectrum (Fig. 5), the bands at the higher wavenumber region correspond to the N–H stretching (3500–3200 cm−1) and the aromatic C–H stretching vibration (3000–2850 cm−1). The group N=Q=N, where Q represents a quinonoid ring, absorbs at 1595 cm−1 and N–B–N (B represents a benzenoid ring) absorbs at 1505 cm−1. The band at 1300 cm−1 is assigned to the C–N stretching of the secondary aromatic amine whereas the band at 1245 cm−1 is related to the protonated C–N group. The absorption bands at 1120 and 1045 cm−1 are due to the aromatic C–H in-plane bending modes. The out-of-plane deformations of C–H in the 1,4-substituted benzene ring result in the band at 870 cm−1.

Fig. 5
figure 5

Fourier transform IR spectrum of the resultant composite compound

The UV–vis spectrum (Fig. 6) of the composite material shows three characteristic absorption bands at 320 nm, 425 nm and 610 nm. The absorption peak at 320 nm is due to the Π–Π* transition of the benzenoid rings. The peak at 425 nm results from the polaron/bipolaron transition. A broad band with an absorption maximum at ∼610 nm corresponds to the transition from a localized benzenoid highest occupied molecular orbital to a quinonoid lowest unoccupied molecular orbital [24], that is, a benzenoid to quinoid excitonic transition [25].

Fig. 6
figure 6

The UV–vis spectrum evidencing the formation of a Π-conjugated polymer type compound

From the above results we suggest the following mechanism for the formation of polyaniline–gold composite material. The H+ ion from HAuCl4 leads to the formation of PhNH +3 type species. [AuCl4] acts as the oxidizing agent [22] and is capable of oxidizing PhNH +3 . The resultant oxidative product is polyaniline and during polymerization each step involved the release of electrons [4] that in turn reduce the gold ions to form gold atoms. The atoms coalesce to form nanoparticles and these are stabilized against further growth by the polymer.

In conclusion, we have presented a simple and effective method for preparing gold–polyaniline composite material, where gold nanoparticles (2.5–13 nm) are stabilized by the polymer. We use methanol as a solvent in order to exploit its ability to dissolve both aniline and the aqueous HAuCl4. Elsewhere [26] we have shown that a modified synthesis procedure can lead to the formation of polyaniline spheres, which are decorated with the gold nanoparticles. Clearly the morphology of the metal–polymer composite can be influenced by the synthesis conditions employed.