How a pH probe works