1 Introduction

One of the many phenolic chemicals that have adversely affected water quality is resorcinol (RS) [1]. It is used for organic synthesis, in the rubber and plastics industries, as food and medicinal additives, etc. RS causes a number of hazards to the environment and public health. RS has toxicokinetic, carcinogenic, and genotoxic impacts on human health as a toxic phenolic substance that has poor biodegradability [2]. Additionally, exposure to this chemical is linked to a few minor health problems. When resorcinol is given to rats in large quantities, the production of thyroid hormone is disrupted, and goitrogenic consequences might result. In addition to its antibacterial, antifungal, and keratolytic qualities, it can be useful to serve as an antiseptic and disinfectant for the treatment of skin [3]. While its close proximity to the eyes can irritate and burn them and even cause eye injury. Additionally, skin rash, dryness, and itching with redness may also occur [4]. Similar to how oral RS may affect the throat, lungs and nose. It can cause wheezing, shortness of breath and coughing when inhaled. Low blood oxygen levels due to high amounts of RS can cause methemoglobinemia, exhaustion, and even death. Additionally, prolonged RS exposure has been linked to liver, renal, and nervous system damage [5]. Moreover, RS is a very toxic phenolic compound which have adverse effects on human health which includes carcinogenicity, genotoxicity, limited biodegradability and toxicokinetic. Given that it is easily absorbed in human skin and stomach juice. RS should be initially taken into account for its rapid and widespread detection in the ecological environment. RS can cause numerous deadly disorders such as convulsions, cyanopathy, endocrine disruption, and dermatitis catarrhal [6]. Governments and academics are now devoting considerably greater consideration to the detection of RS in both environmental and biological samples for the benefit of human health [7]. For the determination of RS, a variety of analytical methods has been recently employed. These include quartz crystal microbalance, surface plasma resonance, flow injection chemiluminescence, spectrophotometric, fluorescence, gas chromatography/mass spectrometry and spectrofluorimetric [8,9,10,11,12,13] and all of which have extensive literature. These procedures needed sample pre-treatment procedures including extraction, adsorption and separation, which made them extremely costly and time-consuming [14]. Even the chemiluminescence response cannot yet be used to identify adverse effects of RS [15]. Due to their distinctive qualities such as superb sensitivity, great accuracy with high efficiency, low maintenance costs, portability, wide linear analysis, versatility and simplicity, electrochemical techniques are capable and have a significant investigation field of study. Additionally, reproducibility, the analyte’s low quantity, time-saving and well stability of these methods are other advantages [16,17,18,19,20]. The standard electrode must always be enhanced with some powerful nanomaterials to serve as a functioning electrode that verifies its legitimacy for the correct detection [21]. Due to their superior catalysis, distinctive shapes, and use in optical and electrochemical sensing platforms, different nanoparticles are widely used [22]. The functionalized nanomaterial, which is synthesized when a metal oxide and metal combine, plays a significant role [23]. Such materials are used in many electrical, solar cell, and chemical sensing applications [24]. Numerous nanomaterials have been utilised as modifiers in electrochemical RS sensing. In contrast to their bulk counterparts, nanomaterials are employed in electrode modification because they have the following distinctive properties [25]; (a) the larger surface area accelerates the electrochemical process, (b) ideal analytes adsorb on an electrode’s surface and (c) regions that are both supportive and active for variability in electrode selectivity.

