1 Introduction

Ascorbic acid (ASA), also known as vitamin C or l-ascorbic acid (Fig. 1a), is a vitamin found in pharmaceutical formulations and several foods, and it is sold as a dietary supplement. Ascorbic acid is a common enzymatic cofactor in the preparation of collagen, as well as an excellent reductive agent capable of fast quenching several reactive oxygen species [1]. It is a water-soluble vitamin, and its excess in the blood is quickly released in the urine, so it manifests significantly low toxicity. Acetaminophen (ACE), also known as paracetamol or N-acetyl-para-aminophenol (Fig. 1b), is widely used as analgesic and antipyretic drugs. Higher doses may lead to toxicity. Untreated acetaminophen overdose results in a lengthy, painful illness and liver failure. Caffeine (CAF), also known as methyltheobromine or 1,3,7-trimethylxanthine (Fig. 1c) is a central nervous system stimulant of the methylxanthine class [2]. It is the world’s most widely consumed psychoactive drug. Caffeine is also a common ingredient in soft drinks, such as cola. Caffeine overdose can result in a state of central nervous system overstimulation, called caffeine intoxication [3]. Ascorbic acid, ACE and CAF exist simultaneously in pharmaceutical formulations or beverages. For example, analgesics such as propyphenazone/paracetamol/caffeine enhances pain reliefs; ASA and CAF can be present in some drinks.

Fig. 1
figure 1

Molecular structure of a ASA, b ACE, and c CAF

Developing an analytical approach for straightforward, precise and simultaneous quantification of these analytes in food and drug formulations is very challenging. In this view, the voltammetric methods have such an advantage that they can simultaneously analyze these species in the samples. The voltammetric methods with chemically modified electrodes are widely recognized as a robust approach for trace analysis of organic and inorganic species due to high selectivity, sensitivity, and in situ performance. Glassy carbon electrodes (GCEs) are advantageous over other electrodes because the surface modification and renewal can take place simultaneously. The purpose of the electrode surface modification is to increase the electroactive areas and active adsorptive sites and enhance the selective interactions between the modified electrode and the analytes. The electrode modifiers, including carbon nanotubes (CNTs) [4, 5], graphene-based materials [6], orderly mesoporous materials (SBA-15, MCM-41, etc.) [7, 8], nano metal oxides [9, 10], and metal–organic frameworks (MOFs) [11, 12], have widely been used due to their high surface area, high-ordered porous structure, and an abundant number of electrocatalytic sites. Concerning ASA, ACE, and CAF, a few articles have dealt with determining one or two of them together only. A voltammetric determination of ACE using the C60-modified electrode was carried out by Goyal and Singh [13]; a CNTs modified glassy-carbon electrode was used as an electrochemical sensor for the simultaneous detection of ASA and CAF [4]. Dalmasso et al. [14] reported a simultaneous determination of ASA and ACE in pharmaceutical formulations using a modified GCE with CNTs dispersed in polyhistidine. Because direct redox reactions occur at very similar potentials on bare GCE electrodes, the determination of each species results in a rather poor selectivity. This is a problem because some pharmaceutical formulations or drinks often contain two of these three species [15, 16]. Recently, Fernandes et al. [15] use manganese ferrite/nitrogen-doped CNTs as an electrode modifier for the simultaneous determination of ASA, ACE, and CAF. Khoshhesab [17] fabricates a new CuO-graphene modified electrode for the simultaneous electrochemical determination of ASA, ACE, and CAF.

Cobalt ferrite (CoFe2O4) with an inverse spinel structure displays ferrimagnetic property that generates from the magnetic moment of anti-parallel spins between Co2+ ions at octahedral sites and Fe3+ ions at tetrahedral sites [6]. Cobalt ferrite has unique physicochemical properties that make it a promising material in antenna rods manufacturing, catalysis, magnetic data storage, sensors, energy conversion applications, and targeted drug delivery [18, 19]. The synthetic ways for CoFe2O4 nanoparticles such as sol–gel [20], combustion [21], microemulsion [22], thermal decomposition [23], micelles and reverse micelles co-precipitation [24], mechanical alloying [25], hydrothermal [26], and electrochemical procedures [21, 27] have been intensively investigated. These synthetic ways aim to reduce the calcination temperature, to form a hierarchical structure, and to prevent agglomeration. Cobalt ferrite thus synthesized has high specific magnetization, high crystallinity, small agglomeration, and large surface area. Recently, the synthesis of hollow-sphere oxides using sacrificial templates has been developed significantly. Colloidal nanoparticles (e.g., Au, Ag, or CdS) have been used as templates, in which the desired metal ions are introduced into composite core–shell structures, and these are then transferred into hollow capsules utilizing chemical or thermal treatment [28,29,30]. Sun et al. [31] report employing carbonaceous polysaccharide microspheres as templates for the preparation of metal-oxide hollow spheres (CoO, Al2O3, Ga2O3, NiO, Mn3O4, Cr2O3, La2O3, Y2O3, Lu2O3, TiO2, and ZrO2). To our best knowledge, only a few articles have been published concerning new cobalt ferrite-modified electrodes for the simultaneous determination of ASA, ACE, and CAF.

