Introduction

The important characteristics of an ideal energy system include efficiency; renewable and economical manufacturing, storage and consumption; and especially eco-friendliness [1]. As one of the major potential focuses for new energy sources, hydrogen energy has grabbed enormous interest with its rapid development in the last few decades [2]. In this field, non-petroleum-based hydrogen productions, such as hydrogen generation through electrocatalytic water-splitting, is “green” and “carbon free,” which has been known to be the future of the world’s clean energy [3].

The most stable compound product of hydrogen and oxygen reaction is water (H2O). The energy consumption of its reverse reaction is huge and needs the help of a catalyst. Various electrocatalytic materials have been designed to replace the efficient but expensive Pt-based catalysts to split water. Among them, transition metal phosphides (TMPs, MxPy, M = Ni, Co, W, Cr, and Mo) have been regarded as the prospective alternative electrocatalysts. Both theoretic calculations [4] and experimental results have proved that TMPs perform activity well in electrochemical hydrogen evolution reaction (HER) due to their suitable electronic structure. For instance, Yang et al. [5] reported a composite catalyst loaded with cobalt phosphide nanoparticles for efficient HER with overpotential of 167 mV at 20 mA cm−2 in 1.0 M KOH and a small Tafel slope value of 59 mV dec−1. Wang et al. [6] monitored the in situ growing process of CoP porous hexagonal nanoplates on reduced graphene oxide (RGO) and used the composite to achieve long-term durability (86.3% current density retention after 10 h) for HER. Yang et al. [7] used nickel foam as collector and supported material for the growth of Mo-Ni2P@NiFe-layered double hydroxide as the catalyst for HER. Recently, Weng et al. [8] reviewed and emphasized that P atoms in TMPs played a crucial role in HER by affecting the electronic conductivity and reactivity. All of these reports reveal that TMPs have excellent prospects for developing low-cost and high-efficiency HER catalysts, and might pave the way for large-scale applications.

As mentioned above, most current studies are carried out in alkaline electrolyte-based freshwater [9]. Indeed, direct electrochemical splitting of seawater is more economical for practical applications, because 97% of the water on the earth is seawater (salt water). Until now, the literature and industrial applications of hydrogen production by directly electrolyzing seawater are relatively few, and the reported HER efficiency is not very encouraging. Yu et al. [10] presented a NiMoN@NiFeN catalyst with overpotentials of 84 mV and 307 mV (current densities of 100 mA cm−2) in alkaline freshwater and alkaline seawater for HER, respectively. A similar situation was revealed in Yang’s report [11], in which η10 (the overpotential for driving a current of 10 mA cm−2) increased from 77 mV in 1 M KOH to 400 mV in simulated seawater. It is supposed that the corrosion of the metal electrode caused by halogen ions (Cl and Br) and covered by precipitates which originated from Ca2+ and Mg2+ are mostly responsible for the reduction of activity of the electrocatalyst in seawater [12, 13]. To overcome these difficulties, researchers tried to not only select appropriate catalytic active components but also combine them with the appropriate carrier materials. The carriers with a porous structure, large specific surface area, and high stability are essential to construct an outstanding electrochemical catalyst. For example, Ni5P4 loaded on carbon cloth [14] or Ni2P-Fe2P on nickel foam [15] has been investigated for HER in seawater.

Herein, we propose a strategy to fabricate phosphorus-rich cobalt/nickel materials supported on N-doped porous carbons (NPC) by employing uniform and stable metal-containing resin as a precursor via high-temperature carbonization followed by phosphating. It is further applied as the active catalyst for HER in alkaline freshwater (1.0 M KOH), alkaline seawater, and neutral seawater (natural seawater), respectively. The results demonstrated that the synergistic effects of the phosphating process and the NPC matrix improved the HER performance of the as-synthesized catalyst. Since the precursor is synthesized in homogeneous polymer solution, the element doping (such as N-doping) can be easily realized by selecting the appropriate polymer system. Therefore, this work may provide a low-cost and high-efficient way to prepare multicomponent electrocatalyst in large scales.

Experimental

Chemicals

