We have synthesized a thiophene derivative, (4-benzeno-15-crown-5 ether)-thiophene-3-methylene-amine (BTA), which was used as a monomer for electrochemical polymerization on metallic surfaces to prepare functional polymer films. Self-assembly of BTA monomers on Au(111) surfaces promotes ordered polymerization to form polymer nanoparticles or clusters by which the size of the polymer nanoparticles can further be controlled electrochemically. The electropolymerization was monitored in situ by scanning tunneling microscopy to unravel the dynamics of the process and possible mechanisms. These are further supported by calculations using a semiquantative model of polymer clusters and X-ray photoelectron spectroscopy analysis. On the basis of these observations, we have attempted to optimize the construction of BTA polymer based ion selective electrodes. The BTA based polymer films, prepared from both aqueous solution and organic phase on gold electrodes, displayed selective sensitivity to potassium ions with a linear dependence of ion concentration over 4 orders of magnitude.