Introduction

Food microbiology is a field of scientific inquiry focused on the study of microorganisms and their positive and negative effects. Over the years, it has attracted considerable global attention due to the prevalence of chronic diseases caused by foodborne pathogens. The microbiological assessment of food holds promise for verifying its quality and ensuring its safety for consumption [1]. Of particular importance in food microbiology is the detection of foodborne pathogens, a crucial aspect, especially within the dairy industry, where there is a pressing need for a rapid, efficient, and cost-effective detection method [2]. Raw milk and its derivatives enjoy significant popularity in the market due to scientific findings highlighting their superior nutritional value [3]. However, the consumption of raw milk carries inherent health risks due to the presence of disease-causing bacteria, prompting caution from the medical community against the consumption of unpasteurized raw milk [2, 3]. Milk is recognized as an optimal environment for bacterial proliferation and offers a multifaceted composition comprising fat globules, carbohydrates, and proteins. Pathogenic bacteria such as Listeria spp., Salmonella spp., Escherichia coli, Campylobacter spp., Shigella spp., and Brucella spp., are present in milk and pose potential health hazards upon consumption [4].

There are conventional approaches for measuring total bacterial counts, such as the standard plate count (SPC) method, known for its reliability. However, it suffers from being time-intensive, typically requiring 24 to 72 h, and lacks feasibility for field applications without automation [5]. To address these drawbacks, various techniques have emerged in recent years, enabling rapid (20 min to a few hours) and precise assessments. These methods leverage diverse principles, including amperometry [6, 7], turbidity [8, 9], piezoelectricity [10, 11], bioluminescence [12, 13] and impedance spectroscopy [14,15,16,17]. Among them, impedance spectroscopy biosensors stand out as a promising alternative to SPC due to their simplicity in implementation and quick applicability across different food types [5].

A detection mechanism utilizing impedance microbiology has been introduced as a sensitive and swift approach for both qualitative and quantitative evaluation of bacterial growth by assessing alterations in electrical conductivity [18,19,20,21]. In the context of food microbiology, impedance pertains to the resistance to the flow of an alternating current through a conductive bacterial medium. Throughout microbial proliferation, metabolic activities generate detectable alterations in the growth substrate as high-molecular weight nutrients are metabolized into smaller charged ionic constituents, elevating the electrical conductivity of the medium. Fluctuations in electrical conductivity, observed over time, correlate with shifts in microorganism populations, enabling the quantification of microbial growth. The fluctuation in the electrical conductivity of milk corresponds directly to the variations in the number of microorganisms and their metabolic activity. Thus, the growth of microbes in milk can be quantified through this measure [18, 20, 22]. The impedance detection method is advocated as an effective and reliable alternative to the conventional standard plate count method. It is already in practice across various countries for quality control of different food items, including shellfish [23], vegetables [24, 25], meat [26] and dairy products [5, 27]. It was also reported that this system has promising potential in distinguishing between different types of bacteria by detecting their distinct signatures. Through careful analysis of the electrical conductivity variations, specific patterns corresponding to the metabolic activities and growth rates of each bacterial strain can be identified [28].

In this study, we introduce an impedance-based biosensor tailored for the rapid and precise assessment of total microbial content in raw milk. The impedance measurement apparatus was designed to produce diverse signals spanning frequencies from 1 to 5000 kHz. Notably, this research marks the inaugural exploration of utilizing an impedance detection approach to examine the microbial density of raw milk. Additionally, as a novel facet of our investigation, we delve into the microbial density in the presence of polyethyleneimine (PEI)-coated Fe3O4@SiO2 nanoparticles (NPs) through two methods: immobilization on the electrode and direct addition to raw milk.

Materials and methods

Materials