Due to their remarkable electrocatalytic activity, metal oxide nanoparticles were utilised in electrochemistry to improve the physical and catalytic characteristics of other materials [26,27,28]. Among the several metal oxides, including ZnO, CuO, MnO2, TiO2, and CoO2, researchers from all over the world are very interested in MgO because of its numerous advantages such as environment friendly, remarkable biocompatibility, nontoxicity, ease of source accessibility and high specific surface area [29]. Metal oxide nanoparticles modified with metallic elements are the best option for removing various types of contaminants from wastewater using heterogeneous photocatalysis. Ag and MgO NPs performed a significant role in phenol degradation, antibacterial activity and dye degradation activity among metal oxide and metal nanoparticles. Ag nanoparticle is one of the commonly utilised inorganic nanoparticles with numerous uses. The selectivity of magnesium oxide nanoparticles towards RS determination was solved with the introduction silver dopants in the present research and synthesising the nanoparticles via sol–gel technique. Ag doping of MgO nanoparticles aids in improving the selectivity and stability of RS sensing. Silver is added to provide a platform that is appropriate for the detection of particular analytes. Ag, Au, Pd, and Pt are examples of metallic catalysts that improve sensing efficacy with additional surface electronic states [30,31,32]. Additionally, Ag is the most preferable when selecting a doping agent due to its great uses in a variety of fields such as chemical, electrical, and optical field. The addition of Ag on the top surface of semiconductor metal oxide may substantially increase the carrier charge-moment (e− and h+ pair) kinetic in the resultant photo-catalyst. However, due to their multiple applications in the sectors of medicine, catalysis, and absorbents, among others, MgO-NPs have recently drawn greater attention. MgO-NPs, however, show less antibacterial and photocatalytic activity than Ag-NPs do. Ag may be used to significantly boost the antibacterial and phenol degradation activities of Ag-based photocatalysts. As a result, Ag-doped MgO nanoparticles have been synthesised for this experiment and further examined for the electrochemical detection of RS based on the existing literature [33,34,35].

2 Experimental sections

2.1 Reagents and instrumentation

The chemicals utilized in the experiment have been used without any further purification. 99% Magnesium nitrate (MgNO3·6H2O), sodium hydroxide (NaOH), 99.9% silver nitrate (AgNO3) and 99% sodium borohydride (NaBH4) were obtained from sigma Aldrich. The glassware utilized were washed with both de-ionized water and soap solution. DI water was used for the solution preparation. Utilising the sol-gel technique, Ag-doped MgO nanoparticles were synthesised. An electrochemical experiment has to be run on an electrochemical workstation with a three-cell setup. A platinum counter electrode, an Ag/AgCl reference electrode and an electrode modified with Ag-doped MgO nanoparticles are used as working electrode. Differential potential voltammetry (DPV) and cyclic voltammetry (CV) characterization techniques have been utilized for studying the electrochemical response of the fabricated electrode. A 0.1 M PBS buffer solution was used for all electrochemical experiments, using 0.05 V/s scan rate.

2.2 Synthesis of Ag-doped MgO nanoparticles

The synthesis process of Ag-doped MgO nanoparticles are shown in Fig. 1. Silver-doped magnesium nitrate (MgNO3·6H2O) was used to synthesise magnesium oxide nanoparticles and silver nitrate (AgNO3) as a source material along with sodium hydroxide. For the typical experimental procedure, 0.2 M magnesium nitrate (MgNO3·6H2O) and 4 mM silver nitrate (AgNO3) were dissolved in 100 ml of deionized water, respectively. The magnesium nitrate (MgNO3·6H2O) and silver nitrate (AgNO3) solution was made and 50 ml of a 1 M sodium hydroxide (NaOH) solution was added dropwise while the mixture was constantly stirred. After a little while a beaker of magnesium hydroxide precipitate emerged in a light brown colour. To eliminate ionic contaminants, the precipitate was filtered and rinsed twice with DI water before being centrifuged for two minutes at a speed of 5000 revolutions per minute and drying at room temperature. Two hours at 100 °C were utilised annealing the dry brown powder samples in the air.

Fig. 1
figure 1

Synthesis process of Ag-doped MgO nanoparticles

2.3 Fabrication of electrodes

The carbon pasteelectrodes were prepared with the mixture of synthesized Ag doped MgO nanoparticles, graphite powder and polyvinyl alcohol (PVA) in a ratio of 8:1:1. Then heating the mixture on the hot plate and adding NMP (1-methyl-2-pyrrolidinone) dropwise so that the mixture can be easily converted into a paste with the help of continuous stirring. The prepared paste is applied on the conductive cotton fabric and dried at room temperature. In this way the carbon paste electrodes of Ag-doped MgO nanoparticles were prepared for sensing applications.