In our previous article, we demonstrate the simultaneous determination of ASA, ACE, and CAF on electrochemically reduced graphene oxide modified electrodes [32]. To further develop the point, the in situ synthesis of cobalt ferrite with hollow-sphere structure was performed using a sacrificial spherical carbon template. The resulting cobalt ferrite was used as an electrode modifier to simultaneously determine ASA, ACE, and CAF. The electrode reaction kinetics and application to real samples were also addressed.

2 Experimental

2.1 Materials

d-glucose (C6H12O6, 99.5%), cobalt nitrate hexahydrate (Co(NO3)2·6H2O, 98%), ferrous sulfate heptahydrate (FeSO4·7H2O, 99%), and ethanol (C2H5OH, 99%) were purchased from the Merck Company, Germany and used to synthesize cobalt ferrite. Potassium hydroxide (KOH), phosphoric acid (H3PO4, 85%), potassium dihydrogen phosphate (KH2PO4, 99%), and boric acid (H3BO3, 99%) were obtained from Daejung, Korea and used to prepare the buffer solution. The Britton–Robinson buffer solutions (B–R BS) were prepared from 0.5 M H3BO3, 0.5 M H3PO4, and 0.5 M CH3COOH solutions. The desired pH of the B–R buffer was adjusted using 1 M KOH or 1 M H3PO4 solutions. Paracetamol (C8H9NO2, 99%), caffeine (C18H10N4O2, 98.5%), and ascorbic acid (C8H6O6, 99.7%) were purchased from Merck Company, Germany. The stock solutions (10 mM) of ASA, ACE, and CAF were prepared just prior to use to avoid any decomposition.

2.2 Cobalt ferrite preparation

Cobalt ferrite was synthesized according to Wang et al. [28, 33]. Glucose (4 g, 0.022 mol) was dissolved in distilled water (40 mL) to form a homogeneous solution. Then, the mixture of 0.02 mol of the two salts (Fe:Co = 0.5:1; 0.95:1; 0.96:1; 0.97:1; 1:1; 2: 1 (mol/mol)) was added to the glucose solution. The resulting solution was sealed in a 40 mL autoclave with a Teflon seal and maintained at 180 °C for 8 h to form black solids. The solids were then separated using centrifugation at 5000 rpm. A refining process using five cycles of centrifugation/washing/redispersion was performed with water or ethanol. The as-synthesized cobalt ferrite/carbon was dried at 100 °C and, then calcinated at 500 °C for 5 h to obtain cobalt ferrite with different Fe/Co molar ratios (see Fig. 2). Carbonaceous microspheres were also synthesized with this procedure without the addition of the metal salts.

Fig. 2
figure 2

Diagram of cobalt ferrite synthesis

2.3 Apparatus

X-ray diffraction (XRD) analysis was performed on a D8 Advanced Brucker anode X-ray Diffractometer with CuKα (λ = 1.5406 Å) radiation. Photoelectron spectrometry (XPS) was conducted on ESCA La 250. Nitrogen adsorption/desorption isotherms were measured using a Micromeritics 2020 volumetric adsorption analyzer system. The samples were degassed by heating under vacuum at 150 °C for 3 h. The specific surface area of the samples was calculated using the Brunauer–Emmett–Teller (BET) model. Diffusive reflectance UV–Vis spectroscopy (DR-UV–Vis) was conducted on JASCO-V670 at 200–800 nm. X-ray photoelectron spectroscopy (XPS) was conducted on a Shimadzu Kratos AXISULTRA DLD spectrometer equipped with the Theta Probe AR-XPS System (Thermo Fisher Scientific, U.K). The magnetic property was analyzed using a vibrating sample magnetometry (VSM, Micro Sence Easy VSM 20130321-02) at ambient temperature.

The determinations of ASA, ACE, and CAF were performed using a Shimadzu 2030 HPLC system with a UV–Vis detector (λ = 275 nm). A C18 (250 × 4 mm; 5 µm) chromatographic column was employed. The mobile phase is the mixture of a phosphate buffer pH 2.3/acetonitrile (35/65 v/v) at a flow rate of 1.5 mL min−1, while the injection volume is 5 mL.

The electrochemical experiments include cyclic voltammetry (CV) and differential pulse voltammetry (DPV). They were carried out at ambient temperature using a CPA–HH5 Computerized Polarography Analyzer (Vietnam). A conventional three-electrode cell was employed. The working electrode is a modified and unmodified glassy carbon electrode (GCE) with a diameter of 2.8 mm. The auxiliary and reference electrodes are platinum wire and Ag/AgCl (sat. KCl), respectively.

