Introduction

Electrocatalytic water splitting is a lucrative process for generating sustainable hydrogen as a fuel. Although a minimum thermodynamic electrode potential of 1.23 V is needed to split water, with the hydrogen production occurring at 0 V vs standard hydrogen electrode (SHE), only by the use of noble metal catalysts such as Pt and its alloys a low overvoltage close to theoretical value with a high exchange current density and a small Tafel slope is achievable [1,2,3]. Considerable search for other non-noble metals and metal oxides is ongoing to develop a cost-effective alternate catalyst for hydrogen production. In the last two decades, various 3D transition metals such as Co, Fe, Ni, and their alloys, along with their phosphide and sulfide compounds, have shown promising results for HER with low overvoltage [4,5,6]. However, they are susceptible to corrosion in both acidic and alkaline environments.

Recently, carbon-based materials have shown to be promising electrodes for photocatalytic and electrocatalytic hydrogen production [7]. These metal-free electrocatalysts provide a cheaper approach for hydrogen evolution reaction as they are abundant and also are tolerant to both acidic and alkaline environments. Their low dimensional structures have shown to be promising materials for oxygen reduction and evolution reactions. Very recently, Zheng et al. showed that carbon nitride combined with graphene gave an overpotential of ~ 240 mV for HER in acidic solution to achieve a current density of 10 mA cm−2 [8]. Using density functional theory calculations, they predicted that due to chemical coupling of carbon nitride and graphene, a decrease in energy barrier compared to carbon materials was achieved for HER to take place. Subsequent research on developing 2D-based carbon materials and their hybrids with transition metals are being explored for HER [9]. However, during the synthesis of such materials and its testing for HER, certain drawbacks occur such as inevitable aggregation of carbon or carbon/metal hybrids, poor contact between carbon and electrodes, and formation of thick carbon layers which decrease the porosity and lead to lower HER efficiency.

On the other hand, organic semiconductors including porous polymeric carbonaceous materials have been reported to be better suited for HER applications [10, 11]. The semiconducting property of polymeric materials makes it an attractive option for photoelectrochemical hydrogen production by tuning the highest occupied molecular orbital (HOMO) and lowest unoccupied molecular orbital (LUMO) levels [11]. Besides HOMO/LUMO, the porosity also plays a critical role for water splitting by providing more active catalytic sites and by decreasing the hydrogen buildup on the catalyst and therefore minimizes the concentration overpotential for HER [12].

Organic semiconductors including conducting polymers have mainly been synthesized by hydrothermal or other solution/pyrolysis routes. Electrodeposition of organic semiconductors has been shown using organic solvents and ionic liquids [13,14,15]. In ionic liquids, as it is possible to change the cation/anion combination, structural changes in the polymeric structure are possible [15]. The polymerization of benzene to polyparaphenylene (PPP) has been shown from 1-hexyl-3-methylimidazolium tris(pentafluoroethyl)trifluorophosphate ([HMIM]FAP) [16]. However, the functional properties were not tested. Furthermore, attempts to make PPP based co-polymers from ionic liquids have not yet been shown.

Taking these factors into consideration, in this manuscript, we demonstrate an electrochemical synthesis of porous copolymers based on polythiophene (PTh) and polyparaphenylene (PPP) from an ionic liquid. On electrochemical copolymerization from ionic liquids, hierarchical porous structures could be directly obtained without any template-assisted techniques [13]. The HER on the electrodeposited porous polymer electrodes showed promising results in an alkaline medium. A significant improvement in the HER catalytic property was obtained on carbonizing the polymers.

Experimental section

