1 Introduction

The constant development of science and technology has resulted in an increase in the demand for energy. Therefore, supercapacitors have been identified as most promising energy storage devices, due to their high specific capacity, fast charge-discharge rates, high power density, long cycle life, environmental friendliness and high safety. The latest reports indicate the need for further development of research related to the introduction of various types of admixtures to electrode materials and the modification of solutions used in energy storage devices [1,2,3,4,5].

A material type that stirs up particular interest in the specific needs related to its application as supercapacitor electrodes are carbon gels. They have the unique ability to adapt their pore structure through small changes in synthesis conditions [6,7,8,9,10]. Nowadays carbon gels are mainly obtained from resorcinol-formaldehyde resins [11, 12]. It has been established that the presence of covalent bonds between carbon atoms in the crystal lattice allows a porous monolith to be obtained [13]. One of the most frequently used method for the synthesis of carbon gels is the sol-gel technique which consists of three consecutive steps: polymerization, drying and carbonization.

To obtain carbon gels with better unique properties for supercapacitor applications modifications are carried out on them. Such modification can be achieved by the addition of heteroatoms (oxygen, nitrogen, fluorine, phosphorus) into the carbon framework [14, 15], which improve the capacity of carbon materials by inducing pseudo-capacity as a result of reversible redox reactions. Heteroatoms also have a significant impact on the wettability of carbon gels.

Nitrogen is most often used to modify the carbon materials [6]. Its presence both supports electronic conductivity and ensures better electrochemical and catalytic activity [16,17,18]. In addition, nitrogen increases the energy storage capacity and improves the optimal wettability of the carbon material [14, 19, 20]. Nitrogen can be inserted into the structure of carbon in various chemical forms. The carbon atoms in the lattice can be replaced by nitrogen atoms, thereby increasing the number of π electrons. The edges and defects are the main places where nitrogen atoms are located [21].

One of the methods of nitrogen doping is the in situ method, involving the copolymerization of resorcinol and formaldehyde with the participation of a nitrogen-rich forerunner, such as, natural or synthetic polymers, urea, melamine, e.t.c. The latter compound is a particularly good candidate for the production of carbon gels due to the presence of three amine groups in its molecule, and because it can be easily combined with formaldehyde [11, 14, 21, 22]. The addition of nitrogen-containing precursors during the polymerization directly affects nitrogen content in the carbon gel as well as the pore texture. This is due to the different mass ratio of monomers in the case of synthesis of only resorcinol with formaldehyde [6, 23, 24].

Nitrogen-doping is undeniably an effective way to enhance the capacitance of carbon materials, however, decreases the conductivity of the materials to some extent [25]. To overcome the disadvantage related to nitrogen-doped carbon frameworks, i.e., lower conductivity, the polymerization of resorcinol and formaldehyde can be carried out in an aqueous solution of graphene oxide, which is an attractive morphology-directing agent [26]. Graphene oxide (GO) is a strongly oxygenated derivative of graphene, i.e., it is made up of sheets of the two-dimensional carbon structure decorated with a high density of oxygen functional groups (epoxides, hydroxyls, carboxyls, etc.; O/C atomic ratios 0.4–0.5) both on their basal plane and at their edges. Carbon gels obtained with the addition of GO can be good candidates for energy applications in storage devices such as electrochemical capacitors or lithium-sulfur batteries [23, 27,28,29]. However, due to the strong van der Waals interactions between the graphene layers, the surface area available for electrolyte ions is strongly limited. In order to prevent this phenomenon, it is necessary to dope carbon gels with flexible substrates that interact with graphene, e.g. nitrogen, which increases the availability of the active surface area to the electrolyte solution. The problem of limited transportation abilities of GO can be solved by preparing GO-metal doped carbon gels.

