Introduction

Environmental problems are becoming more and more serious due to the continuous consumption of fossil energy sources. One potential approach is to replace fossil fuels with sustainable and clean energy sources [1,2,3]. Devices that convert and store energy using electrochemistry are effective, dependable, and eco-friendly (such as metal-air batteries, fuel cells, water splitting, and solar fuel synthesis) [4], and they have grown to play a significant role in modern energy systems [5, 6]. Oxygen reduction reaction (ORR) and oxygen evolution reaction (OER) are the key electrode reaction processes of these new energy systems [7,8,9]. However, due to kinetic retardation in both the ORR and OER processes [10], electrocatalysts are essential to catalyze the ORR/OER reaction pathway [11, 12]. Currently, non-precious metals and their oxides, such as platinum (Pt), iridium oxide (IrO2) and ruthenium oxide (RuO2), have been shown to be the best electrocatalysts for ORR/OER. Unfortunately, the high cost and scarcity of resources of these precious metals, as well as poor multifunctional catalytic properties, have greatly limited their commercialization process [13,14,15]. Therefore, over the past years, intense investigations have been devoted to explore low-cost and efficient ORR/OER electrocatalyst based non-precious metals [16]. Among them, nitrogen-coordinated transition metal alloys (M–N-C, M = transition metal alloys such as NiCo [8], FeCo [10], and NiFe [17]) supported on carbon carriers are considered a promising candidate for enhancing OER/ORR activity. The design of M–N-C materials relies on atomically dispersed M-Nx sites and excellent carbon structure, and the rational carbon structure is favorable for the exposure of active sites and enhancement of mass transfer to improve the ORR/OER performance. Among them, CoNi alloys not only provide a rich variety of valence changes, but also induce change in surface properties and intrinsic polarity during oxygen reactions. The combination of bimetallic CoNi alloys and N-doped carbon promotes OER and ORR reaction kinetics. For example, Chen et al. [8] synthesized CoNi alloy nanoparticles on carbon nanofibers with unique pomegranate-like morphology and microstructure, which exhibited excellent OER and ORR electrocatalytic activities. Singh et al. [18] developed NiCo alloys supported by porous graphene and exhibited excellent OER activity. However, agglomeration of the alloy nanoparticles and direct exposure to the electrolyte inevitably lead to a decrease in catalytic activity and stability. In addition, the alloy nanoparticles tend to leach from the surface of the carbon matrix due to oxidative degradation of carbon. Therefore, encapsulation of CoNi nanoparticles into N-doped carbon layers to form a porous carbon sphere structure is a potential strategy to improve the catalytic performance, in which the highly conductive N-doped carbon layer has a protective shell against agglomeration and oxidation/corrosion of the alloy nanoparticles under harsh operating conditions [19]. More importantly, the strong interaction between the metal active center and the N-doped carbon layer effectively modulates the electronic structure of the outer carbon layer while improving the reaction kinetics [20]. The porous carbon nanospheres structure prevents the collapse of the whole structure during the OER/ORR process, and the porous structure provides abundant active sites for the catalytic reaction [21, 22]. Compared with previously reported CoNi-N–C electrocatalysts with irregular carbon structure, carbon nanosphere electrocatalysts with porous structure not only stabilize the CoNi-Nx active sites due to the special larger surface area, but also prevent chronic aggregation in the practical application of stabilized structure [23, 24]. Metal co-doped porous carbon nanospheres electrocatalysts have high activity and stability in oxygen electrocatalysis [25]. In addition the electrocatalysts synthesized using melamine assistance can be doped into the precursors as a nitrogen source, giving them a large number of active sites [26]. Therefore, the modulation of the active sites of carbon nanosphere electrocatalysts using melamine provides a new approach for the preparation of high-performance advanced carbon materials. Therefore, modulation of the active sites of carbon nanosphere electrocatalysts using melamine provides a new approach for the preparation of high-performance advanced carbon materials.

Here, we synthesized a wrinkled-containing nitrogen-doped carbon nanospheres using a soft template method, followed by the addition of cobalt and nickel salts. The doping of melamine to provide a nitrogen source during pyrolysis improved the distribution of active sites, and its large surface area and high content of M-Nx active sites promoted ORR activity and accelerated the surface reconstruction layer to achieve high OER performance [27]. The effects of different molar ratios of Co (NO3)2·6H2O and Ni(NO3)2·6H2O on the ORR/OER performances were investigated and compared with those of commercial catalysts, and the obtained CoxNiy-N–C electrocatalysts showed good ORR/OER activities, The as-obtained Co3Ni1-N–C electrocatalyst exhibited favorable ORR, OER activity with a half-wave potential of 0.81 V vs. RHE and an onset potential of 0.960 V vs. RHE. The OER overpotential ƞ10 at 10 mA cm−2 was 360 mV, which was only 11 mV lower than the overpotential of commercial RuO2. In addition, the Co3Ni1-N–C electrocatalyst showed better stability in 0.1 M KOH solution also showed better stability. These results suggested that the optimization of the carrier structure and the combination of melamine as a nitrogen source to modulate the active sites of the bimetallic composites was a promising strategy to improve the ORR and OER properties.