1-Hexyl-3-methylimidazolium tris(pentafluoroethyl)trifluorophosphate (HMIMFAP) was purchased in the highest available quality from Merck (Germany) and was used after drying under vacuum at 100 °C to remove the water content to below 2 ppm. Benzene (99.8%) and thiophene (> 99%) were obtained from Sigma. A copper plate was used as the working electrode which was cleaned in a mixture of acetone and isopropanol in an ultrasonic bath prior to the experiments. Platinum wires were used as counter and quasi-reference electrodes (QRE) which were heated in a hydrogen flame to remove any surface impurities. The electrochemical cell was made of PTFE and clamped over a PTFE-covered Viton® O-ring onto the substrate, providing a geometric area of 0.3 cm2. The Teflon cell and the O-ring were cleaned in a mixture of 50:50 vol% of concentrated H2SO4 and H2O2 (35%) followed by refluxing in distilled water.

The electrochemical measurements were performed in an argon-filled glove box with water and oxygen contents of below 0.5 ppm (OMNI-LAB from Vacuum Atmospheres) by using a VersaStat II (Princeton Applied Research) potentiostat/galvanostat controlled by PowerSuite® software. The scan rate during cyclic voltammetry (CV) was set to 10 mV sec−1. For polymer deposition, CV was performed for 10 cycles between the open circuit potential and 2.3 V vs Pt on Cu from HMIMFAP-based solutions: 0.2 M thiophene (pure PTh), 0.15 M thiophene + 0.05 M benzene, 0.1 M thiophene + 0.1 M benzene, 0.05 M thiophene + 0.15 M benzene, and 0.2 M benzene (pure PPP).

For hydrogen evolution reaction, a three-electrode setup was used with the conducting polymer as the working electrode, saturated calomel electrode (SCE) as the reference electrode, and carbon as the counter electrode. The electrolyte was 1 M KOH. Prior to the experiments, the electrolyte was deaerated with N2 for 30 min. The polarization curves were recorded by applying a scan rate of 10 mV s−1. The effect of visible light on the HER was evaluated by illuminating the working electrode with a regular LED torch (Powerlite). The potentials were not iR compensated. The potentials were converted to a reversible hydrogen electrode (RHE) scale using E(RHE) = 0.241 + 0.059 × pH. For heat treatment, the polymers were put inside a tube furnace with continuous Ar flow and heated at 700 °C for 1 h. Ten percent of experiments did show some peeling off the heat-treated polymer from the copper substrate. However, most of the deposit showed good adhesion on copper. For scanning electron microscopy (SEM) (JEOL JSM7610F) and energy dispersive X-ray (EDX) analyses, the electrodes were cleaned with isopropanol overnight before the measurement.

X-ray photoelectron spectra (XPS) were obtained using an ultrahigh vacuum (UHV) apparatus with a base pressure below 1 × 10−10 hPa. The sample was irradiated using the Al Kα line (photon energy of 1486.6 eV) of a non-monochromatic X-ray source (Omicron DAR 400). Electrons emitted were detected by a hemispherical analyzer (Omicron EA125) under an angle of 45° normal to the surface with a resolution of 0.83 eV for detail spectra and 2.07 eV for survey spectra, respectively. All XPS spectra were displayed as a function of the binding energy with respect to the Fermi level.

Fourier transform infrared spectroscopy (VERTEX 70 V, Bruker Optics GmbH) with an attached attenuated total reflectance (ATR) module was used to characterize the polymer. The UV-visible spectra were measured using a Cary 1100 UV-Vis-IR spectrometer. Raman spectra were recorded by a Bruker Senterra Raman microscope using × 50 objective with a laser excitation of 532 nm.

Results and discussion

Figure 1 shows the cyclic voltammetry of the electropolymerization reaction of 0.2 M benzene, 0.2 M thiophene, and their mixtures in [HMIM]FAP on copper at room temperature. From Fig. 1a, a sharp rise in current is observed at 1.45 V in the first CV cycle which relates to the oxidative polymerization of thiophene. In subsequent cycles, two small oxidation peaks around 1 V and 1.5 V are seen followed by a rise in current from 1.9 V. The first two peaks have been ascribed to doping/ion movement of the polymer [17, 18] followed by further polymerization. The dedoping of the polymer is seen at 1.5 and 0.5 V [17].

Fig. 1
figure 1

