A pH Electrode can be compared to a battery in that an electrical voltage is generated between two points that is a function of water chemistry. In the case of a pH electrode the voltage potential is a function of the acidity or alkalinity of the solution in which it is immersed.
Note: The terms pH electrodes and pH probes are often used synonymously, despite the fact that there are differences. A pH electrode is described in this article. A pH probe is the entire assembly that is used for measuring pH. This always consist of a pH electrode, a housing and often (but not always) a temperature sensor (for temperature compensation) and a preamplifier.
The pH element is a thin glass membrane that is permeable by H+ ions. The electrode is filled with a neutral solution, which by definition contains an equal number of H+ and OH- ions. When the probe is immersed in an H+ rich environment (acidic) the glass membrane is permeated by the H+ ions which exert a positive potential on the sensing electrode. This potential difference is measured by a pH meter and converted to a pH output.
Likewise, when the probe is immersed in an alkaline environment there exists within the probe a higher H+ concentration than outside of the probe. This causes H+ ions within the probe to migrate outside of the probe which leaves an excess of OH- ions within the probe. A negative potential is thus sensed by the pH meter.
The pH electrode depicted above is a single junction glass bulb electrode which is the most commonly used pH electrode in industry. There are many other variations including double junction, antimony and specifically formulated glass for various environments. Double junction electrodes are the most common variation from the probe depicted above. This electrode simply provides a second chemical barrier between the reference electrode and the process fluid. This is done to help slow down the effects of electrode poisoning.
pH Probes are inherently unstable and require frequent cleaning and calibrating. A discussion of pH probe cleaning and calibration is available within this site. Although this procedure is rather generic it applies in principle to all pH probes.