The chemicals include cobalt nitrate hexahydrate (Co(NO3)2∙6H2O), nickel nitrate hexahydrate (Ni(NO3)2∙6H2O), melamine (C3N3(NH2)3), formaldehyde (HCHO), red phosphorous (P), and potassium hydroxide (KOH) were of analytical grade and purchased from Aladdin Reagent Inc. (Shanghai, China).  20 wt.% Pt/C power was obtained from Macklin Biochemical Co., Ltd. (Shanghai, China). The aqueous solutions were prepared by ultra-pure water (Milli-Q IQ 7000, Merck Millipore, Germany). Natural seawater was obtained from the South Sea of China (Haikou City, Hainan Province, China) with pH 7.85, which is close to neutral and used for electrochemical tests after simple filtration.

Synthesis of Co/Ni-containing melamine formaldehyde resin

The Co/Ni-containing melamine–formaldehyde (MF) resin was synthesized by a conventional reported method with some modifications [16]. Firstly, 0.5 g melamine and 1.5 mL formaldehyde were mixed in a plastic test tube and immersed in a water bath at 80 °C for 10 min with shaking several times until a clear prepolymer liquid was obtained. Secondly, 4.2 mmol Co(NO3)2∙6H2O or 4.2 mmol Ni(NO3)2∙6H2O or Co(NO3)2∙6H2O/Ni(NO3)2∙6H2O mixed powder (total amount of n(Co) + n(Ni) = 4.2 mmol with n(Co)/n(Ni) = 1:1) was poured into the prepolymer liquid with shocking to dissolution and then sat quietly in the water bath again. The metal salt-containing solution will be polymerized to form solid polymer in 5 min to obtain a metal-containing MF resin precursor, which was named as Co-MF, Ni-MF, or Co/Ni-MF, respectively. Pure MF resin was prepared by a similar method without the addition of Co or Ni salts (0.05 g NaN3 was added as polymerization initiator) for comparison.

Preparation of NPC-supported Co/Ni

NPC-supported Co/Ni (denoted as Co/Ni-NPC, Co-NPC, and Ni-NPC) was prepared by calcining Co/Ni-MF, Co-MF and Ni-MF in N2 atmosphere at 850 °C for 2 h (heating rate 5 °C/min). The solid products were cooled naturally to room temperature in protective gas atmosphere. NPC was synthesized by the same method from pure MF resin and used as a blank sample.

Preparation of NPC-supported CoP/NiP

Co/Ni-NPC was reacted with gaseous phosphorus to obtain NPC-supported CoxPy/NixPy (CoxPy/NixPy-NPC) according to the reported procedure [5]. Briefly, a quartz boat loaded with 1.5 g P powder was placed upstream and another boat loaded with 0.5 g Co/Ni-NPC was placed downstream in a tubular quartz furnace of the Ar gas flow (gas flow rate: 10 mL/min at 25 °C, absolute pressure ~ 115 kPa). The phosphating temperature was 500 °C for 1 h (heating rate: 5 °C/min), then the temperature decreased to 320 °C and kept 2 h. After cooling, the products were taken out and washed twice with ultra-pure water and ethanol, respectively, and then dried under vacuum at 65 °C. Similarly, CoP-NPC and NiP-NPC were prepared under the same conditions for phosphating.

Material characterizations

Powder X-ray diffraction (XRD) patterns were obtained on a DX-2500 diffractometer (Dandong Fangyuan Instruments Ltd., China) with a Cu Kα radiation. The X-ray photoelectron spectroscopy (XPS) test was operated on an ESCALAB 250Xi spectrometer (Thermo Scientific, USA) with a monochromated Al Kα X-ray radiation source to investigate the chemical states and main elements on the surface. Scanning electron microscope (SEM)/energy-dispersive X-ray spectroscopy (EDS) images were recorded on JSM-6700F scanning electron microscopy (Japan Electron Company, Japan). Fourier transform infrared (FTIR) spectra were recorded using Nicolet IR-200 (Thermo-Nicolet, USA). The N2 adsorption–desorption isotherm curve was obtained on a Builder SSA-7000 surface area pore size analyzer (Beijing Builder Electronic Technology Co., Ltd., China). Then, surface area was calculated by the Brunauer–Emmett–Teller (BET) method and the pore size distribution was obtained by the Barrett–Joyner–Halenda (BJH) model.