CV of a 0.2 M thiophene in HMIMFAP, b 0.15 M thiophene + 0.05 M benzene in HMIMFAP, c 0.1 M thiophene + 0.1 M benzene in HMIMFAP, d 0.05 M thiophene + 0.15 M benzene in HMIMFAP, and e 0.2 M benzene in HMIMFAP

On addition of different concentrations of benzene to the electrolyte, changes in the CV are observed (Fig. 1b–d). The copolymerization process occurs at potentials above 1.0 V, and the doping/dedoping processes are not very prominent. Figure 1 e shows the polymerization of benzene on Cu which starts at 1.8 V. Subsequent cycles show that the polymerization process has additional oxidation peaks between 1.25 and 1.75 V which might be related to doping of PPP [17].

Figure 2a shows the low magnification SEM image of polythiophene electrodeposited on copper which shows the formation of nanoparticles over the entire substrate with a particle size of about 300 nm. On copolymerization with PPP with 3:1 ratio of thiophene to benzene in the electrolyte, a highly nanoporous/microporous structure with porosities between 100 nm and 2.5 μm is obtained (Fig. 2b, Fig. S1a). With 1:1 ratio of thiophene to benzene in the electrolyte, hierarchical porous polymer structures are observed with the presence of both nanopores and micropores ranging between 20 nm and 7 μm (Fig. 2c, Fig. S1b). On increasing the concentration of benzene in the electrolyte, polymer films with fewer pores are observed in Fig. 2d with a pore size of few micrometers (Fig. S1c), whereas polymer films with dents are observed on electrodeposited PPP (Fig. 2e). Thus, from the SEM results, it is evident that an optimum ratio of thiophene and benzene is needed to synthesize a hierarchical porous electrode which would create abundant catalytic sites for HER and minimize the hydrogen buildup.

Fig. 2
figure 2

SEM of electrodeposited a PTh, b PTh + PPP from 3:1 ratio of thiophene to benzene in [HMIM]FAP, c PTh + PPP from 1:1 ratio of thiophene to benzene in [HMIM]FAP, d PTh + PPP from 1:3 ratio of thiophene to benzene in [HMIM]FAP, and e PPP

X-ray photoelectron spectroscopy (XPS), FTIR, and UV-visible spectroscopy were performed to get an insight into the copolymerized deposit and to assess the semiconducting properties of the polymers. The high resolution XPS spectra of C 1s are shown in Fig. 3a from which four peaks can be deconvoluted. For polythiophene, the peak at 284.7 eV can be ascribed to C=C–C, whereas the shoulder at 286.6 eV is related to C=C–S [19]. Two shake-up satellite peaks are also observed at 289.6 and 292.8 eV which indicate π-π* transitions in PTh valence electrons [20]. The change in intensity and position of the shake-up structures has been related to the change in the electronic structure of the polymer [21]. On addition of PPP into polythiophene with a ratio of 1:3 (benzene and thiophene), a clear change in intensity of these shake-up peaks is observed in Fig. 3a, which can be related to the change in the energy of molecular orbitals in the copolymer. The shoulder at 286.6 eV observed for PTh almost forms a peak which is related to the change in the C=C–S, thereby confirming the formation of a copolymer.

Fig. 3
figure 3

a High resolution XPS of C 1s of different polymers. b XPS of S 2p of different polymers. c FTIR spectra of PPP and PPP:PTh copolymers. d Change in the C–H stretching in PPP and PPP:PTh copolymers. e UV-visible spectroscopy of different polymers and copolymers

