The electrochemical quartz crystal microbalance technique was used to examine the ion exchange behaviour and charge compensation mechanism of polypyrrole (PPy) doped with polystyrene sulfonate (PSS) immersed in electrolytes containing singly, doubly and triply charged metal ions. New insights were obtained concerning the mechanism of charge compensation and ion exchange behaviour of PPy/PSS films in electrolytes with triply and doubly charged transition metal ions. Understanding the ion exchange behaviour of conducting polymers immersed in these types of aqueous media could play a pivotal part in the development of methods for removing toxic metals from water supplies. Charge compensation occurred predominantly by means of cation movement for PPy/PSS films when the electrolyte was KNO3, Ca(NO3)(2), Mn(NO3)(2) or Co(NO3)(2). After prolonged redox cycling the electroactivity, of the polymer decreases slightly, and the charge compensation mechanism becomes complex owing to movement of ions and neutral species in opposite directions. The charge compensation mechanism for PPy/PSS films immersed in aqueous Cr(NO3)(3) and Al(NO3)(3) solutions was also complex, with the ion exchange behaviour shifting towards anion movement to and from the polymer. (C) 2009 Elsevier B.V. All rights reserved.