Quote of the Day
Vitality shows in not only the ability to persist but the ability to start over.
— F. Scott Fitzgerald. It is very important to know when a task requires a "do over".
Introduction
As you can tell, I enjoy interfacing to sensors. Today, I was reading the usual assortment of engineering trade journals when I came across an interesting part from Lapis Semiconductor that is worth discussing here. It uses simple digital technology to make accurate resistor measurements. If you have a resistive sensor, it may be a good way to go. This approach could be used by other hardware devices as well, but the Lapis part is tailored for this particular technique. My focus in this post is on using a thermistor (Figure 1) for a resistive temperature sensor, but the same approach can be used for all sorts of resistive sensors.
Approach Description
Figure 2 shows a block diagram of how the part connects to a resistive sensor.
Note how the resistive sensor (RS1 in Figure 1) and a conventional resistor (RT1 in Figure 1) are both connected to a capacitor (CS1 in Figure 1). As there are at least four measurement modes supported, I will simplify this discussion by describing only one measurement approach. This approach can be described as follows:
- Set a time interval over which to make the sensor measurement.
- Disable the output for the conventional resistor and charge the capacitor through the sensor. When charged to a given level, cease charging the capacitor and increment a counter.
- Discharge the capacitor very quickly (through IN1 in Figure 1). We will assume the discharge is infinitely fast compared to the charge.
- Repeat this process multiple times until you reach the end of your test time. Call the count value NSensor.
- Repeat the process performed with the resistive sensor on the conventional resistor RT1. Count the number of charge cycles you performed during the test time interval and call the count value NResistor
We can do a little math once we have the two charge counts (NSensor and NResistor). Figure 3 shows how we can compute the resistance of the sensor.
I usually avoid frequency-based approaches that use capacitors because capacitance varies with temperature. In general, this variation is unpredictable and adds error to my temperature measurement. However, taking ratios of the count values eliminates the dependence on the actual capacitance value. As far as the resistance-to-sensor parameter conversion, we can use a lookup table to translate the sensor resistance into what the sensor is reading (e.g. temperature, pressure, stress, etc).
Conclusion
I really like simple ways of reading and processing sensor data. This is a pretty good approach.
I know it's very late to be putting in a comment, the post above is 8 years old !
The maximum practical value for "N" would be what, 100? - which gives ±1% only, for 200 measurements (100 each for reference voltage, test voltage).
A very similar approach, but quicker and more accurate, would be to measure the "time to charge capacitor" - where the timer resolution will be much better than "N" repeats.
Timers are 8-bit or 16-bit, resolutions of 256 and 65536 maximum.
This is just a version of the established "dual slope conversion" technique, where you time the period the capacitor takes to charge to "threshold", when fed from V_ref and when fed from V_measure. Threshold can be poorly defined as long as it is constant over a timescale of a second or so.