1 Introduction

Ascorbic acid (AA) is a micronutrient that is essential for organism metabolism and growth. Additionally, it can be used to treat diseases like scurvy, poisoning, and atherosclerosis [1,2,3]. AA cannot be synthesized by the human body, so it must be consumed through food, vitamin supplements, and beverages containing vitamin C from outside sources. To diagnose diseases, detect illnesses, and promote health, the AA content of biological samples, food, and medications should be monitored to assist in diagnosing diseases, detecting illnesses, and promoting sustainable consumption [4, 5]. In addition, AA must be quantified in samples of food, pharmaceuticals, and cosmetics [6]. AA can be quantified in a number of ways to ensure human well-being and industrial productivity, such as solid phase iodine, [7], spectrophotometry [8], titrimetric [9], electrophoresis [10], fluorescence [11], chemiluminescence [12], and electrochemical techniques [13]. High-performance liquid chromatography (HPLC) allows the selective detection of a multitude of biomolecules in a mixture, but it is much slower, more expensive, and labor-intensive than traditional methods [14]. These analytical techniques are often quite expensive, labor-intensive, and difficult to use. However, electrochemical techniques have proven to be straightforward, affordable, extremely sensitive, and selective in recent years, thus attracting a great deal of attention [15]. Quantification of AA has been accomplished using two electrochemical techniques, including enzyme-based and enzyme-free techniques [16]. AA detection using enzyme-based methods is expensive and has several problems, including denaturation of enzymes during storage, so non-enzymatic methods have been extensively utilized as an alternative [17]. For non-real-time applications with higher sensitivity and selectivity than electrochemical methods, high electrocatalytic materials have always been desired [18]. It is therefore challenging to develop electrocatalytic materials with such high efficiency, but adopting a green chemistry approach can help overcome this problem. As a result, many electrocatalytic materials have been developed and investigated for non-enzymatic sensors [19]. The strong electrochemical activity of metal oxides makes them suitable for this application [20]. Bimetallic oxides, particularly nickel–cobalt oxides (NiCo2O4), have been found to be excellent materials for the development of non-enzymatic sensors, owing to their significant redox properties. Since NiCo2O4 nanostructures have limited surface characteristics and poor electrochemical performance, they have been combined with other materials to develop composites such as MnO2/NiCo2O4 [21], Co3O4/NiCo2O4 [22], NiCo2O4@graphene [23] and Fe2O3@NiCo2O4 [24]. Moreover, numerous morphologies of NiCo2O4 have been fabricated including nanosphere [24], nanorods [21], nanosheets [25] and nanotubes [26]. In order to design non-enzymatic AA acid sensors with high sensitivity, new methods must be explored for improving NiCo2O4 electrochemical performance. The environmental friendliness, low cost, and eco-friendliness of green chemistry have drawn much attention in recent years, and it is expected to grow rapidly [23]. In a green method of mediation, biomass waste materials can be used to tailor nanostructured materials' surface properties, including catalytic sites and charge transfer properties [27]. Currently, only a few studies have been conducted on the production of NiCo2O4 nanostructured materials from biomass wastes. Based on the above facts, an outstanding phytochemical analysis of garlic (Allium sativum) leaves extract has been reported for the first time in order to modify the shape and surface properties of NiCo2O4, with AA being detected highly sensitively and selectively. Among the phytochemical compounds found in garlic (Allium sativum) leaves extract are allicin, alliin, diallyl sulphide, S-allyl-1-cysteine, diallyl disulfide, diallyl trisulfide, allyl mercaptan, and (R)-S-(2-hydroxypropyl) cysteine [28]. Phytochemicals found in garlic leaves (Allium sativum) extract can create surface vacancies and modify surface reactions in nanostructured materials. An illustration of phytochemicals serving as reducing, capping, and stabilizing agents can be seen in Scheme 1. In this study, garlic leaf extract served as a catalyst during the hydrothermal process to produce NiCo2O4 nanostructures for robotic AA determinations.

Scheme 1
scheme 1

