Introduction

Monitoring milk fever or hypocalcemia in transition dairy cows is important for disease prevention and treatment to improve health, productivity, and welfare1,2,3,4. Hypocalcemia is one of the metabolic disorders that occurs when the level of ionized calcium (Ca2+) in the blood is low in dairy cows within the first 24 h of post-calving, and it can last up to 2–3 days5,6,7. It is noted that dairy cows experience a high prevalence of hypocalcemia during the transition period8. In the dairy industry, both clinical and subclinical hypocalcemia cause huge economic losses due to lessened milk yield5,6,7. Hypocalcemia impacts 25 to 40% of primiparous and 45 to 80% of multiparous cows, respectively9. The transition period of dairy cows is challenging due to the high demand for nutrients to help fatal growth, colostrogenesis, and milk production8. In early lactation, energy demands increase by about 300%, and Ca2+ requirements are increased by more than 65% to support lactogenesis10. Importantly, the immune function of dairy cows is compromised with a low level of Ca2+ concentration11. One of the biggest challenges for periparturient dairy cows is the maintenance of a physiological range of Ca2+ concentration (~2.12–2.5 mm) to support milk production and immune function12. Subclinical hypocalcemia (SCH) occurs within a concentration range of blood Ca2+ from 1.4–2 mm within the first 1 to 2 days after calving13. SCH is considered a “gateway” disease that increases the risk of other metabolic diseases, including ketosis, metritis, and displaced abomasum14. This happens because Ca2+ is crucial for muscle and nerve function, particularly functions that support skeletal muscle strength1,15,16,17. The most immediate and noticeable effect of hypocalcemia is the inability of the cow to stand, as the muscles become weak or paralyzed due to insufficient Ca2+ to facilitate proper contraction2. Furthermore, SCH in dairy cows significantly reduces milk production around calving, leading to dairy shortages and economic burdens on farmers that threaten food security18,19.

The weakened muscle function can lead to poor rumen motility and other gastrointestinal issues, compounding the health risks20. Additionally, reduced Ca2+ levels can impair nerve function21, leading to a lack of coordination and control over muscle movements22. This can increase the risk of injuries and make cows more susceptible to other metabolic diseases. Besides, low Ca2+ levels can lead to muscle weakness or even paralysis, affecting the cow’s ability to move, eat, and function normally. This can result in complications such as decreased feed intake, leading to lower milk production and poor overall health1. As SCH does not appear with any clinical symptoms; it is challenging to detect SCH in the early stage of lactating cows. A study of 1462 dairy cows estimated that 50% of mature dairy cows and 25% of first-calf heifers experience SCH2.

Dairy cows with Ca2+ concentrations > 2.0 mM had significantly lower non-esterified fatty acids (NEFA) indicating better energy balance compared to those with SCH2. Such disorder can cause economic losses of between $200–290 per dairy cow annually8 and the average dairy farm was estimated to be $8000 per 100 cows. Owing to the lack of practical, rapid, and inexpensive on-site detection tools, SCH can easily be ignored on dairy farms. Further, there is no availability of Ca2+ analyzers to detect this ion in early lactating cows, particularly in milk samples. Although the blood Ca2+ concentration dropped significantly due to SCH, the change in milk Ca2+ concentration was not significant. Measuring the ratio of Ca2+ to phosphate (HPO42– or P) in milk samples can significantly alleviate this challenge. By considering the equilibrium constant of the reaction in 3Ca2+ + 2 HPO42- Ca3(PO4)2 + 2H+, a correlation between the concentration of Ca and P can be measured to determine the prevalence of SCH in dairy cows23. A large portion of HPO42– mobilized from bone tissue may be a direct consequence of Ca mobilization for Ca homeostasis in early lactation24,25. There is a relationship between Ca and HPO42– in milk that can allow a confident early diagnosis of developing hypocalcemia. Dairy farmers have attempted to improve Ca homeostasis by manipulating dietary cationic-anionic differences or supplying oral Ca2+, Ca2+ binders, and other supplements26. But, it is necessary to analyze milk samples that are easily accessible for the cow-side test at the farm with portable sensors.

Traditionally, several lab-based sensing modalities, such as inductively coupled plasma-mass spectrometry (ICP-MS)27, Fluo-4 emission analyzers28, and blood gas analyzers29 have been used for ion detection in milk samples. ICP-MS and Fluo-4 emission analyzers are being explored for the detection of Ca2+ and P levels in dairy cows. Such modalities can only be performed by trained technicians who are required to ship samples to clinical laboratories. Sending samples to a clinical laboratory instead of analyzing them on-site can lead to sample degradation or contamination during transport, which can reduce the accuracy, sensitivity, and reliability of biomarker detection due to physiological reactions, delays, environmental exposure, or handling errors30. In addition, commercially available analyzers (i-STAT 1, Abbott Laboratories) measure several electrolytes, including Ca2+ and HPO42- concentrations31. However, it is not only costly ($4500) but also has limited accuracy and sensitivity in measuring Ca2+ in blood. Despite their commercial success, the footprint (size, e.g., > 10 cm in length) and high cost of the sensors do not allow the measurement of ions outside the laboratory32.

Given that SCH often presents without symptoms, farmers face a challenge in identifying which cows to test. They can either conduct routine Ca2+ level measurements within the first 48 h postpartum or wait until severe clinical symptoms of hypocalcemia become evident. In the latter scenario, testing is based on observable signs such as weakness or difficulty standing, as well as risk factors including advanced age, previous hypocalcemia, poor body condition, and high milk production, which heightens Ca2+ needs. Decisions are also guided by herd history, preventive measures, and veterinary recommendations33,34. This strategy helps ensure that cows at greater risk or displaying symptoms are accurately identified and appropriately managed.

Recently, ion-selective field-effect transistors (ISFET)35, ion-selective membrane (ISM) sensors36, and DNAzyme-amplified electrochemical biosensor27 are the sensing modalities used for Ca2+ measurements in dairy cows. The potential problems with these sensors are a) lack of stability due to potential drifting over time, b) inability to perform the one-time measurement, c) lack of selectivity due to the contamination of inner filling solutions in both electrodes and d) bulky sensor geometries and high manufacturing cost. These challenges are being addressed by enabling one- and two-dimensional nanostructures with advanced functionalities37. These nanostructures served as solid-contact transducing layers between the ISMs and conductors to develop ion-sensitive potentiometric sensors38. Such transducers accelerate ion-to-electron transfer, resulting in automated, calibration-free sensors39 as they eliminate the need for inner filling solutions of bulky potentiometric sensors40. However, an inevitable water layer with a thickness of ~10–100 nm can be formed at the interface of polymer and ISM (or beneath of ISM)41,42,43 due to enormous oxidation reactions with dissolved O2 molecules resulting in shortage lifetime, and a limited selectivity of the sensor. They still have many issues such as signal drifting and instability, operation temperature, reproducibility, severe interference effects, and high power requirements.

Several advanced manufacturing modalities have triggered the development of sophisticated analytical and miniaturized sensors. In this regard, additive manufacturing (or 3D printing) plays an exciting manufacturing approach that allows the microfabrication of functional nanostructures with intricate architectures, controlled microstructures, and diverse material combinations44,45. This technology has revolutionized sensor or biosensor devices by enabling miniaturization, customization, and flexibility46. 3D-printed structures offer several features such as a high-surface area for molecular interactions, multilateral printing, and accelerated electrochemical reactions, resulting in lower limit-of-detection, increased sensitivity, high sensing resolution, wider sensing range, and ability of long-term measurements47. Unlike 2D surfaces, the 3D surfaces in a 3D volume of target molecules can reduce the diffusion path of interactions as well as provide a spherical diffusion of target ions44. Creating sensors using additive manufacturing is an emerging approach for livestock sensing. With these unique features of 3D geometries, we can manufacture low-cost, rapid-prototype 3D-printed sensors that provide excellent performance for milk fever sensing, which has not been realized before. We believe that this approach will be practical and cost-effective for livestock sensing to improve the health, productivity, economy, and welfare of animals and meet current and future food scarcities across the globe resulting from a shortage of dairy products19.