Experimental component

Materials

Dopamine hydrochloride (purity ≥ 98.0%), 1,3,5-trimethylbenzene (TMB, purity ≥ 98.0%), and ammonia (purity ≥ 28.0%) were obtained from Aladdin Biochemical Technology Co. Ltd (Shanghai, China). Pluronic F127 (purity, BR) and melamine (purity ≥ 99.0%) were obtained from McLean Biochemical Co. Ltd. (Shanghai, China). Cobalt nitrate hexahydrate (Co(NO3)2·6H2O) (purity ≥ 98.5%), nickel nitrate hexahydrate (Ni (NO3)2·6H2O) (purity ≥ 98.0%), potassium hydroxide(KOH) (purity ≥ 85.0%), and sodium hydroxide (NaOH) (purity ≥ 96.0%) were purchased from Sinopharm Chemical Reagent Co. Ltd. (Shanghai, China). Platinum carbon(JM Pt/C) catalyst (20 wt%) was obtained from Johnson Matthey Chemical Co. Ltd. (Landon, UK) and ruthenium dioxide (RuO2) catalyst was obtained from Sigma Aldrich Trading Co. Ltd. (purity ≥ 99.0%) (Shanghai, China). Ultrapure water (18.2 MΩ•cm at 25 °C) was used for all experiments.

Preparation of CoxNiy-N–C

In a typical CoxNiy-N–C synthesis, 0.6 g of dopamine hydrochloride, 0.4 g of Pluronic F127 (F127), and 1.6 mL of 1,3,5-trimethylbenzene (TMB) were dispersed in a mixture of 20 mL of water and 20 mL of ethanol and sonicated for 30 min to bring it to an emulsion. Subsequently, 1.5 mL of ammonia was rapidly added to the above solution at 25 °C with stirring. After 2 h of reaction, the product was centrifuged at 12,000 rpm for 10 min and washed with ethanol/water mixture, and the process was repeated three times. The collected products were then dried at 80 °C and then heated from room temperature to 800 °C at a heating rate of 5 °C min−1 in an N2 atmosphere and held for 2 h to obtain carbon nanosphere carriers. The prepared carbon nanosphere carriers (100 mg) were dispersed in 10 mL of a mixed solution of X mmol of cobalt nitrate hexahydrate(Co (NO3)2·6H2O) (X = 0.217 mmol, denoted by x = 3) and Y mmol of nickel nitrate hexahydrate (Ni (NO3)2·6H2O) (Y = 0, 0.072, 0.144, and 0.217 mmol, denoted by y = 0, 1, 2, 3, respectively) in a mixed solution of water. After sonication for 30 min, the mixture was transferred to a 50 °C water bath and held for 2 h, in which the Co and Ni salts were uniformly loaded on the carriers. The temperature was then raised to 100 °C, and the aqueous mixed solution was eventually removed as the temperature of the reaction system continues to rise. The precursors loaded with Co and Ni (75 mg) were homogeneously mixed with melamine (300 mg) by grinding in a mortar and pestle. Then, the mixture was annealed in N2 atmosphere at a heating rate of 5 °C min−1 from room temperature to 800 °C for 2 h. The final sample obtained was named CoxNiy-N–C. Co0Ni3-N–C was synthesized in the same way in a mixed solution of Ni(NO3)2·6H2O (0.217 mmol) in water, and the method of N–C preparation was the same as that of CoxNiy -N–C, which was synthesized without the addition of melamine and metals.

Physical characterization

The measurements were taken using a Bruker D8 Advance diffractometer, Germany, and the X-ray diffraction (XRD) pattern was performed using Cu K radiation (40 kV, 100 mA, = 0.15432 nm) in the 2θ range, with a scanning range of 5–90° and a scanning rate of 5° min−1. X-ray photoelectron spectroscopy (XPS) measurements were recorded on a Thermo Scientific K-Alpha spectrometer, USA, using an Al Kα source (hν = 1486.6 eV) with a constant passage energy of 20 eV. The binding energy was calibrated using a C1s of 284.8 eV as a reference. Transmission electron microscopy (TEM) images were performed under a FEI Talos F200x electron microscope at 200 kV. Scanning electron microscopy (SEM) was performed under a ZEISS Sigma 300 electron microscope in Germany. Raman spectra were collected on a Horiba LabRAM HR Evolution spectrometer in Japan with a Raman excitation wavelength of 532 nm. Quantachrome Autosorb IQ3, USA, was used for nitrogen isothermal adsorption and desorption test to measure the specific surface area of the material based on the adsorption properties of gases on solid surfaces, the physical adsorption of gas molecules by the sample particles under test at a specific temperature, and a fixed equilibrium adsorption amount under a certain pressure. By measuring its equilibrium adsorption amount, a theoretical model is used to calculate the specific surface area of the surface.

Electrochemical measurements