Shows the various phytochemicals present in the garlic (Allium sativum) extract

2 Experimental section

2.1 Chemical reagents used

The present study used nickel chloride hexahydrates, cobalt chloride hexahydrates (CoCl2·6H2O), lactic acid, glucose, sodium chloride, uric acid, potassium chloride, ascorbic acid, glucose, sodium hydroxide, urea, hydrochloric acid, disodium phosphate, and monopotassium phosphate without pretreatment. Analytical grade chemical reagents were purchased from Sigma Aldrich, Karachi, and Sindh, Pakistan. A pH 7.4 phosphate buffer solution was used as the electrolyte medium during the electrochemical determination of AA. A hydrothermal process was utilized to synthesize NiCo2O4 nanostructures in presence of phytochemicals. Garlic leaves were purchased at the local market, cleaned with deionized water, and allowed to air dry for five hours. The garlic leaves are then chopped and put in a juicer to make the extract. Several concentrations of garlic leaf extract, cobalt chloride hexahydrate (0.1 M), urea (0.1 M) and nickel chloride hexahydrate (0.015 M) were added to 100 mL of deionized water to produce NiCo2O4 nanostructures. The growth solution was diluted with different quantities of garlic leaf extract (5 mL, 10 mL, and 15 mL) to achieve a pH between 8.2 and 7.4. Total volume of precursors solution with and without the use of garlic leaves extract was equal to 100 mL. A five-hour hydrothermal reaction was then conducted with 100 mL growth solutions covered with aluminum sheets at 95 °C. Nickel–cobalt bimetallic hydroxide phase material was recovered on filter paper and repeatedly rinsed with deionized water. The hydroxide phase was dried for 12 h at room temperature after being collected. The bimetallic hydroxide phaseof material was burned at 500 °C for five hours in the open air for the transformation of bimetallic oxide phase. Pure NiCo2O4 nanostructures were also synthesized without garlic leaf extract using the same method. A black colored NiCo2O4 nanostructured structure has been obtained, which can be utilized for further analysis.

2.2 Physical investigations of different NiCo2O4 nanostructures

The morphology of NiCo2O4 nanostructures was investigated with an SEM (JEOL Japan Model No. JSM-IT 100, Auto Fine Coater: JEC-3000FC, Coating done on a 20 mA current for 60 s), using an accelerating voltage of 10 kV. The crystal quality of garlic leaves extract NiCo2O4 nanostructures was determined by powder X-ray diffraction (XRD) at 45 kV and 45 mA utilizing CuK radiation (λ = 1.5418 Å) as a source of X-rays. To examine the confined nanoscale structure, a 200 kV high resolution transmission electron microscope (HRTEM) was used. An energy dispersive spectrometer was used to quantify the elemental mapping. The valence states of the molecules were confirmed by X-ray photoelectron spectroscopy (XPS) under extremely high vacuum. The XPS features were deconvolved using a Shirley type background and Voigt curves with C1s at 284.6 eV as the reference binding energy.

2.3 Non-enzymatic sensing of AA onto surface modified NiCo2O4 nanostructures

A variety of electrochemical techniques have been used to characterize non-enzymatic AA sensors, including cyclic voltammetry, amperometry, electrochemical impedance spectroscopy, and linear sweeping voltammetry. This experiment was conducted with a three-electrode configuration, consisting of silver-silver chloride (Ag/AgCl, filled with 3.0 M KCl) serving as the reference electrode, platinum sheet serving as the counter electrode, and glassy carbon electrode (GCE) serving as the working electrode. The GCE was washed with deionized water before modification and polished with alumina paste (0.3 µm) and silicon paper. An ink containing ten mg of NiCo2O4 nanostructures and 0.5 mL of Nafion (5%) was prepared with 2.5 mL of deionized water and 0.5 mL of Nafion. A 10µL of catalyst ink (mass of 0.2 mg) was dropped onto the GCE using drop casting method and dried with the blow of air at room temperature. An AA stock solution of 10 mM was prepared in a buffer solution of 0.1 M phosphate buffer at pH 7.4. In this solution, AA was dissolved in phosphate buffer. The selectivity of non-enzymatic AA sensors was tested by diluting AA solutions in buffer solutions containing potassium, sodium, and potassium ions at pH 7.4. The sensor was tested using interfering species at the same concentration of AA, including urea, lactic acid, glucose, and uric acid. The linear range of the AA sensor was determined using CV and chronoamperometry methods using different concentrations of AA dissolved in 0.1 M phosphate buffer solution (PBS), pH 7.4. The technique allowed a non-enzymatic sensor's low limit of detection to be determined [29]. A schematic representation of the synthesis, electrochemical signal, and the general mechanism for sensing ascorbic acid is shown in Scheme 2. Furthermore, the electrochemical cell set up is shown in Scheme 3.

