Ion exchange properties of polyaniline: potentiometric measurements on membranes and coated wire electrodes