Time-domain measurement methods for R, L and C sensors based on a versatile direct sensor-to-microcontroller interface circuit

https://doi.org/10.1016/j.sna.2018.03.029Get rights and content

Highlights

  • New time-domain measurement methods for impedance sensors are proposed.

  • A simple versatile direct sensor-to-microcontroller interface circuit is used.

  • The methods are designed to resistive, inductive and capacitive sensors.

  • The methods are for microcontrollers with internal ADCs and ACs.

  • Very good experimental results for inductive and capacitive sensors were obtained.

Abstract

In the paper new time-domain measurement methods for determining values of resistive (R), inductive (L) and capacitive (C) sensors based on a versatile direct sensor-to-microcontroller interface for microcontrollers with internal analog-to-digital converters (ADCs) and analog comparators (ACs) are presented. The interface circuit consists of a reference resistor Rr working as a voltage divider, a given R, L or C sensor and a microcontroller (its peripherals: an ADC, an AC, a timer, I/O pins buffered by an inverter). A prototype of the proposed complete solution of a compact smart sensor based on an 8-bit microcontroller has been developed and tested. The maximum possible relative inaccuracy of an indirectly measurable resistance, inductance and capacitance were analysed. Also, experimental researches were made. The following relative errors of the sensor value determination were achieved: for the R sensor less than 3%, as well as very good results for the L sensor (less than 0.3%) and for the C sensor (less than 0.2%).

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]:Δff=1fi=1IfxiΔxi,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)

  • F. Reverter et al.

    Uncertainty reduction techniques in microcontroller-based time measurements

    Sens. Actuators A

    (2006)
  • M. Kuorilehto et al.

    Ultra-Low Energy Wireless Sensor Networks in Practice

    (2007)
  • Microchip Technology

    PT100 RTD Evaluation Board User’s Guide

    (2007)
  • Maxim Integrated Products Inc

    Positive Analog Feedback Compensates PT100 Transducer

    (2005)
  • Texas Instruments

    AN-1559 Practical RTD Interface Solutions

    (2013)
  • E. Sifuentes et al.

    Measuring dynamic signals with direct sensor-to-microcontroller interfaces applied to a magnetoresistive sensor

    Sensors

    (2017)
  • F. Reverter et al.

    Analysis of power-supply interference effects on direct sensor-to-microcontroller interfaces

    IEEE Trans. Instrum. Meas.

    (2007)
  • F. Reverter

    The art of directly interfacing sensors to microcontrollers

    J. Low Power Electron. Appl.

    (2012)
  • L. Bengtsson

    Analysis of direct sensor-to-embedded systems interfacing: a comparison of targets' performance

    Int. J. Intell. Mechatron. Rob.

    (2012)
  • 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 Confederation
    • A measurement method for lossy capacitive relative humidity sensors based on a direct sensor-to-microcontroller interface circuit

      2021, Measurement: Journal of the International Measurement Confederation
      Citation 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 Confederation
      Citation 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 Journal
    • A Simple Method for a Digital Readout of Randles Impedances

      2024, IEEE Transactions on Instrumentation and Measurement
    View all citing articles on Scopus

    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.

    View full text