PEI, sinapinic acid (SA), iron(III) chloride hexahydrate (FeCl3·6H2O), iron(II) sulfate heptahydrate (FeSO4·7H2O), and anhydrous citric acid were purchased from BIOCHEM Chemopharma (Cosne-Sur-Loire, France). Sodium chloride (NaCl), potassium chloride (KCl), sodium phosphate dibasic (Na2HPO4), potassium phosphate monobasic (KH2PO4), Coomassie brilliant blue G250, methanol, and phosphoric acid (85% w/v) were obtained from TITRACHEM (Tehran, Iran). Ammonium hydroxide solution (NH3.H2O 25% v/v), N′-ethylcarbodiimide hydrochloride (EDC), and N-hydroxysuccinimide (NHS) were sourced from Merck (Darmstadt, Germany). Fifty samples of raw milk were procured from farms and raw milk sales centers.

Design of electrical device

To enable real-time impedance measurement, a pair of electrodes was devised and submerged in a liquid medium. These dual microelectrodes were crafted by initially applying a 10 nm thick chromium (Cr) layer onto a quartz glass substrate using a thermal evaporation system, succeeded by a 100 nm thick gold layer deposited via direct current (DC) sputtering. The electrodes, measuring 2 mm in length, 30 µm in width, and 40 µm in height, were delineated through photolithography and wet etching.

Impedance measurement was conducted employing an impedance analyser produced at the MEMS Laboratory, Faculty of New Sciences and Technologies, University of Tehran, Tehran, Iran. This apparatus delivered an alternating current (AC) of 0.8 V and comprised three internal boards: the first regulated transmission frequencies spanning from 1 kHz to 5 MHz, the second received the transmitted frequencies, and the third facilitated data storage. All collected data, amounting to 384 data points every 20 min over an 8-h period, were transferred to a computer and scrutinized for possible errors using MATLAB 2017 software. Subsequently, the data underwent categorization and extraction.

The impedance analyzer data were evaluated in terms of phase, amplitude, and capacitance magnitude employing the following formulas.

$$Z^{2} = \, R^{2} + \, X^{2}$$

where Z is the complex impedance number, R is the resistance (the real part of the impedance), and X is the reactance (the imaginary part of the impedance).

$$X = \frac{1}{2\pi fc}$$

where f is the frequency and C is the capacitance.

$$X = A*\sin \varphi$$

where A is amplitude and \(\varphi\) is the phase reported by the impedance analyzer. Capacitance can be calculated by combining the above three formulas according to the following formula:

$$C = \frac{1}{Af2\pi \sin \varphi }$$

Standard plate count technique

In this experiment, 50 raw milk samples were collected from farms and subjected to analysis for determination of the total microbial concentration. Following the reference protocol, the milk samples underwent serial dilution and were plated onto an agar culture medium using the pour plate technique, adhering to the guidelines outlined by the 5484 Institute of Standards and Industrial Research of Iran. Subsequently, the plates were incubated at 30 °C for a duration of 48 h. Only plates exhibiting colony counts within the 30–300 range were included for enumeration, and their respective microbial densities were computed and documented. Bacterial levels were measured in terms of colony-forming units (CFU). The intended bacterial density was assessed using the standard plate count method [29].

Preparation of PEI-coated Fe3O4@SiO2

The synthesis of citrate-coated iron oxide NPs (IONPs) was carried out via the co-precipitation method. Fe3+ and Fe2+ ions, in a 2:1 molar ratio, were introduced into 80 ml of deionized water (dH2O) with continuous stirring. The solution was heated to 70 °C, and 20 ml of ammonia was gradually added until the solution turned black. This condition was maintained for 30 min. Subsequently, the temperature was raised to 90 °C, and a 0.5 M citrate solution was added dropwise. The solution was kept at this temperature for an additional 60 min. The resultant magnetic IONPs were washed three times with dH2O and separated from the solution using a strong magnetic force. The mixture was centrifuged at 4000 rpm for 6 min, and the supernatant was preserved for subsequent experiments.