Electrochemical experiments were performed on a CHI-660 electrochemical workstation with a rotating disk electrodes (RDE) system (Pine Research Instruments). The working electrode was a glassy carbon (RDE diameter 5 mm, 0.196 cm−2) with a deposited electrocatalyst layer, and the counter and reference electrodes were graphite rods and Hg/HgO (1 M NaOH) electrodes, respectively. The electrocatalyst ink was prepared by dispersing 5.0 mg of electrocatalyst in 30.0 μL of Nafon solution (5 wt%), 4.5 mL of ethanol, and 0.5 mL of water and ultrasonicated for 10 min. A 150 μL of ink was cast on the RDE with an electrocatalyst loading of 1.5 mg cm−2 at the working electrode. For comparison, commercial Pt/C (20 wt%) and commercial RuO2 inks were prepared in a similar way by casting 10 μL of ink onto RDE with a loading of 0.1 mg cm−2 for JM Pt/C (20 wt%) and commercial RuO2. All ORR and OER potentials reported in this study were converted to reversible hydrogen electrodes (RHE) by the conversion equations E(RHE) = E(Hg/HgO) + 0.895 V and E(RHE) = E(Hg/HgO) + 0.917 V, respectively, which were determined by equilibrium of the platinum disk electrodes as working electrodes in H2-saturated 0.1 M KOHaq. and 1 M KOHaq. potentials were determined. Test cyclic voltammetry (CV) tests performed in 0.1 M KOH saturated with N2 and O2 at a sweep rate of 50 mV s−1 with a voltage interval ranging from 0 to 1.2 V vs. RHE. ORR activity was evaluated by linear sweep voltammetry (LSV) in O2-saturated 0.1 M KOH, the same as for CV ventilation, in a saturated nitrogen atmosphere, and LSV data were measured for the working electrodes at their different rotational speeds as a background current, ranging from 400, 900, 1600, 2025 to 2500 rpm, in that order. Subsequent operation under oxygen saturation was the same as under nitrogen. The voltage range was 0 ~ 1.20 V vs. RHE with a sweep rate of 10 mV/s. OER electrochemical tests were carried out in N2-saturated 1 M KOH solution with CV at a sweep rate of 50 mV/s and a voltage range of 1.0 ~ 1.8 V vs. RHE. LSV was tested for OER activity at a sweep rate of 5 mV s−1 and a rotational speed of 1600 rpm with a voltage range of 1.2 ~ 1.8 V vs. RHE. In the electrochemical active surface area (ECSA) test, the relative size of the ECSA of a sample material is determined by testing the size of its bilayer. The potential window for the CV test was 1.08 ~ 1.16 V vs. RHE, and the scanning speed was set to 20 mV s−1, 40 mV s−1, 60 mV s−1, 80 mV s−1, and 100 mV s −1. Finally, by calculating and fitting a linear relationship between scanning speed and current density, the size of the bilayer of the sample material is the slope of the obtained line. The stability of the electrocatalysts in ORR and OER was carried out in O2-saturated 0.1 M KOH solution and N2-saturated 1 M KOH solution, respectively. The tests were carried out by the current–time (i–t) chronoamperometry technique at voltages of 0.8 V vs. RHE and 1.6 V vs. RHE, respectively, at 1600 rpm for 10 h.

Calculation of electrochemical performance test data

Oxygen reduction reaction is a complex reaction with a multi-electron reaction process or a combination of four-electron and two-electron reactions as the reaction pathway. In order to better study its reaction kinetics, experiments were carried out using the rotating disk technique. The oxygen reduction process was calculated from the rotating disk electrodes (RDE) by the Koutecky-Levich (K-L) equation (Eqs. 1 and 2) [28]. The formula is as follows:

$$\frac{1}{{\text{j}}}\text{=}\frac{1}{{\text{j}}_{\text{L}}}\text{+}\frac{1}{{\text{j}}_{\text{K}}}\text{=}\frac{1}{{\text{B}}^{{1}/{2}}}\text{+}\frac{1}{{\text{j}}_{\text{K}}}$$
(1)
$${\text{B}} \, \text{=} \, \text{0.62nF}{\left({\text{D}}_{0}\right)}^{2/3}{\text{v}}^{\text{-1}/{6}}{\text{C}}_{0}$$
(2)

where j is the measured current density, jK is the kinetic current density, jL is the limiting current density, B determines the slope of the K-L plot, ω denotes the rate of rotation of the electrode expressed in rpm, F is Faraday’s constant (96,485 C mol−1), C0 is the volumetric concentration of O2 (1.2 × 10–6 mol cm −3), D0 is the confusion factor of 0.1 M KOHaq. (1.9 × 10−5cm2 s−1), and v is the kinetic viscosity of the electrolyte (0.01 cm2 s−1).

Results and discussion

Structural features

