###### Abstract
Zinc oxide is considered to be a very important functional oxide among many semiconductor metal oxides [37] and, more generally, is one of the most used materials in applied sciences currently. It is a semiconductor; its wurtzite structure has a wide band gap (Eg = 3.37 eV at 300 K) and a large exciton binding energy (60 meV) [38; 39]; it has excellent biocompatibility, good chemical/thermal stability, mixed chemical bonds (covalent/ionic) [37], and it excellent properties allow it to be used in many applications as a nanomaterial, including in Gratzel cells [40], varistors [41], optical waveguides [42] and in many optoelectronic devices [38; 43]. In addition to these applications, ZnO is widely used in the field of sensors, i.e., gas and heavy metal ion sensors [37; 44; 45; 46; 47; 48; 49; 50]. ZnO thin films are prepared by many techniques such as chemical vapor deposition [51], spray pyrolysis [52], DC-sputtering [53], pulsed laser deposition [54], radiofrequency (RF) magnetron sputtering [55], pulsed laser deposition [56], electro-deposition [57] and sol-gel-dip-coating [58]. The low temperature chemical method [59; 60; 61] investigated herein is one of the most used techniques [59; 60; 61; 47] for the preparation of thin films of ZnO due to its simplicity and operation at low temperatures. This method is carried out in three steps, (i): synthesis of ZnO NPs, (ii): deposition of NPs by spin-coating on gold electrodes, and (iii): growth of ZnO NRs) and rests on the use of ZnO NPs as a seed layer to nucleate the growth process of ZnO NRs. This hydrothermal/chemical method is advantageous due to its low cost and the fact that it facilitates control over the density and overall orientation of nanorod arrays and permits control of the morphology of ZnO by varying the growth conditions such as growth time [61] and temperature [62]. In two recent conference proceedings [63; 64], we have proposed to combine the advantage of diazonium surface modification for the vertical growth of ZnO nanorods and sensing properties of polypyrrole. In this follow-up, we provide an in-depth study targeting the ultimate detection limit using ZnO nanorod-embedded ion imprinted polypyrrole. Besides the central role of diazonium modification of the working electrode for the growth of vertically aligned ZnO nanorods, such surface chemistry ensures robust adhesion of the polypyrrole sensing layer [65]. This strategy of gathering the salient features of diazonium salts, ZnO nanorods and ion imprinting of polypyrrole has never been reported before, with the exception of our short proceedings papers [63; 64]. We believe it has much to offer to the surface scientist in the quest of constructing a robust electrochemical sensor to address environmental issues. Herein, a polypyrrole-based IIP was prepared in the presence of Hg\({}^{2+}\) as a template and L-cysteine as a chelatant agent deposited on a gold electrode sequentially functionalized with diazonium salts and nanostructured with ZnO nanorods in order to have very high roughness for the selective removal of mercury ions in a sample medium (KCl solution). For comparison, an IIP on a bare gold electrode was prepared. A non-imprinted polymer was also prepared in the same conditions of IIP but in the absence of any Hg\({}^{2+}\). Electropolymerization time, incubation time and number of cycles of electroreduction of diazonium salts were investigated and optimized. Electrode sensing materials were characterized by atomic force microscopy (AFM) in order to account for the morphological structures of the nanocomposites. Square wave voltammetry (SWV) experiments permitted us to determine the optimal parameters for sensing Hg\({}^{2+}\), namely linear response range and the limit of detection of the ZnO-IIP sensor. Selectivity and competition between mercury and other ions was investigated by examining the electrochemical responses in the presence of copper, lead and cadmium taken as interfering metal ions.