Scheme 2
scheme 2

Stepwise synthesis of NiCo2O4 nanostructures using garlic leaves extract and general oxidation mechanisms of AA using electroanalytical method

Scheme 3
scheme 3

illustrates the electrochemical cell set up

3 Results and discussion

3.1 Structural and morphological investigations of garlic leaves extract assisted different NiCo2O4 nanostructures

A powder XRD pattern of NiCo2O4 nanostructures is illustrated in Fig. 1, which can be used to evaluate the crystallinity of the powder. Phytochemical components in garlic leaf extract have also been shown to improve NiCo2O4 nanostructure crystal quality. The measured diffraction patterns matched the standard JCPDS card no: 96-900-5891 closely, attesting a cubic crystal phase of the material and confirming its high purity. Typical NiCo2O4 nanostructure reflections are (111), (220), (311), (222), (400), (511) and (440), at two theta angles of 19.40, 31.30, 36.880, 38.590, 44.850, 59.410, and 65.300. In spite of the fact that garlic leaf extract did not alter the crystal cubic phase or composition of NiCo2O4 nanostructures, the relative intensities were slightly varied due to the reducing, capping, and stabilizing properties of garlic leaf extract, as shown in Fig. 1. NiCo2O4 nanostructures were examined using SEM in Fig. 2a–e. Figure 2a illustrates a pure NiCo2O4 nanostructure with a nanorod-like morphology and several microns in length. In Fig. 2b–e, garlic leaf extract altered the morphology of NiCo2O4 nanostructures, resulting in short-range thinner nanowires consisting of nanoparticles rather than nanorods, demonstrating the impact of phytochemicals on surface morphology. According to Fig. 2e, NiCo2O4 nanostructures obtained with garlic leaf extract are typically 50–100 nm in size, confirming the capping, reducing, and stabilizing roles of garlic leaf extract. By incorporating phytochemicals into garlic leaf extracts, NiCo2O4 nanostructures may be structurally modified. Nanorods were transformed into thinner nanowires due to oxygenated groups terminated from garlic leaf extract, as shown in Scheme 1. In the process of growing, phytochemicals played a vital role in transforming nanorods into thinner nanowires due to their reducing, capping, and stabilizing properties. Using Image J software, HRTEM and fast Fourier transform (FFT) images were taken to examine deep morphological features and atom-by-atom calculate d-spacing of NiCo2O4 nanostructures. In Figs. 3 and 4, HRTEM analysis is shown on pristine NiCo2O4 nanostructures and garlic leaf extracts of 10 mL assisted synthesized NiCo2O4 nanostructures. Figure 3 shows the first TEM/HRTEM analysis, the elemental mapping, and the EDS spectrum for pure NiCo2O4 nanostructures. According to Fig. 3a, the calculated d-spacing for pristine materials is 0.46 nm as calculated using Image-J software [30, 31]. The EDS spectra and elemental maps of pristine material are shown in Fig. 3b–e. The NiCo2O4 nanostructures prepared with garlic leaves extract have also shown a reduction in d-spacing compared with pure NiCo2O4, as shown in Fig. 4a, along with the desired FFT transformation [32, 33]. Figure 4b–e illustrates the elemental mapping with corresponding EDS spectra. Garlic leaf phytochemicals have demonstrated their ability to reduce, color, and stabilize materials due to their reduced d-spacing values. Using a synthetic garlic leaf extract, researchers have observed more active sites, vacancies, and electrochemical activity towards facilitating electron transfer between electrodes [34]. The possible synthesis mechanism of NiCo2O4 using phytochemicals from the garlic leaves extract as described in Scheme 4. Briefly, it could be illustrated that the functional groups like amine and hydroxyl from phytochemicals of garlic leaves extract could show the chelating possibilities with the bimetallic ions along with hydroxyl ions produced by the reaction of urea with the water through the ammonia formation. Hence, significant morphological transformation of NiCo2O4 might take place as shown in Scheme 4.

