1 Introduction and scope of the review

A protected environment without any toxic threat, and with safe water and healthy food, is a major concern, the importance of which is growing in our society [1, 2]. It is important to note that this is among the United Nation 17 Sustainable Development Goals (SDGs) [3]. Because natural sources of water are used for the supply in drinking water, the presence of even trace amounts of heavy metals such as lead, copper, chromium and cadmium represents a real threat to preservation and environmental conservation as well as to public health [2]. Indeed, heavy metals are not only very toxic even at very low concentrations but also refractory to conventional treatments. Therefore, they can degrade the quality of drinking water resources and cause serious diseases. In China, more than 30 serious water pollution incidents have occurred each year since 2009, and over 20% of the water pollution by heavy metals caused poisoning [4] whereas in Africa they were reported to occur in children playgrounds [5]. A report indicated the detection of Cd, Pb, Mn, Cu and Zn in urine samples of 15–70-year-old patients with kidney-, liver- and lung-related diseases [6]. The same team has also detected heavy metals in pathologically abnormal organs from corpses (21–50 years old) during autopsies [6]. With the rapid industrial development, discharges of wastewater containing Cu2+ and Ni2+ have caused serious harm to human health [3]. This should encourage the public authorities, scientists and industrials to develop new methods of protection and prevention. Towards this end, the first wastewater treatment techniques consisted of a chemical precipitation which was originally the production of highly toxic sludge which then had to be stored or eliminated [7]. However, these technologies have the disadvantage of being often complicated to implement and very expensive. To meet the growing legitimate demands, scientific research is being carried out and its effectiveness is closely related to the quality of analytical tools available to scientists. Currently, high-performance liquid chromatography (HPLC) [8], atomic absorption spectrometry (AAS) [9] or inductively coupled plasma spectrometry (ICP-MS) [10] and fluorescence techniques [11] are employed for analysis to obtain qualitative and quantitative information on the composition of samples loaded with metal ions. Yet, a test should be fast and simple to implement, and based on simple concepts, it must allow for the simultaneous analysis of a large number of samples in real time. Moreover, there is an increasing demand for on-site analysis of organics [12] or metal ions in water [13] or beverage and food containers [14]. The search for other detection methods including those based on electrochemical techniques is thus more than ever a major challenge [15]. Particularly, the electrochemical approach has experienced a resurgence of interest with the advent of new electrochemical setups. These are often simple and compact devices transforming the biochemical and/or chemical signal in a readily usable electrical signal. They are usually made of a sensitive layer and a transducer transforming the physicochemical modifications induced by the molecular or ionic recognition into an electrical signal. They also have an operating environment which allows the processing of the electrical signals. Electrochemistry indeed offers attractive prospects for the miniaturization and industrialization of low-cost simple sensors, which are also accurate and robust. To access comparable sensitivity levels as those achieved by spectroscopic techniques, much research is being developed. Conductive polypyrrole (PPy) has been considered as unique electrode material to address these challenges [16,17,18,19,20], particularly for the determination of heavy metals in trace amounts. The advantageous property of polypyrrole film electrodes is that they form complexes with heavy metals which facilitate the nucleation process during the accumulation of metal ions [21,22,23].

The ability to control the properties of PPy is of paramount importance to develop technological applications [24]. PPy is stable and electrically conductive and exhibits interesting redox properties linked to the heteroatom in the chain. For these reasons, it is regarded as one of the most attractive conductive polymers for tracking heavy metal ions in aqueous solutions [25]. The quest for pure and safe drinking water has gathered many researchers in view of the fabrication of sensors for the detection of heavy metal ions in water. The demands of robustness, miniaturization and portability of the devices helped to focus on electrochemical sensors. In this sense, the use of electrochemically prepared nanostructured polypyrrole remains as a vibrant area of research for quantitative and rapid analyses. As a matter of fact, nanomaterials have emerged as unique components of sensors offering opportunities for higher sensitivity, lower limit of detection (LOD), reproducibility, multi-analyte detection in online monitoring due to the large surface area to volume ratio, high catalytic activity and strong adsorption ability of nano-objects and nanostructures [26].

In this review paper, we summarize the existing knowledge of the impact of heavy metals on public health, then we will review some of the synthetic pathways to PPy and its use in electrochemical techniques developed for the recognition of the said metal ions in aqueous media. The use of PPy for heavy metal detection arguably attracts considerable interest, as illustrated in Fig. 1 which gives the number of publications per year on this subject, in the last decade. In addition, polypyrrole has been made the subject of several reviews pertaining to sensors, and particularly electrochemical sensors, as reported in Table 1. However, the present review tackles the sole detection of heavy metal ions and is dedicated fully to polypyrrole and to strategies of functionalization of polypyrrole sensing layers in order to achieve high metal ion selectivity with easy-to-make polypyrrole-based electrodes.

Fig. 1
figure 1

Annual number of publications with the keywords “Polypyrrole”, “heavy metals” and “detection” in the period 2011–2020. Source: Scopus; Criteria: All Fields. Last accessed 21 July 2020

Table 1 Handpicked reviews on polypyrrole-based sensors and adsorbents of heavy metals

The scope of the review is the following:

  • Summary of heavy metal impact on human health

  • Electropolymerization of pyrrole

  • Methods of electrochemical detection of heavy metals

  • Case studies of sensing heavy metal ions with polypyrrole electrode materials

We will finish by concluding remarks and discuss some possible future prospects.

2 Heavy metals: occurrence in the environment and risk to public health

Heavy metals (i.e. relative density greater than 5 [34]) can occur at low concentrations in wastewater. However, anthropogenic factors such as mining can generate a substantial increase in metal concentrations in water and sediment, thus raising environmental issues.

Table 2 summarizes physicochemical properties, electroanalytical conditions and health risks of selected heavy metals.

Table 2 Handpicked heavy metal ion pollutants, physicochemical properties, potential range for detection and caused health problems according to WHO

Faced with these various threats, conductive organic polymers have suitable physicochemical properties to be used as sensing layers of selected heavy metals reported in Table 2.

3 Electrosynthesis and characterization of polypyrrole sensing films

3.1 General aspects of electropolymerization of pyrrole

