Author Topic: PIC16F1947...Input impedance of ADC is 82k instead of the required 10k  (Read 2059 times)

0 Members and 1 Guest are viewing this topic.

Offline ocsetTopic starter

  • Super Contributor
  • ***
  • Posts: 1516
  • Country: 00
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 [SFH5711])

PIC16F1947 datasheet
http://ww1.microchip.com/downloads/en/DeviceDoc/40001414E.pdf
 

Offline radiogeek381

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
    • SoDaRadio
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 [SFH5711])


What 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.  :horse:

(fellow readers: if I've fallen for a troll, forgive my credulity...)

 
The following users thanked this post: ocset

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: ocset

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
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.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 
The following users thanked this post: ocset

Offline ocsetTopic starter

  • Super Contributor
  • ***
  • Posts: 1516
  • Country: 00
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.
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
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.

« Last Edit: May 21, 2018, 10:57:19 am by dmills »
 
The following users thanked this post: ocset

Offline CJay

  • Super Contributor
  • ***
  • Posts: 4136
  • Country: gb
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
 
The following users thanked this post: MarkF, ocset

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
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.
.  That took much longer than I thought it would.
 
The following users thanked this post: ocset

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14472
  • Country: fr
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.  :popcorn:

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.
 
The following users thanked this post: ocset

Offline ocsetTopic starter

  • Super Contributor
  • ***
  • Posts: 1516
  • Country: 00
Thanks
The 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
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
 :-/O
.  That took much longer than I thought it would.
 
The following users thanked this post: ocset

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
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 output
there's one that has i2c ... problem solved ...
« Last Edit: May 22, 2018, 03:01:14 pm by free_electron »
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 
The following users thanked this post: ocset

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14472
  • Country: fr
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_amplifier

And 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
 
The following users thanked this post: ocset

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
"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!
.  That took much longer than I thought it would.
 
The following users thanked this post: ocset


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf