# PIC ADC input impedence/ sample time/ec.

Discussion in 'Embedded Systems and Microcontrollers' started by Stuntman, Feb 15, 2012.

1. ### Stuntman Thread Starter Active Member

Mar 28, 2011
189
50
So I have a new project I'm working on. Nothing fancy, but requires I measure a 0-12V signal on the ADC, as well as a few 0-5V signals. The kicker is, I want to be a little more thorough about my protection of these pins, as the possibility exists of them getting transient voltages up to 30V, along with the pins being inherently "exposed" to things like finger touches (read: ESD).

In reading the datasheet, it seems the source impedance is suggested to be < 10k.

My first thought was just a voltage divider (24K, 12K) which would give a 0-15V measurement range, and an output impedance of 8K, just letting the protection diodes do the rest if it sees any transients.

For the 5V channel, I was just going to use a 8.2K resistor in series with the input.

Am I going to run into capacitance issues/sample time problems? I am running the ADC clock at 1MHZ (fosc: 16MHz; ADC clock set: fosc /16). Assuming 120pF and 0 input impedence, I come up with an RC of 960ns. Which seems very appropriate, but I realize I am not accounting for leakage, input impedence, etc.

Any rules of thumb or good reference material for these calculations?

Last edited: Feb 15, 2012
2. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,437
1,626
I don't see anything wrong here, 8K for ESD is reasonable and not much else you could do anyway.
You don't state which PIC, the A2D started as at a 10K input Z, but later units run lower, some as low as 2K, so check your 8K plays. It should be a max, lower is OK.
120pF and 8K has an RC break frequency of .16/(RC) = 167KHz. How fast is th input changing?

3. ### Stuntman Thread Starter Active Member

Mar 28, 2011
189
50
Ernie,
Thanks for the input. I'm running a PIC16F1934. I looked up the suggested source impedance from the datasheet to confirm it is the 10K limit.

Timing is not going to be an issue for the ADC channels. All the time sensitive signals will be ported to the T0CKl. I'm assuming the input impedance on this will be much higher, so hope to use something in the 50K range as I will be feeding it 12V signals with definite nasty transients in the 30-40V range.

4. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,437
1,626
Sounds good. As long as all the inputs with transients have ESD protection diodes (do check, not all do anymore) it should work. Even 40V thru that 50K on a digital input should be safe.