Time-domain measurement methods for R, L and C sensors based on a versatile direct sensor-to-microcontroller interface circuit
Introduction
Smart sensors are used inter alia in industrial control and automation, automotive industry and consumer, medical and military applications. They are usually built into the devices and in such cases they are parts of the control systems of these devices (e.g. in automotive applications). Also, they can work as independent devices (e.g. as wearable electronics in customer or medical applications and as environment monitoring sensors). They measure physical variables of the monitored environment, objects and processes (e.g. temperature, ambient humidity, pressure and tension), process and store the measurement data and often they send these data via any wireless interface to a smartphone, tablet, PC or to the main controller of the monitored device. Smart sensors consist of analog or digital sensors, conditioning circuits, processing and control units and communication interfaces.
In many cases smart sensors are battery-powered or their power supply is based on the energy harvesting technique [1]. Therefore, they should be energy-efficient data acquisition systems, and, ideally, they should be small and cheap [2]. For these reasons, universal sensor interface chips, e.g. [3,4], smart sensor modules based on two-terminal or four-terminal methods, e.g. [[5], [6], [7], [8]], are too expensive and too complex. However, these requirements can be satisfied by the use of widely available low-power one-chip universal devices (i.e. the microcontrollers) as control units. An additional advantage of microcontrollers is that they can convert analog information provided by analog sensors via conditioning circuits to the digital form which next they can also process, store and send.
Important groups of analog sensors are resistive (R), inductive (L) and capacitive (C) sensors. These sensors can be arranged in the form of a single-element, a differential configuration or a bridge configuration. To obtain such low-cost and low-power solutions for resistive sensors [[9], [10], [11], [12], [13]], differential resistive sensors [14], resistive sensors bridges [15,16], inductive sensors [17], capacitive sensors [18,19], differential capacitive sensors [20] based on microcontrollers - the direct sensor-to-microcontroller methods were developed.
The task of such direct interface circuits is to measure the discharging time of either an RC network consisted of resistances or capacitances of the sensor or an RL network consisted of inductance of the sensor. It was noticed that the parameters of the microcontroller pins, which depend on the manufacturing technology, have a noticeable impact on the measurement accuracy. To eliminate it a direct sensor-to-microcontroller interface circuit was extended with additional components, e.g. a calibration resistor [21], MOSFET transistors [22,23], or also an inverter consisted of two MOSFET transistors [24].
In the cited methods [[8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20], [21], [22], [23]] only digital input/output pins and internal timers/counters of the microcontrollers are used to determine values of resistance, inductance or capacitance of the sensors. However, nowadays almost all modern 8-bit and especially 32-bit microcontrollers are likewise equipped with analog-to-digital converters (ADCs) and also analog comparators (ACs).
Thus, new time-domain measurement methods for determining values of R, L and C, based on a direct sensor-to-microcontroller interface for microcontrollers with internal ADCs and ACs are proposed in the paper. It should be emphasized that for measurements of R, L and C components there is used only one common hardware configuration of the interface circuit (Fig. 1) consisting of a reference resistor Rr working as a voltage divider [25], a given sensor and a microcontroller (more precisely its peripherals: an ADC, an AC, a timer, I/O pins buffered by an inverter [26] (Fig. 2)). The differences between measurement methods for respective components exist exclusively in the microcontroller software. Additionally, an advantage of the proposed solution is its hardware and software simplicity, and also a short measurement time, what results in a low-cost, low-power solution of the sensor interface circuit.
Hence, the approach can be used to design smart sensors (Fig. 1), and also, which is its greatest asset, it can be used in easy and cheap way of extending the functionality of existing systems based on microcontrollers.
The paper is organized as follows: Section 2 presents the operating principle of the interface circuit for measurements of R, L and C, Section 3 analyses the error sources of these measurements and their limitations, Section 4 describes experimental results and proposals to improve measuring accuracy, and Section 5 contains the main conclusions.
Section snippets
Operating principle
The proposed direct interface circuit for R, L and C sensors is shown in Fig. 2. An impedance Z represents one of the R, L or C sensors. A reference resistor Rr works as a current-to-voltage converter [25,26] and together with the impedance Z acts as a voltage divider. An inverter consisted of only two MOSFETs [27] buffers the output pin of the microcontroller [25].
The microcontroller, and more precisely its internal measurement peripherals, works simultaneously as a signal generator
Error analysis
The maximum possible relative inaccuracy (error) Δf/| f | of an indirectly measurable variable f will be used to estimate the inaccuracy of determination of R, L and C values of the sensors from the measurement results. It is an approximation of the standard uncertainty [34] and has the form [35]:where: f = f(x1, x2,. ., xI) ≠ 0 – an indirectly measurable variable, x1, x2,. ., xI – directly measurable variables, Δf – the maximum absolute inaccuracy of the function f, Δxi –
Experimental results and discussion
The experiments were performed by using a prototype board of the laboratory compact smart sensor, consisted of a microcontroller module (the ATXmega32A4 together with a 16 MHz crystal oscillator), an inverter based on IRF7015, a communication module MMusb232 based on FT232BL and a sensor interface circuit.
An Agilent 34410A Digital Multimeter was used to measure the supply voltage (VCC = 3.301 V) and values of reference resistors (Rr = 2202 Ω for R measurements, Rr = 10 Ω for L measurements, Rr
Comparison of the methods with the state of the art
The results of comparison of the proposed methods based on a versatile direct sensor-to-microcontroller interface circuit (VDSMIC) with the state of the art, that is with the 1-, 2- and 3-point (generally n-point) calibration technique methods (n-PCT) based on the direct sensor-to-microcontroller interface circuits are included in Table 2. In this table there are compared the interface circuit complexity and the maximum measurement relative error for R, L and C measurements. For R measurements
Conclusions
In the paper new time-domain measurement methods for determining values of R, L and C sensors based on a direct sensor-to-microcontroller interface circuit for microcontrollers with internal ADCs and ACs are presented. These methods use only one common hardware configuration of the interface circuit consisting of a reference resistor, a given sensor, an inverter and a microcontroller. However, the measurement procedures and ways of determining the values for a given R, L or C sensor implemented
Zbigniew Czaja was born in Czluchow, Poland, in 1970. He graduated from Gdansk University of Technology, Faculty of Electronics, Telecommunications and Informatics in 1995. The Ph.D. degree in electronics was received in 2001 from the same university. He worked as assistant professor at this university from 2002 to 2013. In 2014, he qualified as an associate professor, and in 2017, as an professor. His research interests are in technical diagnosis, especially for fault diagnosis of electronic
References (39)
- et al.
Ch2 – Energy harvesting and battery technologies for powering wireless sensor networks
Industrial Wireless Sensor Networks
(2016) - et al.
Interface circuit for impedance sensors using two specialized single-chip microsystems
Sens. Actuators A
(2010) - et al.
Electronic interfaces
Sens. Actuators B
(2007) - et al.
Accuracy and resolution of direct resistive sensor-to-microcontroller interfaces
Sens. Actuators A
(2005) Direct analog-to-microcontroller interfacing
Sens. Actuators A
(2012)- et al.
Direct interface circuit to linearise resistive sensor bridges
Sens. Actuators A
(2008) - et al.
A simple, efficient interface circuit for piezoresistive pressure sensors
Sens. Actuators A
(2006) - et al.
Direct interface circuit for capacitive humidity sensors
Sens. Actuators A
(2008) - et al.
Modified single point calibration with improved accuracy in direct sensor-to-microcontroller interface
Measurement
(2014) A microcontroller system for measurement of three independent components in impedance sensors using a single square pulse
Sens. Actuators A
(2012)
Uncertainty reduction techniques in microcontroller-based time measurements
Sens. Actuators A
Ultra-Low Energy Wireless Sensor Networks in Practice
PT100 RTD Evaluation Board User’s Guide
Positive Analog Feedback Compensates PT100 Transducer
AN-1559 Practical RTD Interface Solutions
Measuring dynamic signals with direct sensor-to-microcontroller interfaces applied to a magnetoresistive sensor
Sensors
Analysis of power-supply interference effects on direct sensor-to-microcontroller interfaces
IEEE Trans. Instrum. Meas.
The art of directly interfacing sensors to microcontrollers
J. Low Power Electron. Appl.
Analysis of direct sensor-to-embedded systems interfacing: a comparison of targets' performance
Int. J. Intell. Mechatron. Rob.
Cited by (23)
Two proposals to simplify resistive sensor readout based on Resistance-to-Time-to-Digital conversion
2023, Measurement: Journal of the International Measurement ConfederationFault detection method for energy measurement systems equipped with a Rogowski coil using the coil's response to a unit voltage jump and a fully convolutional neural network
2022, Measurement: Journal of the International Measurement ConfederationA measurement method for lossy capacitive relative humidity sensors based on a direct sensor-to-microcontroller interface circuit
2021, Measurement: Journal of the International Measurement ConfederationCitation Excerpt :This follows from the fact that the same pin, Pin 3, is used to generate the stimulation when charging the interface circuit, and to monitor the voltage level on the sensor during its discharge. Furthermore, it should be also emphasised that the hardware configuration of the interface circuit is backwards compatible with methods developed for inductive, resistive, and perfect capacitive sensors [27–30]. Therefore, to adapt the system back to such sensors, it is enough to replace the software with the software developed for earlier methods, which is an advantage from a practical point of view.
A measurement method for capacitive sensors based on a versatile direct sensor-to-microcontroller interface circuit
2020, Measurement: Journal of the International Measurement ConfederationCitation Excerpt :In Fig. 2, an example of a versatile direct sensor-to-microcontroller interface circuit for capacitive sensors based on an 8-bit ATXmega32A4 microcontroller [24] is shown. This microcontroller was chosen because, as mentioned in [23], any application which can run on 8-bit microcontrollers can also run on 32-bit microcontrollers, which makes the proposed solution more versatile. Additionally, this microcontroller has all necessary peripherals to implement the proposed method: a 12-bit DAC, an AC, a 16-bit timer/counter and a 12-bit ADC.
Investigation of errors in microcontroller interface circuit for mutual inductance sensor
2019, Engineering Science and Technology, an International JournalA Simple Method for a Digital Readout of Randles Impedances
2024, IEEE Transactions on Instrumentation and Measurement
Zbigniew Czaja was born in Czluchow, Poland, in 1970. He graduated from Gdansk University of Technology, Faculty of Electronics, Telecommunications and Informatics in 1995. The Ph.D. degree in electronics was received in 2001 from the same university. He worked as assistant professor at this university from 2002 to 2013. In 2014, he qualified as an associate professor, and in 2017, as an professor. His research interests are in technical diagnosis, especially for fault diagnosis of electronic analog circuits, and electronic mixed-signal embedded systems. He is also interested in applications of small 8-bit microcontrollers. He is the author and coauthor of more than 70 scientific papers published in international and national journals and conference proceedings.