The magnetic IONPs (1 g) underwent three washes with ethanol and were then re-dispersed in 200 ml of ethanol with sonication for 1 h. Following this, 20 ml of dH2O, 0.5 ml of TEOS, and 22.5 ml of aqueous ammonia were sequentially added. The mixture was stirred at 40 °C for 12 h, and the Fe3O4@SiO2 NPs were collected using a magnet. The NPs were rinsed multiple times with ethanol to remove unreacted TEOS and unbound silica. Finally, the surface of the Fe3O4@SiO2 NPs was coated with PEI by suspending 100 mg of PEI in an aqueous solution and gently rotating for 8 h. The isolated PEI-coated magnetic IONPs were washed three times with 2 ml of dH2O and redispersed in dH2O via ultrasonication [30]. Subsequently, 100 µl of the NPs were mechanically affixed onto the electrode for 15 min in a vacuum oven.

Characterization of PEI-coated Fe3O4@SiO2 nanoparticles

The chemical composition of the synthesized NPs was analyzed utilizing attenuated total reflectance fourier transform infrared spectroscopy (ATR-FTIR) employing a Bruker VERTEX 70 series FTIR spectrometer (Bruker Optics, Germany) equipped with a horizontal ATR sampling accessory (MIRacle, Pike Technology, Inc.). The wavenumber region from 400 to 4000 cm–1 was used to record the ATR-FTIR spectra.

The crystalline structure of the NPs was assessed using a high-resolution X-ray diffraction (XRD) system (SmartLab, Rigaku, Japan) featuring Bragg–Brentano optics and a HyPix-3000 detector (Rigaku, Japan).

The topography of the NPs was characterized through field emission scanning electron microscopy (FESEM) (Hitachi S-4800, Japan). Prior to imaging, samples were thoroughly dried and coated with a thin layer of gold. All measurements and analyses were conducted using the respective operating software of the instrumentation.

Capacitance measurement with PEI-coated Fe3O4@SiO2 nanoparticles

To enhance impedance analysis and entrap bacterial cells, PEI-coated Fe3O4@SiO2 NPs were employed. The impact of these NPs on the total number of bacterial cells was investigated through two approaches:

  1. 1.

    Immobilization on the electrode: 100 µl of NP suspension was mechanically immobilized on the electrode for 15 min in a vacuum oven. Subsequently, the capacitance was measured in the presence of magnetic NPs.

  2. 2.

    Direct addition to raw milk: 100 µl of NP suspension was added to 10 ml of raw milk and agitated for 10 min. Following centrifugation at 5000 rpm for 50 min, the NPs were transferred onto the electrode surface, and the capacitance was measured.

The outcomes of each method were compared with standard plate counting to evaluate their efficacy.

Statistical analysis

The results are expressed as mean ± standard deviation (SD) derived from three independent measurements. The quantitative data obtained from the described experiments were subjected to statistical analysis using Microsoft Excel 2013.

Results

The objective of this study was to ascertain the total bacterial concentration of raw milk utilizing the impedance measurement technique. In industrial settings, a biosensor capable of measuring the total bacterial concentration, irrespective of bacteria type, is essential. Here, the impedance of the sample was continuously monitored in real-time, with measurements taken every 20 min over 8 h, both with and without the presence of PEI-coated Fe3O4@SiO2 NPs, at a frequency of 10 kHz. To determine the optimal frequency, capacitance was measured at various frequencies, and the correlation coefficient was computed for each compared to the standard plate count (Fig. S1). The frequency of 10 kHz exhibited the highest correlation coefficient. Figure 1 illustrates the linear relationship between the results of pour plate counting of bacterial cells and impedance measurement, as calculated from Figs. S2 and S3. The correlation coefficient was found to be 96% (with a P value ≤ 0.05).

Fig. 1
figure 1

Diagram of the correlation between capacitance and bacterial cell count obtained through impedance analysis and the pour plate method

Fig. 2
figure 2

Capacitance changes in the presence of different amounts of bacterial concentrations

Fig. 3
figure 3

Characterization of Fe3O4 nanoparticles. a FE-SEM image of nanoparticles (Scale bar = 1 µm), and b FTIR spectrum of PEI-coated Fe3O4@ SiO2

