QCM-Based MgFe2O4@CaAlg Nanocomposite as a Fast Response Nanosensor for Real-Time Detection of Methylene Blue Dye

Methylene blue (MB) dye is a common colorant used in numerous industries, particularly the textile industry. When methylene blue is discharged into water bodies without being properly treated, it may seriously damage aquatic and human life. As a result, a variety of methods have been established to remove dyes from aqueous systems. Thanks to their distinguishing features e.g., rapid responsiveness, cost-effectiveness, potential selectivity, portability, and simplicity, the electrochemical methods provided promising techniques. Considering these aspects, a novel quartz crystal microbalance nanosensors based on green synthesized magnesium ferrite nanoparticles (QCM-Based MgFe2O4 NPs) and magnesium ferrite nanoparticles coated alginate hydrogel nanocomposite (QCM-Based MgFe2O4@CaAlg NCs) were designed for real-time detection of high concentrations of MB dye in the aqueous streams at different temperatures. The characterization results of MgFe2O4 NPs and MgFe2O4@CaAlg NCs showed that the MgFe2O4 NPs have synthesized in good crystallinity, spherical shape, and successfully coated by the alginate hydrogel. The performance of the designed QCM-Based MgFe2O4 NPs and MgFe2O4@CaAlg NCs nanosensors were examined by the QCM technique, where the developed nanosensors showed great potential for dealing with continuous feed, very small volumes, high concentrations of MB, and providing an instantaneous response. In addition, the alginate coating offered more significant attributes to MgFe2O4 NPs and enhanced the sensor work toward MB monitoring. The sensitivity of designed nanosensors was evaluated at different MB concentrations (100 mg/L, 400 mg/L, and 800 mg/L), and temperatures (25 °C, 35 °C, and 45 °C). Where a real-time detection of 400 mg/L MB was achieved using the developed sensing platforms at different temperatures within an effective time of about 5 min. The results revealed that increasing the temperature from 25 °C to 45 °C has improved the detection of MB using the MgFe2O4@CaAlg NCs nanosensor and the MgFe2O4@CaAlg NCs nanosensor exhibited high sensitivity for different MB concentrations with more efficiency than the MgFe2O4 NPs nanosensor.


Introduction
Over the past few decades, nanomaterials with different structures and compositions have been involved in all fields [1][2][3][4]. Among these nanomaterials, magnetic particles have drawn a great deal of attention, and numerous physical experiments have been done on them [5][6][7]. Different uses for magnetic materials were made possible by the ability to create nanoscale magnetic materials [8][9][10]. These numerous applications include ferrofluid technology, electronics, magnetic data storage, magnetocaloric cooling, medication delivery systems, and magnetically targeted contrast agents for magnetic resonance imaging [11].
The quartz crystal microbalance (QCM) sensor is a simple, highly adjustable, and sensitive sensor for monitoring activity on surfaces or even within thin films [36]. The mass of any target analyte is a fundamental property, and QCM systems could identify these analytes based on their mass, therefore labels are not necessary [37]. Analyses of environmental, food, and biomedical media are frequently conducted using the QCM [38]. Owing to the complexity of these substances, it is imperative to create specific methods for identifying target analytes within them. Since QCM sensors are neither selective nor specific, thus usage of QCM sensors in some applications is thereby becoming challenging [39].
Dye usage is widespread in the textile, paper, pharmaceutical, leather, and plastic industries [40,41]. Once large amounts of dye are dumped into wastewater on a large scale, it may endanger aquatic life, ecosystems, and human health if it enters the food chain [42]. Due to their potential for disruption and poor environmental degradation, many governments have restricted the use of some dyes or discharged them into aquaculture regions [43,44]. One of the pigments that are most frequently used is methylene blue (MB). The MB is considerably used as a model dye to evaluate how well nanocomposites bind to surfaces [45,46]. The ion exchange, electrostatic interactions, or π-π interactions have all been proven to be effective ways for MgFe 2 O 4 nanoparticle-based nanocomposites to adsorb both cationic and anionic dyes [47]. This implies that MB could be selectively detected using MgFe 2 O 4 nanoparticles-based alginate nanocomposites.
In this study, QCM-Based MgFe 2 O 4 NPs and MgFe 2 O 4 @CaAlg NCs Nanosensors were used to fabricate a novel detection technique for MB. First, the magnesium ferrite nanoparticles (MgFe 2 O 4 NPs) were prepared using clove extract as a green synthesis approach method, and then the synthesized nanoparticles the cross-linked with alginate hydrogel to obtain magnesium ferrite-coated calcium alginate nanocomposite (MgFe 2 O 4 @CaAlg NCs). Both MgFe 2 O 4 NPs and MgFe 2 O 4 @CaAlg NCs subjected to many characterization tools e.g., X-ray diffraction (XRD), dynamic light scattering (DLS), zeta sizer analysis (ζ-potential), and transmission electron microscopy (TEM) to provide information about the crystallinity, particle size distribution, surface charge, and shape of the prepared samples. Afterward, the synthesized MgFe 2 O 4 NPs and MgFe 2 O 4 @CaAlg NCs were employed as nanosensor materials based on the QCM technology to real-time monitor the high concentrations of MB dye in the aqueous solutions at different solutions temperatures.

