In this work, two significant advances in photolithographic patterning of polyaniline (PANI) films are reported. Firstly, flash welding was enhanced through the use of polymeric substrates, enabling complete penetration of the welding of PANI films with thicknesses ranging from 5 to over 14 mu m, significantly thicker than reported previously. Masking of parts of the PANI films during flash welding enabled the formation of adjacent conducting and insulating regions as the welding changes the electrical properties of the film. Raman spectroscopy was used to determine the sharpness of these edges, and indicated that the interface between the flash welded and masked regions of the PANI films was typically less than 15 mu m wide. Secondly, using longpass filters, light with a wavelength less than 570 nm was found not to contribute to the welding process. This was confirmed by the use of a 635 nm laser diode for welding the PANI films. This novel approach enabled patterning of PANI films using a direct writing technique with a narrow wavelength light source. (C) 2010 Elsevier B.V. All rights reserved.