The fluctuations in capacitance across various levels of milk contamination were investigated throughout 7 h. Initially, the capacitance of pasteurized milk was gauged using an impedance meter, following which the pasteurized milk was contaminated with varying concentrations of bacteria (ranging from 102 to 104 CFU/ml). The bacterial cultures were diluted with sterile PBS buffer to achieve bacterial concentrations ranging from 102 to 104 CFU/ml, respectively [31]. As depicted in Fig. 2, lower initial bacterial concentration corresponded to minor changes in capacitance compared to instances with higher initial bacterial counts. Specifically, when the initial bacterial count was 1 × 102 CFU/ml, the capacitance growth was gradual, with significant alterations observed after 5 h into the experiment. Conversely, in cases where the bacterial count was 1 × 104 CFU/ml, the capacitance changes were more rapid during the initial hours of the experiment, increasing linearly until 4 h. Subsequently, bacterial growth and, consequently, capacitance declined after 4 h due to the generation of secondary metabolites and the ensuing rise in the milk acidity. These findings were corroborated by the standard pour plate technique. Accordingly, this study underscored the efficacy of capacitance in accurately predicting the total bacterial load of milk.

The detection time was derived from the impedance growth curve (plotting impedance against bacterial growth time) at a frequency of 10 Hz, identified at the juncture where the impedance commenced to exhibit alteration. Specifically, the detection times for initial cell numbers of 102 CFU/ml and 104 CFU/ml were determined to be 5 h and 1 h, respectively.

Capacitance measurement in the presence of PEI-coated Fe3O4@SiO2

The IONPs were synthesized using the co-precipitation method, subsequently coated with SiO2, and further encapsulated with a PEI-based polymer layer. The zeta potential of the NPs was determined to be + 29.9 ± 3.8 mV, primarily attributed to the presence of PEI polymers on the surface bearing positive amine groups. The characterization of the NPs was conducted through FE-SEM and FTIR spectroscopy. In Fig. 3a, the FE-SEM image of Fe3O4 illustrates spherical NPs with an average diameter estimated to be 30 nm. Figure 3b depicts the FTIR analysis confirming the presence of various functional groups and successful functionalization by SiO2 and PEI. Notably, a distinct peak at approximately 590 cm−1 corresponds to the stretching vibrations of the Fe–O bond. Additional significant peaks are evident at 463, 798, 896, and 1086 cm−1. The absorption bands at 896 and 1082 cm−1 arise from the asymmetry of the stretching vibrations of the Si–O–Si and Si–OH bonds, respectively, while the bands at 463 and 798 cm−1 are associated with the symmetry of the stretching vibrations of Si–O–Si bonds. Additionally, the IR spectrum of the PEI-coated Fe3O4 NPs exhibits a broad band at 3100 cm−1, attributable to the N–H stretching vibrations with the band at 1575 cm−1 attributed to the NH bending vibrations of PEI. These findings confirm the successful production of PEI-coated Fe3O4@SiO2 NPs [32,33,34].

The XRD pattern of the NPs is depicted in Fig. 4, utilized to confirm the crystalline nature of the particles. The exhibited peaks indicate a face-centered cubic structure of the NPs [10]. The observed peaks suggest the absence of secondary phases, affirming the purity of the NPs. Moreover, the positions of these characteristic peaks remain unchanged in the XRD patterns of PEI-coated Fe3O4@SiO2, indicating that the binding process during the introduction of SiO2 and the PEI layer did not affect the crystal structure of Fe3O4. The Bragg peaks are discernible at 21.24, 30.28, 35.64, 43.48, 53.6, 57.36, 63, and, 74.32° with corresponding Miller indices (110), (220), (311), (400), (422), (511), (440), and (533), respectively.

Fig. 4
figure 4

XRD pattern of the PEI-coated Fe3O4@SiO2 nanoparticles

Upon validating the outcomes of nanoparticle synthesis, PEI-coated Fe3O4@SiO2 NPs were employed through two approaches. Initially, the NPs were affixed onto the electrode, followed by the addition of a milk sample onto the electrode for capacitance measurement during the experiment (Fig. 5a). The plot depicting capacitance obtained via impedance analysis and the standard pour plate method is presented in Fig. 5b, along with the regression equation of y = 0.0113x + 9.5109, derived through linear regression analysis.

Fig. 5
figure 5

Capacitance measurement using nanoparticles stabilized on the electrode. a Capacitance changes with the effect of nanoparticles along with the bacterial growth diagram. b Capacitance changes were obtained from the impedance analyzer with the bacterial load values of raw milk in the case of using nanoparticles stabilized on the electrode

Figure 5a illustrates a direct correlation between the increase in capacitance with magnetic NPs and the total bacteria count determined via the pour plate method. Meanwhile, Fig. 5b demonstrates a linear relationship between capacitance, measured with immobilized magnetic NPs, and the total bacterial count in raw milk. The R2 value of 0.9234 in Fig. 5b signifies a strong correlation between the total bacterial count in raw milk, assessed through the impedance technique, and the regression equations. Research has indicated a 96% correlation (P value ≤ 0.01) between the laboratory standard plate count technique and capacitance changes.

In the second method (Fig. 6a, b), magnetic NPs were directly introduced into raw milk, separated via centrifugation, and subsequently transferred to the electrode capacitance measurement using an impedance analyzer. Similarly, a high correlation of 96% (P value ≤ 0.01) was observed between the two methods in this instance as well.

Fig. 6
figure 6

Capacitance measurement using nanoparticles immersed in the raw milk. a Capacitance changes with the effect of nanoparticles along with the bacterial growth diagram. b Capacitance changes were obtained from the impedance analyzer with the bacterial load values of raw milk in the case of using nanoparticles immersed in the raw milk

Figure 7 presents a comparison between impedance measurements conducted with and without PEI-coated Fe3O4@SiO2 NPs, alongside results from standard pour plate counting. Without NPs, the correlation between standard plate count and capacitance in determining the total bacterial concentration of raw milk stood at 90%. However, with the introduction of NPs, this correlation coefficient increased to 96%. Accordingly, it was demonstrated that the electrode could count more bacterial cells in the presence of magnetic NPs. The elevated correlation coefficient of 96% highlights the considerable predictive potential of impedance analysis in determining the total bacterial concentration of raw milk when NPs are employed.

Fig. 7
figure 7

Capacitance changes in the absence and presence of magnetic nanoparticles in comparison to the standard plate counting technique

Determination of the optimal time for capacitance measurement

To enhance the efficiency of capacitance measurement with PEI-coated Fe3O4@SiO2 NPs on the electrode, two experiments were carried out. The initial method involved measuring capacitance immediately after NPs were mechanically immobilized on the electrode and the sample was introduced. The alternative method, measured capacitance 5 min post-sample introduction and continued measurement for 6 h. Concurrently, standard plate counting was conducted for control. Analysis in Fig. 8 reveals a correlation coefficient of 92% between capacitance measurement and standard plate counting for the first method, while for the second method (with a 5-min delay in capacitance measurement post-sample introduction), the correlation coefficient was 96%. This suggests that the PEI-coated Fe3O4@SiO2 NPs effectively capture most bacterial cells within the initial 5 min (response time) following sample introduction.

Fig. 8
figure 8

Optimization of time for the measurement of capacitance in the presence of magnetic nanoparticles

Discussion

In the dairy industry, the rapid, sensitive, and cost-effective detection of foodborne pathogens is considered the highest technological priority for ensuring the safety of dairy products. Raw milk and its derivatives are highly sought after in the global market. However, the susceptibility of raw milk to various contaminants poses a significant risk for foodborne disease outbreaks [2]. Particularly, unpasteurized raw milk has garnered special attention from the medical community due to its potential health hazards. In response to consumer demand, there are established standards for the production of raw milk and measures to prevent its trade for human consumption. It is evident that microbiological analysis alone cannot prevent foodborne disease outbreaks, as it can only detect pathogens with statistical significance. Nevertheless, microbiological analysis plays a crucial role in identifying potential risks and finding solutions to ensure food safety [35].