Preparation of the Clove Leaves Extract
The clove (Syzygium aromaticum L.) leaves were initially cleaned with tap water. Then, they were rinsed with double-distilled water to eliminate impurities and contaminants. After that, they were given five days to dry naturally and 6 g of dried leaves were combined with 100 mL of double-distilled water to yield the leaf extract. Then they were heated for 30 min at 60 • C. The clove leaf extract was then filtered and preserved for future work [48].

Green Synthesis of MgFe 2 O 4 Nanoparticles
Spinel MgFe 2 O 4 NPs were prepared using the co-precipitation technique with a few minor modifications and 5 g of FeCl 3 ·6H 2 O and 3 g of MgCl 2 ·6H 2 O were dissolved in double-distilled water. The mixture was then heated at 50 • C on a hot plate for approximately 15 min. The chloride solution was then vigorously stirred before adding 10 mL of the clove leaf extract. The pH of the mixture was increased to 10 by a few drops of a 0.5 M NaOH solution. As the pH of the solution turned to pH 10, a brown precipitate was formed and allowed to settle down. Thereafter, the mixture was agitated for 2 h at 60 • C. After being rinsed with double-distilled water, the obtained nanoparticles were calcined for 2 h at 600 • C.

Preparation of MgFe 2 O 4 @CaAlg Nanocomposite
Ionotropic gelation was used to prepare the MgFe 2 O 4 @CaAlg NCs. In 50 mL of distilled water, 0.025 g of MgFe 2 O 4 NPs was sonicated for 20 min. Then, the MgFe 2 O 4 NPs solution received 1 g of sodium alginate, which was agitated for 1 h before being sonicated for 20 min. Subsequently, a 2 M of calcium chloride solution was added to the mixture, and it was agitated for 1 h. The mixture was refrigerated for two days. The produced nanocomposite was filtered and rinsed three times using distilled water. Following preparation, the MgFe 2 O 4 @CaAlg NCs were dried in an oven for 2 days at 60 • C.