In this study, we developed a lithography-free and low-cost 3D-printed sensor to simultaneously detect Ca2+ and P at the same time directly in milk samples to identify an important metabolic disease, i.e., subclinical hypocalcemia in transitional dairy cows. This innovative sensor, produced using an extrusion-based 3D printer, enables instant diagnosis of milk fever and allows for non-invasive monitoring of SCH in milk, while also offering insights into serum levels without the need for invasive blood sampling. In this device, due to the 3D geometry, which is a periodic structure of polymer (~78 µm) along with secondary hierarchical wrinkled surfaces, we have achieved a detection time of 10 seconds and an attomolar sensitivity. Furthermore, it can be integrated with an electrical milking machine, dairy industry piping, and milk parlors to facilitate in-field milk testing by untrained farmers (Fig. 1). The unique microscopic structures of the 3D sensor surface, along with wrinkled surfaces of poly (3-octyl-thiophene) (POT), which served as a solid-contact ion-to-electron transducing layer, were created using extrusion 3D printing. This wrinkled structure significantly enhances the sensitivity of the sensor by increasing the surface area of the transducer. This enlarged surface area enhanced the capability of the sensor to detect and respond to even slight variations in the Ca2+ and P concentrations in milk and serum samples. This technology may be useful for detecting other biomarkers in milk samples.

Fig. 1: 3D-printed sensors for the detection of subclinical hypocalcemia in dairy cows.
figure 1

Integration of 3D-printed sensor with milking machine for cow side and continuous measurement of Ca2+ and P in milk samples. Figure was created using images from BioRender.com released under a CC-BY 4.0 license.

Results

Sensor manufacturing

First, we describe sensor manufacturing using multiple electrodes for the detection of milk Ca2+ and P ions. The low-cost 3D-printed sensors in this work were manufactured using an extrusion-based additive manufacturing called “stereolithography” (SLA) technique to detect the concentrations of ionized Ca2+ and P ions in dairy cows. This fabrication method does not require sophisticated tools or cleanroom facilities, such as lithography. The details of sensor manufacturing using a 3D printer are explained in the Methods section and Fig. S1 Supporting Information. For manufacturing, a 3D design was first created using SolidWorks software (Fig. S1, Supporting Information). The sensor has three functional electrodes with unique wrinkled geometries. One electrode served as a shared reference electrode and the other two served as indicators or working electrodes.

Working electrodes were used to detect the Ca2+ and P concentrations in the samples. All the electrodes were made of a commercially available UV-curable high-temperature resin. The printed electrodes were placed in a small elliptical circle or sample holder, where the test samples were placed for detection (Fig. S1, Supporting Information). A photograph of the sensor is presented in Fig. S1 in Supporting Information. An elliptical sample holder was created and all three electrodes were placed on it. The sensor is 33 mm in length, 25 mm in width, and 2 mm in height. The sensor dimensions can be adjusted to be smaller or larger, depending on the application and compatibility with tubes of different sizes. The sensing geometry of each sensing unit was built via the layer-by-layer lateral printing of the polymer and cured using ultraviolet light. The width of the lateral layer of the polymer is about 78 ± 2.5 µm, and the geometry of the sensor is composed of several periodic patterns of polymer containing many secondary wrinkled surfaces. All three electrodes have the same diameters of 3 mm and were placed at a 300 µm depth. This design was chosen to use a minimal amount of milk (~200 μL). In one fabrication batch, 20 sensors were printed at room temperature within 2 h. Thus, we expect to manufacture the sensors at a low cost. Once printed, a post-curing step was performed by applying UV light for 120 minutes at 80°C to cure the device. As expected, the curing temperature used during the manufacturing process created secondary wrinkles on the sensor surface. The wrinkled surfaces of the sensor acted as a microelectrode and provided larger surface areas to develop an interfacial potential, even at low concentrations of target ions, particularly Ca2+.

After printing the sensor base, a 100 nm-thick layer of gold (Au) was deposited on the surface of the electrode by placing a polyimide tape-based shadow mask using an e-beam evaporator. The Au and chromium (Cr) layers were selected because of their high stability over time. A conducting polymer layer, i.e., a POT layer, was then introduced onto the two Au electrodes, except for the shared RE, to serve as an ion-to-electron transducing layer in the sensor. The POT concentration was then optimized (Fig. S8 in Supporting Information). In addition to excellent redox properties, the POT layer shows a hydrophobic surface that reduces water accumulation at the interface and high stability by reducing signal drifting over the testing time, resulting in high selectivity48. Furthermore, two cocktail solutions of Ca2+ ion-selective membrane (Ca-ISM) and phosphateion-selective membrane (P-ISM) were prepared separately and placed on top of the two POT/Au electrodes. Detailed explanations of these membranes are provided in the Methods section.

This sensor was based on the potentiometric principle described in Fig. 2a and b, wherein the open-circuit potential (OCP) between the two electrodes was measured. The ion-exchange mechanisms of Ca2+ (left) and P (right) through specific ion-selective membranes and POTs are described. In this sensor, the presence of specific ionophores in the respective ISMs was responsible for the selectivity. These Ca- or P-ionophores embedded in polyvinyl chloride (PVC) membranes on sensor surfaces are responsible for changing the potential while detecting Ca2+ and P ions selectively. This is achieved by the accumulation of target ions at the interfaces between the POT and ISM, which generate a potential in the presence of target ions concerning the constant potential of the RE. The details of the sensing principle are described in the Methods section.

Fig. 2: Sensing mechanisms, and surface morphology.
figure 2

a, b Ca2+ and P sensing mechanism on each WE, respectively. In both panels, the layers from top to bottom consist of the sample (milk), an ion-selective membrane (ISM), poly-octylthiophene (POT), a gold layer (Au), a chromium layer (Cr), and the sensor base. ce SEM images of the Au deposited on the wrinkled 3D-printed sensor in different magnifications with primary and secondary pattern indication. e SEM image of Au-coated 3D-printed sensor showing the interconnection of a layer after the curing step using a UV light. f SEM image of ISM-coated POT-Au film that shows a uniformly smooth surface of the membrane. g Cyclic voltammetry (CV) was performed in 0.05 M ferro/ferricyanide solution at a fixed scan rate of 1 V/s. The current was recorded from −0.5 V to +0.5 V to show clear oxidation and reduction of ferro/ferricyanide. The CV study was conducted for Au, POT-Au, and ISM-POT-Au electrodes. The electrode with the POT layer shows excellent oxidation and reduction properties. With POT, the current of the Au electrode decreases, and the further current of the electrode decreases while the ISM layer is coated on POT-Au. The oxidation and reduction regions of the mediator are highlighted with shading. h Electrochemical impedance spectroscopy (EIS) studies of the sensor. For this study, the amplitude and detection frequency were set to 10 mV and 10,000-1 Hz, respectively. The charge transfer resistance and Warburg region are highlighted using shading. a, b Were created using images from BioRender.com released under a CC-BY 4.0 license. Source data for (g) and (h) are provided as a Source Data file.

The field-emission scanning electron microscopy (FE-SEM) images in Fig. 2c–f depicts the surface morphology of the sensor after Au coating, modification with the POT layer, and ISM, respectively. The Au coating applied to the epoxy resin of the sensor base exhibits two distinct patterns. The first is the primary periodic pattern of the lateral polymer layer (Fig. 2c). The micro-structure (primary pattern) is achievable through 3D printing, offering precise control over the structure at a resolution of 25 μm, specifically tailored for the extrusion printer. Each printed layer maintains a consistent lateral distance (~80 µm), with the underlying polymer layers interconnected through the UV curing step. The secondary pattern revealed a wrinkled and non-uniform texture attributed to the uneven underlying layer of the 3D-printed base. Both the primary and secondary patterns are marked with yellow lines (Fig. 2c, d). Such randomness in the pattern developed due to both the printing and curing steps during sensor manufacturing (Fig. 2e). After curing, a 100 nm-thick gold layer was selectively deposited on the patterns using an e-beam evaporator by placing a shadow mask. The coating was stabilized by adding an adhesive layer of chromium with a thickness of 10 nm. Finally, the shared RE was modified with a commercially available thick (5 µm) layer of silver/silver-chloride (Ag/AgCl) ink. A thick layer enhances device stability49. One of the major issues of potentiometric sensors is signal drifting due to chloride (Cl) leaching over time50. Thus, the RE was modified with a thin protonated membrane, i.e., Nafion, to block Cl leaching. Note that all sensor elements in the sensor are solid-state elements; thus, the sensor does not require any internal filling reference solution, resulting in miniaturized sensors for farm measurements.