2.4 Preparation and modification of electrode

The working electrode surface was washed with ethanol and polished with alumina slurry (0.05 μm). The dispersion was then utilized to prepare the modified electrode. Briefly, 0.01 g CoFe2O4 in 10 mL ethanol was sonicated for 48 h. 5 µL of CoFe2O4 suspension (1 g L−1) was dropped on the electrode surface and dried in air for 4 h at ambient temperature.

2.5 Pharmaceutical preparation

The samples were purchased at a local pharmacy. Six tables of Acetab Extra, Flucoldstad, Pancelxim Extra, Hapacol Sac. 150 mg Kids, Doliprane, vitamin C 500MG/150MG, Efferalgan, and Vitamin C, and three drinks, namely Number One, Sting max gold, and Wake-up 247, were used in this study. Ten tablets of each of the six pharmaceutical preparations were finely ground in a mortar. An exact amount of the powder was weighed and transferred to a 100 mL calibrated flask, which was filled to the volume with double distilled water. The standard addition method was used for determining the pharmaceutical formulations using the modified electrode. For the beverages, the liquid samples were analyzed directly without any further treatment. 100 μL of the soft drink samples was added to a container containing 0.2 M B–R BS (pH 4) then quantified using the DPV method.

3 Results and discussion

3.1 Material characterization

In one of our previous studies, we found that the mixture of Fe2+, Co2+, and d-glucose could provide cobalt ferrite/carbon hollow spheres while that of Fe3+, Co2+, and d-glucose provided two separate phases of the oxides mixture and carbon spheres (SEM not shown here). Hence, the iron(II) source was used in this study. The general reactions are as follows:

$$x{\text{Co}}^{2 + } + y{\text{Fe}}^{2 + } + {\text{ glucose solution}} \mathop \rightarrow\limits_{hydrothermal\;process}{}{\text{Co}}_{n}^{(2 + )} {\text{Fe}}_{m}^{(3 + )} {\text{O}}_{t} /{\text{carbon particles}} + \left( {x{-}m} \right){\text{Co}}^{2 + } + \, \left( {y{-}n} \right){\text{Fe}}^{3 + }$$
(1)
$${\text{Co}}_{n}^{2 + } {\text{Fe}}_{m}^{3 + } {\text{O}}_{t} /{\text{carbon spheres}} \mathop \rightarrow\limits_{Calcination}{}{\text{Co}}_{n}^{2 + } {\text{Fe}}_{m}^{3 + } {\text{O}}_{t} + {\text{CO}}_{2} + {\text{H}}_{2} {\text{O}}$$
(2)

The elemental composition of bimetallic oxides \(({\text{Co}}_{n}^{2 + } {\text{Fe}}_{m}^{3 + } {\text{O}}_{t} )\) depends significantly on the initial Fe2+/Co2+ molar ratio. A series of experiments with different Fe/Co molar ratios in the initial mixture was performed to synthesize the bimetallic oxides and the Fe/Co molar ratio was determined using EDX. Figure 3a illustrates the EDX analysis of cobalt ferrite with the initial Fe/Co molar ratio of 1/1. Cobalt and iron are observed and a small amount of sulfur is also detected due to impurities. The plot of the Fe/Co molar ratio in the product versus the initial Fe/Co molar ratio is illustrated in Fig. 3b. When the initial Fe/Co molar ratio is low (0.5) or high (2.0), the Fe/Co molar ratio in the calcined product deviates significantly from the stoichiometry of cobalt ferrite (CoFe2O4). When the Fe/Co molar ratio in the synthetic mixture is found approximately 1 (0.95 to 1.01), the Fe/Co molar ratio in the product is approximately 2, and the cobalt ferrite has the formula CoFe2O4. Therefore, the initial Fe/Co molar ratio 1/1 was chosen for further experiments.

Fig. 3
figure 3

a EDX of the binary iron-cobalt oxides; b effect of the Fe/Co molar ratio in the synthesized gel on the Fe/Co molar ration of in the calcined products

The resulting specimens were subjected to XRD measurements (Fig. 4). No characteristic diffractions are observed in the spherical carbon samples (Fig. 4a) while the amount of carbon in the carbon spheres estimated by elemental analysis is 65% compared with 40% C in glucose (C6H12O6). These results indicate that glucose, after the hydrothermal treatment at 180 °C, forms mainly amorphous carbon. The diffractions of the cobalt ferrite precursor (Fig. 4b) are indexed as a spinel-type according to JCPDS No. 00-002-1045. However, the XRD pattern does not show sufficient diffractions, and a large background indicates that the specimens contain a large amount of amorphous phase. It is worth noting that the formation of cobalt ferrite phase normally occurs at high temperatures (700–900 °C) depending on the synthetic approach [34, 35]. Indeed, in the present study, the formation of cobalt ferrite takes place at a low temperature (180 °C) due to the high dispersion of cobalt and iron ions in the glucose medium. The cobalt ferrite precursor calcined at 500 °C provides fully crystalized cobalt ferrite (Fig. 4c). All the peaks can be assigned to the cobalt ferrite structure. No intermediate phase is observed, inferring that a single-phase cobalt ferrite structure is formed within the sensitivity of experimental measurements. The average crystallite size of CoFe2O4 particles was calculated using the Scherrer equation Dhkl = K·λ/cosθ, where Dhkl is the crystallite size estimated from the (311) diffraction peak; K is the sphere shape factor (0.9); θ is the Bragg angle; β is the full-width at half-maximum of the (311) diffraction peak; and λ is the wavelength of the X-ray (1.541 Å). The average crystallite size of CoFe2O4 ferrite particles in our study is about 33 nm.

