PDA

View Full Version : Discussion Microchip A2D Source Impedance


rocky79
Jul 24, 2007, 06:00 PM
I was looking at the Pic12f683 and it is recomended that the source impedance must be less than 10kohm.
If i had higher source impedance, how would that affect my measurements and the A2D operation?
My guess is that it will take longer to charge the RC network inside but don't know more than that.

Thanks

xorcise
Jul 24, 2007, 06:14 PM
Higher source impedance requires longer acquisition time to fully charge the internal cap. 10K would be considered an absolute maximum and the recommendation is less than 2K. The datasheet provides a formula for calculation of the minimum acq period based on source impedance, temp, etc. Generally you would buffer the input with an op-amp and get your source impedance super low.

rocky79
Jul 24, 2007, 07:31 PM
Higher source impedance requires longer acquisition time to fully charge the internal cap. 10K would be considered an absolute maximum and the recommendation is less than 2K. The datasheet provides a formula for calculation of the minimum acq period based on source impedance, temp, etc. Generally you would buffer the input with an op-amp and get your source impedance super low.

Looking at the A/D section of the datasheet. I see 2 important timing parameters:
TACQ: or the A/D aquisition time. Time to wait to charge the A/D internal cap before a conversion can be started. According to the microchip datasheet that is dependante on the source impedance. For a 10kohm source impedance @5v TACQ is 4.67us

TAD: The time to complete one bit conversion is defined as
TAD. One full 10-bit conversion requires 11 TAD periods. In my case The TAD is =2us therefore 11 TAD is 22us.

Therfore having bigger input impedance than 10kohm means that i would have to wait longer before the conversion can be started. I don't see a problem in that? maybe i still don't fully understand this.


Thanks

xorcise
Jul 24, 2007, 09:37 PM
I looked at the specs for the 12F683 and it has better acquisition response to what I'm acquainted with from past data in this respect. Here is the Mid-Range Family datasheet for the ADC's:
http://ww1.microchip.com/downloads/en/DeviceDoc/31023a.pdf

The ADC reading requires an acquisition period and then a conversion period. The acquisition period is a delay that the user must apply by his own calculation, as you've noted. The conversion of the charge voltage to a 10-bit number is a little more involved, since you can adjust the ADC clock according to minimums based on your oscillator (Fosc). This gives you the Tad value for each conversion cycle (11 of them). A too fast Tad will produce errors in the reading. There is a chart which will help determine how to minimize Tad timings based on your oscillator frequency and still give you an accurate reading.

Hope that helps.

rocky79
Jul 24, 2007, 10:57 PM
I looked at the specs for the 12F683 and it has better acquisition response to what I'm acquainted with from past data in this respect. Here is the Mid-Range Family datasheet for the ADC's:
http://ww1.microchip.com/downloads/en/DeviceDoc/31023a.pdf

The ADC reading requires an acquisition period and then a conversion period. The acquisition period is a delay that the user must apply by his own calculation, as you've noted. The conversion of the charge voltage to a 10-bit number is a little more involved, since you can adjust the ADC clock according to minimums based on your oscillator (Fosc). This gives you the Tad value for each conversion cycle (11 of them). A too fast Tad will produce errors in the reading. There is a chart which will help determine how to minimize Tad timings based on your oscillator frequency and still give you an accurate reading.

Hope that helps.

But my question is related to source impedance and how does it affect the A2D conversion. I still don't see the negative effect of higher source impedance. Thanks

JimDrew
Jul 25, 2007, 12:07 AM
According to Microchip documentation, the source impedance should not exceed 10K due to the RC circuit used for the ADC hold circuitry. It has to do with the minimum current requirement for the hold to operate.

AndyKunz
Jul 25, 2007, 06:36 AM
Rocky,

You need to get the impedance low, but don't have it so low that you create a ring when the holding cap gets charged. I like to put a resistor between the opamp output and the ADC pin - it allows me to control the impedance rather than simply relying on the source signal itself. Amps are cheap insurance.

Remember that the circuit internally in the PIC is an RC circuit also. If you have too much impedance, you WILL get bad results. If you have too short a sample time, you WILL get bad results. If you have too low impedance, you will have poor results.

I have done quite a bit of testing with the PIC ADC modules as I have used them for some very precise measurements for products, measurements that truly stress the ADC's specs. If you are only interested in 8-bit results, you can get away with poor signal conditioning design. If you want 9+ bit results, you need to use quality components and follow the data sheets.

Also, make sure you follow the data sheet for the particular chip you are using, as Microchip is continually improving product specs and two seemingly close products may in fact be very different in specmanship.

Andy

rocky79
Jul 25, 2007, 11:14 AM
Rocky,

You need to get the impedance low, but don't have it so low that you create a ring when the holding cap gets charged. I like to put a resistor between the opamp output and the ADC pin - it allows me to control the impedance rather than simply relying on the source signal itself. Amps are cheap insurance.

Remember that the circuit internally in the PIC is an RC circuit also. If you have too much impedance, you WILL get bad results. If you have too short a sample time, you WILL get bad results. If you have too low impedance, you will have poor results.

I have done quite a bit of testing with the PIC ADC modules as I have used them for some very precise measurements for products, measurements that truly stress the ADC's specs. If you are only interested in 8-bit results, you can get away with poor signal conditioning design. If you want 9+ bit results, you need to use quality components and follow the data sheets.

Also, make sure you follow the data sheet for the particular chip you are using, as Microchip is continually improving product specs and two seemingly close products may in fact be very different in specmanship.

Andy

Thanks Andy, it would be interesting to know how the A2D results get affected based on the TAD and TACK if you exceed the maximum source impedance reequirements.
It seems that the source impedance only affects the TACK " the aquisition time which is the time that you have to wait before you perform a conversion" but then that shouldn't affect the results.
It seems that high source impedance will affect the input current requirement like what JiMDREW was saying. I still need to double check it..

Thanks

AndyKunz
Jul 25, 2007, 12:16 PM
Acquisition time is the one that gets longer as impedance goes up, yes. Microchip has a very detailed explanation going into all the gory details in a PDF somewhere. You'll find that helpful, as well as a model of their ADC (and general ADC knowledge). Maybe your local FAE can help some.

If you have time, a table derived from a reference board with various input resistors (and different Microchip parts) would be of great value to folks who like to work at the hairy edge. Since I work in industry, I work to a more conservative "must always work no matter what" tune rather than "I can save 2 cents here but I compromise my product."

The thing I found most often was crosstalk between channels. If you have too-short an acquisition time, you get the same symptom, but when the impedance is out of spec you can let it acquire for a real long time and it STILL doesn't get much better.

There's nothing wrong with using a higher impedance input so long as you realize that your results will not be as accurate as the chip is capable of doing.

Engineering is all about making compromises that fly in harmony. If you don't ned the accuracy and want to cut costs, don't put the amp on the board.

(Try 100K instead of 10K and see how it looks.)

Andy

rocky79
Jul 26, 2007, 01:21 AM
Thanks Andy, i think it's clear now.