With 1:1 of benzene to thiophene, the C=C–S is significantly reduced but reappears on further increase in PPP concentration. However, a clear shift in the C 1s peak and the shake-up structures is observed in PPP. The main C 1s peak for PPP is centered at 285 eV and is consistent with literature for C–C [22]. A shoulder at 287.2 eV is observed which could be assigned to C–O. The shake-up structures occur at 290 and 293.3 eV which clearly indicate that the energy levels of molecular orbitals are different in PPP compared with the copolymers. The S 2p high resolution spectra are shown in Fig. 3b. It was observed that not all copolymers showed the presence of sulfur and the intensity of sulfur was very low for the copolymers. The S 2p in PTh is composed of two well-separated components at 163.8 eV and 165 eV which correspond to spin-orbital splitting [20]. A change in the ratio of the intensities in the copolymer is a clear indication for the formation of other bonds. FTIR was used to understand the changes in the stretching modes which occur in the copolymer. In Fig. 3c, it is evident that changes in C–H stretching mode occur in PTh on copolymerization. Appearance of additional peaks between 1000 and 1200 cm−1 is also observed which confirms the formation of copolymers. The changes in C–H in plane, out of plane, and terminal stretching modes are shown in Fig. 3d. As we go from PTh towards PPP, a blue shift from 789 to 804 cm−1 occurs in C–H out of plane, whereas a red shift from 723 to 696 cm−1 occurs for C–H terminal bonds. Peak broadening and peak splitting are also observed in Fig. 3c for the out of plane C–H stretching which is a clear indication for the formation of copolymers. The UV-visible spectra of the conducting polymers are shown in Fig. 3e. Polythiophene shows an absorbance peak centered at 570 nm and a shoulder at 470 nm (black line, Fig. 3e), whereas PPP shows a wide absorbance band centered at 465 nm (green line, Fig. 3e). For both polymers compared with other synthesis routes [23,24,25], the electrochemical synthesis in ionic liquid shows much higher absorbance over a wide visible region. On copolymerizing PTh with PPP at 3:1 and 1:1 ratio of benzene to thiophene in the electrolyte (red and blue line, Fig. 3e), an increase in the absorbance and a red shift occurs from 570 to 593 nm. A blue shift is also seen from 470 to 400 nm. However, with 1:3 ratio of benzene to thiophene, a peak at 580 and a shoulder at 502 nm is observed. Thus, it is evident from the spectroscopic measurements that copolymerization has indeed occurred and the UV spectra show a wide absorbance of the copolymers in the visible range. These blue and red shifts indicate a change in the HOMO/LUMO levels in the copolymers compared with PPP and PTh.

Before testing the as-synthesized polymers/copolymers for hydrogen evolution reaction (HER) in 1 M KOH under dark and visible conditions, we investigated the contact angles of an alkaline solution on the polymers, as wettability affects the HER reaction [26, 27]. We first measured the contact angles of the synthesized polymers/copolymers. The wettability of the polymer in 1 M KOH is shown in Fig. 4a. PTh and PPP show a contact angle of 53 and 72°, respectively (Fig. 4b). Among the copolymers, the lowest contact angle was found for 1:1 PTh:PPP composition with a value of 22° (Fig. 4b). The change in wettability can be related to a change in polymer structure as evident from IR spectra as well as change in the porosity of the polymer as seen from SEM. As the wettability is highest for 1:1 composition, the hydrogen evolution can be expected at a lower overpotential. Figure 4c and d show the HER on different polymers in dark and under visible light, respectively. Under dark conditions (Fig. 4c), copolymers always had a lower overpotential compared with individual polymers, and an overpotential of 455 mV was required to obtain a current density of 10 mA cm−2 for both 1:1 PTh:PPP and 1:3 PTh:PPP copolymers. In comparison, the experiments performed under visible light showed much higher current densities at lower overpotentials for HER (Fig. 4d) which indicates that a light-induced charge transfer process might be taking place.

Fig. 4
figure 4

a, b Surface contact angle measurement for different polymers in 1 M KOH. c HER on different polymers under dark and d under visible light conditions in 1 M KOH at a scan rate of 10 mV sec−1