Fig. 4
figure 4

XRD patterns of (a) spherical carbon particles; (b) cobalt ferrite precursor; (c) cobalt ferrite (initial Fe/Co molar ratio: 1/1)

Figure 5a shows the SEM image of the carbon particles synthesized with the hydrothermal treatment of glucose at 180 °C. As seen from the figure, the morphology of carbon consists of spherical particles with approximately 5 µm in diameter. The synthetic temperature is higher than the normal glycosidation temperature, which leads to aromatization and carbonization [33, 36, 37]. The SEM image of cobalt ferrite precursor is shown in Fig. 5b. The particles are also spherical with flocculent substances on the surface. This is probably the result of a second nucleus-forming phase taking place on the surface of the carbon spheres. That is, iron/cobalt species form the nuclei on the surface of the carbon spheres in the reaction between cobalt and iron species to create cobalt ferrite. The carbon spheres act as a sacrificial template and are removed completely from the cobalt ferrite precursor by calcination at 500 °C for 5 h to form cobalt ferrite with a hierarchical structure (hollow spheres) (Fig. 5c).

Fig. 5
figure 5

SEM observation of a spherical carbon particles; b cobalt ferrite presursor; c cobalt ferrite (initial Fe/Co molar ratio: 2/1)

The XPS spectra of CoFe2O4 in Fig. 6 show Fe, Co, O, and even C peaks (Fig. 6a). The O 1s signal is detected at 529.94 eV, indicating O bonding with metal and at 531.33 eV for the O–C bond (organic compound) due to the incomplete burning of glucose. The Co2p3/2 signal appears at 779.85 eV with a satellite peak at 785.51 eV, and Co2p1/2 signal can be seen at 794.85 eV with a satellite peak at 801.41 eV (Fig. 6b). The peak separation between Co2p3/2 and Co2p1/2 is around 15 eV. The separation between the main peak and the satellite peak is ~ 5.7 eV for Co2p3/2 and ~ 6 eV for Co2p1/2. This difference is an important indicator of the oxidation state of the cobalt ion. A narrow separation of about 4–6 eV (found in our study) is a typical characteristic of Co(II), while a larger difference of about 9–10 eV is often found with Co(III) [38]. Therefore, the Co ions in cobalt ferrite are divalent. Fe2p has two signals: Fe2p3/2 and Fe2p1/2 that locate at approximately 710.67 eV and 723.67 eV, respectively (Fig. 6c). The presence of the satellite peak at 718.20 and 731.76 eV of Fe2p3/2 implies the trivalent iron [39]. The XPS analysis again confirms the formula CoFe2O4 for cobalt ferrite.

Fig. 6
figure 6

The XPS spectra of CoFe2O4: a survey XPS spectrum; b Co2p; c Fe2p

Figure 7a presents the nitrogen adsorption/desorption isotherms of cobalt ferrite calcined at 500 °C. The curves show the IV isotherms with an H3 hysteresis loop at the relative pressure ranging from 0.5 to 0.9, which reveals the presence of mesopores and micropores [40, 41]. The specific surface area calculated using the BET model is 19.46 m2 g−1.

Fig. 7
figure 7

a Nitrogen adsorption/desorption isotherms; b magnetic properties of CoFe2O4

The magnetic properties of spinel were determined via VSM measurements at ambient temperature (Fig. 7b). The magnetization hysteresis loop exhibits the S-like type. The saturation magnetization value of spinel is 59 emu g−1. This value is lower than that of pure nanomagnetic Fe3O4 [42, 43] but compatible with that of the magnetic materials reported in references [44, 45]. The magnetic coercivity is nearly 1000 Oe manifesting that magnetization remains upon the removal of the external magnetic field. Therefore, cobalt ferrite is considered as a ferromagnetic material. It belongs to the hard type due to its large magnetic coercivity, which is useful in permanent magnets.

3.2 Electrochemical behavior of CoFe2O4 modified electrode

The Randles–Sevcik equation is widely employed to calculate the active surface area of the electrodes. It is expressed as follows:

