An automated ammonia monitoring system, comprising: a. a chemical sensor module comprising; an optical interferometer configured to track the amount of ammonia in a fluid, wherein the interferometer further comprises: a waveguide comprising: at least one sense channel; and at least one reference channel, wherein each channel includes an input grating and an output grating, wherein the at least one sense channel is coated with an ammonia adsorptive polymer, whose index of refraction changes in proportion to ammonia adsorption, and wherein the at least one reference channel is coated with a non-ammonia absorptive polymer; and a camera, wherein the interferometer is configured to detect the amount of ammonia through the use of detecting the phase shift of the interference pattern, caused by said change of the index of refraction, generated by a laser passing light through the at least one sense channel, the at least one reference channel, and their respective gratings (232, 238), wherein the interference pattern is captured by the camera; b. a fluid control system for supplying a representative flow of the fluid to the interferometer to the waveguide; and c. a control system to selectively remove ammonia from the fluid responsive to a detection of a threshold amount of ammonia by the interferometer. a. a chemical sensor module comprising; an optical interferometer configured to track the amount of ammonia in a fluid, wherein the interferometer further comprises: a waveguide comprising: at least one sense channel; and at least one reference channel, wherein each channel includes an input grating and an output grating, wherein the at least one sense channel is coated with an ammonia adsorptive polymer, whose index of refraction changes in proportion to ammonia adsorption, and wherein the at least one reference channel is coated with a non-ammonia absorptive polymer; and a camera, wherein the interferometer is configured to detect the amount of ammonia through the use of detecting the phase shift of the interference pattern, caused by said change of the index of refraction, generated by a laser passing light through the at least one sense channel, the at least one reference channel, and their respective gratings (232, 238), wherein the interference pattern is captured by the camera; a waveguide comprising: at least one sense channel; and at least one reference channel, wherein each channel includes an input grating and an output grating, wherein the at least one sense channel is coated with an ammonia adsorptive polymer, whose index of refraction changes in proportion to ammonia adsorption, and wherein the at least one reference channel is coated with a non-ammonia absorptive polymer; and a camera, wherein the interferometer is configured to detect the amount of ammonia through the use of detecting the phase shift of the interference pattern, caused by said change of the index of refraction, generated by a laser passing light through the at least one sense channel, the at least one reference channel, and their respective gratings (232, 238), wherein the interference pattern is captured by the camera; at least one sense channel; and at least one reference channel, wherein each channel includes an input grating and an output grating, wherein the at least one sense channel is coated with an ammonia adsorptive polymer, whose index of refraction changes in proportion to ammonia adsorption, and wherein the at least one reference channel is coated with a non-ammonia absorptive polymer; and a camera, wherein the interferometer is configured to detect the amount of ammonia through the use of detecting the phase shift of the interference pattern, caused by said change of the index of refraction, generated by a laser passing light through the at least one sense channel, the at least one reference channel, and their respective gratings (232, 238), wherein the interference pattern is captured by the camera; b. a fluid control system for supplying a representative flow of the fluid to the interferometer to the waveguide; and c. a control system to selectively remove ammonia from the fluid responsive to a detection of a threshold amount of ammonia by the interferometer.