In order to measure pH, we need a measuring instrument with a sensitivity to hydronium ions that determines the pH. It’s a voltmeter
The basis of the measurement consists in taking a sensor with a glass membrane sensitive to hydronium ions (pH electrode)
and in observing the reaction between the membrane and the sample: potential measurement
This potential is compared to a reference potential delivered by a non-pH-sensitive electrode, by diffusion of an electrolyte towards the sample through a diaphragm: reference electrode (Ag/AgCl).
A solution’s pH is thus the potential difference between both electrodes according to Nernst’s equation
E = E0 + 2.3RT / nF * log [H3O+]
For simpler use, both electrodes are combined in one single electrode.
E = measured potential
E0 = constant
R = gas constant
T = temperature in Kelvin degrees
n = ionic charge
F = Faraday’s constant