The ammonium and nitrate sensors use a silver/silver chloride wire electrode in a custom filling solution. The internal solution is separated from the sample medium by a polymer membrane, which selectively interacts with ammonium or nitrate ions. When the sensor is immersed in water, a potential is established across the membrane that depends on the relative amounts of ions in the sample and the internal solution. This potential is read relative to the Ag/AgCl reference electrode.