Electrochemical reactions with protonations at equilibrium