3 Results and discussion

3.1 Material characterization

Standard characterisation methods including X-ray diffraction, scanning electron microscopy, and X-ray photoelectron were used to better understand the morphology, shape, size, and optical characteristics of the synthesised nanoparticles. Different methods such as general characterization and some specialised equipment were used to create and characterise Ag-doped MgO nanoparticles. The powder X-ray diffractometer (Rigaku Corporation) was used to study crystallinity. For morphological investigationscanning electron microscopy (SEM) was used. Fourier transform infrared (FTIR) spectra was studied for the identification and confirmation of the synthesized material. EDS and mapping have been used for elemental composition and chemical analysis. The characterizations of the synthesized Ag-doped MgO nanoparticles and the results are shown below.

3.1.1 XRD characterization

Fig. 2 displays the XRD plot for the synthesised Ag–MgO nanoparticles. With the use of XRD analysis, the phase and crystal structure of the Ag–MgO nanoparticles were investigated. The step size and angle 2θ range of XRD data are 0.02 and 10° to 80°, respectively. The primary X-ray diffraction peaks which were absorbed at angles 18.726°, 32.11°, 37.89°, 47.92°, 50.64°, 58.59° and 61.45° corresponding to the miller indices (101), (111), (200), (002), (220), (221), and (311), respectively. The peak pattern of Wang et al. and this peak pattern of MgO nanoparticles are comparable [36]. The results obtained for the magnesium oxide nanoparticles in PCPDF Win Card No. 76-1363 and (JCPDS No. 87-0653) are consistent with the XRD standard. According to Vannerberg’s analysis, the crystal structure of MgO nanoparticles is BCC, or cubic [37]. The face-centered cubic structure (JCPDS, file No. 04-0783) indicates that many Bragg reflection peaks were seen at 2θ values of 25.6°, 32.16°, 38.12°, and 44.3°, which are indexed to (210), (122), (111), and (200) planes of pure silver [38, 39]. The other peaks are due to the small amounts of AgNO3 that were still present in the sample.

Fig. 2
figure 2

XRD plot of Ag-doped MgO nanoparticles

Using Debye–Scherer’s equation, the size of MgO nanoparticles was determined.

$$D=\frac{0.9\uplambda }{\mathrm{\beta cos\theta }},$$
(1)

where D is the size of the crystal, X-ray wavelength, complete width at half maximum of the diffraction peak, and θ is the Bragg’s angle. According to calculations made using the Debye–Scherrer’s equation, the average crystallite size of Ag-doped MgO nanoparticles is 28 nm.

3.1.2 XPS characterization

The efficient integration of silver ions (Ag) with the host material (MgO) as well as oxidation state and electrical interactions of the synthesized material are studied using the XPS spectra of Ag-doped MgO nanoparticles. XPS characterization technique has been utilized to examine the chemical states of the elements in Ag-doped MgO. The elemental signals from the sample such as oxygen (O), carbon (C), silver (Ag) and magnesium (Mg) atoms are confirmed with the wide-scan spectrum shown in Fig. 3a. The signal at 48.87 eV in the Mg 2p XPS spectrum (Fig. 3b) indicates that with + 2 oxidation state Mg ions are present [40]. At 367.58 eV and 373.49 eV, the distinctive spin-orbits Ag 3d3/2 and Ag 3d5/2 have been detected as depicted in Fig. 3c. Figure 3d also displays the C1s high-resolution spectra. Additionally, Fig. 3e shows the O1s spectra which have a peak at 530.76 eV. The oxygen in the lattice of MgO may be responsible for the peak of O1s [40, 41].

Fig. 3
figure 3

XPS survey spectra of a Ag-doped MgO, b Mg2p, c Ag3d, d C1s, e O1s of Ag-doped MgO nanoparticles

3.1.3 FTIR characterization