Synthesis of polypyrrole (PPy) is versatile as it can be achieved on various electrode materials and permits to impart this conjugated polymer with specific characteristics (chemical functionality, nanostructuration, texture). It could be triggered by chemical initiation with oxidative agents or electrochemical polymerization [38], photo-induced synthesis [39, 40] or sonochemical synthesis [41, 42]. Particularly, electropolymerization produces polymers with higher purity and conductivity due to their compactness and confinement to the electrode surface. The simplicity of the approach and the quality of the thin films established electropolymerization as a general method for the making of PPy electrosensing layers. Since adhesion is an important issue, it might be necessary to employ coupling agents in order to ensure a robust PPy–electrode interface which prevents delamination of the conductive polymer thin layer [43]. In the case of electrochemistry, the thickness and morphology of the deposited layer are usually very well controlled by application of a well-defined potential and known current passing through the electrochemical cell [44]. The electrochemically synthesized PPy has some attractive features, such as good conductivity and strong adhesion to the underlying electrode. The overoxidation of PPy appears at lower positive potentials in a water- and/or oxygen-containing environment, and in this case, it is leading towards partial destruction of polymeric backbone and generation of oxygen-containing (carboxyl, carbonyl and hydroxyl) groups. Electropolymerization of PPy has been used in several electroanalytical applications, particularly removal of heavy metal ions due to the doping of the conductive polymer with chelating anions [45, 46]. Stable functionalized polymers with controlled sizes and site concentrations could be produced following this strategy, and they can be used for the determination of trace metals in complex water matrices [47].

Electropolymerization is conducted in an organic medium [48, 49], direct or inverse micellar medium [50] or aqueous solution [51]; most often, the deposition of a polymer film is achieved on the working electrode surface. The electrosynthesis process is usually conducted in electrochemical cells with three electrodes (reference, working and counter electrodes) containing a solution of an electrolyte salt and a monomer. The polymer formation requires control over some parameters such as the nature of the monomer, its concentration and its oxidation potential which must be accessible in the solvent used and less than the dissolution potential of the electrode; the nature of the electrolyte; the type of solvent (acidic, basic or neutral); the nature of the metal substrate on which the film is deposited (platinum, iron, etc.); the current density and the polymerization potential. The advantage of electrochemical synthesis lies in the possibility of controlling the thickness of the polymer film deposited on the working electrode and obtaining polymers that are in doped form, are conductive and have a near–zero rate “impurity”. This way of polymerization is achieved according to a simple mechanism [52] (Fig. 2), beginning with oxidation of a monomer leading to the formation of radical cations in a characteristic potential. The latter binds to form a dimer with elimination of two protons. The oxidation potential of the dimer is slightly lower than that of the monomer which facilitates the addition, step by step, of other monomers leading progressively to trimer, tetramer, pentamer and higher oligomers (Fig. 2).

Fig. 2
figure 2

Electropolymerization mechanism by heterocyclic radical cation

Given the general understanding of polypyrrole electrodeposition mechanisms, several electrochemical polymerization techniques were envisaged, as outlined below.

3.2 Techniques of the electropolymerization of pyrrole

Different electrochemical techniques might be applied for PPy deposition on electrode surfaces. The most investigated are potentiodynamic (cyclic voltammetry, CV [53,54,55], or pulsed potential [56]), potentiostatic (constant potential and time-dependent current variation, also called chronoamperometry, CA [57]) and galvanostatic (constant current or current density over a fixed period of time, also called chronopotentiometry (CP) [57]).

In this review, we consider a further discussion of CV and CA methods for they are the most employed techniques for electrodeposition of polypyrrole. Typical CV and chronoamperogram of the electrosynthesis of polypyrrole are displayed in Fig. 3.

Fig. 3
figure 3

Typical cyclic voltammetry, showing a decrease in the peak current of monomer oxidation at high potentials during successive cycles, and the increase in current at lower potentials indicating gradual conductive polymer growth (A), and chronoamperogram, describing the three steps of the electropolymerization process (B) for the electrodeposition on gold electrode of polypyrrole in acetonitrile solution (previously unpublished results)

3.2.1 Electropolymerization by cyclic voltammetry

Cyclic voltammetry (CV) is a method based on a linear potential scan applied to the electrode with a constant rate of variation (v = dE/dt), defined as scan rate. In parallel, the current is recorded as a function of time. Thereby, the results are usually reported as the potential dependence of current (i vs. E). CV provides a wealth of information on the oxidation and/or reduction potential as well as the current intensity characterizing the monomer or polymer peaks. It is therefore a most commonly used method to analyze the electrochemical properties of monomers and to obtain qualitative information about the redox process of polymers coated on electrodes [56]. Polymerization and film deposition of conductive polymers, in general, are characterized by a decrease in the current of the monomer oxidation peak during successive cycles. On the other hand, the redox wave of the polymer continues to develop at lower potentials [58].

3.2.2 Electropolymerization by chronoamperometry

In chronoamperometry (also called potentiostatic mode), a constant potential is applied to the electrode during electrochemical polymerization. The variation of current is recorded as a function of time, i = f(t). CA is often preferred for the electrodeposition of PPy and has been widely used for the design of sensor materials [58,59,60]. Indeed, the overoxidation potential of this polymer is close to that of monomer oxidation [61]. By controlling the potential of the electrode, it is possible to minimize the period of time at which a potential that could damage the polymer is applied to the electrode. Only the oxidation of the monomer occurs, allowing growth of the polymer by electropolymerization. In addition, CA has been used for investigating and understanding conductive polymer growth mechanism [62, 63].

Chronoamperograms generally describe three steps in the process of electropolymerization [46]: the nucleation step, which is typical of conducting polymer formation, is materialized by a sharp decrease in the current density. It corresponds to the formation of radical cations followed by their oxidative electro-adsorption and substrate passivation. This first step is very fast and takes only a few seconds. The second step or the coupling stage is characterized by a progressive increase in the current; it is related to the continuous and gradual conductive polymer growth. The third step marks a stabilization of the current density indicating the growth limitation by mass transfer reactions. The nucleation and growth mechanism are studied by comparing and fitting the current density maximum obtained from the chronoamperometric curves with the theoretical curves developed initially for metallic electro-deposition [64]. The potential area in which the formation of good-quality films occurs can then be determined.