Electrochemical measurements

Electrochemical tests including cyclic voltammetry (CV) and linear sweep voltammetry (LSV) were recorded by the CHI 660E electrochemical workstation (Shanghai, CH Instruments, China). The conventional three-electrode system was used with the as-synthesized catalyst-modified electrode, saturated calomel electrode (SCE, saturated KCl), and carbon rod electrode as working electrode, reference electrode, and counter electrode, respectively. The working electrode was prepared by the following procedure: (1) 5.0 mg catalyst powder was dispersed in 1000 μL Nafion solution (0.1 wt.%, ethanol as solvent) by ultrasonic for 20 min to obtain suspension, (2) glassy carbon electrode (GCE, Φ = 3 mm) was polished with 0.05 μm of alumina/water slurries on felt pads followed by rinsing with water and acetone for using, and (3) 10 μL of the catalyst suspension was dropped on GCE and dried in the air. The SCE potential was converted to RHE potential using the following formula [17]: E(RHE) = E(SCE) + E0(SCE) + 0.059pH = E(SCE) + 0.245 + 0.059pH (V, 25 °C) or E(RHE) = E(SCE) + 1.068 (V, 1.0 M KOH, 25 °C). Current density was normalized by catalyst weight (mA mg−1). The Tafel curves were obtained by LSV at a scan rate of 5 mV s−1 with the stability test carried out by potentiostatic electrolysis (recording it curve).

Results and discussion

Principle

The preparation procedure of CoxPy/NixPy-NPC is illustrated in Scheme 1, which includes three steps. Firstly, the prepolymer of the precursor is prepared by the homogeneous dissolution of inorganic metal salts in the organic system, which is realized by selecting a suitable polymer system and reaction conditions. Stable composite polymers (Co/Ni-containing MF resin) can be easily synthesized under mild conditions (80 °C) in the water bath. Secondly, after calcination in N2 atmosphere at 850 °C for 2 h, the MF resin is transformed into carbon with a porous structure, many N elements are in situ doped in the carbon materials, and the metal salts including Co(NO3)2 and Ni(NO3)2 (or its hydrate) in the polymer are decomposed into metallic oxide in the nitrogen atmosphere (Eqs. 15), which is subsequently reduced by MF resin pyrolysis gas (containing carbon monoxide [18]) (Eqs. 68) into metals to obtain Co/Ni-NPC, Co-NPC, and Ni-NPC (proved by XRD in Fig. 2). With the help of homogeneous dispersion of metal salt in the prepolymer, the metal can be dispersed well on the NPC. Thirdly, metal phosphide is formed by a gas–solid reaction between Ni/Co and phosphorus vapor. The whole preparation process, which involves the well-distributed sample and solvent-free, has advantages of fast synthesis and ease to be scaled up. The reaction equations can be expressed as follows:

Scheme 1
scheme 1

The preparation procedure of CoxPy/NixPy-NPC

Thermal decomposition of nitrate [19, 20]:

$${2\mathrm{Ni}\left({\mathrm{NO}}_3\right)}_2\cdot6{\mathrm H}_2\mathrm O\rightarrow{\mathrm{Ni}}_2{\mathrm O}_3+2{\mathrm{HNO}}_3+2{\mathrm{NO}}_2+11{\mathrm H}_2\mathrm O$$
(1)
$$6{\mathrm{Ni}}_{2}{\mathrm{O}}_{3} \to 4{\mathrm{Ni}}_{3}{\mathrm{O}}_{4}+{\mathrm{O}}_{2}$$
(2)
$$2{\mathrm{Ni}}_{3}{\mathrm{O}}_{4} \to 6\mathrm{NiO}+{\mathrm{O}}_{2}$$
(3)
$${2\mathrm{Co}\left({\mathrm{NO}}_3\right)}_2\cdot6{\mathrm H}_2\mathrm O\rightarrow2{\mathrm{Co}}_2{\mathrm O}_3+{\mathrm N}_2{\mathrm O}_4+{\mathrm N}_2{\mathrm O}_5+12{\mathrm H}_2\mathrm O$$
(4)
$${3\mathrm{Co}\left({\mathrm{NO}}_3\right)}_2\cdot6{\mathrm H}_2\mathrm O\rightarrow{\mathrm{Co}}_3{\mathrm O}_4+{\mathrm N}_2{\mathrm O}_4+{2\mathrm N}_2{\mathrm O}_5+18{\mathrm H}_2\mathrm O$$
(5)