The synthesis of CoxNiy-N–C carbon nanoballs electrocatalysts with different Co/Ni molar ratios with wrinkles was assisted by the use of melamine as shown in Fig. 1. First, TMB was used as a nanoemulsion to polymerize and assemble dopamine hydrochloride in a mixed solution of water in the presence of ammonia. Then, F127 was used as a soft template to modulate the pore structure and surface texture of the polymerized complexes. As shown in Figs. S1a–b, the polymer maintained an intact blob morphology during centrifugation and washing, and the presence of abundant wrinkles in the polymer can be clearly seen. Second, the carbon nanosphere carriers were obtained after heat treatment of the polymers at 800 °C for 2 h under N2 atmosphere, which still maintained the initial structure and spherical morphology, as shown in Figs.S1c–d. Carbon nanospheres enriched with N species were negatively charged and can adsorb cations (Co2+ and Ni2+) from Co (NO3)2·6H2O and Ni(NO3)2·6H2O, avoiding the detachment or agglomeration of metal species during annealing [29]. The powders loaded with Co and Ni salts were further milled with melamine, which was used as a nitrogen source to develop highly N-doped electrocatalysts. Finally, the mixture was annealed at 800 °C for 2 h in N2 atmosphere, and the CoxNiy-C-N electrocatalyst was collected.

Fig. 1
figure 1

Synthesis schematic diagram of CoxNiy-N–C

Firstly, the morphology and microstructure of Co3Ni1-N–C were characterized by SEM and TEM; as shown in Fig. 2a–c, Co3Ni1-N–C had a spherical morphology. And it can be seen in the SEM and TEM images that there were wrinkled on each nanosphere, and these wrinkles can effectively immobilize and disperse the active sites to prevent agglomeration [30]. No Co, Ni-based nanoparticles or nanoparticle clusters were found in the high-resolution transmission electron microscope, but the ones on Co3Ni1-N–C have clear graphite stripes as shown in Fig. 2d. In addition, through the HAADF-TEM images and the corresponding elemental mapping images, it could be seen that there were uniformly distributed Co, Ni, C, and N elements in Co3Ni1-N–C as shown in Fig. 2e–i. And there was a good overlap of Co and Ni, as shown in Fig. 2h–i, indicating the formation of CoNi alloy.

Fig. 2
figure 2

SEM image (a–b), HR-TEM image (c), TEM image (d), HAADF-STEM images, and corresponding elemental mapping images (e–i) of Co3Ni1-N–C

