Development of IOT-based low-cost MEMS pressure sensor for groundwater level monitoring

Groundwater level monitoring is critical to the protection and management of groundwater resources. Properly designed and executed instrumentation can play an important role in increasing the quality and reliability of collected data and reducing total monitoring costs. The efficiency of the instrumentation depends mainly on the accuracy and reliability of the installed sensors. This study presents the testing and application of a cost-effective pressure sensor (0–689 kPa range) for water level monitoring based on microelectromechanical system (MEMS) technology and the internet of things concept. The sensor performance, in terms of accuracy, precision, repeatability, and temperature, was investigated in laboratory columns (with constant water level, increasing and decreasing water levels at various rates) and in situ conditions in an observation bore (with natural groundwater level fluctuations). The results show that the MEMS sensor is capable of providing a reliable and adequate monitoring scheme with an accuracy of 0.31% full scale (FS) (2.13 kPa).


Introduction
Water level data provide valuable knowledge about the extent and rate of change in the groundwater level. It is the principal source of information for hydrogeologists to check local abstraction and to evaluate short-and long-term regional change (depletion or recovery) in groundwater resources [1,2]. The groundwater data are primarily used to characterize * Author to whom any correspondence should be addressed.
Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. the surface-groundwater interactions [3], to estimate aquifer properties such as hydraulic conductivity and specific storage [4,5], to analyse the effects of stresses on groundwater recharge, storage and discharge [6], to establish models for groundwater flow pattern and gradients [7,8] and to investigate the effect of climate variability [9]. Thus, effective data-driven groundwater management is essential to meet the requirements of groundwater-dependent analysis.
In situ groundwater level measurement is widely conducted via two approaches: (i) by deploying sensors in the well and (ii) by water level meters [10,11]. The water level meter approach is easy and provides an immediate single measurement. It is good for the periodic monitoring required to map potentiometric surfaces or when the hydraulic response of an aquifer to stresses is slow. However, it is difficult to use this method to determine extreme water level fluctuations as apparent trends in water levels are potentially biased [2]. Therefore, in many applications, sensors are deployed within a well for an extended period of months or years. The continuous approach is preferred since it provides efficient information about water fluctuations and the effects of stresses on the aquifer system, particularly during droughts and other situations when the rate of change in hydraulic stresses is relatively high [2]. However, continuous measurement is more costly and requires more configuration due to the use of sensors [10]. Having cost-effective, scalable, and reliable groundwater monitoring systems is a necessity to collect vital groundwater data. The role of installed sensors is vital in the prevention of incorrect interpretation of data and critical errors in the estimation of groundwater flow patterns and magnitudes. For most of the currently available sensors, it is necessary to access data by visiting the bore location and downloading data. Thus, access to data is delayed until the date at which the probe is retrieved. Delayed access to groundwater level data means working with outdated information, which may lead to inaccurate assessments of groundwater trends and a reduced ability to address emergencies promptly. The lack of real-time access can result in increased personnel requirements and an increased cost of monitoring operations. Additionally, in some weather conditions, access to the well is difficult, challenging, and dangerous. To overcome this issue, some sensors are deployed with telemetry, which uses antennae to wirelessly transmit sensor data to a database [10]. Although the telemetry system is widely used for different applications such as ecology [12,13], agriculture [14] and energy monitoring [15], its application to remote in situ groundwater sensing networks is limited and particularly reliant on proprietary, commercial applications [10]. Thus, a comprehensive regional or national monitoring plan remains costly. With the advances in sensing technology in recent years, several studies have been conducted to develop low-cost monitoring systems [10,[16][17][18][19][20]. Having a low-cost sensor with the capability of real-time monitoring is of primary interest to not only minimise operation costs but to also overcome shortcomings of the existing sensor, as well as enhance the reliability and accuracy of monitoring.
The common groundwater monitoring devices are strain gauge or vibrating wire (VW) sensors [21,22]. Although these devices provide proper output, they are expensive so a large network of them for hydrogeological monitoring is costly. They may not offer real-time monitoring capabilities by default. The data from VW sensors may need to be manually collected and recorded at regular intervals. Furthermore, they exhibit short circuit and a lack of durability for long-term plans which affect their applications [23,24]. Their components are prone to corrosion and creep under constant tension [21,25].
To overcome existing shortcomings, usage of the other types of sensors, such as fibre optic sensors [26][27][28][29], ultrasonic sensors [16,17,30,31] and microelectromechanical system (MEMS) pressure sensors [32,33], is feasible. Each type has its strengths and weaknesses, and the choice ultimately depends on several factors such as accuracy, sensitivity, operating conditions, power consumption, and cost considerations.
For example, ultrasonic sensors are the proper choice for lowrange monitoring where high precision and resolution are needed. They work based on the transmission and reception of high-frequency electromagnetic or sound waves through a noncontact measurement, which means that they do not need physical contact with the water surface [16,34,35]. This is beneficial because it avoids any disturbance to the water or the need for intrusive installations such as probes or floats. Noncontact measurement reduces the risk of damage to the sensor due to contact with corrosive or contaminated water. However, ultrasonic sensors are sensitive to environmental factors such as temperature, humidity, and air density, which may lead to inaccuracies in water level readings. Furthermore, ultrasonic sensors may show inaccuracy if reflection waves are interfered with by obstacles or other sonic targets inside a well [16]. The more considerable disadvantage of ultrasonic sensors is related to their measurement range, which is typically up to a few metres. Thus, it cannot be used for deep boreholes since sound waves may weaken at high depths. This limitation may restrict the use of ultrasonic sensors in applications where the water level needs to be measured at greater depths.
Fibre optics are another development in groundwater level monitoring that provides excellent immunity to electrical interference, long-distance capability, and distributed sensing [25,36,37]. They enable distributed sensing along the length of the optical fibre, allowing continuous monitoring of groundwater levels at multiple depths or locations [25,37]. However, the cost and complexity of installation is an area of concern with this technology. They also need specialised installation which may make it necessary to involve experts or trained personnel during installation and maintenance [25]. Thus, the overall cost of operation may be expensive. Fibre optic sensors are sensitive to physical damage, such as bending or crushing of the optical fibres [25], and have limited capability for providing high spatial resolution in some conditions in bores [36]. Developing a fibre optic device with low cost and high spatial resolution is challenging. Integration with existing monitoring infrastructure is another issue for this technology; thus, in remote or undeveloped areas, establishing an optical fibre network infrastructure may be challenging or cost prohibitive. The utilization of fibre optic systems for long-term monitoring is still in its early stages and requires further research to gain widespread recognition. The optical method has another big disadvantage. It has an extremely high cross-sensitivity to temperature; the combination of pressurized strain and temperature change poses a challenge to the robustness of the fibre optic sensor when used as a highly sensitive pressure sensor in low-pressure applications [38].
Due to some of the shortcomings in the aforementioned technologies, in recent years, the adoption of instruments based on MEMS has become of interest, particularly for geotechnical instrumentation. MEMS-based instruments have provided promising results, both in the laboratory and in situ monitoring, for a wide range of geomechanical scenarios in recent years, such as ground deformation and ground vibration [33]. MEMS sensors are low-cost miniaturized sensors that are built by merging micromechanical and electrical components on a single substrate, particularly silicon [39][40][41]. Their small size allows for easy integration into space-constrained applications. They are generally more cost-effective compared to optic sensors or ultrasonic sensors. They are produced using semiconductor fabrication techniques, enabling batch production, and reducing per-unit costs. The cost-effectiveness of MEMS pressure sensors makes them suitable for high-volume applications. They are available in a wide range of pressure measurement capabilities, from very low pressures to high pressures, depending on the specific sensor design and model. This versatility allows for the monitoring of various pressure ranges across different applications. MEMS sensors typically have low power consumption, which is advantageous for battery-powered or energy-efficient devices. The low power consumption helps prolong battery life and reduce overall energy consumption, making them suitable for portable or wireless applications. They can easily be integrated with electronic circuits, enabling on-chip signal conditioning, digital output, and communication interfaces. This integration simplifies the overall system design and reduces the need for external components, making them more convenient and costeffective to use. A MEMS pressure sensor can cost between $10 and $70, depending on range, type of measurement, brand, etc. Considering the cost of other parts, such as the microcontroller, temperature sensor, cable, packaging, and internet of things (IOT) components, a groundwater level instrument based on MEMS technology can provide a cost and size reduction of several times compared to available technologies. In addition, the MEMS-based devices provide adequate resistant to vibration, shock, and radiation [33,42]. This provides another advantage compared to conventional devices (VW), whose performance under shock and vibration is an area of concern. High compatibility with the wireless network systems (WSNs) and IOT is another distinct feature of MEMS sensors [43,44]. This paper covers the laboratory and field results of a groundwater level instrument based on a MEMS piezoresistive pressure sensor designed for water level and pore water pressure monitoring. It is based on the IOT concept which provides an automated, real-time monitoring system with the capability for remote monitoring applications.

MEMS technology: piezoresistive sensing
MEMS is a manufacturing technology used to create tiny integrated sensor/actuator systems based on integrated circuits (ICs) and microfabrication techniques [33,39]. In MEMS, the micromechanical components such as gears, cantilevers, and diaphragms are integrated with electrical components (e.g. resistors, capacitors) on a single substrate, mostly silicon [45]. The origin of MEMS dates back to 1954, when Smith [46] discovered the distinct feature of silicon and germanium to sense air or water pressure by means of a change in resistivity. This finding has drawn the attention of researchers investigating the applicability of the piezoresistive effect for sensor design. Silicon is an abundant, inexpensive material with a very low coefficient of thermal expansion [47]. The piezoresistive factor for silicon is 100 times higher than for common metals. With the invention of IC technology in 1958 and the advancement of micromachining techniques in the 1970s and 1980s, batch fabrication of inexpensive, high-functioning microsensors has been moved to the commercialized phase. From that time until now, MEMS devices have appeared in numerous commercial products and reached full commercialization in various fields, such as the automotive and aerospace fields [48,49].
Pressure sensors are considered to be the most successful MEMS technology, with the global market expected to grow further from USD 13.6 billion in 2020 to USD 20.8 billion in 2025 [50]. MEMS pressure sensors are available in different types based on different principles of sensing, including piezoelectricity, piezoresistive, capacitive, and optical [33,51]. The choice between these types depends on the specific application requirements, such as sensitivity, measurement range, environmental conditions, and budget considerations. Piezoelectric sensors are less affected by temperature and have excellent low-power consumption properties. Piezoelectric materials do not require any external excitation and provide unique capabilities for energy harvesting, which may be a valuable asset for monitoring in remote locations. However, piezoelectric pressure sensors cannot be used for static pressure sensing purposes due to charge leakage [49]. Optical ones show immunity to electromagnetic interference and adequate feasibility for multiplexing and distributed sensing [52]. But they are expensive with complicated implementation. Capacitive pressure sensors are based on a change in capacitance, and can be manufactured at very low cost despite low bandwidths and relatively high noise level [53]. They have high sensitivity and are not sensitive to temperature. Piezoresistive sensors are based on the piezoresistive phenomenon, by which the electrical resistance of a material changes in response to applied pressure. They are the most prevalent type of MEMS pressure sensor due to their low cost, highly reliable batch fabrication, excellent stability, and low hysteresis [54][55][56]. They provide a true static pressure measurement and offer superior performance in terms of high sensitivity, low nonlinearity error and ease of manufacturing [54,55]. Sensitivity is an important parameter in sensor development as highly sensitive sensors are capable of detecting the smallest absolute amount of change in the output signal.
MEMS piezoresistive sensors are equipped with a thin and flexible diaphragm that may exhibit deflection, resonant frequency change [56]. These reaction mechanisms are the core of the pressure measurement. The thickness of the diaphragm in a MEMS piezoresistive pressure sensor can vary depending on the specific design, fabrication process, and application requirements. The minimum thickness of the diaphragm in MEMS pressure sensors can be around a few micrometres (µm) or even less. The maximum thickness can be greater than a hundred micrometres (µm). Diaphragms are designed in circular, rectangular, and square shapes [48]. However, square or rectangular are more commonly employed since they take up less space and use easier lithography [48]. They provide greater induced stress for applied pressure than other types [48]. The deflection of rectangular diaphragms can be calculated by [48]: where P is applied pressure, a is plate length and α is the numerical factor depending on the ratio between length and width of the rectangular diaphragm, calculated by: And D is the flexural rigidity represented by: where E is Young's modulus; h is diaphragm thickness, υ is passion ratio and h is thickness of diaphragm. It is clear that the thickness, the properties of the material, the shape and the length of the diaphragm significantly affect the performance of the sensor [55][56][57]. A well designed diaphragm structure can enhance the linearity and sensitivity of the sensor. During the design process, the change in the diaphragm structure and dimensions can cause a gain in sensitivity and an increase in the mechanical nonlinearity [55]. The MEMS piezoresistive pressure sensors are built by micromachining processes such as diffusion or ion implantation on different silicon-based substrates, such as single crystal silicon (Si), or polysilicon (polySi) [51,58]. Since the metal strain gauge was replaced by silicon piezo resistors, the size of the pressure sensors has been reduced from the centimetre to the millimetre level. A piezoresistive pressure sensor consists of four piezo resistors in a Wheatstone bridge configuration, represented in figure 1. The resistors have equal magnitude at zero stress. When pressure is applied, the deflection of the diagram leads to a resistivity change in the resistors, which is converted through a Wheatstone bridge circuit into an electrical output voltage [42,57].
When pressure works on the sensor it causes a resistance increase of ∆R in two resistors and a decrease in others. The output of the Wheatstone bridge is given by [59]: The stress can be measured by voltage differences in the Wheatstone bridge. The output voltage can be calculated based on the following equation [49,59]: where V in is input voltage, and R is resistance. When pressure is applied, each resistance value changes to a value of The output voltage can be written in the following form [59]: The resistance change can be written as follows [49,59]: where E is the Young's modulus of the material, ε l and ε t are longitudinal and transverse strain respectively, and π l , π t and e are the longitudinal and transverse piezoresistive coefficients, respectively. The magnitudes of the piezoresistive coefficients depend on several parameters, including impurity concentration, temperature, orientation of the wafer and diaphragm, the type and amount of doping, as well as the relation of voltage, current and stress to each other [58,60]. The maximum stress can be calculated as follows [49]: When the deflection of the diaphragm occurs, both resistor R 1 and R 3 experience longitudinal stress σ l and transverse stress σ t , as given by [49]: And resistor R 2 and R 4 similarly experience a transverse and longitudinal stress, as below: In a single silicon substrate, π l and π t are equal in magnitude. The output voltage as a result of applied pressure can be calculated by [49]: The MEMS piezoresistive sensor can also be equipped with an application-specific integrated circuit (ASIC) that facilitates respective signal conditioning circuitry, microcontroller, and programmable software, along with wired or wireless communications in a single small package [61].
Piezoresistive pressure sensors currently face numerous challenges when it comes to their utilization in diverse applications, including low-pressure, high-pressure, and harsh environments. As a result, there has been a remarkable surge in research activities focusing on various aspects of piezoresistive pressure sensor technology. These endeavours aim to address the existing limitations and push the boundaries of sensor performance, leading to significant advancements in the field.
An essential aspect of piezoresistive pressure sensor development is ensuring compatibility with harsh environments, characterized by high temperatures, intense vibrations, erosive flows, or corrosive media. To tackle these challenges, researchers are focusing on the use of materials with superior physical, mechanical, chemical, and electrical properties under high-temperature conditions. The aim is to develop piezoresistive pressure sensors that can withstand and perform reliably in such demanding environments. Despite several advantages of piezoresistive sensors, cross-sensitivity to temperature and the susceptibility of piezoresistance to junction leakage and surface contamination are the main disadvantages of this type, particularly when using silicon as the main substrate to fabricate [60,62,63]. In a conventional piezoresistive pressure sensor based on a PN junction, the voltage can be reduced by increasing the temperature due to the effect of leakage currents through the p-n junction [57,59]. This leads to limitations for harsh conditions with high temperatures. Different methods have been proposed to overcome this limitation.
One promising approach involves the utilization of silicon carbide (SiC), a material known for its superior properties compared to silicon. SiC offers higher strength, higher thermal conductivity, higher elastic modulus, and a lower thermal expansion coefficient [64,65]. This makes it wellsuited for withstanding harsh conditions in which piezoresistive pressure sensors may be deployed. Another approach gaining significant traction is the use of silicon on insulator (SOI) technology [57,59,66,67]. SOI involves isolating the device layer and silicon substrate using a buried oxide layer. This isolation prevents the formation of a PN junction, thus addressing the issue of electric leakage commonly associated with traditional silicon-based sensors. Although the use of SOI technology may introduce additional substrate costs, it has shown remarkable progress in mitigating temperature coefficient errors, zero-signal hysteresis, and sensitivity hysteresis [57,59].
Another key focus in the development of MEMS pressure sensors is to enhance their sensitivity and linearity, enabling their usage for low-pressure ranges of up to 60 kPa. These sensors are finding increasing applications, and their range can be extended to applications without the need for ASIC amplification of the output signal [68,69]. In recent years, novel methods have been proposed, to replace the classical Wheatstone bridge with a new circuit design, with one notable approach being the use of the piezo-sensitive differential amplifier (PDA) circuit, which employs bipolar-junction transistors to amplify the output signals from piezoresistive sensors [70,71]. This circuit is specifically designed to amplify the small voltage changes generated by the piezoresistive elements in response to applied pressure or mechanical deformation. Traditionally, piezoresistive MEMS sensors require external amplification and conditioning of the output signal for accurate measurements. However, the PDA circuit allows the amplified signal to be directly obtained without the need for external amplification. This approach minimizes error amplification, and enhances the accuracy and reliability of low-pressure measurements [69]. The introduction of the amplifier grants allows the chip size to be reduced while keeping the same sensitivity as a chip with the classic Wheatstone bridge circuit [68]. This trend facilitates the development of more compact and efficient pressure sensing systems, making them suitable for diverse applications such as medical devices and environmental monitoring. The amplified output signal can be further processed and utilized for data acquisition, control systems, and signal analysis. There are other complex electrical circuits instead of the Wheatstone bridge, such as the piezosensitive differential amplifier with negative feedback loop (PDA-NFL) circuit [68,71,72]. These innovative designs leverage the piezoresistive effect in unique ways, enabling precise differential amplification of the piezoresistive signals for accurate pressure measurements. However, for the selection of the appropriate circuit design for a piezoresistive MEMS, other factors such as cost, space constraints, power consumption, and signal processing requirements should be considered. The development of such pressure sensors is still at the beginning of the road, but they have already demonstrated an obvious advantage over those with a classical Wheatstone bridge.

Instrument description
For this study, a nonvented MEMs pressure sensor is designed, which is labelled 'M2'. The sensor, which provides absolute measurement within an operating range of 0-689 kPa or (70 m H 2 o), is shown in figure 2. It consists of a data acquisition unit (DAU), data transfer unit and the data processing unit. The DAU is used to process the sampling signal to measure the physical stimuli and convert it to digital value. It is built with a MEMS piezoresistive sensor, a temperature sensor, the ATmega328PB microcontroller for signal conditioning circuitry and a 10 -bit analog-to-digital converter (ADC). The sensor is enclosed by clear polyurethane via a 3D printer, which offers inexpensive and watertight encapsulation with high resistance to corrosion.
The MEMS sensor is a TR series pressure sensor (TR1-0100A-101) produced by Merit Sensor [73]. This is fully temperature compensated and combines MEMS piezoresistive die with ASIC signal management. This type isolates onboard electronics from system media through an inert eutectic alloy solder bond of the MEMS pressure element to a ceramic printed circuit board (PCB) substrate. The PCB is formed photochemically upon an insulating substrate. Using a PCB provides the benefits of reducing the size and weight of the component assembly and preserving circuit characteristics from any variation of inter-circuit capacitance [74]. Compared with traditional boards, ceramic PCBs have more advantages due to their high thermal conductivity and minimal coefficient of expansion. The TR Series Pressure sensor is designed for air, liquid, and gas harsh media compatibility over a broad temperature range from −40 with a total error band of less than 1.0%. The design includes a 4.7 kohm pull-up resistor, and operates on a single 5.0 VDC supply in absolute pressure measurement and accuracy of ±2.5% [73]. It comes with a ferrule design based on a gold-plated Kovar (figure 3). The Kovar material has a similar coefficient of thermal expansion (CTE) as the ceramic (alumina) and improves the solderability and strength of the bond to the plated gold of the ceramic. The TR series pressure sensor utilizes capacitors in order to create a completely calibrated circuit with ASIC. The function of these is electromagnetic interference (EMI) protection, voltage reference for the ASIC, and voltage input/output stabilization. Moreover, a pull-up resistor is used in order to have a good/stable output, which ensures a flowing current in the ASIC output driver. The ATmega328PB microcontroller is a low-power CMOS microcontroller with 32 Kbytes of in-system programmable flash memory with read-while-write capabilities and inbuilt ADC and Wi-Fi modules. The output signal is a reference voltage of 0-5 V. The microcontroller is interfaced with Raspberry Pi which is responsible for collecting digitised data from the A/D converter and storing it in flash memory. The ADC is responsible for converting the analogue signal to a digital value and sending the data to a microcontroller when requested. The microcontroller transfers data to the IOT unit to upload data to the cloud-based platform. The IoT is defined as a system based on the internet protocol suite, in which the physical objects (Things) share information about their environment remotely and in real-time via the internet [44]. The IOT-based framework comprises four layers for processing monitoring, as illustrated in figure 3.
The first layer is attributed to collecting data, which is performed by the MEMS sensor. The MEMS sensor measures water level data and transmits the monitored data to the second layer, which is responsible for data acquisition. In the second layer, the acquisition system receives data from sensors, preprocesses it locally, and then sends it to cloud-based platforms. In this layer, SN75176B differential bus transceivers and a DSPIC33FJ128GP802 microcontroller are used to receive data from the sensor and transmit it to the communication system. An 'Arduino' board is used due to its compatibility with several communication types available (Serial, SPI, and I2C), wide voltage operating range, low-energy capabilities, and low cost.
Data communication to the cloud platform layer is conducted by the global Positioning System (GPS)/global navigation satellite system (GNSS) modules over a 3G/4G network. The cloud-based platform (third layer) is a computing layer that is used for storing and computing data [67]. The data is accessible in the last layer in the form of real-time data through an HTTP website with the ability to download data as a comma-separated values (CSV) file by the user. This system provides a well-structured and systematic approach to dealing with water resource functioning. Using real-time data, the cost of data processing and site visits is significantly reduced. In addition to transmitting the data, local storage is used as a backup in case of any issues in the transmission process. A microSD card storage module was used as the storage medium, which allows for easy data extraction and replacement.

Sensor calibration
Calibration is an important step in the development of any MEMS-based instrument. It is an adjustment between the sensor's output signal and the measured quantity to reach the closest value to the truth [75,76]. Adopting a proper calibration model can significantly affect the performance of the MEMS-based instruments [32,[76][77][78][79][80]. A MEMS pressure sensor mainly suffer from four types of error, including offset, gain, nonlinearity, and hysteresis. Offset and gain are two instinctual errors in the pressure sensor that can be easily compensated. But the nonlinearity and hysteresis are so complex that they require an advanced mathematical model in most cases to reach reliable output. These errors are defined as below: Offset error: a deviation in output signal when the output signal is not zero or minimum at a zero or minimum physical input.
Gain error: a deviation when the maximum physical input signal does not match with the maximum electrical output signal.
Nonlinearity error: defined as maximum deviation output signal from an assumed straight line over full span of sensor pressure range. The nonlinearity percentage is defined by the following equation [81]: where V o (P i ) is voltage output at a pressure P i , V o (P m ) is maximum output voltage at the maximum operating pressure (P m ) and V fit-line [P i ] is the reference voltage based on the reference transfer function. The maximum value of NL i represents the value nonlinearity error. Hysteresis error: a deviation in sensor output during pressure increase and decrease cycle [82]. The percentage hysteresis can be defined by the following equation [82]: where v in is the sensor output in the increasing cycle, v de is the sensor output in the decreasing cycle, and v FS is the full scale sensor output. The maximum difference is defined as hysteresis error.
To minimize those errors, a calibration test was conducted using a pressure chamber and a pressure calibrator. The chamber was built using a polyvinyl chloride (PVC) pipe that withstands a full pressure range of 100 psi (689.476 kPa). The chamber connections were sealed using N and P type glue to prevent air leakage. The output data was recorded by a USB device and displayed on a personal laptop, as represented in figure 4.
After setting up the test, the output of the sensor at different pressures over the full operating pressure range were recorded to implement calibration models. Gain and offset were compensated by the following equation: where v c is the corrected voltage after offset and gain compensation, v min is the minimum output voltage for the sensor and v r is the raw output signal, k 1 and k 2 are offset and gain coefficients, which are calculated by following equations [83,84]: where y 1 and y 2 are the desires outputs at a point x 1 (zone or minimum physical input) and x 2 (maximum input) respectively, f (x 1 ) and f 1 (x 2 ) are sensor outputs at those points. The values of k 1 , k 2 are presented in table 1.
In the case of the nonlinearity error, linearization models are solved by the Lagrange polynomial fitting method, by means of optimum calibration points [76].
The Lagrange interpolation method is a suitable option for a cost-effective calibration scheme due to its ability to conduct calibration with a reduced amount of data compared to other available methods [85]and [76]. An optimal Lagrange method can be achieved by ensuring that the calibration points are positioned according to the Lebesgue function criteria. The concept is rooted in the understanding that equidistant points may not yield accurate results, and different sets of points based on Chebyshev spacing or optimality criteria can lead to better outcomes [76,86]. In this analysis, various sets of points are examined, and the best results are obtained by utilizing modified extended Chebyshev (MEC) points. This specific set is constructed by means of Chebyshev polynomials attributed to Chebyshev of first kind [86]. The transfer function based on Lagrange interpolation was computed by equation (8): And the optimum points by means of MEC points are calculated by the following equation: To achieve sensor linearization, a total of six calibration points, including two endpoints, are selected. The measured voltage and pressure are the mean of two readings at each calibration point, in order to reach the best available estimate of the expected value and decrease uncertainty of the calibration. At first, the offset and gain were compensated and then the relationship between the measured voltage and input pressure (standard pressure) is used to build the calibration curve. This curve provides the measured voltage corresponding to a given input pressure. In order to determine the predicted pressure, the calibration curve must be inverted by means of inverse Lagrange interpolation. Once calibration is completed, and the model implemented in the microcontroller, a separate test is conducted by applying 16 different pressures. The accuracy improvement in measurement after offset, gain and nonlinearity calibration is represented in figure 5. As in the definition, accuracy is the maximum difference between a measured variable and its true value. Usually expressed as a % of the full-scale output [87].
Regarding figure 5, it can be seen that the accuracy was improved significantly, by about 85%, and reached from above 4.6% FS to around 0.31%. It should be pointed out that, here, accuracy is the maximum error in sensor output affected by offset, gain and nonlinearity, and we did not consider temperature effect. This means the maximum error in full scale is less than 2.13 kPa. This is very close to the accuracy of the available VW piezometer (0.1%-0.2%) over the same range. The comparable accuracy is particularly attractive given the significantly lower cost of the MEMS sensors. The sensor specification is shown in table 2. It should be noted that the accuracy is not affected by hysteresis, and this error influences the precision of measurement where there is a monotonically changing pressure cycle. Thus, another algorithm is required to compensate of hysteresis error. Generally, piezoresistive MEMS sensors provide proper hysteresis features so that the effect of hysteresis is not significant. Our calibration data showed that the maximum hysteresis among the sensors was around 12 millivolts at full scale, which represents a 0.31% error. This amount is acceptable and adequate for the majority of applications and can be neglected. However, compensating for this error is worthwhile in order to achieve a higher precision result for water level monitoring. Thus, a compensation algorithm is applied to the sensor's output, and the hysteresis error is minimised to 0.10%, which means a maximum pressure of 0.550 kPa at full scale. For this sensor, the inverse Preisach model is applied. It is a static scaler hysteresis model based on the relay operator. This model is computationally inexpensive to implement in a microcontroller [88]. The Preisach model is defined by the following formulation [89]: where y (t) is output, voltage corresponding to input pressure x (t) , α and β represent upper and lower threshold input value, t time of transformation, µ (α, β) is Preisach density function and γ (α,β) is the hysteresis relay operator, which can be described on a rectangular loop in an input, output diagram. The value of the Preisach density function can be calculated from a set of experimentally measured first-order transition (reversal) curves in a monotonic system [90]. For every grid point (α, β), the corresponding value can be calculated as follows: where y αi is output voltage when input pressure increases from 0 to α i and y αiβi is the output voltage associated with a decrease from α i to β i and smaller than α i . The output voltage can be obtained through a numerical approach. For each pair of (α, β), the input pressure increases from a value of β 0 to the value of α and the output voltage is set to the pressure at these points. The present input pressure for the increasing and decreasing cycle can be calculated by the following equation  More information about the Preisach model is available in the following [89,90]. Improvement in sensor output associated with hysteresis error is shown in figure 6.

Laboratory tests
The performance of a groundwater sensor should be analysed in a lab environment before the field installation to ensure the efficiency of the calibration scheme and reliability of measurement. Reliability of measurement represents the degree of confidence in the quality of data, which is attributed to sensor specifications in terms of accuracy, precision, resolution, and stability. It is an important parameter in monitoring operations since poor quality or inaccurate data can be misleading and is worse than no data [91]. In certain critical situations where questions of safety or economy are dependent on the correct interpretation of measurements made, there needs to be a high degree of confidence in the data and hence in the sensor [92]. It is recommended that the response of a groundwater sensor be tested in a 2-3 m standpipe against a known head of water [93]. In this study, the sensors' performance was evaluated in a standpipe tube with a height of 3.7 m through different tests (figure 7).

Accuracy and precision test
To evaluate the accuracy and precision, the pressure variations were analysed at a constant water level of 350 centimetres. The data acquisition system was programmed to record output every 1 h for a period of 720 h (30 d). During this test, a reference pressure sensor was used to measure the atmospheric pressure in a laboratory environment. The true value was calculated based on the height of the water in the tube, and this value for the sensor is estimated after subtracting atmospheric pressure from the sensor output. A reference barometer is used to calculate atmospheric pressure in the laboratory. The change in atmospheric pressure during this test was around 0.300 kPa (0.045 psi). It is also important to keep the height of water constant during the test to avoid any discrepancy in data interpretations. This test follows the procedure of accuracy test for VW conducted by [94], but, due to limitations on size and time, a shorter column size and timeframe are applied. This test can provide valuable information about the source of errors in measurement and the effectiveness of the calibration approach. The results are presented in figure 8. The pressure output in figure 8 is gauge pressure, which is computed after subtracting from atmospheric pressure in the lab.
According to figure 8, it is clear that the sensors exhibit a pressure variation 0.500 kPa, which is attributed to the existence of systematic and random errors in its measurements.  In fact, the sensor's data comprises both systematic and random errors, and the magnitude of the systematic and random errors influence the response. Generally, the rate of accuracy and precision in any instrument depends on two sources of errors: random and systematic (figure 9). A random error is an unpredictable error in which the instrument provides a varying measured value (shift values both higher and lower) in repeated measurements [95]. The systematic error is a constant error that is reproduced on every simple repeat of the measurement so that the measured value is always greater or smaller than the true value [95]. Random errors reduce the precision of measurement while systematic errors reduce the accuracy of the measurement. Several factors can be attributed to random errors. The main reason is that every pressure measurement instrument has a certain level of sensitivity or precision. Random errors can arise from the limitations of the instrument itself. Environmental conditions can be another influencing factor due to fluctuations in temperature, humidity, and atmospheric pressure. Other factors, such as samplin or time stability, may affect the measurement too, but not in this case. On the other hand, the nonlinear behaviour of the pressure measuring instrument can be considered the main reason for the systematic error in our designed sensor. It should be pointed out that during this test we had a sudden power outage in our lab, which may have influenced the sensor error. Additionally, we did not consider the effect of temperature during the calibration phase, which may have a small effect on both random and systematic error.
Random error can be minimized by repetition and averaging of the results. On the other hand, the correction of systematic errors is difficult and can be reduced by using a specific calibration method [96]. However, it is impossible to completely eliminate these two sources of errors due to environmental factors, uncertainty in calibration, human error, shortcomings in the sensor design and minor variations in measuring techniques.   Under repeated conditions, the magnitude of systematic error can be evaluated by mean absolute error (MAE). The MAEs for both sensors were less than 0.23 kPa in this test. Furthermore, regarding the calibration results, it was expected that the maximum error for this sensor at full scale does not exceed 2.13 kPa and is less than 0.60 kPa. Thus, it can be concluded that the calibration performed well to reach high accuracy in the sensor output. The results exhibit high accuracy for measuring water head (pressure) at this scale, with a full-scale accuracy of 0.06% FS. The maximum absolute error was 0.48 kPa. Table 3 represents the magnitude error in this test. It should be noted that minimizing the systematic error only improves accuracy and does not affect precision. In terms of precision, random error can be characterised by standard deviation (SD) and/or mean absolute deviation (MAD). A more precise sensor provides narrow distribution to the actual value.
In the presence of systematic error, mean value represents the centre tendency of the t resulting deviation. The standard deviation and mean absolute deviation are shown in table 4, and calculated by following equations: The MAD offers a more practical and straightforward measure of dispersion from the mean value. Standard deviation, however, is preferred, especially when data has a normal distribution or when calculations become more complex. Results showed a high precision for pressure measurement with a small standard deviation of about 0.15 kPa and a mean absolute deviation of 0.12 kPa (table 4).
The outcomes suggest proper repeatability for MEMS sensors since the deviation range of the top three recorded pressures with the highest frequency was less than 0.36 kPa. Furthermore, the probability density function (PDF) plot, estimated by the Gaussian kernel density estimator (KDE), is represented in figure 10. It shows the absolute likelihood of measuring the true value when the measurement shows a variation in measurement. Figure 10 signifies the effect of random error in measurement; however, the highest density function is near the average value, which means that the effect of random error is not severe. In terms of water level, the MEMS sensor is able to reach an accuracy of around 2.35 cm with a standard error of about ±1.535 cm. Generally, water level accuracy should be in the range from several centimetres in national groundwater resource management, to a centimetre in small-scale study [97]. But these requirements are rarely met in field experiments through available transducers [97]. A field analysis of different brands of nonvented transducers at a length of 2 m, by [97], showed that the accuracy varied from 0.5 cm to 8.5 cm, in which the lower pressure range showed better accuracy. The transducer with pressure ranges of 5, 30, and 100 (m H 2 o) demonstrated accuracies of ±11 cm, ±4.6 cm and ±8.5 cm respectively. The precision result (standard deviation) for high pressure range 30-100 (m H 2 o) were ±1. 58 and ±3.76 cm respectively [97]. Our design sensor covers the range of (70 m H 2 o). Compared to the study by Sorenson, it can be concluded that both the accuracy and the precision of the designed MEMS sensor is adequate and compatible.

Water fluctuation and hysteresis
In an aquifer system, the groundwater level changes constantly for many reasons associated with natural phenomena, such as earth tides, rain falls, or man's activities like pumping. Thus, it is expected that the sensor delivers the same amount at a specific level when the water is going up and down. However, due to limitations of technology, almost none of the sensors can provide the exact same output every time at a specific point in the increasing and decreasing cycle, due to hysteresis error. Therefore, the performance of the MEMS sensor under water fluctuation was tested by increasing and lowering the water level in the standpipe tubes. This test gives us information about both accuracy and the hysteresis property of sensors. The output of sensor water at four different heights (150 cm-300 cm) was recorded during an increasing and decreasing cycle. This cycle was repeated 20 times, and the sensor was set to measure pressure variation every 6 min. The results of absolute error and hysteresis error are represented in figures 11 and 12.
The results show that the sensor response in the downward sequence is around 0.100 kPa less than in the upward sequences due to the existence of hysteresis. The magnitude of the hysteresis error was varied between 0.088 kPa and 0.116 kPa. The average hysteresis error was around 0.100 kPa (1 cm) for all levels ( figure 13). It should be noted that hysteresis error is highest in the mid-range of the sensor operating range and is very small near to the endpoints. Therefore, the difference between calibrated and noncalibrated output is very small at these water levels.
The maximum error in the water head was around 3.2 cm at a height of 300 cm. The average absolute error for upward and downward sequences was 2.35 and 1.24 cm. The pressure accuracy at this level was below 0.04%FS.

Temperature effect
In groundwater monitoring applications, the sensors often operate in variable-temperature environments. The temperature variations may induce a drift in the output of the sensor [98,99]. In the MEMS piezoresistive pressure sensor, considering the effect of temperature is essential since they exhibit an inherent cross sensitivity to temperature. A variation in temperature can change the values of the piezoresistive coefficient, which leads to a constant shift in the sensor output signal [100][101][102]. It is shown that the output response of the pressure sensor gradually decreases with increase in the temperature [67]. Temperature can also adversely affect the precision of the sensor by inducing the fluctuations in the output voltage [101]. The influence of temperature on the piezoresistive behaviour is described as follows [98]: where i is the number of piezo resistor elements, ∆T is the difference between reference temperature and operating temperature, α i and β i are temperature coefficients, R 0 i is conductor resistance at temperature T. Thus, it is worthwhile examining the effect of temperature on the outcome of pore pressure sensor. To analyse the performance of the designed sensor, a water heater immersion element was immersed in the standpipe tube. The device was able to regulate water temperature between 20 • C and 90 • C. The outputs were measured at different temperatures ranging from 20 • C to 70 • C in 10 • C increments. The results were investigated at two different water levels of 150 cm and 300 cm. The reading interval was set to 10 min. For each temperature value, it required around 3-4 h to reach a constant temperature in the whole standpipe tube. The dependence of absolute error and standard deviation from temperature is presented in figure 14.
According to figure 14, it can be seen that both the standard deviation and absolute error are increased by the increase in temperature. In fact, temperature affects the piezoresistive coefficients on the membrane of the sensor element causing a decrease in voltage output and instability of readings. The sensors shows a higher-pressure deviation at higher temperatures, which means a drop in precision of measurement. The standard deviation dropped from 0.110 kPa to 0.330 kPa when the temperature increased from normal (20 • C) to a value of 70 • C. This is a very small change in the full scale of the sensor (less than 0.001%FS). On the other hand, the effect on accuracy was much higher since the absolute error shows an increase of 3.6 kPa in this temperature range. The temperature coefficient of sensitivity and temperature coefficient zero signal were 1 × 10 −3 %FS/ • C and 7.76 × 10 −4 %FS/ • C, respectively. In this analysis, we did not see any meaningful difference in the standard deviation when sensors were embedded in 150 cm of water or 300 cm of water, respectively. This suggests that the standard deviation is affected only by temperature and not by the magnitude of pressure. In terms of accuracy of measurement, the maximum error at higher water head was slightly more than at lower head. However, the per cent difference was insignificant.

Drawdown test
In in situ tests, the measurement of water drawdown provides useful information about the adequacy of underground water resources, rate of water depletion and aquifer properties [5,103,104]. Drawdown is a drop in water head in a well with respect to time when water is being pumped at a constant rate [103]. During the drawdown test, it is necessary to monitor the water levels repeatedly and accurately in the well using the sensor. Since water levels are dropping fast during the first one to two hours, the piezometer should be capable of obtaining an accurate reading in a brief interval, even less than five seconds.
The performance of the MEMS pore pressure sensor was analysed under a rapid drawdown of water in the standpipe tube as a simulation of the pumping test. In this test, the output of sensors was compared with a commercial level TROLL 500 Data Logger [105]. It is vented with an 11 m range (103.42 kPa). For this test, the MEMS sensors and Troll sensor were positioned at the same level (50 cm above the bottom of  the tube) and the water level was set to be 300 cm above of them, then the water was decreased from 300 cm to 100 cm at a constant discharge rate of Q. The value of Q is called the well yield in a pumping test, which is the volume of water per unit of time that is produced from the well by pumping. The two tests were conducted with different Q rates. The results of these two tests are shown in figures 15 and 16.
It is observed that both the MEMS sensor and the TROLL showed similar trends for the drawdown of water. The results were very close and comparable. The MEMS sensor was able to capture a change in water level as rapidly as 2 cm s −1 with a percentage error between 0.67% and 2%. The percentage error for Troll was 0.51% and 1.85%. The percentage difference between these two sensors was around 0.51%.

Field test
To investigate the practical performance of the MEMS sensor, an in situ monitoring of the water level was conducted in an observation bore (Number 82 845). In situ results can give us a true measure of sensor adequacy since results in the field always yield inferior results to laboratory results due to differences in measurement conditions. The study site was located in the eastern part of Australia in Murroon, geographically located at −38.441 327 degrees latitude, 143.820 791 degrees longitude, and 226 m total depth. The water level was 22 m below the surface, and the sensor was positioned at a depth of about 5450 mm below the water line. The outputs were compared with those of the Troll sensor, and both sensors are placed at the same level ( figure 17). A barometric pressure sensor is used to compensate for atmospheric pressure variations. The use of a barometric pressure sensor eliminates the apparent variation in water level due to variations in atmospheric pressure. On-site stations are powered by a lead acid deep-cycle battery (105 amps per hour) and a data logger capable of recording analogue and digital inputs on a 128 K nonvolatile memory card. The test was conducted for a period of 10 d, and the data acquisition system collected and stored instantaneous data every 10 min for both sensors. The IoT system connects the sensor units to the data logger and the internet database, enabling real-time monitoring of field data.
The detail of the water level data for this test is shown in figure 18. Both sensors showed a similar trend of water fluctuations during the test period. However, the average water level for the MEMS sensor was almost 2.15 cm less than the Troll sensor, which can be attributed to the degree of systematic error in its measurement. The average water level for MEMS and Troll was 542.6 and 544.758 cm, respectively.
From figure 18, we can see that the MEMs sensor shows higher pressure variations. The maximum pressure difference for MEMS is 1.3 kPa (13.4 cm), while this value for the Troll sensor was about 0.326 kPa. Statistical results from the two sensors are represented in table 5. This difference in maximum deviation between the output of the sensors can imply the existence of random errors in both sensors. It can be concluded that the rate of random error in MEMS is higher than in the TROLL sensor. Figure 19 shows the pressure difference between the output of these two sensors.
It should be pointed out that some degree of uncertainty will always remain in measurement since it is not possible to completely eliminate systematic and random errors in measurement. Each sensor has a specific accuracy and precision and cannot show a result beyond its own bounds. Other factors such as pressure conversion to water levels, time lag, and    defects in the piezometer or observation well are also discussed as potential sources of measurement error [11]. The nature of the investigation and the objective of the measurements will determine whether this uncertainty is acceptable. Additionally, this must take into consideration that the price for MEMS is significantly less than that available sensor and that this sensor is not the final product. Sorenson's study about the accuracy of groundwater level sensors shows that the field accuracy results depend on the sensor range. For lowrange sensors, an accuracy of around 1 cm is expected, but for higher-range sensors, the accuracy is much lower [97]. In his test, he receives an accuracy of around 4.3 cm for a sensor with a range of (30 m H 2 o) and an accuracy of between 6.5 and 8.5 cm for a sensor with a range of (100 m H 2 o). If we compare our sensor with these results, it can be seen that the range of accuracy and precision in MEMS sensors can meet the requirements for groundwater monitoring. However, to reach a better understanding of the actual performance of sensors in groundwater, further study is needed to update the previous reports. It is also valuable to compare sensors with different technologies in the same conditions, with the same operating range, for different scenarios of groundwater monitoring, to gain in-depth knowledge about the advantages and disadvantages of each technology. In this study, we recorded data for a period of 10 d since the aim was to check the ability of the sensor and battery power. A long-term test is also needed with a MEMS sensor to evaluate the sensor's resolution and stability. In some conditions, the sensor may show a large discrepancy after a few months of recording data or may stop suddenly due to electrical shock, rusting in the housing, or water leakage. Thus, long-term field analysis is planned, powered by solar panels, to extend this assessment. The resolution is important when the recorded data are to be used for the estimation of subsurface properties, since it requires the capability to capture small variations caused by earth tides and atmospheric pressure changes [106]. A future development can be to reach a resolution of 1 mm water head using a 16-bit ADC microcontroller. However, it should be noted that there is a trade-off between resolution and pressure range. With the same ADC converter, using a higher-pressure range means lower resolution. Thus, if high accuracy and resolution are the goals of monitoring, a sensor with a mid-range pressure range and a high ADC bit would be perfect (for example, with 14 or 16 bits). Using smaller ranges, the accuracy is higher, and the magnitude of the hysteresis is very low (in most cases, there is no need to compensate).

Conclusion
In this research, a series of laboratory tests are conducted to evaluate the performance of new sensors for groundwater monitoring, based on MEMS piezoresistive technology. The accuracy, precision, and resolution are tested under different laboratory and field conditions. The results show that MEMS-based instruments can provide reliable measurement in an open borehole system once the source of errors (both systematic and random) are minimised. The accuracy of the system partially depends on the calibration model. The laboratory results exhibit high accuracy for measuring water head (pressure), with a full-scale accuracy of less than 0.1% FS (0.70 kPa) for the low-pressure range. Total accuracy and hysteresis for the sensor are 0.31% and 0.10% FS (or 2.13 and 0.70 KPa) respectively. Both the accuracy and precision of the designed MEMS sensor are adequate and compatible with those of a commercial sensor. The effect of temperature should also be considered in the output, as the value of the absolute error increases with the rise in water temperature. The temperature drift accuracy would be expected at 0.01% FS per Celsius. The test shows that the MEMS sensors can capture a small change in water level with high resolution, which can be helpful for drawdown analysis of groundwater systems. Thus, it is worthwhile to investigate and improve MEMS technology capabilities for future application in groundwater monitoring. With advancements in MEMS device fabrication processes, it can be predicted that MEMS devices will realize more functionalities and miniaturisation, and decrease in cost, which is a huge challenge for other products. However, further studies are required to gain a better understanding of MEMS sensor capabilities. Conducting long-term in situ tests is essential in order to address limitations associated with sensor sensitivity, accuracy, repeatability, noise, stability, temperature resistance, and cost. Using IOT concepts, it is also possible to integrate several different MEMS sensors into a low-cost microcontroller to obtain comprehensive information about the subsurface. An improvement in calibration, sensor design, and packaging is also required to make MEMS sensors more robust for in situ applications. Additional research associated with energy consumption for IOT applications, wireless modules, and the reliability of data transmission for long-range communications is required to improve the efficiency of monitoring networks, particularly in remote areas.

Data availability statement
The data that support the findings of this study are available upon reasonable request from the authors.