Polyaniline is an electroactive and electrically conducting polymer, one member of a class of organic polymers that can be used in chemical sensing.  The use of conducting polymers such as polyaniline, polypyrrole and poly(3-hexylthiophene) as chemical sensors for vapors such as ammonia Hirata, M et al.,  U.S. Pat.  No.  5,252,292 and Selampinar, F. et al.,  Synthetic Metals 1995, 68, 109!,  methanol Boyle, A. et al.,  Synthetic Metals 1989, 28, C769!,  water, NO.sub.2, and hydrazine Ellis, D. L. et al.,  P. M. S. E. 1994, 71, 590!  is known.  There are comprehensive reviews on the use of electroactive polymers in chemical sensors Bidan, G., Sensors and Actuators B 1992, 6, 45 and Miasik, J. J. et al., " Conducting Polymers", Alcacer, L. ed.  D. Reidel Publishing Co. Boston, 1987, pp189-1981!.  Wrighton et al.,  U.S. Pat.  No.  4,717,673, teaches thiophene polymer-based devices which may be used as electrical energy storage devices or as sensors of changes in chemical concentration or pH. A species detector utilizing conductive polymers such as polyaniline is described in Zakin et al.,  U.S. Pat.  No.  5,145,645.  A method of orienting polyaniline films in order to increase their electrical conductivity is taught by Theophilou et al.,  U.S. Pat.  No.  5,217,650. 
There are three categories of sensors based on electroactive polymers: (a) mass, (b) optical, and (c) electrochemical sensors.  There are three main transduction electrochemical modes, giving rise to three types of electrochemical sensors: (i) potentiometric, (ii) amperometric, and (iii) conductimetric sensors. 
The electrical conductivity of an electroactive polymer depends on the level of doping or oxidation, i.e., concentration of courterion (dopant).  Because the difference in electrical conductivity of an undoped and fully doped polymer is in the vicinity of 9 orders of magnitude, the incremental change of conductivity is the basis for operation of conductimetric, chemical sensors, also known as chemiresistors. 
There is a need for a sensor capable of measuring the concentration of acid gases (i.e., HX, where X=F, Cl, Br, I, etc.)  in ppm's, for example, in areas where they are is discharged into the environment.  For example, federal and local environmental laws require measurement of ground level concentrations of HCl emitted from solid rocket plumes.  Decomposition of the oxidizers, typically perchlorates, used in the rocket boosters results in the evolution of large quantities of HCl.  Adequate plume characterization requires multiple and widely distributed sampling points.  The specific need is for an inexpensive, highly accurate, easily maintained, calibrated, portable instrument with a short response time.  None of the current HX monitoring techniques, such as selective ion electrode, chemiluminescence, correlation spectrophotometry and coulometric methods, fits these requirements.  Detection of acid gases is also important for industries involved in the incineration of halogenated hydrocarbons and manufacturing of processes resulting in hydrogen halide as a by-product.  Detection of HF is very important for the semiconductor industries.  It is important to use an accurate monitor because inaccurate measurements of HX gases can lead to overexposure of the public and possible litigation. 
Typical start-of-the-art detection instruments have poor response times, and do not measure total (gaseous/aqueous) HX.  If they do measure total HX, they are heavy, expensive, and hard to maintain, calibrate and use.  Typical collection methods, including pre-evacuated grab sample containers, condensation traps, adsorption tubes, and plastic grab bags, suffer from sample loss prior to analysis and are not suitable for real-time monitoring of HX gases Bailey, R. R. et al.,  Analytic Chemistry, 1976, 48, 1818!. 
Reversible ammonia gas sensors can be accomplished by dispersing a polyaniline in a matrix of a conductive high molecular weight polymer (U.S. Pat.  No.  5,252,292).  Conductive,high molecular weight polymers may contain ionic side chains or an electrolyte.  The resistance of composite films made of conductive high molecular weight polymers increases after exposure to ammonia gas in the ppm range.  Miasik et al. (" Electronically Conducting Polymer Gas Sensors", Conducting Polymers, Luis Alcacar, ed.,  1987, D. Reidel Pub.  Co., pp 189-198) demonstrated that the sensors can be fabricated using polypyrrole for the ambient temperature detection of several industrially important gases, such as ammonia and nitrogen dioxide.