The impedance technique, initially devised for Salmonella detection in food samples, has advanced significantly in recent years, benefiting from innovations such as microfluidics, electrode microfabrication, bio-functionalized magnetic capture, and dielectrophoresis [36]. Two notable studies have been conducted concerning the detection of foodborne pathogens in milk. Grossi et al. [37] developed a portable, automated, and remotely controlled system tailored for industrial use. This system integrated an impedance measurement circuit board with thermal regulation, an incubation chamber, and microfluidics. It can analyze 4 ml of raw milk for psychrotrophic bacteria (30 and 4.5 h for 104 and 107 CFU/ml, respectively) and mesophilic bacteria (10 h for 104 CFU/ml, and 2 h for 107 CFU/ml). The key advantage of this system is its minimal sample preparation requirements and shortened assay time by diluting the sample in the growth medium. In another study, Yang et al. [38] developed an interdigitated microelectrode impedance sensor specifically for detecting Salmonella typhimurium in whole milk. Detection times for initial cell numbers of 4.8 and 5.4 × 105 CFU/ml were 9.3 and 2.2 h, respectively, with the detection limit reaching as low as one cell per sample.

PEI-coated Fe3O4@SiO2 NPs play crucial roles in impedance-based biosensors by enhancing sensitivity through increased binding sites, improving biocompatibility, ensuring stability and dispersibility, enabling magnetic manipulation for concentration and binding enhancement, and acting as amplification agents to improve detection limits and assay sensitivity [39]. Based on the findings from impedance analysis using magnetic NPs, it is clear that the most effective approach to expedite the test is to promptly immobilize the NPs on the electrode. Previous research indicates that bare IONPs possess a negative surface charge towing to the presence of hydroxyl groups in aqueous environments. This negative charge leads to electrostatic repulsion between the NPs and the negatively charged polyionic cell membranes of bacteria, hindering NP attachment and the manifestation of antibacterial properties. To address this limitation, modifying IONPs with positively charged groups can enhance their affinity for bacterial surfaces, thereby facilitating rapid attachment. Coating IONPs with biocompatible polymers such as PEI, polyethylene glycol, polyvinyl alcohol, polyacrylic acid, and various polysaccharides including agarose, alginate, chitosan, dextran, heparin, and starch can modify the interaction pattern between NPs and cells [30, 40, 41]. Applying the electrode modification by magnetic NPs has the poteintial to grant the flexibility and versatility of the proposed biosensor. Flexibility in impedance-based biosensors is essential for their effectiveness in diverse analytical tasks and real-world applications. It offers adaptability, reliability, and versatility in detecting and quantifying target analytes, ensuring the biosensor’s utility across a wide range of settings and scenarios [42, 43].

Conclusion

The findings from the present study underscore the efficacy of impedance measurement within the designed system for tracking bacterial concentration over time and processing small sample volumes to determine total bacteria count. Furthermore, the study highlights the suitability of impedance capacity as a reliable indicator for detecting bacteria across various concentrations in dairy products. The device exhibits the capability to detect bacterial cells at concentrations as low as 100 cells/ml in less than 1 h, signifying its rapidity and sensitivity. Notably, the impedance method significantly outpaces traditional plate-counting methods, providing bacterial quantification within 1 to 7 h compared to the lengthier 48 to 72 h required by the latter. Enhanced sensitivity of the device is achieved through the incorporation of PEI-coated Fe3O4@SiO2 NPs on the electrodes, resulting in amplified signal responses compared to NP-free conditions. Crucially, this impedance biosensor offers versatility in magnetically isolating bacteria in raw milk using PEI-coated Fe3O4@SiO2 NPs at an optimal frequency of 10 kHz. Given its rapidity, sensitivity, and flexibility, this system presents itself as a promising candidate for the development of an automated biosensor for industrial applications.