Instrumentation
X-ray diffraction (EQUINOX 1000, Thermo Scientific CO., Lafayette, CO, USA) was used to determine the composition and phase of both green-synthesized MgFe 2 O 4 NPs and MgFe 2 O 4 @CaAlg NCs. Cu Kα radiation with a current of 31 mA and an applied voltage of 33 kV was used. The 2θ angles ranged between 0 • to 85 • , and the scan speed was adjusted to 0.1 • /min. In addition, the surface charge and particle size of the greenly synthesized MgFe 2 O 4 NPs and MgFe 2 O 4 @CaAlg NCs were determined using the zeta seizer instrument (NanoSight NS500, Malvern Panalytical, Malvern, UK). The prepared samples were further examined with a TEM instrument (JEOL, JEM-2100 high-resolution, Peabody, MA, USA) to determine the morphology of green-synthesized MgFe 2 O 4 NPs and MgFe 2 O 4 @CaAlg NCs. The MgFe 2 O 4 NPs and MgFe 2 O 4 @CaAlg NCs were sonicated for 20 min using an ultrasonic probe sonicator (UP400S, Hielscher, Oderstraße, Teltow, Germany) at a frequency of 55 kHz, an amplitude of 55%, and a cycle of 0.55 before TEM analysis. The dispersed mixture was then deposited in drops with a diameter of five to ten microns across a copper grid that had been coated with carbon before being subjected to TEM analysis.

Establishing of QCM-Based MgFe 2 O 4 NPs and MgFe 2 O 4 @CaAlg NCs Nanosensors
The QCM sensor is contained an AT-cut quartz crystal chip attached to a gold electrode with a diameter of 12 mm, and a resonance frequency of 5 MHz (Q-Sense, Shenzhen, China). Prior to the stabilization of the nanomaterials, the gold sensor was cleaned by immersing it in a 5:1:1 v/v/v solution of aqueous ammonia, H 2 O 2 , and double-distilled water for 10 min at 75 • C. Then, the gold sensor was rinsed with double-distilled water, and ethanol, and allowed to dry at room temperature. The dried chip was subsequently inserted into the Q-Sense instrument. Afterward, a stream of double-distilled water was first injected over the electrode to serve as a background electrolyte. Injecting the background electrolyte solution (double distilled water) into the QCM module enables the baseline measurements before adding the sensor's nanomaterials. In order to keep the QCM signal steady, the QCM module was continuously fed by double-distilled water until the value of the QCM signal was then recorded as zero. Then, 2 mL of 25 g/L aliquots of the MgFe 2 O 4 NPs or MgFe 2 O 4 @CaAlg NCs were dispersed in 10 mL of double distilled water. Following that, aliquots of the mixture were flushed on the gold sensor at a flow rate of 0.1 mL/min.

QCM-Monitoring of MB Dye
The QCM measurements were carried out using a QCM system (QCM, Q-senses, Biolin Scientific, Linthicum Heights, MD, USA). Each QCM measurement was performed by injecting 400 mg of MB solutions (2 mL of 10 g/L MB was dissolved in 50 mL of double distilled water) onto the surface of either QCM-based MgFe 2 O 4 NPs or MgFe 2 O 4 @CaAlg NCs nanosensors at various temperatures (25 • C, 35 • C, and 45 • C). The MB solution was then injected repeatedly until the signal stabilized, indicating that the equilibrium of the binding interaction between the nanosensors and the MB had been reached. To clean unadsorbed MB off the surfaces of the QCM sensors, double distilled water was once more poured into the module after a predetermined certain time. baseline measurements before adding the sensor's nanomaterials. In order to keep the QCM signal steady, the QCM module was continuously fed by double-distilled water until the value of the QCM signal was then recorded as zero. Then, 2 mL of 25 g/L aliquots of the MgFe2O4 NPs or MgFe2O4@CaAlg NCs were dispersed in 10 mL of double distilled water. Following that, aliquots of the mixture were flushed on the gold sensor at a flow rate of 0.1 mL/min.

QCM-Monitoring of MB Dye
The QCM measurements were carried out using a QCM system (QCM, Q-senses, Biolin Scientific, Linthicum Heights, MD, USA). Each QCM measurement was performed by injecting 400 mg of MB solutions (2 mL of 10 g/L MB was dissolved in 50 mL of double distilled water) onto the surface of either QCM-based MgFe2O4 NPs or MgFe2O4@CaAlg NCs nanosensors at various temperatures (25 °C, 35 °C, and 45 °C). The MB solution was then injected repeatedly until the signal stabilized, indicating that the equilibrium of the binding interaction between the nanosensors and the MB had been reached. To clean unadsorbed MB off the surfaces of the QCM sensors, double distilled water was once more poured into the module after a predetermined certain time.