Chemical groups and bonds in the substance are identified using FTIR spectroscopy. Figure 4 displays the FTIR spectrum of the synthesised Ag–MgO nanoparticles. FTIR characterization technique was used for studying the bonding in Ag–MgO nanoparticles. The 500–4000 cm−1 range was used for the FTIR study. The water molecules are responsible for the O–H stretching vibration bonds that are shown in the range of 4000–3400 cm−1. CO2 that has been absorbed from the atmosphere is what causes the peak at 2433.53 cm−1 [42,43,44]. Due to the extremely weak bonding vibration of the water molecule the transition at 1643.52 cm−1 was detected [45]. The existence of an aromatic ring [46] can be seen in the wide band at 1351.45 cm−1due to the C=O stretching frequency. The cubic phase of Mg–O is confirmed with the peak at 835.95 cm−1 [41].

Fig. 4
figure 4

FTIR spectra of Ag-doped MgO nanoparticles

3.1.4 SEM characterization

SEM has been used to examine the surface characteristics, structure, and grain characteristics of the material. SEM images of synthesized samplesshow that the particles are agglomerated. Figure 5a–d show images from a scanning electron microscope of synthesised Ag-doped MgO nanoparticles at various magnifications. The spherical particles are distributed uniformly and the high-magnification images of the Ag-doped MgO nanoparticles have a regular morphology. The formation of an aggregation of synthesised nanoparticles has also been shown in SEM pictures.

Fig. 5
figure 5

SEM images of the synthesized Ag doped MgO nanoparticles at magnification a 100 × and b 75 ×, c 50 × and d 25 ×, respectively

3.1.5 EDS and mapping

Its chemical composition was verified using energy-dispersive X-ray (EDX) spectroscopy on the produced sample. Figure 6a–c depict the elemental mapping of the synthesised Ag-doped MgO nanoparticles. As seen in the figure, the Mg, Ag, and O elements are evenly distributed. The distinct Mg, Ag, and O peaks may be seen in the EDS spectra in Fig. 6d. Figure 6e supports the synthesis of Ag-doped MgO nanoparticles representing the elemental weight and atomic percent proportions.

Fig. 6
figure 6

Elemental mapping of a Ag, b Mg, c O, d Elemental composition and e atomic and weight % of the elements present in the synthesized Ag doped MgO nanoparticles

3.2 Electrochemical characterization

With the development of electrochemical sensors based on synthesised Ag-doped MgO nanoparticle electrodes and utilising standard current–voltage measurements, the resorcinol chemical sensing behaviour is described. IV curves of the modified resorcinol chemical sensor based on carbon paste electrode with and without resorcinol chemical in phosphate buffer solution (PBS, 0.1 M, 20 ml, pH 7) electrolyte. The electrochemical system responds with a small current without resorcinol but a huge increase in current is seen when resorcinol (0.03 M) is added. This strongly shows that the synthesized Ag-doped MgO-based carbon paste electrode exhibits a quick reaction to the resorcinol. This increase in current often happens as a result of the analyte’s addition, which increases the solution’s ionic strength due to the large production of ions. A linear increase in current is observed as resorcinol concentration rises; however, the current then reaches saturation, possibly because there are no free active sites available on the Ag-doped MgO-based carbon paste electrode for resorcinol adsorption at higher concentrations. The manufactured resorcinol chemical sensor, which is based on a MgO electrode made of carbon paste doped with Ag, has the acceptable standard of sensitivity. The correlation value (R2) was ~ 0.99 and the detection limit was ~ 20.2 µM.

3.2.1 Incubation time, pH study and scan rate study

Once the analyte has been introduced to the electrolyte, the reaction must undergo an incubation period (Fig. 7a, b) before it can be considered complete. After 2 min, there is no noticeable shift in the current response, according to the DPV curve. Therefore, the incubation period of 2 min. is set for further studies. At lower pH levels, the current value rises, and a maximum current can be seen at pH 7. This is represented in the DPV curve as shown in Fig. 7c. Since lower pH has more H+, which dominates the current response, further increases in pH decrease the peak current value. Therefore, more research has been carried out at pH 7. The used potential scan rate determines the diffusion layer’s thickness above the electrode surface. Because of a slow potential scan rate, the diffusion layer will steadily deposit over the electrode. This leads to a smaller concentration gradient between the bulk solution and the electrode surface and, as a result, a smaller mass flux of the target compound, as in this case resorcinol. As a result, when the potential scan rate increased, the electrochemical current magnitude, which is related to the mass transport rate of RS towards the electrode, grew steadily, as illustrated in Fig. 7d.