Reduction reaction:

$$\mathrm{NiO }+\mathrm{CO }\to \mathrm{Ni}+{\mathrm{CO}}_{2}$$
(6)
$${\mathrm{Co}}_{2}{\mathrm{O}}_{3} +3\mathrm{CO }\to 2\mathrm{Co}+{3\mathrm{CO}}_{2}$$
(7)
$${\mathrm{Co}}_{3}{\mathrm{O}}_{4} +4\mathrm{CO }\to 3\mathrm{Co}+{4\mathrm{CO}}_{2}$$
(8)

Phosphating reaction:

$$\mathrm{Ni}+\mathrm{P }\to \mathrm{ NiP}$$
(9)
$$\mathrm{Co}+\mathrm{P }\to \mathrm{ CoP}$$
(10)

Material characterizations

Figure 1a shows the SEM image of NPC, which presents a shredded paper-like and irregular layered solid structure with several micrometer widths. After being combined with CoxPy/NixPy, CoP, or NiP particles, the carbon materials shrink and coat on particles (Fig. 1b–e). However, a significant disparate surface morphology derived from different metals could be observed. CoP-NPC is spherical (Fig. 1b), and NiP-NPC (Fig. 1c) is porous. CoxPy/NixPy-NPC shows irregular particles that are embedded in carbon (Fig. 1d and e). The existence of Co, Ni, P, N, and C elements on the surface of CoxPy/NixPy-NPC with uniform distribution has been proved by the qualitative research from EDS mapping (Fig. 1f). SEM and EDS results demonstrate that the composite with a uniform microstructure can be obtained by carbonizing the polymer precursor containing metal salts directly, and phosphating is successfully performed.

Fig. 1
figure 1

SEM images of a NPC, b CoP-NPC, c NiP-NPC, d, e CoxPy/NixPy-NPC with different magnifications, and f EDS mapping of CoxPy/NixPy-NPC (the background of the sample is conductive adhesive)

Figure 2 displays the XRD patterns of various samples. Before phosphorization (Co-NPC, Ni-NPC, and Co/Ni-NPC), metal elements (Co or Ni, corresponding Co phase JCPDS No. 15–0806 or Ni phase JCPDS No. 04–0850) could be found. After phosphorization, the Co or Ni phase disappeared and phosphide phases (CoP, NiP2, and/or CoNiP etc.) with different proportions of Co/Ni to P were formed, which could be proved by the new peaks corresponding with the standard cards (CoP phase JCPDS No. 29–0497, NiP2 phase JCPDS No. 21–0590, Ni5P4 phase JCPDS No. 18–0883, NiCoP phase JCPDS No. 71–2336, and CoP2 phase JCPDS No. 77–0263). The transformation of the crystal phase in the preparation process was clearly confirmed by XRD, which further implied that Ni could coordinate with more P atoms than Co to form NiP2 and Ni5P4. According to references [21, 22], the increase in phosphorus content is helpful in improving the catalytic activity of HER.

Fig. 2
figure 2

XRD patterns of a Co-NPC, b CoP-NPC, c Ni-NPC, d NiP-NPC, e Co/Ni-NPC, and f CoxPy/NixPy-NPC with corresponding standard cards

The results of XPS measurement (Fig. 3a) reveal the existence of Co, Ni, P, and C elements in the sample. For CoxPy/NixPy-NPC and CoP-NPC, the high-resolution Co 2p spectra (Fig. 3b) exhibit two peak groups corresponding to Co 2p3/2 and Co 2p1/2, respectively. In CoxPy/NixPy-NPC, the peaks at 778.71 eV and 792.11 eV can be ascribed to the phosphide (Co-P) with other peaks that originated from the oxidized Co species (at 782.02 eV and 798.18 eV) and satellite peaks. Compared with those of CoP-NPC, the peaks of Co-P in CoxPy/NixPy-NPC move slightly to the lower binding energy direction, indicating strong electron interactions after heterometallic doping, which is conducive to the improvement of its activity [23]. Similar two-peak groups are also observed in the Ni 2p spectra of CoxPy/NixPy-NPC samples (Fig. 3c), which include the peaks at 853.91 eV and 868.13 eV assigned to Ni–P. Compared with single metal phosphide NiP-NPC, its position also shifted slightly negatively. The P 2p region (Fig. 3d) shows two peaks at 134.11 eV and 130.50 eV, which are assigned to the binding energies of P 2p3/2 and P 2p1/2 in phosphide, and another peak at 129.73 eV can be attributed to oxidized phosphate species. In Fig. 3e, the distinguished peaks of N 1 s at 399.00 eV, 400.73 eV, and 401.71 eV are attributable to pyrrolic nitrogen, quaternary nitrogen, and pyridine-N-oxide, respectively [24]. Finally, the existence of a strong peak of O 1 s and the oxidized Co, oxidized Ni, and oxidized P species (in Fig. 3a, b and d) implied that the catalyst surface is highly oxidized. The oxygen element mainly comes from the oxygen in the organic precursor, which is partially retained in the carbonization process and can also be confirmed by FT-IR results. Another reason may be due to the contamination of the fresh catalyst with oxygen when exposed to ambient conditions [25]. However, it has been proved that the oxygen layer on the surface of the cobalt phosphide catalyst can be reduced even in alkaline solution under electroreduction conditions in the HER process [26]. Therefore, the appearance of surface oxide species on the catalyst will not influence the catalytic performance.

Fig. 3
figure 3

XPS of a CoxPy/NixPy-NPC survey spectra and high-resolution XPS spectra for b Co 2p of CoxPy/NixPy-NPC and CoP-NPC, c Ni 2p of CoxPy/NixPy-NPC and NiP-NPC, d P 2p of CoxPy/NixPy-NPC, e N 1 s of CoxPy/NixPy-NPC, f FT-IR spectra of CoxPy/NixPy-NPC, g N2 adsorption–desorption isotherms of CoxPy/NixPy-NPC and Pt/C, and h pore size distribution of CoxPy/NixPy-NPC

The information of the chemical group and N-dopant in the carbon carrier can be further proved by FT-IR, and Fig. 3f displays the FT-IR spectroscopy of CoxPy/NixPy-NPC. The absorption bands at 3419 cm−1 and 1637 cm−1 are attributed to the stretching and deformation modes of the OH group that originated from the physically adsorbed water. The weak peak at 2923 cm−1 reveals that the sample contains little C–H bonding. Stretching of oxygen atoms bonded to carbon in various functional groups generates intense overlapping bands in the region between 1000 and 1300 cm−1, including the peaks located at 1130 cm−1 and 1039 cm−1, which can be caused by the use of formaldehyde as a precursor. The peak around 1256 cm−1 can be assigned to the C–N stretching vibration [27]. The spectrum also reveals the peaks originated from carbon materials, including the stretching vibration of the –C = C bond located at 1557 cm−1 and the graphitic sp2 domains located at 780 cm−1 [28].

The N2 adsorption–desorption isotherm curves of CoxPy/NixPy-NPC and Pt/C were tested and analyzed. Figure 3g displays a combined curve between type I and type IV species curve characteristics of porous adsorbents. According to the BET model, the calculated specific surface areas of CoxPy/NixPy-NPC and Pt/C are 704 m2 g−1 and 1476 m2 g−1, respectively. As shown in the pore size distribution curve (Fig. 3h), CoxPy/NixPy-NPC has an obvious proportion of 3 ~ 4 nm pores with distribution of some mesopores based on the BJH model, which is similar to the properties of carbonized resin materials reported in literature [29].

Electrochemical performances