Fig. 1
figure 1

XRD Pattterns of various NiCo2O4 nanostructures inclduign pristine and preared with 5 mL (Sample 1), 10 mL (Sample 2) and 15 mL (Sample 3) of galric leaves extract

Fig. 2
figure 2

ad SEM iamges of various NiCo2O4 nanostructures inclduign pristine and preared with 5 mL (Sample 1), 10 mL (Sample 2) and 15 mL (Sample 3) of galric leaves extract

Fig. 3
figure 3

HRTEM analysis of pristine NiCo2O4 nanostructures a HRTEM images and FFT conversion at right side with d-spacing value, bd corresponding elemental mapping, e EDS spectra for elemental existence

Fig. 4
figure 4

HRTEM analysis of NiCo2O4 nanostructures prepared with 10 mL of galric leaves extract a HRTEM images and FFT conversion at right side with d-spacing value bd corresponding elemental mapping, e EDS spectra for elemental existence

Scheme 4
scheme 4

Possible synthesis mechanism of NiCo2O4 nanostructures using phytochemicals from garlic leaves extract

Furthermore, XPS measurements were conducted as shown in Fig. 5 in order to gain a better understanding of the chemical states and surface species of NiCo2O4 nanostructures prepared with garlic leaf extract. Since pristine NiCo2O4 nanostructures have been reported previously [70], both with and without garlic leaves extract, the method used here is similar. Carbon's average binding energy was determined based on the XPS binding energies of each element. NiCo2O4 nanostructures contain two different chemical states of Co, as shown in Fig. 5a. Figure 5a shows two spin orbital peaks located at 779.73 eV and 781.60 eV, corresponding to Co3+ and Co2+ oxidation states, respectively. Additionally, satellite peaks at 785.8 eV and 789.37 eV were observed in the resolved Co 2p spectrum. Co3+ and Co2+ were calculated to have a relative percentage of 60.18% and 27.29%, respectively. The Ni 2p spectrum is shown in Fig. 5b using the Voigt fitting. As shown in Fig. 5b, Ni2+ and Ni3+ valence states exhibit a spin orbital double peak at 853.88 eV and 855.60 eV, respectively. In terms of valence percentage, Ni2+ represents 6.06% and Ni3+ represents 67.38%. An 861.34 eV satellite peak was observed with a relative percentage of 25.96%. XPS fits for Ni 2p have been shown to be in agreement with previous results [21, 35]. The O 1s spectrum of NiCo2O4 nanostructures prepared with 10 mL of garlic leaf extract was also collected, and its fitting results are shown in Fig. 5c. The binding energies estimated at 529.69 eV, 531.10 eV, and 532.68 eV for well resolved three peaks have been associated with distinct metal–oxygen, oxygen ions, and physic/chemisorbed water on the surface of NiCo2O4 nanostructures, confirming earlier result [35]. Studies have shown that NiCo2O4 nanostructures prepared with garlic leaf extract have high oxygen ions (O) and Co3+ valence states that are highly desirable for electrocatalysis [21].

Fig. 5
figure 5

XPS resolved spectra a Co 2p, b Ni 2p, c O 1s of NiCo2O4 nanostructures prepared with 10 mL of galric leaves extract

3.2 Non-enzymatic sensing of ascorbic acid (AA) using NiCo2O4 nanostructures prepared with garlic leaves extract