$$I_{\text{p}} = \left( {2.69 \times 10^{5} } \right) \cdot n^{3/2} \cdot A \cdot C \cdot D^{1/2} \cdot \upsilon^{1/2}$$
(3)

where Ip represents the anodic peak current (µA); n is the total number of electrons transferred (n = 1); A refers to the electroactive surface area of the electrode; D is the diffusion coefficient of 1 mM K3[Fe(CN)6]/K4[Fe(CN)6] in 0.1 M KCl (7.6 × 10−6 cm2 s−1); C is the concentration of K3[Fe(CN)6]/K4[Fe(CN)6] (1 mM); and ν is the scan rate (V s−1).

The electroactive surface area is obtained from the slope of the linear line of Ip versus υ1/2 (Fig. 8a–d) and the calculated value for GCE and CoFe2O4/GCE is 0.043 and 0.128 cm2, respectively. The increase (almost three times) in the electroactive surface area of the modified electrode is due to the capacity of cobalt ferrite to modify the electrode and implement a large surface and porous structure and thus facilitate the electron transfer between the electrode and the solution.

Fig. 8
figure 8

Cyclic voltammograms of a bare GCE; b Co2Fe2O4/GCE at various scan rates; c the plot of peak current versus square root of scan rate at Co2Fe2O4/GCE; d the plot of peak current versus square root of scan rate at bare GCE (1 mM K3[Fe(CN)6]/K4[Fe(CN)6] in 0.1 M KCl)

In the present study, the electrochemical behavior of ASA, ACE, and CAF at bare GCE and CoFe2O4/GCE were studied using CV and DPV. The voltammogram at bare GCE presents broad peaks in redox processes, while at CoFe2O4/GCE, well-defined oxidation peaks of ASA, ACE, and CAF appear at 0.38, 0.69, and 1.47 V, respectively (Fig. 9a). Similar to CV, the DPV curve at bare GCE exhibits broad peaks of anodic stripping voltammetry, while the curve at CoFe2O4/GCE presents well-defined peaks (Fig. 9b). The oxidation peak current for ASA, ACE, and CAF at CoFe2O4/GCE is nearly 12, 9, 15 times as high as that on bare GCE, respectively. The large peak separation between ASA and ACE (0.31 V), and ACE and CAF (0.78 V) are acceptable for their simultaneous determination in the mixture. This is due to the increase in the surface area, macroporous structure, and functionality in CoFe2O4 compared with bare GCE. Therefore, cobalt ferrite is expected to be a potential electrode modifier for the simultaneous determination of ASA, ACE, and CAF.

Fig. 9
figure 9

a Cyclic voltammograms (CVs) and b differential pulse voltammetry (DPV) at bare GCE and CoFe2O4/GCE in 0.2 M B–R BS pH 4 containing an equal concentration of 10−4 M ASA, ACE, and CAF

3.3 Effect of pH

The electrochemical signals were measured in the pH range of 2.8–6.4 (Fig. 10a). The peak current of ASA decreases slightly first as pH increases from 2.8 to ac. 4.6 and then declines significantly as pH increased further to 6.4. The varying peak current of ACE exhibits nearly the same trend as that of ASA except for a large decline between pH 3.9 and pH 4.6. While at pH 3.9, the peak current of CAF reaches a maximum at pH 3.9 and then declines like that of ASA and ACE (Fig. 10b). Therefore, pH 3.9 (≈ 4) was selected for further experiments.

Fig. 10
figure 10

a Cyclic voltammograms of CoFe2O4/GCE in 0.2 M B–R BS pH 4 containing an equal concentration of 10−4 M ASA, ACE, and CAF; b pH dependence on peak current (Ip); c linear plot of Epvs. pH

The increase in pH causes the oxidation peak potential to shift to less positive potential, inferring that protons are involved in the oxidation process (Fig. 10a). At 298 K, the Nernst equation expresses the relationship between Ep and pH as follows:

$$a{\text{Ox}} + n{\text{e}}^{{{-} }} + {\text{pH }} \rightleftarrows \, b{\text{Red}}$$
(4)
$$E_{p} = E^{0} + \frac{0.0591}{n}\cdot\log \frac{{{\text{Ox}}^{a} }}{{{\text{Red}}^{b} }} - 0.059\cdot\frac{p}{n}\cdot{\text{pH}}$$
(5)

where E0 is the standard electrode potential; p and n are the numbers of protons and electrons involved in the electrode reaction, respectively; Ox and Red are the conjugated redox pairs.

The linear regression equations between Ep versus pH for the analytes are as follows (Fig. 10c):

$$E_{\text{p, ASA}} = 0.61 - 0.058\,\cdot\,{\text{pH}}; \,r = 0.986$$
(6)
$$E_{\text{p, ACE}} = 0.89 - 0.059\,\cdot\,{\text{pH}};\, r = 0.991$$
(7)
$$E_{\text{p, CAE}} = 1.70 - 0.062\,\cdot\,{\text{pH}}; \,r = 0.985$$
(8)