In order to optimize the synthesis scheme of CoxNiy-N–C catalysts, this paper focused on the Co/Ni molar ratio as an important influence on their catalytic activity. The crystal structures of CoxNiy-N–C prepared at 800 °C with different Co/Ni molar ratios were analyzed using X-ray diffractograms (XRD). As shown in the XRD plot in Fig. 3a, the relatively broad peak at 26.0° is the (002) plane of graphitic carbon. The characteristic peaks of the CoxNiy-N–C sample were located between the diffraction peaks of Co (PDF#15–0806) and Ni (PDF#04–0850), respectively, and according to previous reports, the peaks at 44.5°, 51.8°, and 76.2° correspond to the diffraction peaks of the face-centered cubic CoNi alloys at (111), (200), and ( 220) diffraction peaks [31]. Compared with Co3Ni0-N–C and Co0Ni3-N–C, the CoxNiy-N–C diffraction peak (111) was shifted to the high angle direction with the increase of Ni content, which proved the successful doping of nickel elements and the formation of Co/Ni alloy, which led to the stretching of the crystalline spacing. The results showed that the peak intensity increases with increasing metal content, indicating that the degree of crystallization of the samples increased with increasing metal content [32].

Fig. 3
figure 3

XRD patterns (a, b) and Raman spectra (c) of the Co3Ni1-N-Cand N–C electrocatalysts; N2 adsorption–desorption isotherms and pore size distribution of the Co3Ni1-N-Cand N–C electrocatalysts (d, e)

The Raman spectroscopic characterization carried out to investigate the chemical structural state of the CoxNiy-N–C electrocatalyst was shown in Fig. 3c. All the samples had two distinct main peaks near 1342 cm−1 and 1589 cm−1, indicating that they represented disordered carbon (from the D peak) and graphitic carbon (from the G peak), respectively, and the intensity ratios of ID/IG can be used for evaluating the degree of graphitization and defects in the carbon arrays. The results by Raman spectroscopy showed that the metal content had a significant effect on the ID/IG ratio, where the ID/IG values of CoxNiy-N–C and Co3Ni0-N–C (ID/IG = 1.04) and Co0Ni3-N–C (ID/IG = 1.02) were less than that of N–C (ID/IG = 1.09), which indicated that the introduction of the metal improved the graphitization of the catalysts degree. Among CoxNiy-N–C, its Co3Ni1-N–C had the smallest (ID/IG = 1.01) value, indicating that Co3Ni1-N–C had a higher degree of graphitization, which gave it a higher conductivity and promoted the electron transfer, and thus improved the electrocatalytic activity. Notably, the successful doping of Ni and Co elements and the presence of CoNi alloy in the catalyst samples were demonstrated by both Raman spectroscopy and XRD patterns. The structural properties of Co3Ni1-N–C and N–C electrocatalysts were analyzed by N2 adsorption–desorption isotherm (BET), as shown in Fig. 3c; Co3Ni1-N–C and N–C exhibited type IV adsorption isotherms indicated the presence of mesoporous structure in Co3Ni1-N–C [33]. In addition, the average pore size (11.51 nm), pore volume (0.29 cm3 g−1), and BET specific surface area (140.3 m2 g−1) of Co3Ni1-N–C are shown in Fig. 3d–e and Table S1. This had mesoporous structure, large pore volume, and specific surface area, which could provide abundant active sites for the reaction, as well as convenient mass transfer conditions for ORR and OER catalytic processes. For N–C prepared without the introduction of metals, the pore volume and BET specific surface area were 0.10 cm3 g−1 and 21.9 m2 g−1, respectively (e.g., Table S1). Apparently, these results could be explained by the introduction of the metal, which facilitated the production of homogeneous nanoparticles and the increase of graphitization, and thus increased the pore volume/BET specific surface area. Upon comparison, it was shown that the doping of cobalt–nickel bimetallic could effectively increase the porosity and specific surface area of nitrogen-doped carbon nanorods, reduce the defects to increase the degree of graphitization, and improve the electrical conductivity of the catalysts; the enriched pore structure and high specific surface area were conducive to maximizing the exposure of the electrocatalytic active sites and facilitating the mass-transfer process in the reaction, which further enhanced the electrocatalytic performance of the materials.

The chemical composition and valence states of the surface elements of Co3Ni1-N–C and N–C were characterized using X-ray photoelectron spectroscopy (XPS). As can be seen from Fig. 4a, the full spectrum of Co3Ni1-N–C showed the presence of more Co and Ni elements compared to N–C. As shown in Fig. 4b, the high-resolution C 1 s peaks of N–C and Co3Ni1-N–C were analyzed with the same results. The high-resolution C 1 s peaks at 284.8 eV, 285.6 eV, 288.9 eV, and 286.5 eV for Co3Ni1-N–C and N–C were attributed to C–C, C-N, O-C-O, and C = O, respectively, where the C-N bond was the catalytically active site [8], and the presence of C-N bond confirmed the successful doping of nitrogen. Furthermore, the presence of N 1 s spectra confirmed that the electrocatalyst was N-doped. As shown in Fig. 4(c), five characteristic peaks were decomposed in the Co3Ni1-N–C high-resolution N 1 s spectrum: pyridine-N (398.2 eV), M-Nx (399.12 eV), pyrrole-N (400.7 eV), graphite-N (402.2 eV), and oxidized-N (405.4 eV) [34]. On the other hand, because no metal salts were introduced during the preparation procedure, as shown in Fig. 4c, N–C did not breakdown the M-Nx signal. It was possible that N and metal elements were successfully doped into the carbon matrix based on the presence of N–C and M-Nx [35]. Among them, the formation of M-Nx site could accelerate the charge transfer and improve the electrochemical activity, which was an effective active site in the ORR/OER process. Also pyridine-N and graphite-N played a crucial role in the ORR/OER process by promoting oxygen adsorption while lowering the overpotential due to their superior electron acceptance [36]. The contents of different N species in Co3Ni1-N–C and N–C were calculated by XPS tests as shown in Fig. 4f, where the total N content of Co3Ni1-N–C increased to 4.22 at%, while N–C was 2.9 at%. In addition, the pyridine-N content in Co3Ni1-N–C was much higher than that in N–C, indicating that the melamine-assisted synthesis strategy increased the number of active sites. Except for the oxidized-N species, all the other four N groups had important effects on the catalytic ORR/OER [37].

Fig. 4
figure 4

XPS full spectrum peaks of Co3Ni1-N–C and N–C (a); C 1 s peaks of Co3Ni1-N–C and N–C (b); high-resolution XPS spectra of N 1 s peaks of Co3Ni1-N–C and N–C (c); Co 2p peaks (d); high-resolution XPS spectra of Ni 2p peaks (e); calculation of the XPS results for Co3Ni1-N -C and N–C carbon matrices for different nitrogen species and nitrogen elements (f)

In the XPS Co 2p spectrum, as shown in Fig. 4d, the peaks at 780.3 and 796.8 eV are Co 2p3/2 and Co 2p1/2, respectively. Peaks located at 784.2 and 802.9 eV indicated satellite peaks. In addition, the 780.0 and 796.1 eV peaks were attributed to the metallic Co peaks. the N-coordinated Co2+ peaks at 781.8 and 797.2 eV [38] indicated that the Co particles were anchored to the NC substrate. The XPS Ni 2p spectra are shown in Fig. 4e similar to Co, but with lower Ni content than Co [39]. The 855.3 and 873.2 eV peaks correspond to the metallic Ni peaks, and 856.4 and 875.1 eV peaks correspond to the Ni2+ peaks. Finally, the 862.6 and 880.2 eV peaks correspond to satellite peaks [40]. The high valence states of Co and Ni indicated the presence of M-Nx bonds, and the presence of metallic Co and Ni peaks confirmed the formation of CoNi alloys in the Co3Ni1-N–C sample. The presence of M-Nx and metal Co/Ni was beneficial in the oxygen reaction, and M-Nx is formed due to coordination effects, which optimized the adsorption energy and improved the electrochemical activity. Some other studies have found that for Co-doped samples, moderate amounts of Ni elements could increase the content of Co-Nx species, which also applied to Ni-doped samples. This result suggested that Co/Ni alloys could promote the formation of M-Nx material compared to individual metal-doped samples [41]. In addition, Co and Ni nanoparticles were not isolated from each other but had electronic interactions. In CoNi alloys, Co atoms could obtain d-electrons from nearby Ni atoms, thus increasing the electron-donating properties of the hybrids, which was associated with enhanced electrochemical activity [42]. The above results indicated a modification of the electronic structure between the near-surface Co and Ni atoms [43], suggesting the formation of cobalt–nickel alloys and the presence of bimetallic synergies.

ORR performance testing

First, the ORR performance of the catalysts was characterized using glassy carbon rotating disc electrodes. As shown in Fig. 5a and Fig. S2a–f, the electrocatalysts of catalyst CoxNiy-N–C were tested for CV curves in N2 and O2 saturated 0.1 M KOH solutions at 50 mV/s, respectively. Apparently, all the samples did not show oxygen reduction peaks in the N2-saturated electrolyte solution, while obvious oxygen reduction peaks appeared in the O2-saturated electrolyte solution, which indicated good ORR catalytic activity. However, it was worth noting that the oxygen reduction peak becomes more positive with the introduction of Co and Ni elements. Among them, the oxygen reduction peak of Co3Ni1-N–C appeared around 0.771 V vs. RHE, which was larger than that of the other catalysts of CoxNiy-N–C, indicating that the catalytic activity of ORR was improved. To further demonstrate the excellent ORR performance of the catalysts, the LSV curves of the electrocatalysts were recorded by in O2-saturated 0.1 M KOH solution at 1600 rpm, as shown in Fig. 5b. It was clearly seen that CoxNiy-N–C catalysts with different Co/Ni molar ratios have different activities, and the electrocatalytic activity of ORR increases with increasing Co and Ni molar ratios. A maximum was reached at a Co/Ni ratio of 3:1, and then the electrocatalytic activity decreased. The results showed that the optimal Co/Ni molar ratio was 3:1, and CoxNiy-N–C had the best ORR catalytic activity, as shown in Fig. 6 where the Co3Ni1-N–C electrocatalyst had the largest positive onset potential (E0 = 0.960 V vs. RHE) and the highest half-wave potential (E1/2 = 0.81 V vs. RHE), which is close to that of commercial Pt/C (E0 = 0.966 V vs. RHE and E1/2 = 0.831 V vs. RHE). Among the above catalysts, although the ORR performance of the catalysts with only cobalt (Co3Ni0-N–C) or only nickel (Co0Ni3-N–C) was improved compared with that of N–C, the enhancement of Co3Ni1-N–C activity was more pronounced, suggesting that there was an obvious synergistic catalytic effect of Co/Ni bimetallic in nitrogen-doped carbon matrix. Therefore, it was concluded from the above results that Co3Ni1-N–C has excellent ORR electrocatalytic activity. The monometallic cobalt/nickel composites did not show good ORR performance, which could be explained by the strong adhesion of the O* and OH* species to the Co/Ni species, which led to a strong activation of the proton transfer step, thus inhibiting the reaction rate [27]. Thus, the presence of CoNi alloy in the graphitic carbon structure helped to promote the electron transfer from the bimetallic alloy to the carbon shell and contributes to the structural modification of the carbon surface, thus improving the catalytic activity of ORR [44].

Fig. 5
figure 5

CV curves of Co3Ni1-N–C (a); LSV curves of commercial Pt/C, CoxNiy-N–C and N–C at 1600 rpm (b)

Fig. 6
figure 6

Histograms of onset and half-wave potentials of commercial Pt/C, CoxNiy-N–C and N–C

In order to reveal the ORR kinetics and electron transfer pathways of the catalysts in O2-saturated 0.1 M KOH solution, the linear voltammetric scanning curves of CoxNiy-N–C and commercial JM Pt/C measured at different rotational speeds, as shown in Figs. 7 a and c and S3a–l, show that the limiting diffusion current density keeps increasing with the electrode rotational speed, which indicated that the whole process was controlled by the mass transfer process. In addition, the limiting current density of Co3Ni1-N–C (jL = 5.5 mA cm−2) at 1600 rpm was superior to that of commercial JM Pt/C (jL = 4.6 mA cm−2) and other electrocatalysts of CoxNiy-N–C, as shown in Fig. 7a. This suggested that Co3Ni1-N–C had excellent ORR kinetics. In order to explore the electron transfer pathway of CoxNiy-N–C in ORR, as Fig. 7 b and d and Fig. S3a–l were the straight lines fitted by K-L equations, the slopes of their K-L straight lines are very close to each other, confirming that this was a first-order oxygen reduction reaction. As shown in Fig. 7 b and d and Fig. S3a–l, the electron transfer number (n) of CoxNiy-N–C at different voltages were also calculated to be about n = 4.0 for Co3Ni1-N–C and commercial JM Pt/C as shown in Fig. 7b and d, which suggested that Co3Ni1-N–C catalysts and commercial JM Pt/C had similar ORR activity and the ORR process is mainly a 4epathway. The results showed that most of the oxygen was directly converted to OH, including four reaction pathways as follows [45]:

Fig. 7
figure 7

LSV curves of Co3Ni1-N–C and commercial Pt/C at different rotational speeds (a, c); Koutecky-Levich curves and number of transferred electrons for Co3Ni1-N–C and commercial Pt/C (b, d)

$${{\text{O}}}_{2}+{{\text{H}}}_{2}{\text{O}}+{{\text{e}}}^{-}\to *{\text{OOH}}+{{\text{OH}}}^{-}$$
(3)
$${*{\text{OOH}}+{\text{e}}}^{-}\to *{\text{O}}+{{\text{OH}}}^{-}$$
(4)
$${*{\text{O}}+{{\text{H}}}_{2}{\text{O}}+{\text{e}}}^{-}\to *{\text{OH}}+{{\text{OH}}}^{-}$$
(5)
$$*{\text{OH}}+{{\text{e}}}^{-}\to {{\text{OH}}}^{-}$$
(6)

The results showed that the excellent ORR catalytic performance of Co3Ni1-N–C electrocatalysts was mainly attributed to the presence of CoNi alloys contributing to the catalytic effect on ORR, the high content of M-Nx and pyridine-N, the unique pleat-rich structure, as well as the large specific surface area and high graphitization.

OER performance testing

The performance of OER was investigated using a glassy carbon rotating disk electrode device. As shown in Fig. 8a, the LSV curves of the electrocatalysts recorded at 1 M KOH solution, 1600 rpm, it was clear that one of them, Co3Ni1-N–C, exhibited excellent OER electrocatalytic performance with the smallest overpotential at a current density of 10 mA cm−210 = 0.360 V vs. RHE), which was significantly lower than the other CoxNiy-N–C catalysts with overpotentials close to that of commercial RuO210 = 0.348 V vs. RHE), as shown in Fig. 8c. By determining the Tafel slope, it was evident that the Tafel slope of Co3Ni1-N–C (100 mV dec−1) was significantly lower than that of other CoxNiy-N–C catalysts and close to that of commercial RuO2 (90 mV dec−1), as shown in Fig. 8b, suggesting that Co3Ni1-N–C possesses better OER kinetics. To estimate the active site of CoxNiy-N–C, cyclic voltammetry (CV) curves were recorded at different scan rates (20–100 mV s−1) as in Fig. 8e and Fig. S4a–f, and the Cdl values were measured using CV curves in the non-Faraday region to calculate the electrochemical double-layer capacitance (Cdl) as in Fig. 8f. Among them, the Cdl value of Co3Ni1-N–C was 47.1 mF cm−2, which was significantly higher than that of other CoxNiy-N–C catalysts, such as Co–N-C (14.42 mF cm−2) and Ni–N-C (14.43 mF cm−2), suggesting that Co3Ni1-N–C exposed more active sites. The highly coupled N-doped carbon of CoNi alloys provides active sites with high affinity for both reactants and intermediates [46]. Both ORR and OER follow four single electron transfer reactions including a series of intermediates (*OH, *O, and *OOH) [47]. In addition, the electrocatalytic activity of the bifunctional ORR/OER was characterized by calculating the potential difference between the OER and the ORR (ΔE = Ej=10-E1/2), which indicates the loss of efficiency. The ΔE value of the apparent Co3Ni1-N–C is 0.779 V vs. RHE, as shown in Fig. 8f. Close to the benchmark ΔE value of the combination with commercial noble metal catalysts (Pt/C-RuO2, 0.744 V vs. RHE) indicates good bifunctional electrocatalytic activity. It was well known that Co and Ni metals themselves were active centers for ORR and OER, respectively; when alloyed with each other, the synergistic effect of Ni and Co makes CoNi nanoparticles better active centers for ORR and OER [48]. These results suggest that this excellent ORR and OER activity is largely due to the unique structure of the folded carbon nanospheres and the synergistic effect between the CoNi nanoparticles and the N carbon-doped carbon layer, which endows Co3Ni1-N–C with multiple active sites, accelerates the reaction rate, and reduces the energy of adsorption to the reaction intermediates, which enhanced the ORR/OER electrochemical performance [35].