With the CA process, it is possible to carry out the synthesis of polymers in various media such as organic solvent [65], direct micelle [66], or reverse micelle medium [67, 68]. All of these environments require optimization work and often lead to very interesting results. For example, the micellar environment is highlighted by its involvement in doping, lowering the redox potential characteristics of the monomer and polymer and its ability to increase the monomer solubility.

3.3 Stability and solubility of electrosynthesized polypyrrole films

The solubility of polypyrrole is limited due to its rigid structure and its high degree of cross-linking. Polypyrrole is insoluble in most organic solvents [69, 70]. However, numerous studies have shown that the choice of the medium for the electrosynthesis, substitution with electron-donating groups on the monomer, and use of certain salts can dramatically improve the solubility especially in environments such as dimethylformamide, dimethylsulfoxide, and tetrahydrofuran [71]. Polypyrrole presents chemical and physical properties that can be modified to get better control over the structure [72,73,74,75]. However, the structural modification of these conjugated polymers with the aim of improving their properties is still challenging. For example, the introduction of large functional groups to the conjugated polymer can lead to a steric effect on the polymer backbone, which affects interesting features of the optical and electronic properties of the polymer [76,77,78]. Such desirable characteristic has been widely used in the art of fluorescent marking, which explores the mounting on one side of fluorophore groups in the polymer chain [79]. Although polypyrrole has attractive electrical properties, it is insoluble in common solvents and cannot thus be coated via solvent casting or dip coating, hence the interest of deposition by in situ electrosynthesis on electrode surfaces.

4 Heavy metal detection with polypyrrole-modified electrodes

4.1 Overview of electrochemical detection techniques

Electrochemical methods are suitable for the analysis of heavy metals, particularly when the electrode is coated with a thin conductive polymer sensing layer. Indeed, with the same electrochemical setup one can synthesize the sensing layer and perform the detection measurements. This simplifies the whole procedure and minimizes the time required to design the sensor and its use for heavy metal detection. Numerous electrochemical methods have been developed for the detection of heavy metal water samples. Most of the reported electrochemical methods are based on the pre-concentration of heavy metals on the working electrode, equilibrium and subsequent stripping (Fig. 4a).

Fig. 4
figure 4

General method of electroanalysis of heavy metal ions by stripping voltammetry. a All steps involved in the stripping method consisting of the application of a constant potential at which metal ions are reduced at the electrode surface, followed by anodic stripping in the SWV or DPV mode. b Example of reduction in Cu2+ and their pre-concentration at the electrode surface and reduction in Cu0 followed by anodic stripping of metal ions; the blue arrows show the pre-concentration step noted in a. c Shows the example of deposition of polypyrrole on graphene for the preconcentration of Cd2+ and its reduction into Cd and re-dissolution as Cd2+. Reproduced with permissions from Elsevier: a from [13], b from [80], and c from [81].

Stripping voltammetry [82] is popular because it is known to be an ultrasensitive detection method. Sample preparation is minimal, and sensitivity and selectivity are excellent. The three most commonly used variations are anodic stripping voltammetry (ASV), cathodic stripping voltammetry (CSV), and adsorptive stripping voltammetry (AdSV). Table 3 reports the recommended stripping voltammetric techniques for the detection of selected heavy metals [83].

  • Anodic stripping voltammetry with linear potential sweep (LSASV): ASV is most widely used for trace metal determination. Metals are deposited by reduction (Fig. 4b, left-hand side of the voltammogram), and the metal deposit is anodically dissolved. Due to the enrichment of the oxidizable compound on the electrode, the faradic current is much higher than in a measurement where the diffusion of the dissolved ions fuels a reduction current. By using a simple linear scan, it is possible to decrease LOD to 10−9–10−8 mol L−1 [84].

  • Anodic stripping voltammetry with pulse techniques

    Table 3 Suitable stripping voltammetric techniques for the detection of selected heavy metals [83]

The use of pulse techniques can substantially lower the limits of detection of ASV (to 10−12 mol L−1) and increase the sensitivity [85]. The two most commonly used pulse techniques are differential pulse and square-wave anodic stripping voltammetry (DPASV and SWASV, respectively). In DPASV, the anodic dissolving step is performed using differential pulse voltammetry (DPV). The current measured is then the difference of two currents measured just before and at the end of the pulse. This differential measurement between these two flows allows the increase in the faradic current to the capacitive current ratio. The variation of the potential change should be slow. In SWASV, the anodic dissolving step is performed using square-wave voltammetry (SWV). Two currents are measured: one is measured at the end of the high pulse, and the second one is measured at the end of the low pulse (see Fig. 4b). These two streams are then automatically subtracted to give the current. The signal is in the form of peaks, and the potential variation can be rapid.

  • Cathodic stripping voltammetry (CSV): in this technique, the metal ionic species deposited on the electrode during the pre-concentration step are dissolved by a cathodic or reductive process.

  • AdsSV: metal and some organic compounds can complex with organic ligands and adsorb to the electrode at the pre-concentration step (Fig. 4c). Usually, the adsorbed compounds do not undergo an oxidation or reduction reaction during this step. Then, stripping voltammograms are generally recorded in the differential pulse- or square-wave voltammetry modes (DPV or SWV, respectively), for they are much more sensitive than the normal scan mode.

As far as the guidelines are concerned, the US Environmental Protection Agency has recommended the use of stripping voltammetry for some heavy metals [86]. Electrochemical analysis of mercury is sensitive, inexpensive, simple, and fast and can be performed with miniaturized, portable instrumentation [87]. For more details about stripping methods, one could also refer to [88].

4.2 Metal detection using PPy-modified electrodes: methods and applications

For three decades, these electrogenerated films aroused a growing interest in the design of electrochemical sensors. Among conducting polymers, polypyrrole and its derivatives play the leading role due to its relative low oxidation potential, high stability, and excellent electrical properties in organic and aqueous solvents. In addition, the easy and versatile modification of pyrrole monomer by a large variety of molecular species leads to powerful polymeric platforms with specific recognition, affinity, or catalytic properties for the detection of heavy metals [89,90,91].