The smooth surface of the ion-selective membrane covering the wrinkled POT is revealed in Fig. 2f. The ion-selective membrane atop the POT-Au layer exhibited uniformity because the main constituent of the membrane cocktail, PVC, filled both the secondary and primary patterns, forming both smooth and even layers. In Fig. S3 in the Supporting Information, an SEM analysis was conducted to investigate the reproducibility of the printed geometry of the sensor. As evidenced by a low standard deviation (SD) of ± 2.518 µm for printing micro-structures, the sensor provides a high reproducibility. This confirms the random nature of the secondary pattern, as its size falls below the precision of the printer and contributes to the significantly increased surface area of the sensor.

Surface wrinkles formation

Photosensitive polymer surfaces tend to form wrinkled surfaces owing to mechanical instabilities51,52. In our device, we observed the formation of wrinkles on the polymer surfaces enabled by the combined effect of simultaneous thermal and UV light treatments during the curing step. The surface wrinkles on the patterned polymer are shown in Fig. S3 in the Supporting Information. These wrinkles are complex and hierarchical. Although it was a single layer of polymer (2 mm thick), the top surface of the printed structure formed wrinkles. The heights of the wrinkles were a few microns, and they were confined within periodic patterns on the surface. Unlike temperature treatment, UV light treatment allows only the top surface of the device to shine. As a result, the volume contraction and capillary forces acted simultaneously52,53, and thus, the surface volume of the device shrank to form hierarchical wrinkles. In this study, we maintained a constant temperature (80°C) and an ultraviolet irrigation having a wavelength of 405 nm to produce reproducible geometry of the sensor. In this work, the wrinkled feature of the sensor provides a higher signal-to-noise ratio, larger surface area, and ultra-high sensitivity compared to traditional sensors with planar surfaces. Such features of the device are expected to provide highly ultrasensitive detection of Ca2+ and P, even in milk samples.

Surface analysis of the sensor

Because our sensor has multiple layers, the chemical composition of each layer was evaluated using Energy-dispersive X-ray spectroscopy (EDS), mapping, and X-ray photoelectron spectroscopy (XPS) (see Supporting Information, Figs. S4, S5, and S6). The layers were composed of bare Au, POT-Au, and ISM-POT-Au films. In EDS analysis, only Au was observed on the Au film. With the POT layer, carbon traces notably increased to 55.6%, further increasing to 76.3% upon the incorporation of the ion-selective membrane into the POT layer. The uniform coverage of the surface by the POT and ISM layers is evidenced by a notable reduction in the Au percentage in the film (Fig. S4d). SEM images revealed the thorough coverage of both the lateral patterns (primary pattern) and the wrinkled surface (secondary pattern) by a smooth ISM-POT layer (Fig. S2). In addition, the surface mapping analysis of the POT layer shown in Fig. S5 reveals the presence of sulfur and carbon atoms, as POT is comprised of sulfur and carbon. The Ca2+ and P ion-selective membranes predominantly consisted of PVC, with carbon and chloride as the primary atoms in the ISM coating mapping analysis.

X-ray photoelectron spectroscopy (XPS) provides a deeper analysis of each layer of the sensor. The XPS spectra of the resin polymer and Au films are shown in Fig. S6 in Supporting Information. The gold coating on the polymer showed multiple Au peaks owing to the disappearance of the C1s and O1s peaks (Fig. S6a, b) of only the polymer. As shown in Fig. S6c, there are three major peaks found at the binding energies of 284.8 eV, 286.2 eV, and 289.0 eV for printed sensors without any coating corresponding to the functional groups of C–C, C–O, and O–C = O, respectively. In the O1s peak (Fig. S6d, Supporting Information) of polymer, three distinct peaks appeared at binding energies of 530.9 eV, 532 eV, and 529.1 eV, indicating oxygen-carbon (O–C), oxygen-hydrogen (O–H) and oxygen-carbon (O = C) bonds, respectively. These peaks disappeared because of the gold coating (Fig. S6e, Supporting Information). The gold layer revealed distinct peaks corresponding to the Au4f7/2 and Au4f5/2 binding energies, confirming the gold coating.

Electrochemical characterization of the sensor

POT is known as a hydrophobic conductive polymer and is well suited to serve as an ion-to-electron transducer layer to develop a solid contact-based potentiometric sensor54,55. In addition, the POT layer is highly stable and reproduces the interfacial potential between the gold and ISM layers, resulting in the high potential stability of the sensor56. Such potential stability, along with its high redox properties and high sensor-to-sensor reproducibility55. With these excellent properties, we chose POT as a sensor material for manufacturing.

To investigate the redox properties of the POT layer, the cyclic voltammetry (CV) technique was performed, wherein the current was recorded over a range of potentials. CV experiments were performed in the presence of a 50 mM phosphate-buffered saline (PBS, pH 7.4) solution containing an equimolar (5 mM) concentration of a ferro/ferricyanide mediator. As indicated in Fig. 2g, the CV of the Au electrode shows clear oxidation and reduction peaks due to the redox reaction of [Fe(CN)6]3−/4− probe. Further, the peak-to-peak potential difference (ΔE) for the Au electrode was estimated to be 0.1 V. Such a small ΔE of the Au electrode indicates an excellent redox property and higher electron transfer kinetics. This is due to the wrinkled surface of the three-dimensional gold sensor. Introducing a POT layer on Au, the sensor generates a lesser electrochemical current (1.7 µA) due to the inherent insulating nature of POT compared to a bare Au electrode (3.4 µA). Peak current is a crucial parameter that provides valuable information about electrode kinetics, surface area, species concentration, and reaction reversibility. We noticed that the ΔE remains almost unchanged, indicating that the POT layer does not influence the kinetics of the mediator redox reaction on its surface. The POT-Au electrode ISM coating significantly reduced the electrochemical current (0.7 µA). This is due to the ISM layer, which repels [Fe(CN)6]3−/4− ions to reach the ion-to-electron transducing layer, and the sluggish ion exchanges on the ISM electrode surface, which acts as an isolator. Consequently, both the oxidation and reduction peaks disappeared from the recorded signals.

The wrinkled surface on the sensor acted as a microelectrode; thus, we expected a higher diffusion coefficient of the redox species due to the spherical diffusion of ions44. The diffusion coefficient (D0) for each mediator using the Randles-Sevcik equation57 applied to individual layers of the electrode. It shows diffusion coefficients of 3.038 × 10−10, 8.013 × 10−11, and 1.401 × 10-11 mm2.s-1, respectively, for [Fe(CN)6]4− diffusion on Au, POT-Au, and ISM-POT-Au sensors. In the reverse scan, the calculated diffusion coefficients of [Fe(CN)6]3− on Au, POT-Au, and ISM-POT-Au sensors are 4.752 × 10−10, 1.087 × 10−10, and 1.207 × 10−11 mm2.s−1, respectively. Both the POT and ISM layers on the wrinkled Au surfaces cause sluggish mediator diffusion towards the electrodes, resulting in lower oxidation and reduction currents in their CVs.

