Polyaniline polymers are usually prepared by chemical
or electrochemical oxidation. The general structure of
polyaniline is shown in Fig. 1. The most common form
of polyaniline is termed emeraldine base (EB). It can be
reduced to leucoemeraldine base (LEB), oxidized to pernigraniline
base (PN), or protonated to produce a salt (EM). Of
particular interest for optical sensor development is its
reversible protonation/deprotonation reaction, which occurs
on imine nitrogen atoms. The transformation of EB to EM
by protonation is accompanied by signi®cant changes in the
UV±VIS±NIR spectrum of polyaniline polymers [6±8]. For
the polyaniline ®lms prepared through 30 min reaction at
room temperature, maximum absorption wavelength (lmax)
shifts from 840 nm in acidic solution to 600 nm in basic
solution [7]. The effect of pH on the change in electronic
spectrum of polyaniline polymers can be explained by the
different degree of protonation of the imine nitrogen atoms
in the polymer chain