This method can be carried out in four ways (Fig. 5):

  • By making homopolypyrrole and exploiting the chelating power of pyrrole nitrogen atom (Fig. 5a)

  • By homopolymerization of chelator-functionalized pyrrole (Fig. 5b)

  • By copolymerization of pyrrole with a conjugated monomer–bearing chelating group (Fig. 5c)

  • By ion imprinting polypyrrole (Fig. 5d)

Fig. 5
figure 5

Various approaches for polypyrrole sensor elaboration: a synthesis of homopolypyrrole, b polymerization of chelator-functionalized pyrrole (N-functionalized pyrrole is shown), c copolymerization of pyrrole with chelator-functionalized pyrrole, and d preparation of ion imprinted polypyrrole

We will also consider the less explored preparation of sensors by post-functionalization of polypyrrole.

Homopolymerization of pyrrole yields a polymer with chelating capability owing to the nitrogen atom borne by the PPy repeat units. The homopolypyrrole doping with chelator and ion imprinting of polypyrrole have been readily synthesized and carried out for the removal of different heavy metal ions for its inexpensive and simplicity processes.

The homopolypyrroles doped with the chelator are recognized as effective and economic adsorbents for low-concentration heavy metal ion treatment [45, 46]. However, homopolymerization of chelator-functionalized pyrrole yields low adsorption capacity which depends on the type of the chelator. PPy-based nanomaterials are widely explored as highly efficient adsorbents for the detection of various heavy metal ions from aqueous/wastewater sources due to the presence of highly active surface sites within the nano-adsorbents. They exhibit various advantages such as fast kinetics, high capacity, and preferable sorption towards heavy metal ions in aqueous/wastewater.

4.2.1 Preparation of sensing films by synthesis of homopolypyrrole doped with chelator

The role of the dopant nature of PPy has been investigated a long time ago by Wallace and Lin [92]; the case study concerned the electroanalysis of silver ions with PPy doped with a range of anions including EDTA and 2,6-pyridinedicarboxylic acid. This incipient study paved the way to numerous developments to address the environmental issues of occurrence of heavy metal ions in waste, river, and tap waters.

This section concerns the homopolymerization of pyrrole and incorporation of dopants that could take part of the uptake of the metal ions.

Table 4 reports selected materials and their electroanalytical performances. One can note that much has been achieved to make polypyrrole composites in order to achieve low LODs and high sensitivity. If nanomolar and even femtomolar detections were claimed, the use of nanomaterials to improve the sensing features is not always successful. What really matters is to achieve detection limits below the upper limits recommended by the WHO, particularly when it comes to drinking water.

Table 4 Electroanalytical performances of electrodes modified with chelator-doped polypyrrole materials

Wei et al. [93] synthesized PPy@carbon microspheres which they deposited on screen-printed electrodes for the detection of Hg2+ and Pb2+ in tap water and in what is called “real water” but without any explanation what stood for “real sample” (see Table 4). Also, polypyrrole was presumably doped with sulphate as the oxidizing agent was “APS” (not defined) and which could stand for ammonium persulfate. SWV was electroanalytical, and the LOD was very low, in the femtomolar regime. Interestingly, the authors demonstrated the synergetic effect of PPy and carbon microspheres, since the LOD was much lower with the PPy@carbon composites compared with those achieved with pure PPy and carbon microspheres taken separately (Fig. 6). The method has been extended by the team of Mireille Turmine to the fabrication of carbon paste electrodes doped with PPy/carbon nanofibre nanocomposites for the detection of Pb2+ with a LOD of 0.05 μg L−1 (0.24 nmol L−1) and a linear range in the 0.2–130-μg L−1 Pb2+ range [94]. It also inspired Arulraj et al. [95] to make a highly sensitive (28.64 μA μM−1) PPy/Pct/GR-modified GCE electrode for electrosensing Hg2+ in drinking water at claimed low LOD of 4 fM. Pectin served as a polysaccharide with pending COOH groups for improving the hydrophilic character of PPy and diffusion of metal ions in the sensing layer. Cysteine-grafted GO served as a nanoplatform for the in situ electropolymerization of pyrrole on SPE for the selective detection of Pb2+ without any output loss in the presence of competing metal ions [101]. Finally, other approaches emerged combining PPy with Co3O4 nanoneedles on copper foams [102] or NiCo2O4@PPy nanoneedle immobilized on graphene [103] for electrosensing Pb2+, on the one hand, and metal-organic-framework (MOF)/PPy composites for electrosensing Pb2+ and Cu2+, on the other hand [104].

Fig. 6
figure 6

Electrosensing metal ions with PPy@carbon microsphere composites deposited on screen-printed electrodes by SWASV of a Hg2+ and b Pb2+. Conditions: 120 s preconcentration time, at pH 3 in acetate buffered solution. Insets in a and b are the calibration plots of the SWASV peak current (background current was subtracted) vs the concentration of metal ions. Electrode material electrosensing features were as follows: c sensitivity and d LOD on the PPy, CNS, and PPy–CNSs-modified SPE for the individual analysis of Hg(II) and Pb. NB: CNS were carbon microspheres and in no way nanospheres. Reproduced from [93] with permission of Elsevier