Electrochemical impedance spectroscopy (EIS) was used to investigate the surface electrochemical properties of the sensors. This study was conducted on sensors with and without ISM and POT layers to investigate the interfacial properties between the electrode and electrolyte. We applied an AC signal having an amplitude of 10 mV and a range of frequency of 1–10,000 Hz to the sensor, and electrode impedance was measured in the presence of PBS solution containing [Fe(CN)6]3−/4−. As shown in Fig. 2h, the Nyquist plots corresponding to each electrode indicate a significant change in the charge-transfer resistance (Rct) of the electrode. These Rct values were estimated by fitting the raw data to an equivalent Randles circuit. The wrinkled Au electrode without ISM and POT layers provided an Rct value of 4.9 kΩ. ISM and POT coating enhances the electrode’s impedance to a value of 69.3 kΩ. This enhancement in Rct was mainly due to the resistive properties of both the ISM and POT layers, which hindered electron transfer.

Sensor calibration

The sensor was calibrated before testing the spiked solutions and real samples. This was done by recording the OCP, which is also known as the electromotive force (emf), and is measured in millivolts (mV) between two electrodes (WE and RE) when no current flows between them. The change in the sensor output (mV) was measured using several standard solutions of Ca2+ and P. Note that the working electrode develops a specific potential due to ion exchange through the ISM, which varies with concentration, while the RE develops a fixed potential. The sensing principles and mechanisms are discussed in detail in the Methods section. Considering the application of the sensor in farms, OCP measurements may be the best choice for the sensing modality. OCP sensors can provide stable measurements over extended periods. This stability is important for applications that require long-term monitoring.

The calibration of the Ca2+ sensor (Ca-sensor) in Fig. 3a was established using standard solutions of Ca2+ with concentrations ranging from 0.5 mm to 10 mm in deionized (DI) water (0.5 mm, 1 mm, 1.5 mm, 2 mm, 2.5 mm, 3 mm, 5 mm, and 10 mm). To ensure reliability and accuracy, three consecutive readings were recorded for each measurement. The OCP of the sensor was measured for 100 seconds. Error bars corresponding to the standard deviation of measurements derived from a minimum of n three biologically independent experiments were incorporated into each calibration plot. For the Ca-sensor, the baseline of the sensor was set to −0.190 V with DI water without any Ca2+ ions. A drastic change in the potential of the sensor (0.130 V) was observed when a 0.5 mm concentration of Ca2+ ions was introduced into the sensor. A specific Ca2+ ionophore embedded in the PVC membrane was responsible for changing the sensor potential. Then, serial titration concentrations of Ca2+ ranging from 1 to 10 mm were introduced and their OCP were measured. The OCP increased with elevated concentrations of Ca2+ ions. The sensor was then washed with DI water to reset its baseline value. A minute change in the potential (0.004 mV) was observed during resetting of the sensor. The sensor was re-calibrated with titration concentrations of Ca2+ ions (0.5–10 mm) and showed a baseline signal when tested with DI water. A similar result was observed for the sensor OCP when the sensor was tested for a second calibration. A plot of the concentration versus OCP of the sensor is shown in Fig. S9a, and the resulting calibration curves, along with the regression coefficients, are depicted in Fig. 3b. These results indicate the ability of the sensor to detect multiple measurements of Ca2+ without recalibration. The sensor’s sensitivity, determined by analyzing the slope of the associated calibration curve, is calculated to be 76.19 ( ± 2.67) mV/dec (r2 = 0.99). A minor decrease in the sensitivity of the sensor was observed during the second measurement across the entire Ca2+ concentration range, demonstrating the repeatability of successive measurements. It is important to note that the calibration slope varies slightly across different media such as blood, serum, and milk. Therefore, recalibration in each medium is necessary to ensure accurate results.

Fig. 3: Sensing performance of the 3D-printed sensor.
figure 3

a The open-circuit potential (OCP) responses of the Ca2+-sensor. Standard solutions of Ca2+ were prepared in DI water; Ca2+ concentration was varied from 500 µm to 10.0 mm. The OCP was found to increase while the concentration of Ca2+ was increased from low to high. The same sensor was regenerated and tested for second-time measurements. The first and second sensings are separated by a dashed line border. The recording time for data collection was set to 100 seconds. b The calibration curves and slopes of the two successive sensing measurements of Ca2+. c OCP responses of the P-sensor. Standard solutions of P ions were prepared in DI water; P concentration was varied from 10.0 µm to 30.0 µm. The OCP was found to decrease while the concentration of P was increased from low to high. The same sensor was regenerated and tested for second-time measurements. d The resulting calibration curve and slope. Error bars in Fig. 3b and d is the standard deviation (SD) of three repeated measurements (n  =  3 biologically independent experiments). Error bars, mean ± SD. Deionized (DI) water is utilized as the solution for establishing the sensors’ baseline. Source data are provided as a Source Data file.

For the phosphate sensor (P-sensor), the sensor was calibrated with titration concentrations of HPO42– ranging from 10 μm to 30 μm (Fig. 3c). The baseline of the P-sensor was set to 358 mV using DI water without any HPO42– ions. When a concentration (10 μm) of HPO42– ions was introduced to the P-sensor, an OCP of 10 mV was decreased compared to the baseline signal. This change in the OCP is due to the presence of a P ionophore embedded in the PVC layer on the sensor surface, which traps HPO42– ions from the samples and develops a potential at the membrane interface. Further, as we increase the concentration of HPO42– ions from 15 μm to 30 μm, the sensor potential found to be decline. Unlike the Ca-sensor, the P-sensor showed the opposite signal trend with increasing concentrations. As expected, an increase in the HPO42– concentration of the negatively charged anions led to a reduction in the OCP response. Further, the P-sensor turned into the baseline when the sensor was tested with DI water, and the measurements were repeated with 10 μm to 30 μm of concentrations of HPO42– ions to set the second baseline of the P-sensor. These repeated measurements indicated that the sensor did not require recalibration. The calibration plot of the P-sensor is shown in Fig. S9b. The sensitivity of the P-sensor was estimated by evaluating the slope of the calibration curve, resulting in a calculated value of -152.09 mV/dec (r2 = 0.99, Fig. 3d). The analytical sensitivity of the P-sensor was 10 µm.

Sensing performance at low concentration and repeatability

The baseline signal of the Ca-sensor had a large gap with the response signal of the Ca2+ ions (0. 5 mm). Therefore, we introduced several low concentrations of Ca2+ ions to evaluate the limit of detection of the sensor. Furthermore, during the transition period of dairy cows, blood Ca2+ ions become too low, and we expect to meet this requirement using the Ca-sensor. For this, we prepared a series of standard titration concentrations of Ca2+ ions ranging from 1 am, 1 fm, and 1 pm to 1 µm in DI water. The results are shown in Fig. 4a. For the baseline measurement, the sensor was tested in the absence of Ca2+ ions and showed a negative OCP. Subsequently, we introduced standard solutions of Ca2+ ions onto the surface of the sensor and recorded the corresponding OCP graphs over 100 seconds to ensure that the sensor delivered a stable response. As shown in Fig. 4b, we observed discernible details of the sensing responses at low concentrations of Ca2+ ions. This demonstrates the capacity of the sensor to distinguish the attomole (1 am) concentration of Ca2+ ions from the baseline signal. Finally, the OCP responses of the sensor were plotted against each concentration of Ca2+, as depicted in Fig. S10b. The 3D-printed sensor responses were compared with the theoretical values of Ca2+ ions and those of a commercially available Ca-meter. Both sensors (printed and commercial) provided similar results, as evidenced by the minimal difference in their regression coefficients (Fig. 4c). However, a major limitation of commercial Ca meters is that they cannot detect Ca2+ at concentrations as low as 1 mm. The analytical sensitivities for Ca-sensor and P-sensor are 1 fm and 10 µm, respectively. Such sensitivities were mainly due to the 3D geometry of the electrode and wrinkled surfaces.

Fig. 4: Sensing performance of the 3D-printed Ca-sensor.
figure 4