As can be seen from Eqs. (68), the slopes of these plots are equal or close to the theoretical value of 0.059, indicating that an equal number of photons and electrons takes part in the redox process of ASA, ACE, and CAF.

3.4 Effect of scan rate

The relationship between peak current and scan rate can provide helpful information about the electrochemical mechanism. Therefore, the effect of scan rate (v) on the peak current and peak potential was studied by using the CV method (Fig. 11a). The linear regression equations of the relationship between Ip and v are as follows:

Fig. 11
figure 11

a Cyclic voltammograms of CoFe2O4/GCE; b plot of Ip versus v; c plot of lnIp versus lnv; d plot of Ip versus v1/2e plot of Ep versus lnv in 0.2 M B–R BS, pH 4 containing an equal concentration of 10−4 M ASA, ACE, and CAF at various scan rates

$$I_{\text{p, ASA}} = \left( {6.770 \pm 16.294} \right) + \left( {167.100 \pm 49.128} \right)\,\cdot\,v; \,r = 0.987; p = 0.002$$
(9)
$$I_{\text{p, ACE}} = \left( {1.960 \pm 12.185} \right) + \left( {280.200 \pm 36.740} \right)\,\cdot\,v;\, r = 0.997; p \le 0.001$$
(10)
$$I_{\text{p, CAE}} = \left( {15.060 \pm 33.740} \right) + \left( {117.100 \pm 101.730} \right)\,\cdot\,v;\, r = 0.954; p = 0.012$$
(11)

The highly linear relationship of the plots between Ip and v (r = 0.954–0.997; p < 0.05) indicates that oxidation at CoFe2O4/GCE is adsorption-controlled (see Fig. 11b) [46].

The plots of lnIp versus lnv or Ip versus v1/2 can provide information on whether a reaction is adsorption- or diffusion-controlled. Figure 11c shows the plots of the logarithm of the oxidation peaks of ASA, ACE, and CAF in 0.02 M B–R BS, pH 4 versus the logarithm of scan rate. The regression equations are as follows:

$$\ln I_{{{\text{p}}, {\text{ASA}}}} = 5.205 + 0.960\cdot\ln v; r = 0.986; p = 0.002$$
(12)
$$\ln I_{{{\text{p}}, {\text{ACE}}}} = 5.628 + 0.972\cdot\ln v; r = 0.999; p \le 0.001$$
(13)
$$\ln I_{{{\text{p}}, {\text{CAF}}}} = 5.329 + 0.907\cdot\ln v; r = 0.967; p = 0.007$$
(14)

If the slope of the regression equations approaches 0.5, the reaction is supposed to be a diffusion-controlled electrode process, and if it approaches 1.0, the reaction is expected to be an adsorption-controlled process [47, 48]. In our study, the slopes are very close to 1.0 (0.960 for ASA, 0.972 for ACE, and 0.907 for CAF), indicating that oxidation at CoFe2O4/GCE is an adsorption-controlled process. According to Soleymani et al., if the intercept of the plot of Ip versus v1/2 crosses the origin of the plot, the electrode process is controlled by diffusion; otherwise, it is adsorption-controlled [49]. In the scan rate range from 0.10 to 0.50 V s−1, Ip of ASA, ACE and CAF electrooxidation is linearly correlated with v1/2 following the equations (Fig. 11d):

$$I_{{{\text{p}}, {\text{ASA}}}} = \left( { - 35.054 \pm 13.665} \right) + \left( {173.338 \pm 24.950} \right) \cdot v^{1/2} ; r = 0.999; p \le 0.001$$
(15)
$$I_{{{\text{p}}, {\text{ACE}}}} = \left( { - 65.500 \pm 40.449} \right) + \left( {285.808 \pm 24.950} \right) \cdot v^{1/2} ; r = 0.990; p = 0.001$$
(16)
$$I_{{{\text{p}}, {\text{CAE}}}} = \left( { - 31.020 \pm 30.335} \right) + \left( {187.194 \pm 66.338} \right) \cdot v^{1/2} ; r = 0.982; p = 0.003$$
(17)

Equations (1517) show that the relationship between the peak current and the square root of the scan rate is highly linear (r = 0.982–0.999; p < 0.05). The numbers in the parentheses are the 95% confident interval of the respective values. The intercepts of all the three equations are far less than zero, referring that the electrode oxidation is controlled by adsorption.

According to the analysis of the three relationships, namely Ip versus v; lnIp versus lnv; and Ip versus v1/2, we can conclude that the electrooxidation of ASA, ACE, and CAF on CoFe2O4/GCE is an adsorption-controlled process. This is characteristic for the electrode process, in which the electrochemical reaction precedes the homogenous chemical reaction [49].

According to the Laviron theory [50], for an irreversible anodic reaction, the relationship between Ep and v should be expressed as:

