ADC bug

I am using the cc2431 and I’m having an interesting problem with the ADC. Basically I have a thermistor, which is a resistor that responds to temperature changes. The sensor has two leads. So basically the resistance is proportional to a temperature, and at room temperature it is about 10 kOhm. Very straight forward stuff. So to measure this, I take another resistor, which is also 10 kOhm and put it in series to create a voltage divider. I sample in between both “resistors”. Now my problem is that there seems to be some offset. I also added passive filters (capacitors, each .1 uF) to try to smooth it out a bit. The problem is that if I use my multimeter to measure the voltage WITHOUT the ADC analog port plugged in I get a value, the correct value that follows ohms law. If I connect the port and I measure the voltage, it jumps up about .2 volts… I tried putting the analog port to ground and it reads zero which is correct. Thats when I put in the filters, because I thought it might be noise. So for some reason attaching the ADC makes the measured voltage incorrect. Also when I spit the number out through serial there is an additional offset.

So basically I have something like this…

VDD

|

10k Ohm

|---------------Analog In of ADC

thermistor

|

GND

For my filters I did the following:

I have a .1 uF cap going from VDD to GND and I have a 100 ohm resistor going from between the 10 k ohm and the thermistor going to the analog in with a .1uF cap going from the analog in to ground. So basically two low pass filters… I’m trying permutations of this and it’s not really helping.

I measured the voltages using a multimeter an as soon as the analog in connects to the circuit, I get that offset…

Thanks

Oh and I’m a bit skeptical about the fact that it could be noise because the offset is constant, so it must be me…

One thing I have noticed is that some ADC circuits do not have a very high impedance. Looking at the data sheet for a similar part, the impedance is about 197k, but seems to be affected by the settings of the decimation circuitry. 20k of resistance is about 10% of the input impedance which could be causing your accuracy problems. A meter is typically in the megaohms range for impedance. You may have to put an opamp buffer in there to increase the impedance of your circuit.

Good call, I was thinking that could be an issue but wasn’t sure. Since I’m dealing only in real values (resistance), would it be a bad idea to increase the resistance looking into the circuit by putting a resistor in series to block any current trying to get in, and then compensate in software? Because If i use an opamp and build a buffer, then I have to use output pins to control and power the opamp. My device is battery powered so I don’t wanna burn any extra power. I have no idea how much power op amps burn.

Hi,

I agree that the output impedance of your divider causes the problems.

The divider has an output impedance equal to the 10k parallel to the thermistor (=about 5 kOhm at room temp).

While sampling, the ADC draws awkward input currents (pulses), that cause a voltage error related to (input current * 5 kOhm).

The input current cannot be changed since it has to do with the internals of the ADC. So the trick is to lower the impedance seen by the ADC. It should see in the order of 10 Ohms, not 5 kOhms. Also, a capacitor must be added between input and GND (you already did this).

You can reach the lower impedance by buffering the divider output voltage with an opamp.

Connect the voltage divider node to the non-inverting (+) input.

Connect the opamp output both to its inverting (-) input and a 10 ohm resistor. Connect the other side of the 10 ohm resistor to the ADC input AND via a 100 nF capacitor to GND.

The opamp should not be an ultra-lowpower type because its output impedance must be low at higher frequencies. So use an opamp with about 5 MHz gain-bandwidth and you should be safe.

A good, in-depth explanation of all this can be found in:

http://www.analog.com/library/analogdia … _final.pdf .

About the power dissipation:

You now burn about 0.17mA continuously in the divider. The opamp will add about 0.5 mA if you take a modern device. If this is too much, the smartest thing to do is to supply the opamp AND the voltage divider from an uC output . If you turn the output on for 10 ms every second, this means 100x reduction of average current, so about (0.17 + 0.5mA)/100 = 6.7uA. In this scenario the capacitors must be as small as possible (10 nF or so) so their charging does not contribute too much to the power consumption.

That is more than 20x less average current than the current solution.

I hope this helps!

Best regards,

Marco