Conversion from electronic conducting phase to redox conducting phase of polypyrrole