Fig. 8
figure 8

LSV curves of commercial RuO2 and CoxNiy-N–C at a speed of 1600 rpm (a); Tafel slope curves of commercial RuO2 and CoxNiy-N–C (b); overpotential ƞ10 histograms of commercial RuO2 and CoxNiy-N–C at 10 mA cm.−2 (c); CV curves of Co3Ni1-N–C at different sweep speeds (d); bilayer capacitance Cdl of CoxNiy-N–C (e); LSV curves of commercial Pt/C-RuO2 and the prepared catalysts at a speed of 1600 rpm (f)

The stability of the electrocatalysts, another key parameter for their potential applications, was tested by the timed-current method (i-t) for the electrocatalysts Co3Ni1-N–C, commercial Pt/C and commercial RuO2. As shown in Figs. 9a and S5a, the relative current of Co3Ni1-N–C in 0.1 M KOH solution retained 81.45% of its initial value after 10 h at constant potentials of 0.8 V vs. RHE and 1.6 V vs. RHE, while commercial Pt/C retained only 34.5% under the same conditions, indicating that Co3Ni1-N–C’s stability was superior to that of commercial Pt/C. As shown in Fig. 9b, the E1/2 of Co3Ni1-N–C decreased by only 4 mV, whereas that of commercial Pt/C decreased by 10 mV after 10 h. The relative current of commercial RuO2 in 1 M KOH solution retained 42.10% of its initial value after 8 h, whereas Co3Ni1-N–C retained 46.9% under the same conditions, as shown in Fig. S5a. It indicated that Co3Ni1-N–C was slightly higher stable than commercial RuO2 in a solution of 1 M KOH. These results confirmed the excellent durability of CoNi alloy nanoparticles encapsulated by Co3Ni1-N–C in N-doped folded carbon nanosphere layers.

