An improved optical sensor and methods for measuring the presence of
various materials or constituents in a fluid sample uses reactive
material(s) in a fluid environment. The reactive materials have optical
properties that change in the presence of a target material that may be
present in the environment. An optical emitter generates light that is
directed to the reactive materials, and one or more optical detectors
receive reflected light from one or more interfaces in the optical path
between the emitter and the detector(s), one or more of the interfaces
having a reactive material. The reactive material(s), emitter(s), and
detector(s) are selected based on the desired target material to be
sensed.