Ayenimo and Adeloju [96] designed an electrochemical sensing device fitted with a PPy-GOx working electrode, a platinum auxiliary, and a Ag/AgCl reference electrode (3 M KCl) for the detection of Hg2+, Cd2+, Cu2+, and Pb2+. The biosensor of PPy was synthesized in the presence of glucose oxidase (GOx) by electropolymerization at − 800 mV for 1 to 2 s from an aqueous solution containing Py (0.2 M) and concentrations of GOx (300 U mL−1). Entrapping enzymes in conductive polymers by electrochemical means has actually been reported in 1986 by Foulds and Lowe [105]. The amperometric biosensor with GOx entrapped in the nanofilm of PPy (55 nm) was used for the detection of lead, copper, mercury, and cadmium at pH 7.0 and RT and using an applied potential of 700 mV. It responded very rapidly, within 20 s, which means it does not require an incubation step. The principle rests on the inhibition of GOx by the toxic heavy metal ions. It follows that an adverse effect of heavy metals can be exploited to design a biosensor, the sensing performances of which are inhibited when it is in the presence of the said toxic heavy metals. Figure 7 a displays the effect of addition of mercury on the response of the PPy-GOx biosensor and the immediate decrease in output signal testifying for the inhibition effect of the heavy metal ions; Hg(II) is shown for example. Figure 7 b plots decrease in peak intensity (ΔI/μA) versus the initial concentration of Hg(II); linearity is demonstrated up to 3.3 μM metal ion at pH 7 for the 8-mM glucose test concentration. The authors investigated the mechanisms of inhibition using Dixon and Cornish–Bowden plots [106]. They demonstrated that the suppressive effects observed with Hg(II) and Cu(II) were via non-competitive inhibition (metal ion binds to the enzyme, herein GOx, and reduces its activity), while those of Pb(II) and Cd(II) were due to mixed and competitive inhibition. In the mixed inhibition mode, the inhibitor (metal ion) binds to the enzyme whether or not the substrate (glucose) is interacting with the receptor site borne by the enzyme (GOx), whereas in competitive inhibition the metal ion (inhibitor) interacts preferentially with the binding site of the enzyme.

Fig. 7
figure 7

Detection of heavy metal ions based on the principle of inhibition of a biosensor of the PPy/glucose oxidase (PPy/GOx) type. a Real-time monitoring of the response of PPy/GOx to successive additions of Hg(II) ions. b Calibration plot ΔI-vs-Hg(II). Conditions: pH 7 in 0.05 M PBS, 8 mM glucose concentration, potential applied to the PPy/GOx electrode: + 700 mV vs. Ag/AgCl. Reproduced from [96] with permission from Elsevier

Another way of exploiting the polypyrrole-supported chelator was to design PPy nanowires (NWs) by the template approach where surfactants direct the growth of PPy as NWs. 1D structures impart high surface area, and in order to improve the recognition of metal ions, phytic acid (PA) was immobilized on the NWs by electrostatic adsorption and ultrasonic mixing. The PA/PPy NWs were then coated on GC electrodes and protected with Nafion. Figure 8 shows the structure of PA and the NW characteristics. PA/PPy NWs were found to have superior recognition capabilities of Cu(II) in wastewater samples over PPy NWs [97].

Fig. 8
figure 8

Molecular structure of phytic acid (a), its influence on PPy NW shape (b), and electrosynthesis of Cu2+ (c). Reproduced from [97] with permission from Elsevier

As 2D supports are concerned, graphene/β-cyclodextrin (GR-CD) served as a platform for the in situ electropolymerization of pyrrole on the SPE electrode [98]. The resulting PPy-GR-CD composite was obtained by the potentiostatic method in an aqueous solution containing 0.1 M pyrrole and into the as-prepared GR-CD aqueous solution under magnetic stirring at RT. These films were applied to the detection of lead ions in deionized water as schematically illustrated in Fig. 9. Other electrochemical sensors have been developed for the detection of Hg2+ in the aqueous medium. For this purpose, the gold electrode was modified by a polypyrrole (PPy)/multiwalled carbon nanotube (MWCNT) hybrid [91]. The PPy/MWCNT composite film was electrochemically deposited by cyclic voltammetry (CV) which was applied to determine the trace levels of Pb2+ using differential pulse stripping voltammetry (DPSV).

Fig. 9
figure 9

Proposed mechanism for electrosensing Hg(II) at the GR-CD/PPy electrode material. Reproduced from [98] with permission from Elsevier

A new nanocomposite of PPy and reduced graphene oxide (RGO)–modified carbon paste electrode (CPE) has been reported for the determination of trace lead ions. The surface electrode PPy-RGO/CPE affects the stripping analysis of Pb2+ with the limit of detection estimated to be 0.3 nM Pb2+ [16].

Metallic nanoparticles enhance the electrochemical properties of PPy. Towards this end, a composite prepared from gold nanoparticles and polypyrrole (Au@PPy) at the surface of an SPC served for the determination of lead ions (Pb2+) with a LOD of 0.36 nM [99]. Immobilization of DNA resulted in an aptasensor that selectively bound lead(II) in the − 0.2~0.6 V range.

Finally, EDTA was advantageously used to functionalize the PPy/SWCNT nanocomposite electrochemically deposited on stainless steel (S) electrode [100]. Although Raman spectroscopy indicated SWCNT peak shifts of the D and G bands of the SWCNTs, nothing was reported about the D/G peak intensity ratio which is known to be affected, connected with covalent attachment (herein of EDTA-like moiety). In addition, the authors claimed EDTA covalent bonding but did not provide full justification for the effective reaction between PPy and EDTA in the presence of EDC. Nevertheless, EDTA-functionalized PPy/SWCNT was found to be beneficial for the detection of Pb(II) over Cd(II), Zn(II), Mg(II), Ni(II), and Hg(II), in acetate buffer solution, pH 4.9, with a LOD of 70 nM.

Another interesting PPy dopant is MoS42− due to its sulphur atoms which undergo specific bonding interactions with metal ions [107]. PPy/MoS4= was obtained by anion exchange of NO3-doped PPy with (NH4)2MoS4=. Ag+ and Pb2+ were removed at over 99.6% within 5 min, whereas 98% of the highly toxic Hg2+ was removed within 1 min. The extent of removed Ag+ was as high as 725 mg/g, which indicates that this counterion is highly interesting for developing a new electrochemical sensor based on PPy/MoS4=.