a Ca-sensor performance at the low concentration of Ca2+. OCP responses of the sensor were recorded in the presence of 1.0 am to 5.0 mm. The shaded areas indicate the low concentration regions of 1.0 am, 1.0 fm, and 1.0 pm, respectively, from left to right. (b) Zoom-in shows the potential response at low concentrations. c Correlation in responses of a commercial Ca-meter and 3D-printed Ca-sensor with theoretical values of Ca2+. d Ca-sensor responses with repeated high (2.0 mm) and low (0 mm) concentrations of Ca2+. OCP vs concentration plot obtained from graph along with relative standard deviation (RSD). Seven repeated measurements of high concentrations of Ca show an RSD of 1.1%. Error bars in Fig. 4d is the SD of three repeated measurements (n  =  3 biologically independent experiments). Error bars, mean ± SD. DI water is utilized as the solution for establishing the sensors’ baseline. Source data are provided as a Source Data file.

The limit of detection (LOD) is an important parameter for an ISM-based potentiometric sensor58. We calculated the LOD for both sensors; LOD calculations are described in Section S3 (Supporting Information)45,59. The LOD of the Ca-sensor and P-sensor were calculated as 138 am and 2.6 µm. The LOD in this study was useful for detecting low concentrations of Ca2+ in milk samples during the transition period in dairy cows. Unlike traditional 2D surface-based sensors, the larger surface area of the wrinkled surfaces of the sensors was the main reason for the low LOD. In contrast to the findings outlined in Table 1 from various research endeavors, our sensor demonstrated a detection limit of ~ten orders of magnitude lower, highlighting the impact of the 3D-printed sensor structure on its performance. This represents a significant milestone as it is the inaugural instance of a compact and affordable sensor that can successfully measure Ca2+ ions at the attomolar level. Additionally, the linear ranges for the Ca2+ and P sensors were 10-18 ~ 10-2 M and 1.0 × 10-5 ~ 3.0 × 10-5 M, respectively, effectively encompassing the target physiological concentrations in cow’s milk and serum samples. The broader range of detection of the Ca-sensor can maximize the efficacy beyond the physiological range of dairy cows and can also promote its use in other applications.

Table 1 Comparison of the analytical properties of the Ca-sensor and P-sensor with previous literature

For repeatability, we conducted an experiment involving consecutive introductions of identical Ca2+ concentrations of 0 mm (low) and 2 mm (high), followed by a control sample without any Ca2+ ions (Figs. 4dS10a). For this study, a specific high-low concentration of Ca2+ that aligns with the physiological range of Ca2+ in milk was chosen to investigate the sensing performance. The baseline exhibited a minimum deviation of 6.7%, whereas the sensor response showed a deviation of 1.1% after testing the sensor sequentially (low-high-low-high) at least seven times. This confirmed the minimal potential drift of the sensor, even with a drastic change in the Ca2+ level, owing to the hydrophobic surface and high selectivity of the Ca-sensor. These excellent features of the 3D-printed sensor could also be of interest to the food sector, where compact sensors with high sensitivity, minimum potential drift, signal calibration, and cost-effectiveness are required.

Selectivity, reproducibility, and detection time

Given the significant presence of coexisting and isostructural ionic species within clinical and biological samples, which could potentially lead to interference with the target analyte, the ability of the developed sensor to accurately measure Ca2+ selectively was assessed via an interference test (Figs. 5a, S12a and Section S2 and S17 in the Supporting Information). Notably, two major ions, sodium (Na+) and potassium (K+), were chosen because they could potentially influence target test samples such as milk and bovine serum. A constant concentration of Ca2+ (2 mM) was used in the absence and presence of varying concentrations of Na+ and K+. As illustrated in Fig. S12a, the sensor OCP was measured when exposed to a mixture of 2 mm Ca2+ along with 0.5 mm Na+ and K+ ions, as well as 1 mm and 2 mm of both Na+ and K+ ion solutions. In all concentrations of Na+ and K+ (0.5, 1.0 and 2.0 mm), the sensor demonstrates high selectivity for the detection of Ca2+ ions, as indicated by its minimal relative standard deviation (RSD ~ ±6.53%). Figure 5a depicts a visual comparison of the sensor responses to each interference, along with their corresponding error bars. These results demonstrate the exceptional ability of the sensor to selectively detect Ca2+ even when solutions containing even equal concentrations of highly interfering ions. The high selectivity of the sensor is due to the lipophilic ionophore embedded in the membrane along with the hydrophobic POT layer60,61.

Fig. 5: Selectivity, validation, and reproducibility of the sensor.
figure 5

a, c Selectivity studies. Sensor responses in the presence of interfering ions (Na+ and K+) along with and without 0.5, 1.0-, and 2.0-mM concentrations of both interfering ions. The corresponding sensor responses against interfering ions are shown in (a). The RSD is found as 6.53% indicating the sensors’ high selectivity. b Sensor test results with Fatal Bovine Serum (FBS) in the presence and absence of Ca2+. For this, FBS was diluted to different concentrations such as 1: 1 (FBS: water), 1:10, 1: 100, and 1:200. Further, these diluted concentrations of FBS were spiked with 2 mm of Ca2+ concentration. The corresponding calculated values of OCP vs FBS samples. c Sensor results with whole milk samples. The whole milk obtained from Walmart Inc. was diluted to four different concentrations such as 100%, 80%, 60%, and 30%. With dilution, the sensor response was found to be decreased as the concentration of Ca2+ decreased. d Reproducibility test of the Ca-sensor. Four identical Ca-sensors were chosen to test the reproducibility of the sensor and the OCP of each sensor was recorded in the presence of 0.2 mm of Ca2+. The sensor’s reproducibility was calculated by evaluating with RSD of 6.68%. Error bars are the standard deviation (SD) of three repeated measurements (n  =  3 biologically independent experiments). Error bars, mean ± SD. Source data are provided as a Source Data file.

Furthermore, to validate the sensor specificity in complex real samples, we have designed an experiment to measure spiked Ca2+ in the fetal bovine serum (FBS) samples. To accomplish this, the sensor was tested in an undiluted FBS solution, followed by dilution with DI water at ratios of 1:10, 1:100, and 1:200, to measure Ca2+. As illustrated in Figs. S12b and 5b, the sensor effectively identified the presence of Ca2+ within the FBS matrix. Upon dilution with DI water, the OCP signal of the sensor decreased because of the reduction in the Ca2+ concentration. In subsequent experiments, the concentration of Ca2+ was maintained at 2 mM, and the matrix solution was changed from pure FBS (1:0) to ratios of 1:10 and 1:200 of FBS to DI water. We noticed that the sensor response remained unchanged owing to the constant Ca2+ concentration. With the spiking analysis, these results suggested that the sensor exhibited excellent performance in serum solutions.

Furthermore, to assess the intersensor variability, four identical sensors were chosen to evaluate the reproducibility. In this study, the sensor test was conducted in the presence of 0.2 mm Ca2+ ions. Each sensor was calibrated and subjected to three repeated measurements in independent biological experiments. The resulting standard deviation for sensors responding to the same Ca2+ concentration was determined to be ± 4.69 mV, with an RSD of 6.68% (Figs. S12d and 5d). This result indicates that the sensor provides high reproducibility owing to the precise additive manufacturing of sensors with high-resolution features.

Next, we discuss the detection time for both Ca- and P-sensors (Fig. S12e) by calculating the OCP response percentage every tenth second to reach one minute. This result indicates their ability to measure target ions in less than 10 seconds. We note that the sensors reach their outputs of 100% (Ca-sensor) and 99% (P-sensor) signals within 10 s, compared to the sensor’s saturation signals (see Fig. S12e). The signals from the sensors were stable within the first 10 s of the measurement. Fast detection by both sensors was achieved owing to the potentiometric detection modality along with the wrinkled surfaces of the sensor geometry. This swift sensing facilitates the real-time identification of Ca2+ and P levels on dairy farms and enables the continuous monitoring of milk composition in food industry pipelines. The swift response times of both sensors open up possibilities for various applications, including SCH treatment and best-practice management of dairy herds.