Fig. 7
figure 7

a, b Shows the incubation time study, c pH study and d scan rate study fabricated electrodes

3.2.2 Sensing

The electrochemical behaviour of different modified electrodes has been evaluated with differential pulse voltammetry (DPV). As represented in Fig. 8a, the good conductivity of MgO nanoparticles is explained with DPV since the redox peak current of the electrode after modification with the synthesised nanoparticles is seen higher than that of the bare electrode. The combination of silver and magnesium oxide nanoparticles may also improve the electrochemical behaviour of the electrode by providing the necessary conduction pathways on the electrode surface. The peak current raised when the electrode surface is altered with Ag-doped MgO nanoparticles which is due to an increase in direct electron transport on the electrode surface. According to the aforementioned findings, the antigen was effectively immobilised on the electrode surface. The calibration curve between the peak current and RS at various concentrations is shown in Fig. 8b. The high degree of linearity is indicated by the R2 coefficient of correlation which is 0.975. The following formulae which utilise the slope of the calibration curves produced by DPV and the standard deviation of the minimum RS concentration are used to estimate the limit of detection and quantification, respectively, abbreviated as LOD and LOQ [47].

Fig. 8
figure 8

a DPV of Ag-doped MgO modified electrode for RS (0–600 µM) from − 1.0 to 1.0 V and b RS concentration against current calibration graph

$$\mathrm{LOQ}\hspace{0.17em}=\hspace{0.17em}10 \sigma /S$$
(2)
$$\mathrm{LOD}\hspace{0.17em}=\hspace{0.17em}3.3 \sigma /S$$
(3)

The detection and quantification limits of the fabricated electrode are found to be 20.2 µM and 61.3 µM, respectively. The obtained data is further contrasted with findings from earlier investigations, as shown in Table 1.

Table 1 Comparison table of LOD of detection of resorcinol

3.2.3 Interference study, reproducibility, repeatability and stability

Additional interferents including p-bromophenol (A), phenol (B), 2-nitrophenol (C), nitrophenol (D), 4-nitrophenol (E), and resorcinol (RS) were examined during the interference study (Fig. 9a). In the presence of 200 µM RS, at a concentration of 1 mM, each interferent was assessed. 20 µL of each of the interfering substances indicated above were added to PBS as part of the interference investigation.

Fig. 9
figure 9

a Interference study, b reproducibility, c repeatability and d stability of the fabricated electrodes are shown

Reproducibility is regarded as one of the most significant factors when assessing the sensor's accuracy. The repeatability of the sensor was studied using five separate electrodes of the synthesized material developed under the same conditions. To ensure that the results are consistent, the electrochemical behaviour of modified electrodes in 200 µM RS at pH 7 has been investigated. Figure 9b displays the bar graph for the peak current value and the repeatability of several sensors. The results demonstrated that the sensor has acceptable repeatability and could potentially be employed as an alternative to conventional electrodes (Fig. 9c). The target analyte was measured nine to ten times in a row for the stability test, with each measurement consisting of 0.20 µL of 200 µM RS cations (Fig. 9d). A stability (reproducibility) test is also carried out and investigated for 35 days. It was observed that the fabricated electrodes are extremely stable and barely show any detectable changes in the IV response.

4 Degradation

UV–visible spectrum for a pure resorcinol solution at a concentration of 3 mg L−1. In accordance with the literature [59], it is demonstrated that the greatest absorption peak for resorcinol occurs between 273 and 294 nm depending on pH levels. This wavelength corresponds to an aromatic ring.