Fig. 9
figure 9

The i-t curves of Co3Ni1-N–C and commercial Pt/C in 0.1 M KOH solution at 0.8 V vs. RHE (a); LSV curves of Co3Ni1-N–C and commercial JM Pt/C electrocatalysts before and after endurance testing (b)

In order to elucidate the excellent stability of Co3Ni1-N–C, the morphology of the electrocatalyst after the stability test was investigated by TEM. As shown in Fig. S6, Co3Ni1-N–C retained its initial nanosphere structure after testing in 0.1 M KOH solution, and almost no agglomerations were observed. As shown in Fig.S7, whereas agglomeration of CoNi-based nanoparticles was clearly observed after testing in 1 M KOH solution, which led to a decrease in OER stability due to agglomeration of metal particles as a result of migration at high potentials, overall, the excellent stability of Co3Ni1-N–C may be attributed to its unique wrinkled structure.

XPS testing of Co3Ni1-N–C after OER stability measurements and the results are shown in Fig. S8. The XPS high-resolution spectra of N1s (Fig. S8a) showed that the peak intensity of pyridine-N was significantly reduced, indicating that pyridine-N, which acted as the active site of the Co3Ni1-N–C catalyst during the OER process, partly coordinated with the metal center to form the M-Nx active site, and part of it was oxidized during the reaction process, and a significant enhancement of the M-Nx and oxidized-N peak intensities can also be seen. In addition, the obvious enhancement of the pyrrole-N peak indicates that the metal centers coordinated to the nitrogen atoms in the pyrrole ring are reduced, which decreased the reactivity and selectivity of the catalyst. The XPS spectra of Co 2p (Fig. S8b) showed that there was no obvious change in the position of the peaks of Co, whereas the peak strength of Co0 of Co2p3/2 was reduced. This proved that Co0 was the active site of Co3Ni1-N–C catalyst, which was gradually oxidized during the reaction process, leading to a gradual decrease in catalyst performance. Meanwhile, the XPS spectra of Ni2p (Fig. S8c) showed that the peak intensity of Ni0 decreased and the peak intensity of Ni2+ increased for Ni2p3/2, and basically no Ni0 peak was detected in Ni2p1/2, which indicated that the metallic nickel underwent oxidization or bonding with OH to generate active Ni-OOH intermediate species.