DLS and Zeta Potential
The DLS method was used to determine the particle size of green-synthesized MgFe 2 O 4 NPs and MgFe 2 O 4 @CaAlg NCs (Figure 2a,c). The green-synthesized MgFe 2 O 4 NPs and MgFe 2 O 4 @CaAlg NCs were found to have average sizes of 15 and 37 nm, respectively. The results showed that all the suspensions had a unimodal size distribution with polydispersity indices and that they all had a high level of colloidal stability. The observed increases in the average size of the MgFe 2 O 4 @CaAlg NCs demonstrate the effective stabilizing of MgFe 2 O 4 NPs with alginate hydrogel. The average size also considers the existence of nanoparticles and any solvent molecules that are connected to the tumbling particle as a hydrodynamic size.
lizing of MgFe2O4 NPs with alginate hydrogel. The average size also considers the existence of nanoparticles and any solvent molecules that are connected to the tumbling particle as a hydrodynamic size.
The stability of green-synthesized MgFe2O4 NPs and MgFe2O4@CaAlg NCs in aqueous environments was examined by measuring the ζ-potentials of these materials at different applied voltage values. The measured ζ-values for green-synthesized MgFe2O4 NPs and MgFe2O4@CaAlg NCs were −32 and −4.8 mV, respectively, as shown in Figure 2b,d. The ζ-value of MgFe2O4@CaAlg NCs was decreased negatively, which may be due to masking alginate structures for the negative charge of MgFe2O4 NPs. This implies the good linking between the CaAlg hydrogel and MgFe2O4 NPs.