It is also known, that the doping of metal atoms enhances surface electron transportation and catalytic abilities. Some bivalent metal ions (for example: (Ni2+, Co2+, Ca2+) can work as a linking medium in 3D graphene oxide based materials, which may increase chemical bonding between graphene sheets [23, 30]. Additionally, heavy metal salts, such as Co and Ni, can adjust the pore textures and surface characteristics and generate the graphitization of created carbon gels. Furthermore, the replacement of the usually used catalyst of Na2CO3 with bivalent metal salts in the synthesis of carbon gels, allows more porous structures in the macropore region to be obtained [30].

The doping of carbon gels with nickel is often used in hydrogen storage. Ni, by chemical modification of the carrier, supports this process [31]. The results also show Ni-doped carbon aerogels maintain the elementary structure of carbon aerogel, but they exhibited higher specific capacitance than a non-doped one [32, 33].

The aim of the work was to obtain carbon xerogel with high capacitance suitable for utilization as an electrode for supercapacitors. Although there are some studies on the synthesis of Ni-, N- and graphene oxide-doped carbon materials with resorcinol (R) and formaldehyde (F), the mutual effects of melamine (M), graphene oxide and nickel have not been investigated in electrochemical application as far as we know. Hence, melamine-graphene oxide-nickel-resorcinol-formaldehyde derived carbon xerogel was prepared by a sol-gel method for this work. The influence of components on the structure and the performance of electrode material were studied.

2 Experimental

2.1 Synthesis of graphene oxide

GO was synthesized from natural graphine (99% 100 mesh, Sigma Aldrich) using a modified Hummers method [34]. In short, a 5 g portion of graphite powder was mixed with 5 g of NaNO3 and 230 ml of 12.1 M H2SO4 and were stirred in an ice-salt bath for 15 min. Then 40 g of KMnO4 was slowly added into the mixture to yield a purple-green color. Successively, the reaction system was placed in a 40 °C water bath under vigorous stirring for 90 min. Then, 50 ml of deionized water (DI) was slowly added and stirred for a further 10 min. A 60 ml H2O2 was added dropwise until the color of mixture was a golden-brown. A further 500 ml of DI was added, and the obtained product filtered and washed with warm DI repeatedly to adjust the pH close to 6. Then the product was dried at 80 °C for 24 h. Finally, a GO suspension (7.5 mg ml−1) was produced by ultrasonication of graphite oxide. For this purpose graphite oxide powder (1.5 g) was introduced into 200 ml of DI and exfoliated into GO by high-energy sonication (BANDELIN SONOPULS)

2.2 Preparation of carbon gels

The organic gels were prepared by a sol-gel process. Melamine-resorcinol-formaldehyde (MRF) hydrogel was obtained by the polycondensation of resorcinol (R) with formaldehyde (F), sodium carbonate (C) as a catalyst, and melamine (M). The received product was marked as MRF-CX carbon xerogel. In order to obtain melamine-graphene oxide-nickel-resorcinol-formaldehyde (MRF-GO-Ni-CX) derived carbon xerogel, a Na2CO3 catalyst was substituted for nickel acetate (C4H6NiO4 ∙ 4H2O). The mass of nickel salt in the mixture was regulated so that in carbon obtained after MRF pyrolysis (conditions hereafter) the theoretical metal mass was 5 wt.%. Resorcinol and nickel acetate were dissolved in GO suspensions. Then melamine was added and the whole solution was stirred for 3 hours in a hot water bath (70 °C). After this time, it was stirred for another 18 hours at 25 °C. Then formaldehyde was added and the pH was adjusted to 6. The weight content of GO in the composite xerogel was 1%. Molar ratios R/F, R/M and R/C were 0.5, 3 and 1000, respectively.

Each of the prepared solutions was poured into polypropylene containers, tightly closed, and gelation took place at 85 °C for 120 hours. The obtained wet gels were immersed into acetone for 12 h. Further water exchange was carried out as described earlier [35]. After the third decantation of acetone, the gel was initially dried at 25 °C for 72 h and further drying was continued at 100 °C for 120 hours.

Finally, samples of gels after removal of water were pyrolyzed in a tube furnace under nitrogen flow at 950 °C for 3 h using a heating rate of 10 °C min−1. The final product was further ground into powders in a porcelain mortar for characterization and electrochemical measurements.

2.3 Materials characterization

A scanning electron microscope (SEM) (Hitachi S-3400N, Japan) was used to investigate the morphology of carbon gels, whereas an energy dispersive spectrometer (EDS) (Thermo Electron Corp., model No. 4481B-1UES-SN with the NSS Spectral Imaging System software) allows to estimate distribution of active particles as well as chemical composition of the samples surface.

The porous geometry of the samples was characterized by N2 adsorption/desorption at −195.5 °C (3Flex, Micromeritics, USA). The specific surface areas (SBET) was calculated by the Brunauer-Emmett-Teller (BET) method. The calculations of cumulative pore volume (VCUM) (between 1.7 and 300 nm) as well as mesopore size distributions were made on the basis of the desorption branch of the N2 isotherm applying the Barret-Joyner-Halenda (BJH) method.

The X-ray analyses (a BRUKER D8 Advance diffractometer) was used to obtain the X-ray diffraction patterns (XRD) of the prepared samples. The patterns were run with Ni-filtered copper radiation (λ = 0.1542 nm).

The chemical composition of samples surface was examined by Fourier transform infrared spectroscopy (FTIR) (JASCO-model 6700 type A) using the KBr pellets. The data were recorded between 4000 and 400 cm−1, over 100 scans at a resolution of 4 cm−1.

The acid-base proportions of xerogels were determined by titration according to the Boehm method [36].

2.4 Electrochemical measurements

Briefly, the working electrode was prepared as follows: 20 mg of powdered xerogel was inserted into the working chamber of an electrolyte cell previously filled with a gold spiral, which was a current collector. The method of electrode implementation was discussed in detail in earlier works [35, 37]. Each measurement was preceded by submergence of a prepared electrode in 6 M KOH solution for 24 h. It allows the diffusion of electrolyte solution through the pore structure of the carbon gel. The electrode was tested in a standard three-electrode system, in which an Hg/HgO (−0.098 V vs. normal hydrogen electrode) and a platinum wire were used as the reference and counter electrode, respectively. 6 M KOH was used as the aqueous electrolyte. Cyclic voltammograms (CV) and galvanostatic charge/discharge (GCD) curves were recorded by the chronopotentiometry method using an AUTOLAB potentiostat-galvanostat (model PGSTAT 30, The Netherlands). The potential range of cyclic voltammetry experiments spread from −1.0 to 0.0 V with the scan rate at 1, 5 and 10 mV s−1. GCD measurements were carried out at a constant current density of 0.1, 0.25, 0.5, 0.75 and 1.0 A g−1 in a potential interval from 0 to −1 V. All CV and GCD investigations were conducted at 25 °C.

The specific capacitance values were based on the CV curves and calculated with the following equation [38]:

$$C_{{{{\mathrm{CV}}}}} = \frac{{I_{{{\mathrm{a}}}} + \left| {I_{{{\mathrm{c}}}}} \right|}}{{2m\left( {{{{\mathrm{d}}}}V/{{{\mathrm{d}}}}t} \right)}}$$

where: CCV - the specific capacitance of electrode material (F g−1), Ia and Ic - the current recorded during anodic and cathodic polarization, respectively (A), m - mass of electrode material (g) and dV/dt is the scan rate (V s−1).

The calculations of specific capacitances of the electrodes gathered from the discharge process of the GCD curves made using the formula below:

$$C_{{{{\mathrm{GCD}}}}} = \frac{{2{{{\mathrm{It}}}}}}{{\Delta {{{\mathrm{Vm}}}}}}$$

where: CGCD - the specific capacitance (F g−1), I - the current (A), t - the discharging time (s), ΔV - potential change measured upon discharging (V), and m - electrode mass (g).

3 Results and discussion

3.1 Structure of carbon xerogels

The structures of the MRF-CX and MRF-GO-Ni-CX carbon xerogels were examined by XRD and the patterns are shown in Fig. 1. The XRD diffractions of the MRF-CX can be assigned to the graphitic carbon. Two diffraction peaks at about 2θ ~ 24o and 44o, indexed to (002) and (101) diffraction of graphitic carbon [39, 40] are observed in the MRF-CX sample, implying the formation of graphitic structure. For the MRF-GO-Ni-CX sample additional peaks at 2θ ~ 44o, 52o and 76o appeared indicating the presence of crystalline nickel [41, 42]. These diffraction peaks correspond to (111), (200) and (220) planes of nickel.

Fig. 1
figure 1

XRD patterns of MRF-CX and MRF-GO-Ni-CX xerogels

3.2 Morphology of carbon xerogels

In order to examine the morphology of prepared carbon gels, micrographs were made using a scanning electron microscope (SEM). When analyzing the obtained results, shown in Figs. 2 and 3, changes caused by the presence of graphene oxide and nickel in the carbon xerogel can be observed.

Fig. 2
figure 2

SEM micrographs of carbon xerogel MRF-CX

Fig. 3
figure 3

SEM micrographs of carbon xerogel MRF-GO-Ni-CX

As can be seen the MRF-CX carbon xerogel has particles with regular, spherical shapes (Fig. 2) with diameter 0.5 μm and higher. For this material, holes in the monolithic surface of the carbon gel are also visible. It should be noticed that the addition of graphene oxide and nickel acetate to carbon gel undeniably effects a change in its morphology (Fig. 3). It was hypothesized that GO with numerous oxygen functional groups causes the binding of these groups to melamine molecules through -NH groups. This is presumed to be done by hydrogen bonding [23] and may prompt the change in shape and diameter of particles. The SEM images obtained for this carbon gel show both fine, spherical particles with diameters of about 1 μm and smaller, and particles with irregular shapes.

Semi-quantitative results of the EDS analysis obtained for prepared carbon gels are shown in Table 1 (EDS mapping of these materials and the element distribution area is presented in Figs. A1, A2). One can notice that the main differences in the composition of these two carbon gels are the presence of nickel, a higher content of carbon and oxygen, and a lower content of nitrogen for MRF-GO-Ni-CX compared to MRF-CX xerogel.

Table 1 EDS data for samples MRF-CX and MRF-GO-Ni-CX

3.3 Surface area and porosity

The development of specific surface area (SSA) as well as pore distribution of MRF-CX and MRF-GO-Ni-CX xerogels were examined by BET and BJH measurements (Table 2). The SSA for MRF-CX carbon xerogel amounted to 692 m2g−1. For sample MRF-GO-Ni-CX one can notice a slight decrease of about 2% of the BET surface area down to 677 m2g−1 and decrease of micropore area and volume of about 4.4 and 3.8%, respectively compared to the MRF-CX xerogel. Simultaneously there was an increase of cumulative pore volume (VCUM) and average pore diameter of about 50 and 32%, respectively.

Table 2 Surface area and porosity of MRF-CX and MRF-GO-Ni-CX xerogels

3.4 Chemical composition of carbon xerogel surface

Figure 4 depicts the FTIR spectra of MRF-CX and MRF-GO-Ni-CX xerogels. In both cases, there is a broad band between 3000 and 3500 cm−1 which can be assigned to the O-H stretching vibrations, originating from hydroxylic groups and chemisorbed water [43,44,45,46,47,48,49,50]. In this region, the oscillations can also be ascribed to the vibrations associated with the NH groups [51]. It is as if the O-H stretch masks significantly –NH2 or =NH stretching vibrations. The mentioned groups also absorb around 2300 cm−1. Both xerogels were seen to exhibit adsorption bands in this region. On the other hand these bands may arise from CO2, which vibrates at about 2300 cm−1 with a greater intensity [52].

Fig. 4
figure 4

FTIR spectra of MRF-CX and MRF-GO-Ni-CX xerogels

For MRF-GO-Ni-CX xerogel a pronounced peak at 1560 cm−1 is visible. The origin of this effect is not clear. It may prompt the thought that aromatic ring bands and double bond (C = C) vibrations impose themselves over the C = O stretching vibration bands and OH binding vibration bands or N-O asymmetric stretching vibrations [44, 45, 53]. The huge difference in intensity of these peaks may suggest that signals of MF groups tended to grow on the graphene base [23]. For xerogel MRF-GO-Ni-CX an intensive peak at 1120 cm−1, corresponding to C-O vibrations derived from the phenolic structure [46, 47] or to C-N stretching vibrations in amines [51], is also visible.

The band that appeared for MRF-CX xerogel at about 680 cm−1 may have arisen from the stretching vibrations of carbon and hydrogen, confirming the presence of -C = C-H and C-H structures [48, 49, 54].

As can be seen from the data compiled in Table 3, the carbon xerogels vary slightly in the number of acid and basic functional groups. For both xerogels the amount of basic groups is higher than acidic. This is connected with the presence of the nitrogen groups on the porous carbon which increased surface basicity. For the carbon gel with the addition of Ni and GO both the amount of basic and acidic functional groups is higher by over 6% and 14%, respectively. Moreover, total content of surface oxide groups for carbon xerogel MRF-GO-Ni-CX is more than 11% higher than for xerogel MRF-CX.

Table 3 Acid and basic functional groups of xerogels MRF-CX and MRF-GO-Ni-CX

3.5 Cyclic voltammetry measurements

The electrochemical properties of carbon xerogels were assessed by carrying out cyclic voltammetry measurements. Cyclic voltammograms recorded at different scan rates, for electrodes made of MRF-CX and MRF-GO-Ni-CX xerogels are shown in Figs. 5 and 6.

Fig. 5
figure 5

CV curves of MRF-CX and MRF-GO-Ni-CX electrodes measured in 6 M KOH at a scan rate of 1 mV s−1

Fig. 6
figure 6

CV curves of MRF-CX and MRF-GO-Ni-CX electrodes measured in 6 M KOH during the 10th cycle at different scan rates

From the curves presented in Fig. 5 one can observe that the shapes of the registered voltammetric curves are symmetrical, similar in shape to a rectangle (especially those recorded for sample MRF-GO-Ni-CX). The process of formation of electrochemical double layer is reversible in the tested potential range. In the presented potential scanning cycles, no decrease in recorded currents is observed, the electrodes remain stable during the performed 500 scanning cycles. The electrode made of MRF-GO-Ni-CX xerogel was further scanned for another 2,500 cycles (CV curves not shown here). The obtained data showed that in this case the capacitance of the electrode decreased by about 2% during this scaning.

Figure 6 shows the voltammetric curves in the potential range from −1 to 0 V, recorded in selected potential scanning cycles with a scanning rate of 5 and 10 mV/s, for MRF-CX and MRF-GO-Ni-CX xerogels. From the course of the CV curves shown in this Figure, it can be observed, that at the increased potential scanning rate of 5 mV s−1, only the voltammetric curves recorded for MRF-GO-Ni-CX xerogel are similar in shape to a rectangle. From the CV curves shown in Fig. 6, made during the scanning with the highest applied rate (10 mV s−1), the deterioration of the shape of the voltammetric curves is visible and the increasing slope of the curves during the charging and discharging process is noticeable.

The specific capacitance of the MRF-GO-Ni-CX electrode in comparison to the MRF-CX electrode is over 40% higher at the potential scanning rate of 1 mV s−1. At higher potential scanning rates, the differences in capacitance are even greater and so, when scanning at 5 and 10 mV s−1, they are over 250 and about 350%, respectively (Table 4).

Table 4 Specific capacitance of MRF-CX and MRF-GO-Ni-CX electrodes calculated for 10th cycle from CV and GCD

In the case of both xerogels, we can observe that as the sweep rate increases the capacitance decreases. This can be explained by the fact that the generation of the electrical double-layer (EDL) within the micropores is leisurely and not complete in reference to the potential scanning rate.

It seems that the MRF-GO-Ni-CX xerogel structure is better for allowing quick ion transport route, and thus the EDL can be quickly reoriented by changing the potentials resulting in rectangular cyclic voltammograms. It can be seen that the electrodes prepared from xerogel MRF-CX show inferior electrochemical behavior compared to the electrode with the addition of GO and Ni. Higher capacities were obtained for MRF-GO-Ni-CX xerogel at all scanning rates used. It seems that the GO and nickel present in the MRF-GO-Ni-CX xerogel were involved in the creation of the structural features of the carbon gel with increased specific capacity [41]. Moreover, the higher amount of surface oxide groups for carbon xerogel MRF-GO-Ni-CX resulted in an increase of the specific capacitance of this material. However, for this sample, the rectangular shape of CV curves decreases, as the scan rate increases, showing that the surface area is not accessible for electrical double layer formation during faster charge-discharge reactions. This is mainly attributed to pseudo-capacitive reactions induced by groups containing heteroatoms which, result in additional polarization. Obviously, the MRF-CX electrode shows a faster deflection than the MRF-GO-Ni-CX electrode. This result is compatible with their internal structures. The obtained specific capacitances were comparable to the capacitances obtained by Lee et al. [55] for nano-sized-nickel doped carbon aerogels, but with a much higher addition of nickel. The specific capacitance obtained for carbon gels with the addition of nickel as a catalyst in the amount of 7 and 10% [41] was also lower than for carbon xerogel to which nickel and GO were introduced simultaneously.

The high-rate capability and good long-term cycling stability of MRF-GO-Ni-CX carbon xerogel can also be assigned to the addition of GO into the conductive nitrogen-containing carbon framework ensure a porous architecture and high affinity of charge transfer [17].

Such good stability after long-term cycling suggests that the porous structure of the MRF-GO-Ni-CX electrode can well tolerate volumetric change and the counter-ion drain effect during the rapid charge/discharge process, which makes MRF-GO-Ni-CX promising for future supercapacitor applications.

3.6 Galvanostatic measurements

Figure 7 shows the GCD profiles of MRF-CX and MRF-GO-Ni-CX xerogels electrodes under different current densities ranging from 0.1 to 1 A g−1. Both samples exhibit triangular shapes between −1 and 0 V at all current densities. Linear and symmetry charge/discharge behaviour is observed for both electrodes indicating good reversibility. It can be clearly seen that MRF-GO-Ni-CX electrode exhibits the largest charging/discharging time span, suggesting large specific capacitance (Fig. 7b). The discharge curve of the MRF-GO-Ni-CX electrode from 0 to −1.0 V vs Hg/HgO is nearly linear. One can observe the slope of the time dependence of the potential on this curve, which is connected with the phenomena of a surface redox reaction on the electrode – electrolyte interface [56]. This is also in line with the data on amounts of oxygen surface groups (Fig. 4 and Table 3) [40]. This pseudocapacitance behaviour is also noted for the MRF-CX electrode from 0 to −0.3 V (Fig. 7a).

Fig. 7
figure 7

GCD curves of (a) MRF-CX and (b) MRF-GO-Ni-CX electrodes

The detailed values of calculated specific capacitances are summarized in Table 4. It is noteworthy that the MRF-GO-Ni-CX electrode showed the higher specific capacitance, which is consistent with the result of specific capacitance measurement by cyclic voltammograms. Also in the case of galvanostatic charge/discharge higher capacitances were obtained than in the case of carbon gels with 7 and 10% nickel dopants [41].

Repeated charge-discharge cycling was used to examine the cycle life of supercapacitors as a significant factor connected with its electrochemical performance. The GCD stability of MRF-CX and MRF-GO-Ni-CX electrodes was measured at current density of 0.1 A g−1 for 1000 cycles, as illustrated in Fig. 8.

Fig. 8
figure 8

Cycle performance of carbon xerogel electrodes at current density of 0.1 A g−1

4 Conclusions

In summary, we demonstrated that the synthesis of melamine-graphene oxide-nickel-resorcinol-formaldehyde derived carbon xerogel by a sol-gel method leads to obtaining an electrochemically active material. The prepared material was characterized in terms of morphology, chemical composition, pore structure, and surface area and its electrochemical potential in capacity measurements was tested.

Carbon xerogel with the addition of GO and Ni, synthesized in the conducted research, can be considered as an active electrode material in electrochemical capacitors. Specific capacitances obtained for carbon xerogels doped with GO and Ni simultaneously were higher than those obtained for carbon gels synthesized only with the addition of nickel [41, 55]. Modification of carbon xerogel with GO and Ni leads to an increase of the capacitance of the electrodes for supercapacitor applications due to the synergistic effect of graphene oxide and nickel. The CV study of MRF-GO-Ni-CX displayed a typical voltammogram of the electric double-layer capacitors, while the GCD study showed isosceles triangular shape curves, which are characteristic of the electric double-layer capacitors.

High specific capacitances and good cyclic stability were achieved for MRF-GO-Ni-CX with the highest specific capacitance of 114 Fg−1 at the lowest scan rate, 1 mV s−1, with good stability and durability. Also during GCD at 0.1 Ag−1 the highest specific capacitance of 222 Fg−1 for MRF-GO-Ni-CX carbon xerogel was obtained.