Interestingly, for a current density of 10 mA cm−2, a lowest overpotential of 417 mV vs RHE was observed under visible light for copolymers having 3:1 PTh:PPP composition which is comparatively lower with other polymeric materials mentioned in literature [28, 29]. The overpotential of both 1:1 and 1:3 PTh:PPP was found to be 427 mV to obtain a current density of 10 mA cm−2 (Fig. 4d). Therefore, a direct relationship between wettability at open circuit potential and electrocatalysis is not that simple, and one needs to look into electro-wettability and three-phase interface of the polymer, KOH and hydrogen production, and also the electronic structure of the catalysts. All polymers/copolymers except PPP obtained higher current densities at more or less similar overpotentials in the presence of light, whereas only 1:1 PTh:PPP and 1:3 PTh:PPP copolymers achieved 10 mA cm−2 under dark conditions.

Heat treatment of conducting polymers has shown to affect the conductivity as well as to change its structure [30, 31]. Upon heat treatment, a remarkable shift in the overpotential and current density was observed for all the polymers. The microstructure after heat treatment (Fig. S2) showed that all the polymers have an open network structure. The XPS of heat-treated samples showed certain changes in C 1s and S 2p (Fig. 5a and b) spectra. For PTh, 3:1 PTh:PPP and 1:1 PTh:PPP (Fig. 5a), the carbon peak at 284.7 eV (Fig. 5a) related to C=C–C does not change upon heat treatment, whereas the shoulder at 286.6 eV related to C=C–S drastically decreases compared to that observed in Fig. 3a. Furthermore, the shake-up structures which occurred at 290 and 293.3 eV have (Fig. 3a) disappeared. As these peaks are related with energy levels of molecular orbitals, it appears that carbonization of the polymers took place which resulted in the loss of semiconducting property of the polymer. However, the presence of sulfur in the heat-treated polymer (Fig. 5b) indicates that full carbonization of the polymer might not have taken place. For the case of PPP and 1:3 PTh:PPP, both the peaks at 284.7 eV and the shoulder at 286.6 eV are prominent. Also, a small satellite peak at 293 eV is observed which indicates that these polymers still retain their semiconducting property with a few changes in their electronic structure. It was reported that the carbonization of polythiophene at 700 °C has shown to improve the electrical conductivity [30], whereas heat treatment of PPP leads to a change in the structure from a benzenoid to a defect-quinoid structure [31].

Fig. 5
figure 5

a High resolution XPS of C 1 s of different polymers. b XPS of S 2p of different polymers after heat treatment at 700 °C for 1 h. c Contact angle measurement of heat-treated PPP and PPP:PTh copolymers with different ratios at 700 °C. d HER catalysis on different heat-treated polymers. e Tafel plots of heat-treated polymers

Therefore, from XPS measurements, it is clear that the orbital structure of the polymers is affected on heat treatment which improved the HER electrocatalytic property of the materials. The change in the polymer structure and the electronic structure is further substantiated by IR and UV spectra. From the IR spectra in Fig. S3a, both PPP and 1:3 PTh:PPP copolymers show only the C–H stretching modes, whereas these modes are completely lost for polythiophene and the other two copolymers with higher thiophene content. The Raman spectra of heat-treated polymers are compared in Fig. S3b. PTh shows the D and G bands at 1342 and 1573 cm−1, respectively, which correspond well to the formation of graphite/graphene mixture. However on increasing the PPP concentration (1:3 PTh:PPP), a clear shift in the G band to 1598 cm−1 and D band to 1331 cm−1 with an additional shoulder at 1236 cm−1 occur which are related to the defect-quinoid structure of PPP [31]. Furthermore, the heat-treated PPP clearly shows the defect-quinoid structure of PPP and does not correspond to the formation of graphite. The changes in the stretching modes along with the formation of defects affect the electronic structure of the polymers which were observed by the changes in the UV-visible spectra (Fig. S3c). A lowering of absorption along with the blue shift in the absorption from 590 to 560 nm and 400 to 300 nm intensity is observed for all the polymers. Such shifts clearly represent a change in the electronic band structure of the partially carbonized polymers.