Conclusion

In summary, a carbon nanosphere electrocatalyst, CoxNiy-N–C, was successfully synthesized by a soft template method with melamine-assisted pyrolysis. The melamine played a crucial role in the control and distribution of CoxNiy-N–C active sites. The preparation process of CoxNiy-N–C was optimized by adjusting the amount of Co/Ni precursor. The results showed that Co3Ni1-N–C exhibit excellent ORR and OER catalytic activities, which should be contributed to the large specific surface area and abundant M-Nx active sites and the synergistic effect of CoNi alloy. In addition, with the addition of Ni, a highly active surface reconstructed Ni-CoOOH layer was formed at a lower potential, which improved the OER catalytic activity. This made it exhibit ORR and OER performance in alkaline electrolytes comparable to that of commercial catalysts. The prepared Co3Ni1-N–C catalyst exhibited excellent ORR, OER electrocatalytic performance with a more positive half-wave potential (E1/2 = 0.81 V vs. RHE), and better long-term stability than that of commercial Pt/C. The catalyst also exhibited a low OER overpotential of 1.60 V. Between ORR and OER, there were advantages for applications in bifunctional electrochemical reactions. Overall, this work showed that the manipulation of catalyst structure and exposed active sites enabled efficient ORR and OER electrocatalysis, which contributed to the design of cost-effective, high-performance bifunctional electrocatalysts.