MB Monitoring using QCM-based MgFe2O4 NPs and MgFe2O4@CaAlg NCs Nanosensors
The influence of temperature on the monitoring of the high concentration of MB was achieved at 25 °C, 35 °C, and 45 °C using MgFe2O4 NPs and MgFe2O4@CaAlg NCs nanosensors. Figures 4 and 5 revealed that the detection sensitivity of the MB in the aqueous solutions is affected by the medium temperature. A typical QCM-based MgFe2O4 NPs and MgFe2O4@CaAlg NCs nanosensors experiments have four stages, (1) represents the frequency response of MgFe2O4 NPs and MgFe2O4@CaAlg NCs nanosensors (stable baseline), (2) suddenly drop in the frequency change due to the rapid binding of MB molecules with the sensors, which may be attributed to the large numbers of vacant sites on the sensors' surfaces, (3) more adsorption of target MB molecules, and (4) equilibrium state of adsorption process between the MgFe2O4 NPs and MgFe2O4@CaAlg NCs nanosensors and MB molecules. The frequency shift would stay steady after adding the MgFe2O4 NPs and MgFe2O4@CaAlg NCs before the MB solution was pumped into the QCM system. The frequency would drastically change when MB was adsorbed on the surface of QCM-based MgFe2O4 NPs and MgFe2O4@CaAlg NCs nanosensors. According to Figures 4 and 5, the frequency was more shifted for the QCM-based MgFe2O4@CaAlg NCs nanosensor than for the QCM-based MgFe2O4 NPs nanosensor. This suggests that the QCM-based MgFe2O4@CaAlg NCs nanosensor was more capable of binding MB molecules because it had more vacant cavities as a result of the presence of the alginate hydrogel. Similar changes in the frequencies of both QCM-based MgFe2O4 NPs and MgFe2O4@CaAlg NCs nanosensors have occurred, therefore, indicating that both nanosensors have comparable responses toward the adsorption of MB molecules. Once the frequency became stable again, this means an equilibrium state of MB adsorption on the surface of both QCMbased MgFe2O4 NPs and MgFe2O4@CaAlg NCs nanosensors has reached. At step four, no noticeable changes in the frequency of sensors were observed, indicating that minimal mass was lost, and the nanosensor surfaces had only minor structural modifications. This indicated that the QCM-based MgFe2O4 NPs and MgFe2O4@CaAlg NCs nanosensors could be used effectively for the real-time detection of MB dye even at high concentrations reaching 400 mg/L. Where chemical reactions are known to be significantly influenced by temperature; hence, a particular reaction may be improved or inhibited by temperature depending on the surroundings of the reactants and/or products. The adsorbate molecule diffuses more quickly through the adsorbent's exterior boundary layer and inside its pores because of the temperature change. Additionally, changing the temperature will enhance the adsorbent's capacity to reach equilibrium for a given adsorbate [49].
For adsorption of MB by QCM-based MgFe2O4 NPs and MgFe2O4@CaAlg NCs nanosensors, the same adsorption behavior was observed at the different temperatures, but @CaAlg NCs nanosensors could be used effectively for the real-time detection of MB dye even at high concentrations reaching 400 mg/L. Where chemical reactions are known to be significantly influenced by temperature; hence, a particular reaction may be improved or inhibited by temperature depending on the surroundings of the reactants and/or products. The adsorbate molecule diffuses more quickly through the adsorbent's exterior boundary layer and inside its pores because of the temperature change. Additionally, changing the temperature will enhance the adsorbent's capacity to reach equilibrium for a given adsorbate [49].
number of active adsorption sites, which also led to a decrease in the MB's adsorption amplitude. While in the case of the MgFe2O4@CaAlg NCs nanosensor, the temperature increases caused physical changes in the alginate hydrogel structure such as rupture strength increases, which may help in the easy diffusion of MB molecules into the surface of the MgFe2O4@CaAlg NCs nanosensor due to increasing the swelling degree of alginate hydrogel. In addition, this improvement in MB detection may be attributed to the increase of the mobility of MB molecules and the allowed number of active spots on the surface of the MgFe2O4@CaAlg NCs nanosensor. The sensitivity of both QCM-based MgFe2O4 NPs and MgFe2O4@CaAlg NCs nanosensors towards the different concentrations of MB (100 mg/L, 400 mg/L, and 800 mg/L) was investigated as shown in Figures 6 and 7. It could be observed that the adsorption of MB on the surface of the QCM-based MgFe2O4 NPs nanosensor causes the frequency to change markedly because of the mass of MB that adsorbed onto the sensor surfaces. However, the change in frequency of the QCM-based MgFe2O4 NPs nanosensor decreased gradually as the MB concentration increased (Figure 6). This may be attributed to the relatively high surface area and the availability of adsorption sites at low initial solution concentrations, where the MB was easily adsorbed and detected. While at higher initial solution concentrations, a decrease in the frequency response of MB occurs due to the limitation or saturation of total available adsorption sites on the surface of the QCM-based MgFe2O4 NPs nanosensor. This may be due to the formation of monolayer coverage at the interface of the MgFe2O4 NPs. In addition, this behavior could be attributed to the accumulation of more amount of MB molecules at higher concentrations. Accordingly, the increasing total accumulation of methylene blue is probably due to more contact of QCMbased MgFe2O4 NPs nanosensor sites with MB molecules. Most of the methylene blue in the sample solution may interact with the adsorbent's active sites at low concentrations,   (Figure 6). This may be attributed to the relatively high surface area and the availability of adsorption sites at low initial solution concentrations, where the MB was easily adsorbed and detected. While at higher initial solution concentrations, a decrease in the frequency response of MB occurs due to the limitation or saturation of total available adsorption sites on the surface of the QCM-based MgFe 2 O 4 NPs nanosensor. This may be due to the formation of monolayer coverage at the interface of the MgFe 2 O 4 NPs. In addition, this behavior could be attributed to the accumulation of more amount of MB molecules at higher concentrations. Accordingly, the increasing total accumulation of methylene blue is probably due to more contact of QCM-based MgFe 2 O 4 NPs nanosensor sites with MB molecules. Most of the methylene blue in the sample solution may interact with the adsorbent's active sites at low concentrations, but as the concentration is increased, more and more methylene blue species will be unavailable to interact with the active surface because the active sites have already been occupied. Moreover, the accumulation of MB molecules results in increasing the positive charge on the surface of QCM-based MgFe 2 O 4 NPs and causes a raising of repulsion force between MB molecules. Therefore, it could conclude that the sensitivity of QCM-based MgFe 2 O 4 NPs nanosensors decreases at higher concentrations of MB.

