desirably between about 25 and 35 weight%. The number of films that are needed to cover a given alkalinity range if a weak acid such as a carboxylic acid is used is fewer than that if a strong acid is used. This is because the weak acid exhibits a flatter titration curve than the strong acid. However, weak acids usually form complexes with ions such as calcium ions that commonly exist in water samples. 

When a given amount of sample solution is deposited on the hydrogel films, alkaline species in the sample neutralize the acid added. Since an acid concentration gradient is created by addition of different amount of acid in the film series, a profile of color change is resulted in when the film series (multiple films) is (are) exposed to the sample solution, cor› responding to different degree of neutralization. Average absorbance of all the films in the series is used for quantitative determination of sample alkalinity. 

The films may be prepared by depositing the polymer solution into wells on a glass slide or other suitable method known to those skilled in the art. In one example, the wells may be created with a die-cut, adhesive-backed polymer mask layer. The films are then exposed to a fixed amount of the sample solution. After the films are exposed, the absor› bance of each film is measured using known methods at a wavelength near or at the maximum absorbance peak of the indicator. The average absorbance measured from the sensor films is used to quantify the alkalinity of the sample. This method is based on absorbance measurement and it will still work even if all of films change color. Further, in addition to colorimetric measurements, fluorescence and other optical measurements are possible. 

In another embodiment of the invention, we unexpectedly discovered that an addition of a certain polymer as an additive ( or blend) to a polymer formulation, provides an enhance› ment of signal if this additive is at a certain concentration. Above and below this concentration, the effect is diminished. This effect was discovered in the application of dye 2-[2-[3- [ (1,3-Dihydro-3,3-dimethyl-1-propyl-2H-indol-2-ylidene) ethylidene ]-2-phenoxy-l -cyclohexen-1-yl ]etheny l]-3 ,3- dimethy 1-1-propy lindolium perchlorate known as IR 768 perchlorate. The addition ofNafionfi resulted in the improve- ment of the relative response of the sensor film when sensor signal change is normalized by the remaining absorbance at highest tested concentration. Nafionfi is a trade name for sulfonated tetrafluoroethylene copolymer from E.I. du Pont de Nemours and Company (Wilmington, Del.). 

The present disclosure will now be described more specifi› cally with reference to the following examples. It is to be noted that the following examples are presented herein for purpose of illustration and description; they are not intended to be exhaustive or to limit the disclosure to the precise form disclosed. 

To a 10.0 g solution of 20% pHEMA (MW 300,000) in l-methoxy-2-propanol (Dowanol PM), was added 20 mg Bromopyrogallol Red and 40 mg para-toluenesulfonic acid. After stirring for 1 hour, 200 mg benzyldimethyltetradecy› lammonium chloride (Zephiramine) was added. After an additional 1 hour of stirring, 40 mg L-ascorbic acid was added and the mixture stirred at room temperature until all solids were dissolved (minimum of 12 hours). 

The sensor film was prepared by coating a clear plastic surface with a thin layer of the chemical mixture and allowed 

## EXAMPLE 1 

## Molybdate Sensor 

to dry over a period of several hours in the dark. The final film thickness was between 10 and 20 microns. 

The sensor film was exposed to about 30 µL of aqueous samples of molybdate at various concentrations. Exposure time was in general 120 seconds. The water sample was then removed and the film dried under a constant airflow. The sensor film was then measured for molybdate response. 

The sensor film was places in a dark room on a flat surface. The sensor film response was measured using an OceanOp- tics spectrophotometer equipped with a fiber-optic probe. The probe was oriented at a 90° with respect to the sensor film 

FIG. 1 shows a typical set of spectra at different molybdate concentrations for the described sensor film. FIGS. 2 and 3 show a typical response curves for the described sensor film. 

Chemical Mixture Preparation: 

To a 10.0 g solution of 20% pHEMA (MW 300,000) in l-methoxy-2-propanol (Dowanol PM), was added 50 mg Xylidyl Blue 1, sodium salt and 300 mg tetrabutylanimonium bromide (TBAB). After stirring for 1 hour, 500 mg of a 40% (w/w) solution of polyethylenimine (low molecular weight Mn approx. 1000, water-free) in l-methoxy-2-propanol (Dowanol PM) was added. After an addition 1 hour stirring, 400 mg ethylene glycol-bis(aminoethylether)-N,N,N’,N’-tet› raacetic acid, tetrasodium salt (EGTA-Na4) was added and the mixture stirred at room temperature until all solids were dissolved (minimum of 12 hour). 

FIG. 3 shows a typical set of spectra at different magne› sium concentrations for the described sensor film. FIG. 4 shows a typical response curve for the described sensor film. 

Chemical Mixture Preparation: 

To a 10.0 g solution of 20% pHEMA (MW 300,000) in l-methoxy-2-propanol (Dowanol PM), was added 50 mg Xylidyl Blue I, sodium salt and 500 mg of a 40% (w/w) solution of polyethylenimine (low molecular weight Mn approximately 1000, water-free) in l-methoxy-2-propanol (Dowanol PM). The mixture was stirred at room temperature until all solids were dissolved (minimum of 12 hour). 

FIG. 5 shows a typical set of spectra at different hardness concentrations for the described sensor film. FIG. 6 shows a typical response curve for the described sensor film. 

Chemical Mixture Preparation: 

To a 10.0 g solution of 20% pHEMA (MW 300,000) in l-methoxy-2-propanol (Dowanol PM), was added 25 mg Chlorophosphonazo III and 200 mg para-toluenesulfonic acid. The mixture was stirred at room temperature for 1 hour, before 60 mg tridocecylmethylanimonium chloride (TD› MAC) was added. The mixture was stirred at room tempera› ture until all solids were dissolved (minimum of 12 hour). 

FIG. 7 shows a typical set of spectra at different calcium concentrations for the described sensor film. FIG. 8 shows a typical response curve for the described sensor film. 

## EXAMPLE2 

## Magnesium Sensor 

## EXAMPLE3 

## Hardness Sensor 

## EXAMPLE4 

## Calcium Sensor 