Flexible ITO electrodes are interesting for flexible electronics but also for electrochemistry as they can be cut easily with scissors. They were coated with strongly adhesively bonded PPy top layers for the electrodetection of Pb2+ [44] and other heavy metal ions [47]. Adhesion was achieved through an ultrathin aryl layer grafted to ITO by electroreduction of in situ generated aminobenzenediazonium salt [44] and other in situ generated diazonium salts such as p-N,N-dimethylaminobenzenediazonium [108]. Polypyrrole was doped with benzenesulfonic acid (BSA), which served also as a chelator for heavy metal ions. The general principle is displayed in Fig. 10, upper panel. Flexible electrodes were tested against Pb2+ in aqueous solutions prepared in the laboratory but also in wastewater samples spiked with one heavy metal ion or metal ion mixtures (Fig. 10, lower panel) [47]. DPV was found to be appropriate indeed for detecting Cd2+, Pb2+, and Cu2+, taken separately or simultaneously with detection limits of 8.95, 0.99, and 11.1 nmol L−1, respectively. For similar initial concentrations, no competitive adsorption was noted and heavy metal ions could be recovered without any significant loss. In contrast, recovery of less than 50% was achieved, e.g. for Pb2+ in the presence of Cu2+ or Cd2+ 100-fold more concentrated. The same type of sensing flexible electrodes ITO-NH2-PPy was employed to track Cu2+ or Cd2+ ions spiked in wastewater samples. Recovery was found good with 81% for Cd2+ and excellent for Cu2+ with 95% extent recovered.

Fig. 10
figure 10

Upper panel: principle of preparation of flexible ITO electrodes coated with PPy sensing top layer through an ultrathin adhesive aminophenyl layer (reproduced with permission of Elsevier from [44]). Lower panel: DPV simultaneous detection of metal ions with an initial concentration of 2.10−7 mol L−1 of a Cd2+ and Pb2+, b Pb2+ and Cu2+, c Cd2+ and Cu2+, and d Cd2+, Pb2+, and Cu2+ mixture. Reproduced with permission of Springer from [45]

While most of fundamental studies of selectivity concern heavy metal ions taken separately, it is essential to consider their mixtures in order to consider possible competitive adsorption on the ion recognition sites of the sensing layer. For this reason, we have prepared thin polypyrrole films containing an EDTA derivative, a less employed chelator: ethylene glycol-bis(2-aminoethylether)-tetraacetic acid (EGTA). In order to improve the conductivity of the sensing layer, multiwalled CNTs were first immobilized on ITO-NH2 (Fig. 11a,b) [109]. Adhesion of CNTs was excellent but failed on bare ITO, thus justifying the need for surface modification. Surprisingly, polypyrrole was found to wrap the nanotubes with increasing thickness depending on the number of voltammetric cycles for the electrosynthesis of the conductive polymer (Fig. 11c). Selectivity was investigated. The sensor could recognize simultaneously Pb2+ and Cu2+; however, no recovery loss was noted with EGTA-containing chelator (Fig. 11d) since for an initial Cu2+ concentration as high as 40 times that of Pb2+, the response of the sensor for the latter did not change. DFT calculation permitted to understand the excellent selective behaviour of the EGTA-containing sensor; the interaction energy computed for the EGTA–metal ion pairs, considering solvation effects, was found to be − 374.6 kJ/mol for Pb2+, more than 3-fold that computed for Cu2+ (− 116.4 kJ/mol). This clear difference is due to the hexacoordination of Pb2+ compared with the pentacoordination of Cu2+.

Fig. 11
figure 11

a EGTA chemical structure. b CNTs immobilized on ITO-NH2. c PPy/EGTA-wrapped CNTs on ITO. d Selectivity of the sensor with total recovery using PPy/EGTA even in the presence of Cu2+. e Structures of stable conformers of EGTA, and [EGTA-Pb]2+ and [EGTA-Cu]2+ complexes. Reproduced from [109]

4.2.2 Preparation of sensing films by functionalization of polypyrrole backbone with chelating groups

Homopolymerization of pyrrole in the presence of an ionic chelator could be simple and very attractive; however, due to the redox properties of PPy and its ion exchange properties, the chelating anion could be lost and the polymer loses partially its chelating and sensing properties. For this reason, polymerization of the chelator-functionalized pyrrole derivative could be an interesting way to retain the sensing properties. Actually, functionalized pyrroles were polymerized or copolymerized for numerous purposes such as DNA hybridization sensing [110], visual diagnostic tests [111], platform for nerve growth [112], protein-functionalized magnetic PPy nanoparticles [113], ferrofluids [114], and phosphate measurement in stream water [115] and electrocatalysis of water oxidation [116] among numerous other applications. Functionalized PPys were also employed for electrosensing heavy metal ions.

Selected functionalized PPy-based electrode materials are reported in Table 5. For example, a polypyrrole film functionalized with iminodiacetic acid (IDA-PPy) was chemically synthesized and evaluated for the selective recognition of Pb2+ [118]. Pyrrole was initially pre-functionalized with iminodiacetic acid (IDA) and then polymerized chemically (Fig. 12a). The electrochemical response of Pb2+ ion on the IDA-PPy modified CPE has been evaluated and the controlling parameters have been optimized using differential pulse anodic stripping voltammetry (DPASV). The IDA-PPy-modified CPE shows a linear correlation for Pb2+ concentrations in the range of 1 × 10−6 to 5 × 10−9 M, and the lower detection limit of Pb2+ has been found to be 9.6 × 10−9 M concentration. Other tested metal ions, namely, Cu2+, Cd2+, Co2+, Hg2+, Ni2+, and Zn2+, do not exhibit any voltammetric stripping response below 1 × 10−7 M concentration. However, the Pb2+ response is affected in the presence of molar equivalents or higher concentrations of Cu2+, Cd2+, and Co2+ ions in binary systems with Pb2+, consequent to their ability to bind with iminodiacetic acid, while Hg2+, Ni2+, and Zn2+ do not interfere at all (Fig. 12b).

Table 5 Analytical characteristics of PPy-modified electrodes
Fig. 12
figure 12

Stepwise synthesis of IDA-PPy for carbon paste electrode (a) and its application to electroanalysis of Pb(II) in the presence of interferent metal ions (b). Reproduced from [118] with permission from Elsevier

Furthermore, the oxidative electropolymerization of malonic acid–functionalized pyrrole (Py-MA) on carbon disk by cyclic voltammetry method by the scan rate of 2 mV s−1 in a solution of CH3CN containing 3.10−3 mol L−1 (3-pyrrole-1-yl-propyl) malonic and 0.1 mol L−1 of TBAP [119]. These films obtained were used to trap heavy metals such as Cu2+, Pb2+, Cd2+, and Hg2+. The detection limits were determined from square-wave voltammetry at 0.5, 5, 50, and 200 nM for Pb2+, Cu2+, Hg2+, and Cd2+, respectively, after a 10-min pre-concentration.