The HER activity was firstly measured by LSV in 1.0 M KOH using CoP-NPC, NiP-NPC, CoxPy/NixPy-NPC, and Pt/C electrodes at the scan rate of 5 mV s−1 with the curves shown in Fig. 4a. Under the test conditions, the onset overpotential of CoxPy/NixPy-NPC is about 93 mV with an η10 value of 126 mV, which is 83 mV higher than that of 20 wt.% Pt/C. Meanwhile, CoP-NPC and NiP-NPC demonstrate relatively higher η10 at 141 mV and 157 mV, respectively. Therefore, CoxPy/NixPy-NPC displays better activity for HER than CoP-NPC and NiP-NPC. As an important electrochemical parameter dependent on the catalytic mechanism, the Tafel slopes of CoxPy/NixPy-NPC, CoP-NPC, and NiP-NPC are 84 mV dec−1, 63 mV dec−1, and 78 mV dec−1, respectively (Fig. 4b). According to the kinetic theory of the electrode processes for HER, a higher slope value means that HER is more likely progressed by the Volmer (H2O + M + e ⇌ MHads + OH)–Heyrovsky (MHads + H2O + e ⇌ M + OH + H2) step (theoretical value 118.3 mV dec−1 when α = 0.5).

Fig. 4
figure 4

Electrochemical results. a LSV curves of CoP-NPC, NiP-NPC, CoxPy/NixPy-NPC, compared with Pt/C, NPC, and GCE in 1.0 M KOH. b Tafel plots. c LSV curves before and after stability test in alkaline solution and time-dependent current density curve of CoxPy/NixPy-NPC at initial current density of 15.3 mA mg−1 for 10 h (insert)

Furthermore, the stability of the CoxPy/NixPy-NPC catalyst in the alkaline electrolyte is evaluated under constant voltage with the initial current density of 15.3 mA mg−1, and the results are shown in Fig. 4c. The current density decreased by 5.0% after 10 h of stability test (inset in Fig. 4c) with η10 shifting by 20 mV to the negative direction. Therefore, CoxPy/NixPy-NPC has relative excellent stability in a long-term HER process and has good prospects for further development.

The theoretical study, especially abundant research results from computational chemistry of TMPs, shows that the catalytic activity of HER is due to the stronger electronegativity of P atoms [30]. Furthermore, there are many reports about density-functional theory (DFT) calculation for CoP, NiP, and CoNiP catalysts and these results can explain the origin of the activity, especially the better performance of the CoNiP catalyst in detail. By analyzing the calculated Gibbs free energy of the hydrogen adsorption (ΔGH) value of NiCoP(111) (0.01 eV), NiCoP(100) (0.05 eV), CoP(001) (− 0.16 eV), and NiP(100) (0.44 eV) at 1 atm H2 and 298 K which was provided by Mou et al. [31], it revealed that among the above materials, NiCoP is the most efficient HER material with a ΔGH value close to zero. Liu et al.’s report also provides a similar conclusion that the ΔGH value on NiCoP(001) (− 0.23 eV) is close to zero than that of CoP(011) (− 0.75 eV) [32]. Thus, all the test data and analyses give a clear conclusion that the activity of Co–Ni bimetallic phosphide is better than that of single metal phosphide.

As the most common carrier form of hydrogen on the Earth’s surface, seawater is the most potential source for producing hydrogen. The catalytic performances of these materials were further executed in natural seawater (South Sea of China, Haikou City, China, pH = 7.85). However, since neutral seawater is a non-buffered medium, and the pH near the electrode surface will change during the HER process, which can cause zero drift in RHE, the polarization curves in seawater with 1.0 M KOH as a pH-controlled system (alkaline seawater) were first tested and are shown in Fig. 5a.

Fig. 5
figure 5

Electrochemical results. a LSV curves and b Tafel plots of CoP-NPC, NiP-NPC, CoxPy/NixPy-NPC, and Pt/C electrode in 1.0 M KOH + seawater. c LSV curves of CoP-NPC, NiP-NPC, CoxPy/NixPy-NPC, and Pt/C electrode in natural seawater. d LSV curves before and after test in seawater electrolyte and time-dependent current density curve of CoxPy/NixPy-NPC under initial current density of 35.3 mA mg−1 for 6 h (insert). e XRD patterns of CoxPy/NixPy-NPC before and after stability test

