Abstract A polyaniline based amperometric pH sensor has been developed using a novel electrochemical measurement system. A polyaniline film (PANI) coated pencil graphite electrode (PGE) is connected in series between the working and counter electrodes of a potentiostat, and immersed in the solution together with a reference electrode. When an external potential is applied, the resulting current varies with the solution pH, which provides the basis for the amperoemtric pH sensor. Equations describing the measurement principle are presented. Based on pH dependent emeraldine salt–emeraldine base transition of PANI film, the pH sensor exhibits high stability, accuracy, selectivity, sensitivity and a short time.