The degradation mechanism of resorcinol is described as: the Ag-doped MgO nanoparticles have the ability to adsorb and retain resorcinol molecules on their surfaces. It allows the concentration of the contaminant at the catalyst surface. In the presence of water, NaBH4 produces sodium hydroxide (NaOH) and hydrogen gas (H2). Resorcinol molecules adhere to the surface of the Ag-doped MgO where they are reduced by hydrogen gas (H2) produced by NaBH4. When resorcinol is reduced, the chemical bonds within the pollutant molecule break down and results in the production of less hazardous and simpler compounds. Additionally, the Ag-doped MgO nanoparticles act as catalysts which promote the oxidation of the reduced organic compounds by atmospheric molecules of oxygen (O2). The intermediate chemicals are further broken down during this oxidation process into simpler, non-toxic byproducts like carbon dioxide (CO2) and water (H2O). Therefore, after understanding the degradation process, we have to investigate the amount of sodium borohydride that can be used in the reaction so that significant results could be obtained. Hence, the literature survey suggested 8 mmol amounts of sodium borohydride (NaBH4) [59]. For these investigations, we utilized a moderate concentration of 3 mg L−1 of resorcinol. Ag-doped MgO was synthesized via sol-gel method. To determine the catalytic activity of the catalyst, Ag-doped MgO with optimized amount of resorcinol was added to DI water along with 8 mmol of NaBH4 and 0.15 mg of Ag-doped MgO. The experimental results in Fig. 10a reveal that no observable degradation of RS occurred within 60 min even though there was no catalyst present. Figure 10b illustrates the presence of Ag-doped MgO catalyst causes the RS concentration to drop as the degradation time increases. In Fig. 10c, it is observed that absorbance decreases linearly with respect to time during the degradation of RS. The absorbance vs. time graph shows that Ag-doped MgO acts as a perfect catalyst for the degradation of RS in the presence of NABH4.

Fig. 10
figure 10

a UV–Vis-IR of resorcinol without Ag doped MgO NPs, b UV–Vis-IR of resorcinol after adding Ag doped MgO nanoparticles and c because of the effect of nanoparticles, the corresponding reaction rate

The Langmuir–Hinshelwood equation is widely used to describe the catalytic processes in heterogeneous systems. The first-order kinetics from the Langmuir–Hinshelwood equation is written as:

$$\mathrm{ln}\frac{C}{{C}_{o}}={K}_{p}t.$$
(4)

The ratio of the concentration of dye in the solution to the rate of dye degradation, as demonstrated with the kinetic model of first-order shown in Eq. (2). The starting and ultimate concentrations of RS are represented as the variables C and Co in the equation, while Kp (min−1) is the first order rate constant. Figure 10c shows a graph with the variables ln (C/Co) and time (t). The value of Kp is obtained through calculating the slope of the graph and the calculated result is − 0.03176 min−1. The determined rate constant provides details about the rate of degradation of resorcinol whether it is matched to 1st order or 2nd order. R2 (regression coefficient) calculated comes out to be 0.99 which indicates that Kp is associated with first order.

5 Conclusion

In this work, the sol–gel method was used to synthesise MgO nanoparticles that were doped with silver nanoparticles. The form, structure, optical properties, and other characteristics of the synthesised nanoparticles were examined. Using common characterisation techniques such as UV–Vis-IR, XRD, FTIR, XPS, EDS, and SEM. Agglomeration, uniformity and an average particle size of 28 nm is found in the Ag-doped MgO nanoparticles. Pure resorcinol exhibits a maximum absorption peak at 283 nm in its UV–visible spectrum. The fabricated resorcinol sensor based on Ag-doped MgO carbon paste electrode exhibits significant stability, reasonable, reliable and reproducible sensitivity. The limit of detection of the fabricated sensor is found to be ~ 20.2 µM. The modified electrode offers a platform for possible RS detection with substantial outcomes in the realm of electrochemical sensing. When compared to RS, photocatalytic activity of the synthesised nanoparticles showed apparent light colour fluctuation. In DI water, a solution of resorcinol and synthesized Ag-doped MgO nanoparticles was preparedin the presence of NaBH4 for around 60 min. After a ten-minute break, the absorbance was measured and RS had entirely degraded after 60 min. The synthesised Ag-doped MgO nanoparticles degraded the RS with 98% efficiency.