+ Post New Thread
Results 1 to 11 of 11

1st May 2019, 20:41 #1
 Join Date
 Sep 2008
 Location
 cambridge
 Posts
 6,861
 Helped
 498 / 498
 Points
 32,986
 Level
 44
input impedance to ADC pin on PIC16F18856
Hello
Concerning an ADC pin on a PIC16F18856, the maximum input impedance is stated as 10k into the ADC PIN.
However, supposing I have 100k into an ADC pin, but with a 470n capacitor on the ADC pin…in that case, would you agree that as long as the rate of ADC sampling of the 470n capacitor voltage is not too high, then the 100k is fine?
PIC16F18856 datasheet
http://ww1.microchip.com/downloads/e.../40001824B.pdf

Advertisement

1st May 2019, 22:10 #2
Awards:
 Join Date
 Jul 2009
 Location
 Aberdyfi, West Wales, UK
 Posts
 13,349
 Helped
 4456 / 4456
 Points
 81,434
 Level
 69
Re: input impedance to ADC pin on PIC16F18856
The impedance isn't caused by the PIC, it is the maximum impedance you can feed it with to achieve full ADC speed. If the input current is limited it slows the charging of the internal sample & hold amplifier which then limits accuracy at high speed. If you have the input shunted with 470nF the impedance will be very low anyway, all you need to worry about is the 100K/470nF time constant.
Brian.PLEASE  no friends requests or private emails, I simply don't have time to reply to them all.
It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.

2nd May 2019, 04:30 #3
 Join Date
 May 2012
 Posts
 504
 Helped
 118 / 118
 Points
 3,760
 Level
 14
Re: input impedance to ADC pin on PIC16F18856
As long as the sampling rate is low enough then what you sugest will be fine. As the sample capacitor is only 5pF 470nF may be more than you need. Don't forget about input leakage though.
1 members found this post helpful.

2nd May 2019, 06:13 #4
 Join Date
 Sep 2008
 Location
 cambridge
 Posts
 6,861
 Helped
 498 / 498
 Points
 32,986
 Level
 44
Re: input impedance to ADC pin on PIC16F18856
Thanks, i see, all's we've got to do is charge up that internal S&H capacitor, and account for the littlle bit of leakage current

2nd May 2019, 08:06 #5
 Join Date
 May 2012
 Posts
 504
 Helped
 118 / 118
 Points
 3,760
 Level
 14
Re: input impedance to ADC pin on PIC16F18856
If the resolution of the AD is 12 bits then the capacitor needs to be at least 4096 X 5pf to get 1 bit resolution which is just over 20nF I would suggest the use of a 47nF capacitor. As for the leakage you may want to add a pot to trim the results or do it in software.
1 members found this post helpful.

Advertisement

2nd May 2019, 23:32 #6
 Join Date
 Jan 2015
 Posts
 1,097
 Helped
 346 / 346
 Points
 7,828
 Level
 21
Re: input impedance to ADC pin on PIC16F18856
While what pjmelect says is true, practically speaking you are doing well to get 8 to 10 bits out of an 12bit ADC with any real value  the least significant bits are typically noise. Of course there are techniques to overcome this (averaging over a number of samples) but that adds time.
So it all comes down to the classic trade off of precision vs time.
Susan
1 members found this post helpful.

3rd May 2019, 11:48 #7
Awards:
 Join Date
 Apr 2014
 Posts
 15,776
 Helped
 3592 / 3592
 Points
 77,851
 Level
 68
Re: input impedance to ADC pin on PIC16F18856
Hi,
If the resolution of the AD is 12 bits then the capacitor needs to be at least 4096 X 5pf to get 1 bit resolution which is just over 20nF I would suggest the use of a 47nF capacitor. As for the leakage you may want to add a pot to trim the results or do it in software.
Resolution is not influenced by input impedance, the capacitor will influence accuracy and precision.
And about leakage current:
With an ADC you have two types of input current:
* one is the low static input current (usually no big problem)
* the other is the sample frequency dependent current (to charge the S/H capacitor)
This is the more problematic current. It makes the reading dependent of sampling rate...especially with high source resistance and it does not care what size of capacitor you use. The capacitor just changes the time constant tau.
Example: 5pF S/H capacitor. Discharged to 0V during conversion. It takes about 8 tau to get less than 1LSB error. This means 400ns @ 10kOhms
As long as the sampling time is longer than 400ns the error will be less than 1LSB.
Now add an external capacitor. Let's say 470nF.
Now let's assume the voltage is 3V. With every sample the 5pF capacitor needs to be charged from 0V to 3V.
This causes an average current of 150nA @ 10ksmpl/s.
This means a voltage drop of 1.5mV @10kOhms. (Or 15mV at 100kOhms)
And this error can't be compensated by a capacitor.
KlausPlease don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.
1 members found this post helpful.

4th May 2019, 06:09 #8
 Join Date
 May 2012
 Posts
 504
 Helped
 118 / 118
 Points
 3,760
 Level
 14
Re: input impedance to ADC pin on PIC16F18856
Example: 5pF S/H capacitor. Discharged to 0V during conversion. It takes about 8 tau to get less than 1LSB error. This means 400ns @ 10kOhms
As long as the sampling time is longer than 400ns the error will be less than 1LSB.
Now add an external capacitor. Let's say 470nF.
Now let's assume the voltage is 3V. With every sample the 5pF capacitor needs to be charged from 0V to 3V.
This causes an average current of 150nA @ 10ksmpl/s.
This means a voltage drop of 1.5mV @10kOhms. (Or 15mV at 100kOhms)
And this error can't be compensated by a capacitor.
1 members found this post helpful.

4th May 2019, 06:26 #9
 Join Date
 Sep 2008
 Location
 cambridge
 Posts
 6,861
 Helped
 498 / 498
 Points
 32,986
 Level
 44
Re: input impedance to ADC pin on PIC16F18856
Thanks, i see what you both mean.
so some time is required between samples to recover.
Thankl for straightening this out for me.

Advertisement

4th May 2019, 07:16 #10
Awards:
 Join Date
 Apr 2014
 Posts
 15,776
 Helped
 3592 / 3592
 Points
 77,851
 Level
 68
Re: input impedance to ADC pin on PIC16F18856
Hi,
I disagree,
All what you write agrees with what I have written.
KlausPlease don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.
1 members found this post helpful.

4th May 2019, 07:25 #11
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 45,447
 Helped
 13829 / 13829
 Points
 260,253
 Level
 100
Re: input impedance to ADC pin on PIC16F18856
I think the disagreement is in the prerequisites. The buffer capacitor method can work, but only for low sample rates. Assumed 10 kS/s is obviously too high.
+ Post New Thread
Please login