$$E_{p} = E^{0} - \frac{R \cdot T}{{\left( {1 - \alpha } \right) \cdot n \cdot F}} \cdot \ln \frac{{R \cdot T \cdot K_{S} }}{{\left( {1 - \alpha } \right) \cdot n \cdot F}} + \frac{R \cdot T}{{\left( {1 - \alpha } \right) \cdot n \cdot F}} \cdot \ln v$$
(18)

where E0 is the formal standard potential; α is the charge transfer coefficient; n is the number of the electrons transferred; F is the Faraday constant (96,500 C mol−1); Ks is the standard heterogeneous reaction rate constant; and R and T are 8.123 J mol K−1, 298 K, respectively.

This relationship for the oxidation of ASA, ACE, and CAF in our study is as follows:

$$E_{{{\text{p}},ASA}} = 0.425 + 0.027 \cdot \ln v; r = 0.962$$
(19)
$$E_{{{\text{p}},ACE}} = 0.715 + 0.024 \cdot \ln v; r = 0.920$$
(20)
$$E_{{{\text{p}},CAF}} = 1.511 + 0.027 \cdot \ln v; r = 0.977$$
(21)

As can be seen from Eqs. (1921), the plots of Ep versus lnv are highly linearly related (r = 0.920–0.960, p < 0.05). The values of (1 − n)·α can be calculated from the slopes of the plots (Fig. 11e), and they are 0.95, 1.05, and 0. 95 for ASA, ACE, and CAF, respectively. For a totally irreversible process, α is accepted to be 0.5. Therefore, n is approximately 1.9; 2.10, and 1.90 for ASA, ACE, and CAF, respectively. Since n is an integral, we accept that n equals 2. As a result, two protons and two electrons are involved in the redox process.

As mentioned above, the anodic peak current tends to decrease with increasing pH, and this indicates that the chemical reactions occur according to the electrochemical mechanism, in which the possible reaction between the buffer molecules and the oxidized form of the electrode is acceptable [49]. It is assumed that cobalt ferrite exhibits electrocatalytic activity as ferrite (Fe3O4) [49, 51]. Then, the electrochemical behavior could involve the iron phosphate system. The CoFe2O4 particles are directly oxidized at the electrode according to reaction (22).

$${\text{CoFe}}_{2} {\text{O}}_{4} + 2{\text{e}}^{-} \to 2{\text{Fe}}^{2 + } \left( {{\text{CoFeO}}_{4} } \right)$$
(22)

The as-produced Fe2+ ions react with the phosphate ions of the buffer.

$${\text{Fe}}^{2 + } \left( {{\text{CoFeO}}_{4} } \right) + {\text{HPO}}_{4}^{-} \to {\text{FeHPO}}_{4} \left( {{\text{CoFeO}}_{4} } \right)$$
(23)

The FePO4 solid at the electrode surface could be responsible for the electrocatalytic reaction

$${\text{FeHPO}}_{4} ({\text{CoFeO}}_{4} ) + {\text{H}}^{ + } - {\text{e}} \to {\text{CoFe}}_{2} {\text{O}}_{4} + {\text{HPO}}_{4}^{ - }$$
(24)
(25)
(26)

CAF is oxidized in a two-step mechanism (reaction (26)). First, 2H+, 2e oxidation occurs at C–8 and N–9 atoms of caffeine and gives 8-oxy caffeine. Second, another 2e, 2H+ oxidation gives 4,5-dihydroxy-8-oxy-caffeine [52]. Therefore, the oxidation of CAF with two electrons and two protons at CoFe2O4/GCE could be understood as the first step of this mechanism, and it also determines the rate of this reaction.

CoFe2O4 with a bigger number of redox-catalytic sites (Fe3+/Fe2+), hierarchical structure, and large surface area enhances the adsorption effectively, and therefore, the oxidation of ASA, ACE, and CAF results in high electrochemical responses and a large peak separation. This process is illustrated in Fig. 12.

Fig. 12
figure 12

Illustration of ASA, ACE, and CAF oxidation at CoFe2O4/GCE

3.5 Interference study

The effect of several possible interfering compounds on the detection of ASA, ACE, and CAF was studied. DPV measurements were performed for the solution containing an equal concentration (10−6 M) of ASA, ACE, and CAF in 0.2 M B–R BS, pH 4 in the presence of an excess concentration of an interfering agent. The tolerance limit is assumed as the maximum concentration of the interferent brought about a relative standard error (RSD) less than 5%. In our study, 500 fold of NaNO3, KNO3, CaCl2, (NH4)2SO4 do not affect the selectivity, and no interfering effect is observed at 152 fold of glucose, 180 fold of benzoic acid, and 200 fold of glutamic acid. RSD varies between − 4.9 and 4.3% (Table 1). This reveals the acceptable selectivity of the CoFe2O4 electrode even in the presence of high concentrations of other species.

Table 1 Effect of different interferences on peak currents (10−6 M ASA, ACE, and CAF in 0.2 B–R BS, pH 4)