The onset overpotential of Pt/C is about 3 mV and η10 value as 66 mV, which is bigger than the η10 value of 43 mV in 1.0 M KOH, suggesting the lower electrocatalytic activity in alkaline seawater. Similarly, the increase of η10 was also observed for other materials (η10 value of CoxPy/NixPy-NPC, CoP-NPC, and NiP-NPC are 203 mV, 242 mV, and 311 mV, respectively). These phenomena are usually attributed to the influence of chloride ions and electrode corrosion [33]. The calculated Tafel slopes of HER of all catalysts in alkaline seawater are larger than that of 1.0 M KOH (Fig. 5b, 135 mV dec−1 for CoxPy/NixPy-NPC, 123 mV dec−1 for CoP-NPC, 109 mV dec−1 for NiP-NPC, and 90 mV dec−1 for Pt/C), implying that the rising rate of the current decreased but the HER mechanism in alkaline seawater was also probably controlled by the Volmer (H2O + M + e ⇌ MHads + OH)–Heyrovsky (MHads + H2O + e ⇌ M + OH + H2) mechanism. The Tafel slope of CoP-NPC exhibits deviations from the theoretical value, which may be due to the smaller charge transfer coefficient (α < 0.5) [34]. Considering these above discussions, the resistance of HER in alkaline seawater is obviously higher than that in 1.0 M KOH.

Next, the HER process of different materials in natural seawater was investigated and polarization curves are shown in Fig. 5c under the potential coordinate system of relative reference electrode (vs. SCE). The potential that are required to drive the current density to 10 mA mg−1 (marked as φ10) for CoxPy/NixPy-NPC, CoP-NPC, NiP-NPC, and Pt/C have values of − 1.157 V, − 1.218 V, − 1.359 V, and − 1.047 V (vs. SCE), respectively. Compared with Pt/C, CoxPy/NixPy-NPC shows the minimum potential difference Δφ10 (calculated by Δφ10 = φ10(Pt/C) − φ10(CoxPy/NixPy-NPC)). Due to the diversity of the salt concentration, the pH and substance in natural seawater across all regions of the earth, even Pt/C, which is considered as the “gold standard” of minimum overpotential, are considerably diverse in various literatures. Thus, it is better to use Δφ10 based on φ10(Pt/C) to estimate the performance of HER for test material in the seawater electrolyte. Therefore, the Δφ10 value (110 mV) of CoxPy/NixPy-NPC is superior or close to other reported values using phosphide metal in seawater, such as CoP/NiCoP nanotadpole heterojunction (Δφ10 = 105 mV) [35], Fe–Co2P bundle of nanorods (Δφ10 = 214 mV) [36], and porous CoP/Co2P (Δφ10 = 110 mV) [37].

Furthermore, the long-term electrolytic stability of CoxPy/NixPy-NPC in seawater was tested by a potentiostatic method at − 1.31 V (vs. SCE) with the initial current density of 35.3 mA mg−1. As shown in the inset of Fig. 5d, the current density-time curve (j-time) of CoxPy/NixPy-NPC consists of an induction period (about 0.8 h) with a rapid decrease followed by a subsequent stability period. In the stability period, the current decay rate is less than 0.3% per hour. After the test, the LSV curve shifts to the negative direction slightly, which indicates that there is a short stable process in the process of HER in the seawater electrolyte (Fig. 5d), and the electrocatalytic activity can be kept stable for a long time. To investigate the reason for the decrease in catalytic activity, the XRD pattern of CoxPy/NixPy-NPC was obtained after the stability test followed by additional 72 h of immersion in seawater with results shown in Fig. 5e. The main active components of the phosphide crystal phase (CoP2 and NiCoP) also exist. There is a weak new peak in the sample, which may belong to cobalt phosphate or nickel phosphate, implying that the reduction in catalytic performance is caused by the change of some active components.

Conclusions

In summary, binary metal phosphide electrocatalysts (CoxPy/NixPy-NPC) have been synthesized by a homogeneous polymerization–carbonization–phosphating method. CoxPy/NixPy-NPC demonstrates excellent electrocatalytic performance for HER in 1.0 M KOH with an η10 of 126 mV and a Tafel slope of 84 mV dec−1, better than that of single metal phosphide. The catalytic activity of CoxPy/NixPy-NPC for HER in natural seawater was further checked with the results comparable or better than some similar reported materials. Additionally, the electrode can work well in natural seawater with low attenuation. Therefore, the material obtained by this homogeneous polymerization has good uniformity and can be adjusted with ease in precursor composition, making it possible to be used in the large-scale preparation process.