Heat treatment also resulted in a change in wetting behavior. Figure 5c shows the wetting behavior of 1 M KOH after heat treatment. From the contact angle measurements of the heat-treated polymers, besides PPP, all other polymers show a contact angle below 30° with a complete wetting for 1:1 PTh:PPP. The HER plots in Fig. 5d show a remarkable shift in the catalytic performance. The as-prepared PPP which could not achieve a high current density before heat treatment showed a remarkable HER activity by achieving a current density of 10 mA cm−2 at quite a low overpotential of 105 mV upon heat treatment. Both PTh and PTh:PPP 1:3 also showed a significant HER performance which commenced at around 35 mV and achieved a current density of 10 mA cm−2 at 110 and 85 mV overpotential, respectively. An unprecedented low overpotential of just 77 mV was required to achieve a current density of 10 mA cm−2 for both 1:1 PTh:PPP and 3:1 PTh:PPP copolymers (Fig. 5d). Repeated experiments showed that the HER overpotential values for both the polymers were in the range of ~ 75–90 mV to obtain a current density of 10 mA cm−2 which might be due to the difference in the polymer structure and porosity in the polymer. Table 1 compares the HER of the heat-treated polymer with metal-free catalyst and carbon-based catalyst. It is evident that the results obtained in this work show the lowest overpotential to reach a current density of 10 mA cm−2.

Table 1 Comparison of HER performance on different metal-free catalysts in 1 M KOH

The HER values are slightly higher than Pt which shows an overpotential of 37 mV to achieve a current density of 10 mA cm−2. Furthermore, compared with precious noble metal nanoparticles and their carbon composites [37], the overpotential achieved by the porous polymer is higher by about 50–70 mV.

The Tafel plots for HER for different polymers are plotted in Fig. 5e using the Tafel equation as shown in Eq. 1.

$$ \eta =a+b\cdotp \log \mid j\mid . $$
(1)

In Eq. 1, η is the overpotential which is the difference between the electrode and standard electrode potential (η = E-Eo), j denotes the current density, and b is the Tafel slope. All the polymers showed a Tafel slope between 150 and 205 mV dec−1. Based on the Tafel-Volmer-Heyrovsky mechanism for HER in alkaline medium, the rate determining step for HER is the Volmer and Tafel steps which is related with the hydrogen adsorption and hydrogen reduction, respectively. In the case of the polymers, it is evident that the Tafel slopes are higher than 120 mV dec−1 which indicates that electrochemical formation of adsorbed hydrogen atoms is the limiting step and controls the kinetics of catalysis [38,39,40]. With suitable modification by incorporating metal nanoparticles, it might be possible to lower the Tafel slope values and increase the rate of hydrogen evolution at the electrode surface. HER experiments were also performed on 1:1 PTh:PPP copolymer over time at 90 mV overpotential vs RHE (Fig. S4a) which showed an initial increased current density of greater than 15 mA cm−2 for the first 5 h and stabilized at a current density of 10 mA cm−2 for 30 h. The disturbance in the current density measurement was due to the hydrogen evolution at the porous electrode surface. After 30 h electrolysis, the HER performance of the polymer was again tested which showed almost the same performance as before electrolysis (Fig. S4b). Thus, based on the presented results, it appears that heat treatment of polymers not only changes the electronic structure but also improves the conductivity, porosity, and the wetting behavior of the polymers, all of which contributes to enhance the catalytic properties of polymers and lower the HER overpotentials significantly.

Conclusion

In conclusion, we have shown a simple electrochemical strategy to obtain porous conducting polymers which show a high catalytic property for HER. The copolymerization leads to a change in the electronic structure and improves the absorption of light. In the presence of visible light, the lowest overpotential of 427 mV is required to obtain 10 mA cm−2 for 3:1 PTh:PPP. Heat treatment remarkably lowers the HER on all the polymers. The lowest overpotential of only 77 mV was required to achieve a current density of 10 mA cm−2 for both 1:1 PTh:PPP and 3:1 PTh:PPP copolymers. The polymers were also shown to be stable for hydrogen production over long time with little deterioration in HER performance. Thus, here, we have shown a simple approach to obtain highly porous polymeric materials with tunable absorbance and high electrocatalytic activity which paves new avenues for exploring these metal-free electrodes for other energy conversion applications.