An electrolyte of pH 7.4 phosphate buffer solution was used for the development of AA sensors. Three-electrode cells were used for the detection of AA. For each electrode, preliminary electrochemical signals were obtained using cyclic voltammetry, as shown in Fig. 6a. Four GCEs were modified with pure NiCo2O4 nanostructures and three samples of NiCo2O4 nanostructures prepared with 5 mL, 10 mL, and 15 mL of garlic leaves extract. They were represented as modified glassy carbon electrode (MGCE). As shown in Fig. 6a, CV curves were recorded using 0.5 mM AA at a scan rate of 50 mV/s. Compared to pristine NiCo2O4 nanostructures, NiCo2O4 nanostructures prepared with garlic leaves extract show strong oxidation signals in Fig. 6a. A 5 mL concentration of garlic leaf extract enhanced NiCo2O4 nanostructure electrochemical performance, while a 10 mL concentration of garlic leaf extract resulted in the best electrochemical performance. By adding garlic leaves extract to NiCo2O4 nanostructures, the effectiveness of these structures significantly decreased, possibly due to a decrease in active sites. NiCo2O4 nanostructures' functionality was limited by a 15 mL use of garlic leaves extract since the surface became less active and had favorable features that could facilitate AA oxidation. According to Fig. 6b, NiCo2O4 nanostructures and bare glassy carbon electrodes (BGCE) were tested in phosphate buffer solutions at pH 7.4 in the presence and absence of 0.5 mM AA. As shown in Fig. 6b, NiCo2O4 nanostructures generated the AA signal, whereas bare glassy carbon electrodes did not demonstrate any electrochemical activity. In response to this preliminary testing, systematic sensor studies were conducted with NiCo2O4 nanostructures prepared using garlic leaf extract in 10 mL. In an experimental study using NiCo2O4 nanostructures, the following mechanism was demonstrated to detect AA. Typical electron transfer reactions involve oxidizing AA to give electrons to Co3+ and Ni3+ ions, then reducing them to Co2+ and Ni2+. NiCo2O4 nanostructures synthesized with 10 mL of garlic leaf extract showed enhanced oxidation because they were exposed to a high density of active sites, had favorable charge transfer at electrode-electrode interfaces, and had unique morphological characteristics resulting from reducing, capping, and stabilizing agents from garlic leaves extract. Figure 7a shows the electrochemical kinetics of nanostructures prepared with 10 mL of garlic leaf extract and 0.5 mM AA at different scan rates. The diffusion-controlled kinetics of AA electrochemical reaction were demonstrated by increasing the scan rate and increasing the peak current. Figure 7b illustrates the peak currents of oxidation for each scan rate against the square root of the scan rate, and literature supports these findings [35,36,37,38]. There was a regression coefficient of 0.99 during the scan rate study in the presence of AA oxidation, which was regulated by surface adsorption and electrochemistry [38, 39]. AA oxidation was investigated using CV curves at different pH values adjusted in 0.5 mm of AA, and the results are shown in Fig. 8a. An AA sensor that is nonenzymatic was evaluated at pH 7.4 since the peak shape and current are more obvious. In the pH investigation, the pH of the analyte solution significantly influenced NiCo2O4 nanostructure activity, as has already been reported [39]. The pH of the solution influences the limited activity of NiCo2O4 nanostructures, as shown in Fig. 8b. This indicates that analytes with a pH close to 7.4 exhibit favorable oxidation of AA, but analytes with a pH below or above 7.4 are less stable and effective. Previous studies have documented such phenomena [40]. As a result of analyzing the pH ranges of 5.4, 6.4, 7.4, 8.4 and 9.4, it is determined that all electrochemical experiments were conducted at pH 7.4, as the CV results shown are highly stable at pH 7.4 and show an enhanced oxidation peak.

Fig. 6
figure 6