Other studies of functionalization of polypyrrole concerned the preparation of complexing polymer-coated electrodes by oxidative electropolymerization of N,N′-ethylenebis[N-[(3-(pyrrole-l-yl)propyl) carbamoyl)methyl]-glycine for the electrochemical detection of Hg(II) [120]. The same group, in association with Barnabé Rivas, has designed other PPy-EDTA-like thin films for the detection of Pb(II) or Cu(II) (NB: metal ions were taken separately) [121], and poly(pyrrole-ferrocenyl alkylammonium) with immobilized Pd0 for the detection of arsenic based on the electrocatalyzed As(III) → As(V) reaction [117] as depicted in Fig. 13. This example is summarized in this review though it concerns detection of non-metal ions.

Fig. 13
figure 13

Three-step design of electrosensing thin film of poly(pyrrole-ferrocenyl alkylammonium)/Pt0 or Pd0 on carbon electrode for the recognition of As(III). Adapted from [117]

4.2.3 Preparation of biomimetic sensing films by ion imprinting of polypyrrole

Molecular imprinting is a very interesting technique to make biomimetic polymers that act as antibodies. For this reason, molecularly imprinted polymers (MIPs) are coined “plastic antibodies”. MIPs are obtained by synthesis of a cross-linked polymer in the presence of a template molecule [122]. The latter is complexed by a functional monomer prior to polymerization. A cross-linker is used to obtain a 3D polymeric network once the polymerization is triggered. The final system is cross-linked polymer system holding the template by hydrogen or electrostatic bonds. Upon washing the polymer with appropriate solvent, the template is removed leaving prints in the polymer that have the shape of the template. These sites are called “artificial receptors”. The technique has been extended to ion imprinted polymers (IIPs) with the same principle: the polymer is synthesized in the presence of a metal ion. In this case, an additional chelator could be used if the functional monomer does not to suffice to retain the template during the pre-polymerization complexation (PPC) step.

In the case of conductive polymers, and particularly polypyrrole, a cross-linker is not necessary. Polypyrrole is partially cross-linked [123, 124] which yields a final rigid structure holding the metal ion. Again, upon washing with EDTA or another strong chelating compound, the metal ion is removed and the polymer is then bearing the artificial receptor to host again the template ion. As the artificial receptor was shaped by the template, it should be highly selective to the template ion in the rebinding process; any other competing ion would not fit in well with the receptor, hence the high selectivity aspect of IIPs (and MIPs if the template is a molecule). IIPs recognize metal ions after imprinting (rebinding step), while preserving all the virtues of the biomimetic polymer.

Figure 14 illustrates the 3 main steps of making IIP and its use for rebinding the template metal ion.

Fig. 14
figure 14

Principle of preparation of an ion-imprinted polymer (IIP). An example is given for the making of pyrrole, coordination is arbitrarily set to 4, and the size of the metal ion compared with pyrrole bonds lengths is approximately that of unhydrated Pb(II)

Despite the remarkable progress in the MIP [122] and IIP [125, 126] literature, we found little information on ion-imprinted polypyrrole (IIPPy) materials for electroanalysis of heavy metal ions. Handpicked examples of IIPPys are reported in Table 6.

Table 6 Analytical characteristics of selected IIPPy electrodes

Mazloum-Ardakani [128] synthesized polypyrrole IIP on glassy carbon for the detection of Cu2+ ions. The electrode was prepared by electropolymerization pyrrole on GCE in the presence of methyl red. Electropolymerization of pyrrole was done by applying a potential of 0.75 V from an aqueous solution containing 0.1 M of pyrrole and 10−4 M methyl red on the GCE surface. After electropolymerization, the electrodes were washed with water and then subjected to several alternative steps of reduction/oxidation in a solution containing 10−3 M Cu(NO3)2. The reduction and oxidation steps were performed potentiostatically at − 0.4 and 0.5 V, respectively, each for a period of 5 min. GCE prepared/Cu-IIP was then used directly for anodic stripping voltammetry (ASV) for the detection of Cu2+ ions with the detection limit of 5.09 × 10−7 M. Actually, this is not a conventional way to make IIPs particularly in the case of a rigid polymer such as PPy. Similarly, the same authors designed also a PPy/methyl red electrode for the detection of Pb2+ [127].

In their quest of exploring the PPy/EDTA-like type of sensors, the teams of Rivas and Moutet published a joint paper on IIPPy/EDTA-like for the selective detection of Hg2+, Pb2+, Cd2+, and Cu2+ (Fig. 15). The strategy they devised permitted to achieve selective sensing and binding of Cd(II) in competitive mixtures containing other metal ions [129].

Fig. 15
figure 15

Strategy of preparation of an ion-imprinted poly(pyrrole-EDTA like) polymer for the detection of Cd2+. Step (i): preparation of the metallopolymer by electropolymerization of pyrrole-EDTA like/metal ion complex; step (ii): removal of the template ion and generation of artificial receptor sites within the polymer matrix. Adapted from [129]

Ion imprinting could be conducted with chelating co-dopants like L-cysteine and acrylic acid as reported by the team of Fourati and Zerrouki [131]. Herein, one explores the combined actions of chelating dopants and ion imprinting to achieve outstanding LOD for lead. In another strategy, for the first time the lowest value ever reported in the literature for the detection of Hg2+ was reported by Ait-Touchente et al. [15] in association with the group of Fourati and Zerrouki. They designed an IIP by electropolymerization of pyrrole in the presence of Hg2+ on ZnO nanorods that were grown on diazonium-modified gold substrates. This exceptional sensor was applied to detect Hg2+ with a LOD of ~ 1 pM (Fig. 16).

Fig. 16
figure 16

Schematic illustration of the stepwise synthesis of mercury-imprinted PPy wrapped around vertically aligned ZnO nanorods attached to diazonium-modified gold electrodes. Reproduced from [15]

