I have a CNY70 sensor connected this way: The CNY1 port goes to the ADC's input

I read the output (the CNY1 port) with a PIC18F2550's ADC and in the datasheet, it tells me

The maximum recommended impedance for analog sources is 2.5 kΩ.

I want to know my circuit's output impedance because using common sense I can assume it's 10kΩ (because of R2). It actually works and also using an Arduino but I don't know if the ADC is being damaged or something.


If the Vcc at the right side of R2 is in the allowed ADC input voltage range, there's no damage expected. The 2,5kOhm limit is for accuracy. the ADC takes a little input current and that can cause errorneous ADC result when compared to unloaded voltage. You said "it works" and I believe it - obviously you can take into the account somehow the possible conversion error or the exact value isn't interesting, you measure only if the voltage is over or under a certain treshold.

ADD due the comments:

It's difficult to decide how much more ADC input catches random noise due the bigger source impedance. Only careful tests can reveal how much there's random variation at the LSB end of the result.

See the datasheet. FIGURE 21-3: ANALOG INPUT MODEL makes possible to calculate the error limits due the leakage current (quite small) and you can decide how long it takes to charge the sample&hold capacitor to the needed accuracy.

There's suggested adding a capacitor. It reduces the noise but filters also the signal. Simulate it's effect.

  • \$\begingroup\$ Thanks for your answer. I have another question: is the possible conversion error linear or something like that? Because if the error can be measured/graphed I could change my program to adapt for more accuracy (this is for a line follower racing robot). \$\endgroup\$ – Iaka Noe Jul 18 '18 at 0:17
  • \$\begingroup\$ You can also add a capacitor to lower impedance at 100kHz without compromising slew rate of signal but reduce sampling load error during few us acquisition time. Because load cap is only 2pF it won’t take much. \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Jul 18 '18 at 0:48
  • \$\begingroup\$ @IakaNoe there's more in the answer. \$\endgroup\$ – user287001 Jul 18 '18 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.