a Cyclic voltammograms at a scan rate of 50 mV/s of MGCE with 5 mL, 10 mL and 15 mL garlic leaves extract assistd NiCo2O4 and pristine NiCo2O4-modified GCE in the presence of 0.5 mM of AA in 0.1 M PBS pH 7.4. b Cyclic voltammograms at 50 mV/s of bare GCE and modified with 10 mL assisted NiCo2O4 in electrolyte and in the presence of 0.5 mM AA in 0.1 M PBS pH 7.4

Fig. 7
figure 7

a Cyclic voltammograms at a scan rate of 50 mV/s of MGCE with 10 mL garlic leaves extract assisted NiCo2O4 modified GCE in the presence of 0.5 mM of AA in 0.1 M PBS pH 7.4. b Linear plot of peak current against square root of scan rate

Fig. 8
figure 8

a Cyclic voltammograms at a scan rate of 50 mV/s of MGCE with 10 mL of garlic leave extract assisted NiCo2O4-modified GCE in the presence of different pH values of 0.5 mM of AA in 0.1 M PBS. b Linear plot of peak current versus different pH values of 0.5 mM of AA in 0.1 M PBS

3.3 The calibration plots, stability, repeatability and selectivity studies of newly developed non-enzymatic AA sensor based on surface modified NiCo2O4 nanostructures