3.6 Long-term stability and limit of detection (LOD)

The peak current was recorded for ASA, ACE, and CAF oxidation at the modified GCE in the 0.2 M B–R BS containing the spiked solution of an equal concentration (10−4 M) of ASA, ACE, and CAF at different times to assess the long-term stability of CoFe2O4/GCE. Figure 13 presents the peak currents measured with time (day). The error bars are the standard deviation of sixteen experiments (of the peak current for ASA, ACE, and CAF was 6.7, 5.6, and 7.2%, respectively) using the same CoFe2O4/GCE for all the measurements. The relevant values of RSD infer that CoFe2O4/GCE has long-term stability and acceptable sensitivity for the analysis of real samples.

Fig. 13
figure 13

Long-term stability of CoFe2O4/GCE during 15 consecutive days

Since all peaks could be resolved at CoFe2O4/GCE, the simultaneous detection of the compounds was conducted. Figure 14a presents the DPV recorded for the simultaneous addition of ASA, ACE, and CAF in the increasing concentration in the range 0.2–4.4 µM. The plots of Ip,ASA, Ip,ACE, and Ip,CAF versus ASA, ACE, and CAF concentration are shown in Fig. 14b. Their linear regression equations are as follows:

Fig. 14
figure 14

a Differential pulse voltammetric responses at CoFe2O4/GCE in 0.2 B–R BS, pH 4 containing the equal concentration varying from 0.2 to 4.4 µM; b plot of anodic peak current as a function of analyte concentration

$$I_{{{\text{p}}, {\text{ASA}}}} = \left( { - 3.03 \pm 0.02} \right) + \left( {0.412 \pm 0.009} \right) \cdot C_{\text{ASA}} ; r = 0.998$$
(27)
$$I_{{{\text{p}}, {\text{ACE}}}} = \left( {0.83 \pm 0.06} \right) + \left( {2.23 \pm 0.05} \right) \cdot C_{\text{ACE}} ; r = 0.997$$
(28)
$$I_{{{\text{p}}, {\text{CAE}}}} = \left( { - 0.04 \pm 0.02} \right) + \left( {0.89 \pm 0.02} \right) \cdot C_{\text{CAF}} ; r = 0.998$$
(29)

The LOD of ASA, ACE, and CAF [three times of the standard deviation of the blank over sensitivity (3 s m−1)] is 0.313 μM, 0.267 μM, and 0.226 μM, respectively. The sensitivity of the ASA, ACE, and CAF determination is 0.41, 2.23 and 0.89, respectively.

Table 2 compares the linear range and LOD for our electrode with several modified electrodes reported previously. The data show that the linear range obtained in this work with CoFe2O4/GCE is much smaller, whereas LODs are compatible or lower than those of other works.

Table 2 Performance comparison of the proposed DPV method for ARA, ACE, and CAF with other electrodes

3.7 Determination of ASA, ACE, and CAF in pharmaceutical preparations and beverages

As for the real samples, those containing simultaneously ASA, ACE, and CAF are unavailable, but ACE and CAF, or ASA and ACE are found in several pharmaceutical formulas (Table 3), and ASA and CAF are found in certain beverages. Therefore, six commercial pharmaceutical and three beverage samples were used to qualify the method (Table 4). The determination was carried out using the standard addition method. The analysis was performed three times under the same conditions. The recoveries of the analytes in the real samples were calculated to estimate the accuracy of the proposed method. Then, known amounts of both ACE and CAF, ASA and ACE, or ASA and CAF were added to the samples and the analytes were simultaneously analyzed again using the standard addition method with the proposed DPV method. The recovery is in the range of 95–106%. The analytes were also determined by using HPLC for comparison. The content of ASA, ACE, and CAF in the samples determined using the proposed method and the HPLC method is in a good agreement. The recovery is also acceptable. From these results, we can conclude that the CoFe2O4/GCE electrode is capable of the simultaneous analysis of pharmaceutical and beverage samples.

Table 3 Results of ASA, ACE and CAF determination in the pharmaceutical preparations using the proposed DPV and HPLC method
Table 4 Results of ASA, ACE and CAF determination in the beverage samples using the proposed DPV and HPLC method

4 Conclusions

The synthesis of cobalt ferrite hollow spheres was performed using the carbonaceous microspheres prepared from the glucose solution as a sacrificial template. The Fe/Co ratio in cobalt ferrite could be controlled by varying the initial Fe/Co ratio. The resulting CoFe2O4 possesses a hierarchical structure of hollow spheres, large specific areas, and high magnetic saturation. The CoFe2O4 hollow spheres were used to develop a modified electrode, and it is promising for the ASA, ACE, and CAF detection with such advantages as high sensitivity and stability and low detection limit. The proposed DPV method can be easily performed with acceptable precision and accuracy when employed to pharmaceutical preparations and beverage samples.