In vitro tests with biological fluids

To ensure the reliability and effectiveness of the developed sensors for Ca2+ and P measurements in biological samples and consider their ultimate application for the analysis of milk samples. Before testing the milk samples, we examined the performance of the sensor on whole milk samples obtained from Walmart. Inc. In this regard, a whole milk sample was chosen as the stock solution for the milk sample studies. Three different dilutions (30%, 60%, and 80%) were prepared from whole milk in DI water. Next, the baseline of the sensor was set, and all milk samples were tested using a Ca-sensor. The maximum sensor output was achieved with whole milk because the concentration of Ca was high. As expected, the sensor response (OCP) decreased the milk dilution from 30% to 80% (Figs. S12c and 5c). The results were validated using a commercial Ca2+ meter to measure the Ca2+ content in all diluted milk samples.

We tested the sensors using fresh milk and blood samples obtained from 20 lactating Holstein multiparous cows from the local dairy farm. The Institutional Animal Care and Use Committee (IACUC) protocol was approved before the milk samples were obtained. To diagnose SCH in cows, we collected blood samples and tested them using a commercial on-site Ca2+ meter. Cows with blood ionic (not total) calcium levels below 1 mmol/L were classified as SCH, while those with higher levels were categorized as healthy (control) cows. Figure 6a shows the two groups of cows based on their blood Ca2+ levels. We also evaluated our Ca-sensor using the same blood samples, and it produced results consistent with the commercial ion meter. As shown in Fig. 6b, the OCP response of the Ca-sensor effectively distinguishes between control cows and SCH cows. It is important to note that the sensor’s calibration equation varies slightly depending on the medium—whether blood, milk, or standard solution. For simplicity in comparing milk and blood samples, we used the raw OCP (signal) values instead of converting them to concentration values. Tables S2 and S3 (Supporting Information) display and compare the measured milk levels of Ca2+ and P (in ppm) from our sensors and the commercial meters. Next, we conducted immediate sensing analyzes of Ca2+ and P ions in milk samples using the developed sensors and commercial meters. For Ca2+ measurement, the samples were utilized without any modification or dilution, whereas for P measurement, the samples were diluted with DI water. The sensing results for the detection of Ca2+ and P ions are shown in Fig. S11a and b (Supporting Information). The recorded signals from these real samples were extracted to evaluate the unknown Ca2+ and P levels using their calibrations. Simultaneously, we evaluated milk Ca2+ and P levels (ppm) using commercial meters. Tables S2 and S3 show the sensing results for Ca2+ and P levels in fresh milk samples. The Ca2+ and P OCP signal (mV) from the developed sensors and commercial meters were compared as shown in Fig. 6b, d, to estimate regression coefficients (r2). The correlation studies revealed r2 values of 0.95 for Ca2+ in 20 blood samples and 0.97 for P ions in 20 milk samples. These r2 values confirm the capability of the sensors to analyze both ions in both blood and milk samples, indicating the reliability of the sensors for on-site tests at the farm. To assess milk fever in dairy cows, we evaluated the ratio of Ca2+ to P-sensor reading in milk samples and presented the results as shown in Fig. 6e. This OCP ratio serves as an indicator of healthy and SCH cows since it can clearly discriminated among the two groups. Thus, in addition to serum (Fig. 6a, c), the ratio of Ca2+ to P OCP value in milk samples used as an indicator of SCH.

Fig. 6: Sensor performance with milk and blood sample tests.
figure 6