With 10 mL of garlic leaf extract, NiCo2O4 nanostructures were prepared to study the linear range and limit of detection of AA. The sensing range of NiCo2O4 nanostructures prepared with 10 mL of garlic leaves extract was maintained using different electrochemical modes. However, different linear AA ranges were observed depending on the sensitivity of each electrochemical mode. We determined the linear range of AA concentrations in phosphate buffer solution at pH 7.4 using CV at 50 mV/s using a range of AA concentrations in phosphate buffer solution. Figure 9a shows that the peak current for AA oxidation increased linearly with increasing AA concentrations, with a linear range of AA of 0.5 to 8.5 mM. From the results of this study, it appears that AA non-enzymatic sensors have a wide linear range among those reported so far [41,42,43,44,45,46]. The linear plot depicted in Fig. 9b was constructed to evaluate the analytical quality of a newly constructed non-enzymatic AA sensor in terms of accuracy and precision by selecting the oxidation peak current for each AA concentration against a variety of AA concentrations. According to the linear plot of CV data, AA sensors are capable of measuring high concentrations of AA and can be applied to the analysis of real samples. The limits of detection (LOD) and quantification (LOQ) were estimated using published research [41]. This study determined that the LOD and LOQ were 0.01 mM and 0.04 mM, respectively. The reported results shown in Table 1 based on the non-enzymatic AA, it is very clear that the suggested approach to AA analysis could prove highly valuable as a substitute technique for AA detection in real samples where a broad linear range and a low detection limit are highly desirable. As well, the linear sweep voltammetry (LSV) mode was used to estimate the calibration of a newly constructed non-enzymatic AA sensor, as shown in Fig. 10a. Fig. It is shown in Fig. 10a how the proposed AA sensor arrangement can detect AA over a wide linear range, 0.1 mM to 7.0 mM, and generate measurable currents. As the concentration of AA increases, a greater current is produced, demonstrating the sensitivity of the recently designed AA sensor. A linear plot of peak current against AA concentration is shown in Fig. 10b. The proposed non-enzymatic AA sensor exhibits outstanding analytical performance and has a coefficient of 0.99 as a regression coefficient based on a linear fitting of LSV curves. Based on a full CV curve, an AA sensor can detect a wide linear range of AA with precise and accurate outputs. Figure 11a illustrates how the linear range of the AA sensor can also be calculated using the extremely sensitive electrochemical mode of amperometry. When the concentration of AA was between 0.5 and 3.5 mM, the amperometric signal was highly sensitive. Figure 11b shows a linear plot of the amperometric signal for these various AA concentrations. This analysis shows that the powerful analytical features of AA detection are capable of detecting AA with a regression coefficient of 0.99. The excellent electrochemical activity of NiCo2O4 nanostructures prepared with 10 mL garlic leaf extract has been attributed to several factors, including oxygen vacancies on the surface, good crystal quality, surface modification by reducing agents, and well controlled size and shape due to the capping agent Several and stabilizing agents of garlic leaf extract phytochemicals. Analytical techniques such as SEM, XRD, HRTEM, and XPS have confirmed the results. In order to determine how well the proposed AA sensor performs in the presence of potential interfering species, a selectivity experiment was conducted. The interfering study was used to investigate the selectivity of proposed non-enzymatic sensor and the concentration of ascorbic acid was used as 0.5 mM, whereas the concentration of each interfering agents was used about 0.1 mM. In Fig. 12a, we have plotted CV curves with interfering species such as glucose, uric acid, urea, lactic acid, mannose, sodium ions, chloride ions, potassium ions, and calcium ions at 50 mV/s in 0.5 mM AA. In the presence of AA, successive additions of interfering species did not affect the oxidation peak position, drift in oxidation potential, or peak current of the AA sensor. In this study, the proposed AA sensor configuration was found to have excellent selectivity and may be suitable for detecting AA in biological matrixes. In Fig. 12b, a bar graph shows the peak current variation of AA following the addition of interfering species. Peak current changes by less than 4%. NiCo2O4 nanostructures can selectively quantify AA even in the presence of competing interference agents by reducing, capping, and stabilizing the phytochemicals in garlic leaves extract. The AA sensor electrode was evaluated for repeatability and stability by measuring 20 CV cycles of 50 mV/s at 0.5 mM. Figure 13a shows that the gadget can be repeatedly used. Enzymatic biosensors are particularly problematic when it comes to the stability of AA biosensors. Therefore, we developed a non-enzymatic AA sensor for practical sample analysis. As shown in Fig. 13b, a bar graph shows peak current after several repeatable CV cycles. A low error rate of less than 5% demonstrates that the presented approach has excellent analytical properties and that NiCo2O4 nanostructures are suitable for long-term applications. The amperometric response of NiCo2O4 nanostructures in a 0.5 mM AA solution was measured over a period of 1000 s to determine the stability of these nanostructures. Amperometry results can be seen in Fig. 14a. In view of the fact that there was no current fluctuation during testing, it can be concluded that the current AA sensor is adequate for long-term use. Compared to other reported AA sensors/biosensors in the literature, the sensor/biosensor was improved due to its wide linear range, low detection limit, and low fabrication cost. With a sweeping frequency range of 100 kHz to 1 Hz, an amplitude of 10 mV, and a bias potential of 0.4 V, we conducted electrochemical impedance spectroscopy (EIS) on NiCo2O4 nanostructures in order to improve electrochemical performance. For three NiCo2O4 nanostructures, including the virgin sample, sample 1 and sample 2 in 0.5 mM AA, Nyquist plots were measured. As indicated by the Nyquist plots of sample 2, the low arc indicates a fast charge transfer between the NiCo2O4 nanostructured working electrode and analyte solution at 0.5 mM, whereas the intercept at high frequency indicates the resistance of the electrolyte [47]. It is evident from Nyquist plots that the pristine NiCo2O4 nanostructures, samples 1 and 3, are limited by poor charge transfer.

Fig. 9
figure 9

a Cyclic voltammograms at a scan rate of 50 mV/s of MGCE with 10 mL of garlic leaves extract assisted NiCo2O4 in the presence of various concentrations of AA in 0.1 M PBS pH 7.4. b Linear plot of peak current versus successive increase of AA concentrations

Table 1 Performance comparison of the enzyme-free sensor based on NiCo2O4 nanostructures grown with 10 mL garlic leaves extract versus several non-enzymatic AA sensors in the literature
Fig. 10
figure 10

a Linear sweep voltammetry at a scan rate of 10 mV/s of MGCE with 10 mL of garlic leaves extract assisted NiCo2O4 in the presence of various concentrations of AA in 0.1 M PBS pH 7.4. b Linear plot of peak current versus successive increase of AA concentrations

Fig. 11
figure 11

