PIC16F1947...Input impedance of ADC is 82k instead of the required 10k - Page 1
Forum section: electronics / general

author: ocset
author_rank: Super Contributor
timestamp: May 20, 2018, 07:42:25 pm
content: Hello,Page 398 of PIC16F1947 datasheet says that the ADC needs an input impedance of 10k. We have 82k and we need 82k there. We dont have room for a buffer opamp. We take ADC readings every 500usecs. Does this mean our ADC readings will be different to what they would be if we had 10k of input impedance.?(also, we can’t put 10nF on the ADC pin as the signal would be affected too much. We only have 100pF on the 82k resistor to gnd at the ADC input, which incidentally is the resistor at the output of a current source output light sensor )PIC16F1947 datasheethttp://ww1.microchip.com/downloads/en/DeviceDoc/40001414E.pdf

author: radiogeek381
author_rank: Regular Contributor
timestamp: May 21, 2018, 01:42:41 am
content: Quote from: treez on May 20, 2018, 07:42:25 pmWhat it means is that you are ignoring the clear statement in the datasheet. They've described the performance under the conditions noted and make no claims beyond that. You (and your eventual customer) bear the risk.If this is for a hobby, knock yourself out. But if this is for something important to life or property, you really should find a responsible professional to advise you.(fellow readers: if I've fallen for a troll, forgive my credulity...)

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 21, 2018, 02:05:37 am
content: Typically, ADC inputs are capacitive with a small parallel resistance component (Rp ~ some megs) and a modest series resistance component (Rs ~10k).To get rated analog bandwidth, you must have Zsrc << Rs, so that the capacitance charges at a speed limited by Rs.To get rated gain, you also must have Zsrc < Rp / 2^ENOB, so that the voltage divider thus formed does not affect the measurement.For Zsrc larger than these margins, gain and bandwidth will suffer. Gain can be calibrated out, and if you aren't using full bandwidth, then you'll still get the right result (given the gain error) but slower (over more than just one sample).There may be nonlinear effects as well, like diode leakage to the pin, analog switch resistance dependence on bias, etc., which are similarly quashed when a low Zsrc is used.Tim

author: free_electron
author_rank: Super Contributor
timestamp: May 21, 2018, 02:42:09 am
content: some ADC exhibit a dynamic impedance behavior. : when they are sampling they are drainign an amount of current to charge the sampling capacitor. during sampling the adc behaves like a 10k resistor to ground.read the datasheets attentively.

author: ocset
author_rank: Super Contributor
timestamp: May 21, 2018, 05:23:10 am
content: Thanks, the output of the sfh5711 light sensor IC is going up and down as our led lamps turn on and off with the mains half cycle.So i wonder if the sfh5711, with 82k at its output, (thats 82k to goround) can charge the s&h capacitor quick enough for 500us sampling rate?We need the sfh5711 output to be changing fast with the actual led light, since we do ambient light sensing at the mains zero crossing, where our leds are temporarily off and wont spoil the ambient light reading.

author: dmills
author_rank: Super Contributor
timestamp: May 21, 2018, 10:31:44 am
content: Buffer it, it is the only way to be reasonably sure without doing a LOT of qualification (Which would still leave you at the mercy of Microchip doing a process change), nothing worse then having a batch of a thousand boards not work because some vendor has changed fabs and while some part still meets datasheet, it no longer plays outside spec in the same way.You can get an opamp in a SC70-5, so space really should not be an issue, and once you have it buffered then a series resistor and cap will deal with the sampling charge injection requirements.Regards, Dan.

author: CJay
author_rank: Super Contributor
timestamp: May 21, 2018, 11:16:28 am
content: Treez, how many of your company's products have we debugged and redesigned now?I think we could probably invoice for the consultancy fees if you raised a PO

author: StillTrying
author_rank: Super Contributor
timestamp: May 21, 2018, 12:23:25 pm
content: If you could use a lower Vref for the ADC, (1.024V ?) you could use a lower value for the 82k, of course the ADC results would be more noisy.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 21, 2018, 03:03:34 pm
content: It's amazing how your company, as I gathered, essentially deals with power electronics and how you always manage not to have any space left for any additional component in most of your designs.Maybe you should consider provisioning for extra space right from the start of your projects so you don't get screwed up if anything needs to be added during the development phase. Just a thought.Anyway, all depends on the accuracy that is needed for your measurements - you will most likely get some kind of attenuation. Whether it's a fixed attenuation in all conditions or not depends on your sensor's output impedance and probably the ADC settings. So maybe you can compensate on a software level, or maybe you can't.As dmills said, the simpler approach would be to add a small opamp and move on. An SC70 package is approx. 2mmx2mm including pins.Or you could select a PIC MCU which has an integrated opamp. Some do, but maybe not in the same product line.

author: ocset
author_rank: Super Contributor
timestamp: May 21, 2018, 06:46:42 pm
content: ThanksThe attached shows our situation by way of an ltspice sim.The biggest threat seems to be adc pin leakage current...and the datasheet makes no mention of what this might be...just 2uA of leakage current could seriously mess our readings up, as the sim attached shows

author: free_electron
author_rank: Super Contributor
timestamp: May 22, 2018, 02:58:39 pm
content: Won't work. That sensor has a current mode output. Any current you deviate will yield a reading error.Send the current into a resistor , then buffer voltage across resistor.Or switch to a sensor that has a voltage mode outputthere's one that has i2c ... problem solved ...

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 22, 2018, 03:08:46 pm
content: Right! I looked at the sensor's datasheet. It's a current output. You can use a load resistor and buffer it with an opamp voltage follower for instance, or use an opamp as a transimpedance amplifier:https://en.wikipedia.org/wiki/Transimpedance_amplifierAnd use a zero-drift opamp preferably, with a very small input offset current, such as this:http://www.analog.com/en/products/amplifiers/operational-amplifiers/low-input-bias-current-op-amps/ada4051-1.html#product-overview

author: StillTrying
author_rank: Super Contributor
timestamp: May 22, 2018, 04:16:10 pm
content: "Right! I looked at the sensor's datasheet."Have you seen the PIC16F1947's datasheet, presumably it's doing something else as well as switching a light on when it gets dark!