The OCP for all milk and blood samples was recorded and was used to diagnose SCH through milk samples. a Shows the ionic Ca2+ concentration of the blood samples measured with commercial Ca-sensor. c Indicates the OCP response of the 3D-printed Ca-sensor in blood samples of both control (healthy) and subclinical hypocalcemia (SCH) groups. The Ca2+ and P sensors OCP signals of each sample from sensors were compared with commercial Ca– and P–meters. Results of both sensors and commercial meters are compared and their co-relation coefficients (r2 = 0.95 for Ca2+ and r2 = 0.97 for P) are estimated as shown in (b) and (d). e In the milk sample analysis, we plotted the ratio of Ca-sensor to P-sensor readings (OCPs) for each milk sample to separate healthy cows from SCH cows. This ratio in milk samples can be used to determine SCH. f The EDTA (10 mM) as masking agent spiked in the 10 milk samples of the healthy cow result in significant drop in the OCP signal. To get access of these real samples for the Virginia Tech Kentland farm, we first obtained an IACUC (Institutional Animal Care and Use Committee #24-093) approval from Virginia Tech. We have chosen Holstein cows specially those are during their postpartum transition periods. Error bars are the SD of three repeated measurements (n  =  3 biologically independent experiments). Error bars, mean ± SD. One way ANOVA have been performed and the p values were indicated. Source data are provided as a Source Data file.

Finally, we validated the sensor’s robustness by testing its performance in detecting Ca2+ in real milk samples from ten healthy cows. In milk, Ca²+, K+, and Na+ are the predominant mono- and divalent cations, with trivalent ions like Fe³+ present in much lower concentrations. Therefore, we demonstrated the sensor’s sensitivity in real milk by adding 10 mM of ethylenediaminetetraacetic acid (EDTA), which forms stable complexes with various metal ions, particularly divalent and trivalent cations such as Ca²+, Mg²+, and Fe³+. The results indicate a significant decline in the sensor’s response when Ca2+ is absent in its ionic form, despite the presence of other interfering ions like Na+ and K+ in the milk medium. These findings are now presented in Fig. 6f. Furthermore, we tested our sensor and confirmed its response by comparing it with a commercial Ca-meter in cow blood, enabling the diagnosis of hypocalcemia in both blood and milk samples.

Discussion

In the US, ~30–50% of dairy cows are affected by metabolic disorders due to both nutritional deficiencies and inaccurate management3,62. Hypocalcemia in dairy cows especially causes huge economic losses due to decreased milk yield5,6. The nutritional management of dairy cows is thus important to improve health and milk productivity. Ca2+ plays a vital role in muscle and nerve function, supporting skeletal muscle strength1,15, and immune function12. Laboratory screening cost of serum Ca2+ level is $60 per sample, and the available commercial on-site testing cost is about $1000. As the prevalence of subclinical and clinical hypocalcemia is ~33% and 5%, respectively, in the US dairy herds2,63, there is an unmet requirement to develop diagnostic tools, such as smart and low-cost, and user-friendly sensors, to produce large-scale data to support the best management practices. Early diagnosis may prevent or treat diseases; however, it relies on rapid, economically efficient, farm-side, and accurate diagnostic assessment of Ca2+ and P levels.

Unlike clinical hypocalcemia, SCH in dairy cows after calving does not cause any symptoms. Hence, it is difficult to measure at the early stage63. Though several sensors and spectroscopic tests have been explored to monitor Ca2+ and P, such tests are not feasible or widely adopted by dairy farmers due to the labor-intensive sample processing and long testing time64,65. It is important to note that not all commercial meters are useful for identifying SCH in dairy farms using milk samples. This is because these sensors are intended to measure Ca2+ levels in blood, not in milk66. In addition, unlike the blood Ca2+, detection of SCH by measuring milk Ca2+ in dairy cows is challenging as milk contains huge amounts of Ca2+ that make the negligible Ca2+ decline, resulting in an inaccurate diagnosis of SCH23. This happens because SCH in dairy cows arises when blood Ca2+ levels fall below normal after calving, mainly due to the sudden increase in Ca2+ demand for milk production. As a result, the decrease in Ca2+ levels in milk is less pronounced than in blood, which makes detection difficult if the sensor only measures Ca2+ levels. Thus, measuring the ratio of milk Ca2+ to P would solve this issue.

In this study, lithography-free and low-cost 3D-printed sensors were developed by additive manufacturing to analyze instant samples without any sample preprocessing and treatment. From a manufacturing perspective, the extrusion printing of sensors allows easy manufacturing, miniaturization, customization, rapid prototyping, multiplexity, and complex geometry. The additive manufacturing technique used in this study does not require cleanroom facilities, such as lithography. In addition to these features of the printed sensor, it can also provide excellent geometry with wrinkled surfaces, which improves the sensor performance. Owing to these features, the printed sensor can be used to manage dairy farms, particularly for the detection and treatment of metabolic diseases during the transition period of dairy cows. The multiplexed sensor developed in this study could simultaneously detect Ca2+ and P in milk samples at the same time. In particular, the developed sensors not only provide a low cost per test but can also detect ultralow concentrations of Ca2+ ions. Furthermore, the sensor can be integrated with a milking machine to collect data in real time to identify healthy or SCH cows. The main innovation of this device is to provide economic benefits for dairy farmers by improving milk production, health management, and decision-making through the early assessment of the prevalence of clinical and subclinical hypocalcemia. We believe that this device can provide a sustainable solution to dairy farmers for the best management practices for dairy cows.

This study demonstrates the successful detection of ionic analytes at the attomolar level within seconds by enabling additive manufacturing. The 3D-printed sensor base (Fig. S1, Supporting Information) possessed a lateral pattern and wrinkled microstructure, as shown in Fig. S3. The unique geometry of the wrinkled surface of the sensor enhanced the sensitivity of the Ca2+ and P measurements. It offers a substantial surface area for the ion-to-electron (POT) solid-state layer, facilitating the detection of Ca2+ and P with LODs of 1.38 × 10−16 m and 2.6 × 10−6 m, respectively. Another important aspect of this study is the ability of the sensor to be utilized repeatedly without compromising its functionality. By employing OCP as the sensing method, we inhibited electrochemical reactions on the electrode surface, thereby preventing corrosion or leaching. This safeguard ensures that each sensor can be employed multiple times without diminishing selectivity or sensitivity. Additionally, the use of the OCP as a sensing modality contributes to the repeatability of the sensor, allowing for consistent performance across multiple applications. Additionally, the sensor’s 3D design necessitates less than 200 μL of sample for Ca2+ and P measurements, rendering it suitable for analyzing minute sample quantities. Finally, a compact design of the sensor, measuring 2 mm in thickness and 2 cm in width (Fig. S1) enables seamless integration into milking machines or food industry piping through a straightforward rectangular slot with similar dimensions.

Our 3D-printed sensor offers several advantages over alternative approaches for measuring Ca2+ and P levels. Unlike other methods, this sensor was designed for use by unsupervised farm personnel, whereas existing techniques are primarily laboratory-based and require users to possess specific expertize. Additionally, the limited time available for diagnosing SCH necessitates prompt and regular milk analysis in transition cows. This is impractical when conventional methods are used. Our cost-effective multiuse sensor, coupled with its ease of use, presents a compelling alternative, especially for remote farms where farmers may be hesitant to invest substantial amounts in acquiring existing field-deployable calcium/phosphate sensors. Moreover, our sensor design requires only a small sample size for analysis, offering convenience in situations where invasive blood sampling methods are inevitable. A mere blood droplet is ample for measurement, facilitating the early detection of diseases that require prompt investigation.

In addition to analyzing real milk samples from ten cows with subclinical hypocalcemia and ten healthy controls, we conducted experiments using ten milk samples from Holstein cows treated with EDTA. Due to the difficulties in obtaining milk samples from cows with clinical hypocalcemia, we sourced these samples from the Virginia Tech Kentland Farm, where we simulated clinical hypocalcemia by treating the samples with EDTA to lower Ca2+ levels. Our sensor was validated using these EDTA-treated samples (Fig. 6f). Additionally, we integrated blood sample testing with our Ca- sensor, highlighting its potential for clinical applications.

In summary, on-site monitoring of asymptomatic subclinical hypocalcemia is of great importance in the dairy industry, as it can improve the health, productivity, economy, and welfare of dairy cows. In this study, we developed an attomole-sensitive sensor that utilizes extrusion-based 3D-printed sensing structures to detect SCH in milk samples, which represents a significant advancement in addressing this issue. The wrinkled structures of the 3D-printed sensors enable a remarkable limit of detection for the attomole concentration of ionized Ca2+ in milk. Unlike traditional sensors, the innovative design of the sensor featuring wrinkled poly (3-octyl-thiophene), acts as an efficient ion-to-electron transducer for rapid Ca2+ and P detection. The ability of a multiplex sensor to provide disease indications based on the calcium-to-phosphate ratio in milk samples is a valuable diagnostic dimension. With its low cost, this sensor has emerged as a promising tool for on-site diagnostics of dairy cows, contributing to enhanced farm management. The integration of this technology has the potential to improve the overall health, productivity, and welfare of dairy cows, thereby addressing critical needs in the dairy farming industry.

Methods

Details of sensor manufacturing using 3D printing

Section S1 in the Supporting Information describes all the chemicals used in this study. Figure 7a shows the overall sensor interfacing with a measurement unit i.e. a portable potentiostat, to test the milk sample. The design of the sensor used in this study is illustrated in Fig. S1 in (Supporting Information). This design was realized using the 3D CAD SolidWorks software. The sensor was 33 mm long, 25 mm wide, and 2 mm high. A compact version of the sensor, measuring 28 mm in length, 24 mm in width, and 2 mm in height, can be integrated with the milker tube. The device had two working electrodes (WEs) and a reference electrode (RE). All electrodes are circular having diameters of 3 mm and a depth of 300 µm. The device consists of an elliptical sample holder in which all three electrodes are placed. This design allowed for a minimal amount of milk sample (ranging from 50 μL to 200 μL) to be used.

Fig. 7: Sensor manufacturing using an extrusion-based 3D-printer.
figure 7

a Schematic illustration of the 3D-printed sensor that interfaced with a potentiostat to detect SCH in different mediums of biofluids. b 3D printing process for sensor manufacturing. An extrusion 3D printer was used to build sensor structures using a high-temperature polymeric resin. A lateral layer-by-layer printing results in a periodic structure (~78 ± 2.5 µm) of polymer. The printed structure of high-temperature resin was cured by exposing a UV light resulting in wrinkled surfaces along with a constant temperature of 80°C. These lateral layers are interconnected with each other. c The wrinkled surfaces were coated with a thin layer of Au using an e-beam evaporation technique. d The printed sensor contains three electrodes out of which two served WEs for Ca2+ and P detectors and one electrode is shared RE. The middle electrode is RE and was made of Ag/AgCl and Nafion layers. Both WEs were first coated with POT layers and then coated with Ca-ISM and P-ISM solutions. A real photograph of the sensing set-up for on-site testing of SCH in dairy cows. Figs. ad were created in part using images from BioRender.com released under a CC-BY 4.0 license.

An extrusion-based high-resolution 3D printing technique called stereolithography (SLA) was used to build the base of the sensor. A 3D sensor base was built by layer-by-layer lateral printing (layer thickness can be maintained within 25–300 microns) of a high-temperature polymeric resin using a 3D printer obtained from FormLabs (Form 3 L). Form 3 L is an ease-of-use SLA 3D printer with a large build volume of 11.8 × 13.2 × 7.9. It features an XY resolution of just 25 microns. 3 L is one of the only SLA machines that offers durable, flexible, and general-use resins on one platform. The 3 L’s wide range of material options allows it to excel when printing for various applications, from medical to mechanical.

The printing process using epoxy resin in this study is shown in Fig. 7b. We printed 10 sensors simultaneously. A photograph of the printed device is presented in Fig. S1 in (Supporting Information). After printing, the sensor was removed from the printer tray and washed with isopropyl alcohol (IPA) washing using a FormWash L unit. Subsequently, the sensor part was cured for 2 h by exposing it to a UV light with a wavelength of 405 nm in a FormCure L system at 80°C. This curing step allowed the cross-linking of the epoxy resin molecules and formed an interconnected polymer (Fig. 7b). Here, we discuss the formation of wrinkled surfaces on the top layer of the polymer during this curing step.

After printing, a thin layer of gold was deposited onto the sensor using an electron-beam evaporator, following a specific pattern created by a shadow mask (Fig. 7c). A 2D design of a shadow mask was created using Auto CAD software. The mask was built using Kapton tape, which was cut according to the 2D sensor design using an automated silhouette cutter. Once the shadow mask was placed, a 10 nm thick chromium (Cr) layer was applied as an adhesive layer, and then a 100 nm thick gold layer was deposited onto the sensor using an e-beam evaporator. This gold layer functioned as a conductive layer on the wrinkled surface of the sensor.

Next, a solid-contact layer of POT was applied by drop-casting onto the gold surface of the WE (Fig. 7d). Because of its high redox and hydrophobic properties, this POT layer serves as an ion-to-electron transducing layer. The solid-state RE was modified by applying a silver-silver chloride (Ag/AgCl) paste (~5 µm) along with Nafion on the middle gold electrode to serve as an anti-leaching layer (Fig. 7d). Figure S8 in the Supporting Information shows the optimization of the POT layer. Three different amounts of POT, such as 1.1 µg/mm2, 2.2 µg/mm2, and 3.6 µg/mm2 were chosen for this study and calibrations were established. The sensitivity of each sensor to these POT polymer concentrations was identical. Based on these results, a thin POT layer was selected for the development of the 3D sensor.

For the Ca-sensor, a Ca-ISM was prepared. The Ca-ISM consisted of 1 wt% of the Ca2+ selective ligand, 65 wt% of the plasticizer, 1 wt% of the additive, and 33 wt% of PVC powder67. This cocktail solution of 40 µL was drop-casted onto the POT layer. The ionophores in the Ca-ISM trap Ca2+ from the samples via an ion exchange mechanism and develop a potential difference at the membrane-solid interface. For the P-sensor, the P–ISM was prepared with a mixture of 3.0 mg (1 wt %) of tributyltin chloride, 198 mg (66 wt %) of NPOE, 99 mg (33 wt %) of PVC, and 2.0 mg of NaTFPB in 3 mL of tetrahydrofuran68. This cocktail will be coated on the POT surface to develop the P–sensor. The printed sensor, shown in Fig. 7e was connected to a portable potentiostat to collect the readout signal via a Bluetooth network. Before we tested our sensor with real samples, a commercial Ca meter was tested, its performance was evaluated with Ca standard solutions, and the results were compared with theoretical Ca2+ concentrations (Fig. S7 the Supporting Information).

Electrode conditioning

The conditioning of the electrodes is a crucial initial stage to ensure reliable outcomes69. Thus, the developed sensors were conditioned by treating them in a concentrated solution of CaCl2 and K2HPO4 for several hours (more than 12 h). This process aims to replace all the interfering ions in the membrane with the desired ions. Prior to the calibration, selectivity tests, and analysis of real samples, both sensors were conditioned to achieve a stable and reliable response.

Sensing mechanism

The POT layer, which serves as an ion-to-electron transduction layer, undergoes redox reactions during sensing. The cation exchange process through the POT layer was elucidated through cyclic voltammetry (CV) experiments conducted on an ion-selective membrane with a POT electrode. The process for extracting cations (specifically Ca2+) into the Ca-ISM through electrochemical mediation consists of three sequential steps70,71. These steps include (1) Reduction of POT+ to POT: In this initial step, the cation exchange layer, often referred to as POT+ (also known as P+), is reduced to its neutral form, known as POT (or P). (2) Extraction of hydrophilic ions (Ca2+): Following the reduction of POT+, this step involves the facilitation of the extraction of the hydrophilic ion, in this case Ca2+, from the test sample. (3) Redistribution of lipophilic anion (R-): The final step involves the redistribution of the lipophilic anion (represented as R-) from the POT layer to the ISM layer. These three consecutive stages collectively describe the mechanism of electrochemically mediated cation (Ca2+) extraction into the ISM. The redox reactions that occur concurrently with the transfer of Ca2+ in the ISM are as follows:

$${{{\rm{P}}}}_{({{\rm{p}}})}^{+}+{{{\rm{e}}}}^{-}+{{{\rm{R}}}}_{({{\rm{p}}})}^{-}+{{{\rm{Ca}}}}_{({{\rm{aq}}})}^{2+}\rightleftharpoons {{\rm{P}}}+{{{\rm{R}}}}_{({{\rm{m}}})}^{-}+{{{\rm{Ca}}}}_{({{\rm{m}}})}^{2+}$$
(1)

where m, p, and aq represent the membrane (ISM), ion-to-electron transducer (POT), and aqueous phases (cow milk), respectively. In addition, P(p) and P(p)+ correspond to a small number of individual building blocks within the POT chain in two states: an electrically neutral insulating state and an oxidized state with polaronic sites.

Due to the reduction process, POT removes cations in the form of Ca2+(aq) from the sample and causes the movement of lipophilic anions (R) from POT into the ISM layer. Consequently, when the redox and ion-exchange processes at the WE are combined, an equilibrium is reached at the interfaces between the aqueous solution, transducer, and ISM. This equilibrium results in the separation of charges at each interface, leading to the creation of a phase boundary potential72. The phase-boundary potential E1 is determined using the following equation:

$${E}_{1}=\frac{{RT}}{{zF}}{{\mathrm{ln}}}\,{a}_{I}$$
(2)

where R, T, z, F, and aI represent the gas constant, temperature, charge of the target ion, Faraday constant, and primary ion activity without interfering ions, respectively. In addition, the RE of the sensor underwent a redox reaction while maintaining a constant potential (E0). A Nafion layer is applied to the surface of Ag/AgCl, serving the dual purpose of preventing the leaching of chloride ions from Ag/AgCl and blocking other external anions from entering the RE. When anions or cations move from high to low concentrations, the ion exchange generates a potential difference. Consequently, the potential (E) is dependent on the logarithm of ion activity, as described by the Nernst equation:

$$E={E}_{0}+{E}_{1}={E}_{0}+\frac{{RT}}{{zF}}{{\mathrm{ln}}}\,{a}_{I}$$
(3)

The anion exchange process in the POT layer follows a mechanism similar to that of cation exchange but in the opposite direction. The exchange of PO42- ions also involves a similar three-step mechanism, but it is based on the oxidation of POT to POT+ as described in Eq. 4.

$${{{\rm{P}}}}_{{{\rm{p}}}}+{2{{\rm{R}}}}_{({{\rm{p}}})}^{+}+{{{{\rm{HPO}}}}_{4}^{2-}}_{({{\rm{aq}}})}\rightleftharpoons {{{\rm{P}}}}^{+}+2{{{\rm{R}}}}_{({{\rm{m}}})}^{+}+{{{{\rm{HPO}}}}_{4}^{2-}}_{({{\rm{M}}})}+{{{\rm{e}}}}^{-}$$
(4)

where m, p, and aq represent the membrane (ISM), ion-to-electron transducer (POT) phase, and aqueous phases (milk samples), respectively.

Blood and milk sampling

In this study, we selected 20 dairy cows aged 2 to 5 years based on their health status, stage of lactation, calving date, and age, with permission from the Virginia Tech Kentland Farm authorities and approval from the Institutional Animal Care and Use Committee (protocol 24-093). Milk samples were collected in sterile tubes, while blood samples were drawn from the tail vein using sterile needles and anticoagulants from cows that had recently calved. During blood collection, cows were secured in headlocks for feeding. Milk samples were kept on ice prior to freezing, and blood samples were stored at −20 °C. Detailed records were maintained for each sample, including cow identification and collection information. All procedures adhered to ethical guidelines to ensure animal welfare and minimize stress.

Software

OriginPro 2023b and GraphPad Prism 6.02 were used for statistical analysis. The 3D CAD SolidWorks 2020 and AutoCAD software were used to create the 3D design for 3D printing. Software associated with the extrusion SLA printer with different control managers was used to control the 3D printing of the polymer. Biorender 2023 software was used to generate the 3D schematics.