a Chronoamperometric response curves measured at an applied potential of 0.3 V of MGCE with 10 mL of garlic; eaves extract assisted NiCo2O4 in the presence of various concentrations of AA in 0.1 M PBS pH 7.4. b Linear plot of peak current versus successive increase of AA concentrations

Fig. 12
figure 12

a Cyclic voltammograms at a scan rate of 50 mV/s of MGCE with 10 mL of garlic leaves extract assisted NiCo2O4 in the presence of 0.5 mM AA and other competing interfering agents (20%) in 0.1 M PBS pH 7.4. b Bar graph of peak current with addition of interfering species for the illustration of variation of peak current

Fig. 13
figure 13

a Cyclic voltammograms at a scan rate of 50 mV/s of MGCE with 10 mL of garlic leaves extract assisted NiCo2O4 in the presence of 0.5 mM AA in 0.1 M PBS pH 7.4. b bar graph of peak current for the description of change in the peak current with increasing number of CV cycles. Linear plot of peak current versus successive increase of AA concentrations

Fig. 14
figure 14

a Chronoamperometric response of MGCE with 10 mL of garlic extract assisted NiCo2O4 in 0.5 mM prepared in 0.1 M PBS pH 7.4 for the demonstration of stability of modified electrode, b EIS Nyquist plots collected for the MGCE with and 10 mL of garlic extract assisted NiCo2O4 in 0.5 mM AA using frequency range of 100 kHz to 1 Hz, amplitude of 10 mV and biasing potential of 0.6 V

3.4 Method of preparation real sample and their analysis

For practical applications, it is essential to examine the electrode's performance during the analysis of real samples. Commercial orange juice was purchased from a nearby market (in Sindh, Pakistan) and tested to validate the sensor's practical application for AA detection. Several filters were needed to remove suspended particles and pulp from the sample. A 25 mL solution of PBS at a pH of 7.4 was added to 10 mL of filtered juice. In Table 2, the results are presented. A standard recovery method was used to confirm the results. As a method of determining AA levels in real samples, ce-cone chewable tablets, which contain vitamin C, were selected. Chewable ce-cone tablets were obtained from a nearby pharmacy. A mixture of crushed vitamin C chewable pills (500 mg/tablet) was mixed with 10.0 mL of PBS 0.1 M, pH 7.4. The mixture was centrifuged for 20 min at 13,000 rpm. 100 mL of supernatant was diluted to 10.0 mL of ultrapure water to prepare the stock solution for the vitamin C chewable pills. AA content of Ce-cone tablet stock solution was determined using the standard addition method, and recoveries were calculated to assess the method's accuracy. NiCo2O4 nanostructures prepared with 10 mL garlic leaves extract provided highly encouraging results for the potential application of NiCo2O4 nanostructures for AA detection. Due to the high density of active sites present on garlic leaves, their surface properties have changed. A high electrode compatibility of NiCo2O4 nanostructures allows them to exhibit excellent sensing performance by promoting charge transfer at the interface.

Table 2 Practical performance of NiCo2O4 prepared with 10 mL of garlic leaves extract using standard addition method by following (%) recovery method

4 Conclusions

Nanostructures of NiCo2O4 were synthesized from garlic leaf extract by hydrothermal synthesis. To develop optimized electroactive materials based on NiCo2O4 nanostructures, various amounts of garlic juice, including 5 mL, 10 mL, and 15 mL were used. Analyses have been conducted on the shape, crystal quality, surface chemical composition, and elemental composition of the material. A garlic leaf extract exhibited phytochemical properties such as reducing, capping, and stabilizing agents, which strongly altered NiCo2O4 surface properties. In a non-enzymatic approach, the optimized NiCo2O4 nanostructures were found to be highly sensitive to AA detection using 10 mL garlic leaf extract. An AA sensor with a linear range of 0.5 mM to 8.5 mM and a detection limit of 0.01 mM is presented. In this study, AA sensors were tested for stability, repeatability, and selectivity. Since garlic leaves are biomass waste, they can be used to prepare highly electroactive materials for use in energy conversion, storage, and medicine.