Proposed Sensing Mechanism of the QCM-based MgFe2O4 NPs and MgFe2O4@CaAlg NCs Nanosensors
The receiving of MB by the QCM-based MgFe2O4 NPs and MgFe2O4@CaAlg NCs nanosensors is illustrated in Figure 8. In the case of the MgFe2O4 NPs nanosensor, the surface of MgFe2O4 NPs carriers a net negative charge, which is acquired by the symmetric stretching of oxygen atoms along the Fe 3+ -O 2− and Mg 2+ -O 2− bonds at the tetrahedral site and asymmetric stretching of Fe 3+ -O 2− and Mg 2+ -O 2− bonds at the octahedral site [50]. Since  [50]. Since the N atom of MB exhibits a lower electronegativity compared to the O atom of the MgFe 2 O 4 NPs. In this situation, the O atom carries a partial negative charge (δ−) and N carries a partial positive charge (δ+). As a result, dipole-dipole interactions might consequently originate from π-π interactions. Accordingly, nitrogen atoms of two MB molecules can interact with a single O atom from MgFe 2 O 4 NPs.
π-π interactions. Moreover, the molecular structure of bio-adhesive alginate hydrogel that can absorb water at levels of more than 100 times its weight may influence the interaction of QCM-based MgFe2O4@CaAlg NCs nanosensor with MB molecules. Where the polar structure of alginate hydrogel enhanced the interactions with MB molecules that also have a polar structure causing more favorable adsorption. This interpreted why the adsorption capacities were higher for the MgFe2O4@CaAlg NCs nanosensor than for the MgFe2O4 NPs nanosensor.

Comparison of the QCM-based MgFe2O4 NPs and MgFe2O4@CaAlg NCs nanosensors method with other methods in the literature
The sensitive detection of the target analyte in the QCM sensor, surface-enhanced Raman scattering (SERS), and surface plasmon resonance (SPR) are crucial for the surface chemistry of the sensors. These techniques can be utilized to detect target analytes at low concentrations due to their rapid responses, high sensitivities, and lack of label requirement. The QCM-based MgFe2O4 NPs and MgFe2O4@CaAlg NCs nanosensor's limit of detection for the MB was compared with it for SERS and SPR, suggesting that it might be In the case of the QCM-based MgFe 2 O 4 @CaAlg NCs nanosensor, the presence of alginate hydrogel increased the layer thickness of the MgFe 2 O 4 @CaAlg NCs nanosensor, causing more cavities to form. In addition, the presence of a polar side chain of carboxylic groups in the alginate hydrogel structure that contributed as functional groups with electron donors would have increased the density of negative charge and hydrophilicity of MgFe 2 O 4 @CaAlg NCs surface. Thus, the QCM-based MgFe 2 O 4 @CaAlg NCs nanosensor would interact more readily with MB through electrostatic interactions, besides the slight negative charge acquired by the MgFe 2 O 4 NPs, which may help in further occurrence of π-π interactions. Moreover, the molecular structure of bio-adhesive alginate hydrogel that can absorb water at levels of more than 100 times its weight may influence the interaction of QCM-based MgFe 2 O 4 @CaAlg NCs nanosensor with MB molecules. Where the polar structure of alginate hydrogel enhanced the interactions with MB molecules that also have a polar structure causing more favorable adsorption. This interpreted why the adsorption capacities were higher for the MgFe 2 O 4 @CaAlg NCs nanosensor than for the MgFe 2 O 4 NPs nanosensor.