In the abovementioned approaches, most of the time, removal of the template ion is achieved by extensive acid washing. In order to avoid harsh conditions which might alter the 3D structure of the imprinted polymers, Du et al. [132] suggested to apply the electrochemically switched ion exchange (ESIX) method as a means for the selective and reversible separation process of the targeted ion. Although yttrium is rather ranked as rare earth, the protocol could be applied to heavy metal ions. The authors prepared Y3+-imprinted FCN/PPy and interrogated its propensity to uptake and release Y3+ (Fig. 17a). The same study was performed with Ni2+-imprinted FCN/PPy and non-imprinted FCN/PPy. Mass change during electropolymerization demonstrated uptake and intermittent release of Y3+ during the whole process of film growth due to the UPEP process. The authors have demonstrated by EDS that, upon applying an oxidation potential to the working electrode, the FCN/PPy expels Y3+ but not the FCN ligand; this is confirmed by XPS. The redox cycles were monitored by quartz microbalance measurements which demonstrated the larger mass change at Y3+-imprinted FCN/PPy (Fig. 17c) compared with the non-imprinted FCN/PPy electrode (Fig. 17b). Drift in the baseline shown in Fig. 17b was attributed to the unloading of water molecules hydrating Y3+ ions.

Fig. 17
figure 17

Synthesis and electrochemical behaviour of Y3+-imprinted FCN/PPy composite film (a). Electrode mass change upon application of oxidation–reduction potential at the non-imprinted (b) and (c) Y3+-imprinted FCN/PPy. Reproduced from [132] with permission from Elsevier

4.3 Water composition effect on the performance of heavy metal electrochemical detection

So far, we have tackled various strategies to detect heavy metals in water with polypyrrole-based electrodes. Most of the studies are of fundamental nature and concern ideal aqueous solutions of heavy metal ions. Conducting electroanalysis in water complex matrices requires knowing composition, i.e. organic and inorganic species and pH. If pH is known to induce precipitation of metal hydroxides, and studies are usually conducted at neutral or acidic pH, selectivity remains an issue as the coexistence of metal ions induces competitive adsorption at the receptor sites. In the case of turbid water samples, centrifugation and filtration might be required before any electroanalytical measurements are performed [133].

For the purpose of electroanalysis of complex water samples containing at least two metal ions, Sakhraoui et al. [131] studied the selectivity of lead L-Cys/PPy in coexistence of ions such as Sn, Ni, and Co. The recovery rate was found to be higher than 90% in buffered solutions prepared in the laboratory. In contrast, the results of the detection of lead in natural river water showed a noisy, convoluted signal of Pb that had to be peak-fitted in order to determine the contribution of other ionic species (Sn2+, Ni2+, and Co2+). The calibration curve permitted to determine a concentration of 14 μg lead per litre of river water.

In another study, Lo et al. [45] found partial recovery due to competitive adsorption of metal ions spiked in wastewater, but upon the use of EGTA as co-chelator of polypyrrole, the detection of lead was not found to be affected by the coexistence of a competitive metal ion and the recovery rate was as high as 90% [109]. These results show that the composition of water samples, at least in terms of metal ion mixture, could have an effect on the electrochemical detection performance.

5 Conclusion and future prospects

This rich literature survey shows the interest of conductive polypyrrole-based electrodes for the selective recognition of heavy metal ions. This is what has motivated this review paper. We have gone through the global concern of pollution by heavy metal ions as they induce severe health problems to humans, and the urgent need to detect them accurately, preferably on site and in situ [13] before any action intended for their massive removal using adsorbents or by filtration using effective membranes. Electrochemistry is demonstrated to be an elegant and very efficient technique for the recognition of heavy metal ions in both aqueous solutions prepared in the laboratory as well as in real wastewater and natural river or rain water samples [47, 97].

The electrochemical technique itself is selective as heavy metal stripping peaks are centred at different potentials [47, 81, 95]; however, improvement of selectivity can be achieved through ion imprinting technique [15]. With electrochemical methods as sensitive as anodic stripping DPV or SWV, one can also achieve very low limits of detection (LOD), down to the femtomolar regime as claimed in some papers [95]. A very promising method for the detection of heavy metals ions is the so-called fast-scan cyclic voltammetry (FSCV) which satisfies several criteria; the so-called 6 S’s stand for sensitivity, selectivity, size of the sensing probe, stability, safety (of the electrode material), and speed [13]. It merits thorough investigation by several laboratories in order to be a very well-established electroanalytical technique for tracing heavy metals and other compounds.

The role of nanomaterials and nanostructured polypyrrole sensing films seems essential as demonstrated in numerous studies [15, 109]; there is also a significant positive role of porous micro-supports [134] for polypyrrole to obtain a higher surface area. However, improvements are urgently needed as, in some reports, LOD values are rather in the micromolar regime which shows that nanostructuration did not impart the expected sensitivity. There should also be larger screening of dopants with chelating properties [107, 109, 131]. Finally, one can expect take-off of the ion imprinting technique for designing biomimetic polypyrrole electrochemical sensors of heavy metal ions; as a matter of fact, only a few examples were reported in the literature and that concern specifically ion-imprinted polypyrrole (see Table 6).

As far as the fundamental aspects are concerned, the question of detection of hydrated metal ions is essential and more studies should focus on the number of water molecules per metal ion [132].

To finish, as water is a gift of life, and quoting the text of Dr. Sybil Sharvelle [135] in its entirety “Use of locally available water sources can increase reliability and resilience of water supplies, particularly in areas prone to drought. Examples of local water supplies include roof runoff, stormwater, graywater, and treated wastewater”, it is clear that more than ever, it is urgent to develop for example paper-based disposable sensing materials [12] for portable electrochemical sensors and for wireless sensing of metal ions and other pollutants [13]. In this sense, combining paper electrodes [12] and smartphones [14] could be a very promising solution to detect on-site heavy metals in available water and to burn out paper-based electrodes after data acquisition. This is fully compatible with polypyrrole, an organic conductive polymer, which could be deposited on paper strips to make flexible electrodes [42] for sensor applications [136].

This review anticipates an increase in the use of polypyrrole electro-sensing materials of heavy metal ions. With the advent of highly sensitive portable potentiostats, on-site electro-detection of heavy metal ions becomes possible using polypyrrole-based electrode materials.