Comparison of the QCM-Based MgFe 2 O 4 NPs and MgFe 2 O 4 @CaAlg NCs Nanosensors Method with Other Methods in the Literature
The sensitive detection of the target analyte in the QCM sensor, surface-enhanced Raman scattering (SERS), and surface plasmon resonance (SPR) are crucial for the surface chemistry of the sensors. These techniques can be utilized to detect target analytes at low concentrations due to their rapid responses, high sensitivities, and lack of label requirement. The QCM-based MgFe 2 O 4 NPs and MgFe 2 O 4 @CaAlg NCs nanosensor's limit of detection for the MB was compared with it for SERS and SPR, suggesting that it might be utilized for real-time detection of MB at different concentrations. Additionally, the MB has also been identified using other methods such as ultraviolet-visible absorption spectrophotometry (UV-Vis), capillary electrophoresis (CE), fluorescence spectroscopy, and high-performance liquid chromatography (HPLC). The detection limit was provided by the QCM-based MgFe 2 O 4 NPs and MgFe 2 O 4 @CaAlg NCs nanosensors compared to these techniques as summarized in Table 1. NPs sensing layer was upgraded with the CaAlg layer to decrease the response time and enhance the sensitivity, and the QCM sensor was developed for the detection and measurement of high concentrations of dye contaminant. Additionally, rather than waiting for adsorption equilibrium, it is feasible to specify a time when the mass of the developed QCM sensor starts to vary significantly to shorten the detection time. Table 2

Conclusions
In this work, novel QCM-based MgFe 2 O 4 NPs and MgFe 2 O 4 @CaAlg NCs nanosensors have been developed for comparable detection of the high concentrations of MB in the water streams. The MgFe 2 O 4 NPs were green synthesized using the extract of clove (Syzygium aromaticum L.). Then, the prepared MgFe 2 O 4 NPs were coated using alginate hydrogel to obtain the MgFe 2 O 4 @CaAlg nanocomposite. The XRD results showed that MgFe 2 O 4 NPs were formed in good crystallinity with minor differences observed for MgFe 2 O 4 @CaAlg NCs. The DLS and Zeta values revealed that the MgFe 2 O 4 NPs and MgFe 2 O 4 @CaAlg possess a particles size distribution of 15 nm and 37 nm, and ζ-potentials of −32 mV and −4.8 mV, respectively. While the TEM images depicted that the MgFe 2 O 4 NPs have a spherical shape and the MgFe 2 O 4 @CaAlg NCs were successfully coated with alginate hydrogel. Subsequently, the fabricated nanomaterials were employed as novel nanosensors based on the QCM method. The designed nanosensors were further used to monitor the highly concentrated MB of about 400 mg/L at different temperatures (25 • C, 35 • C, and 45 • C) and different initial MB concentrations (100 mg/L, 400 mg/L, and 800 mg/L). The results provided that as the temperature increases from 25 • C to 45 • C, the sensitivity of QCM-based MgFe 2 O 4 @CaAlg NCs for MB detection has improved. In addition, the QCM-based MgFe 2 O 4 @CaAlg NCs nanosensor exhibits a stable sensitivity towards different MB concentrations. On the contrary, the QCM-based MgFe 2 O 4 NPs exhibited an opposing behavior for MB detection at higher both temperatures and concentrations of MB. Accordingly, it could be stated that the QCM-based MgFe 2 O 4 @CaAlg NCs is an efficient tool as a real-time rapid and sensitive nanosensor for MB detection in continuous-flow water streams.