I am trying to derive an equation to calculate voltage at ADC pin for below circuit:

enter image description here

Initially, I have considered only ADC leakage current in my equation to calculate the voltage. During testing at high temperature, it was observed that for an input voltage of 48V, the SW measured voltage is around 49.3V because of diode reverse leakage current. As per datasheet it can go up to 2 µA at 125 C°.

Following equation I have used to calculate voltage at ADC pin.

Without diode:

$$V_{ADC} = V_{in} \cdot \frac{R2}{R1+R2} - I_{leak_{ADC}} \cdot (R3 + \frac{R1 \cdot R2}{R1+R2})$$

With Diode:

$$V_{ADC} = V_{in} \cdot \frac{R2}{R1+R2} - (I_{leak_{ADC}}-I_{reverse_{Diode}})\cdot (R3 + \frac{R1 \cdot R2}{R1+R2})$$

\$I_{leak_{adc}}\$ = ADC Input leakage current from datasheet

I am not sure my above formula is correct. Can anyone suggest a better way to derive a formula for the above circuit?


2 Answers 2


I think you are going to get a little disappointed with the BAS16 especially as the leakage value will slightly change with the measured voltage at the junction of R1 and R2 and temperature. I'd be more inclined to choose something like the BAS716. It has a typical leakage current of below 2 nA at 125 degC and a guaranteed max value of 50 nA at 125 degC: -

enter image description here

I am not sure my above formula is correct

So, given the variabilities of the bAS16 (and also 1N4148 spin offs) I would say that your formula isn't accurate enough to be able to predict leakage across input voltage changes and temperature changes hence, the better choice (IMHO) is the BAS716 (or similar).

Yes, the forward volt drop of the BAS716 is higher but you can reposition its anode to the left of R3 and rely on R3 for limiting the current into your ADC pin. Then it comes down to what current is acceptable into the ADC pin under worst case considerations. My guess is that 1 mA is allowable and therefore you'd be fine.

  • \$\begingroup\$ Thank you for your suggestion. Currently, In our project we cannot change the diode, so I am just doing impact analysis of this diode in our measurement. So I am trying to find worst case voltage with diode. \$\endgroup\$ Mar 2, 2020 at 9:40
  • \$\begingroup\$ Either do as @Andy says and put the diode to the left of R3 or replace R3 with a zero-ohm resistor. What are you trying to protect against? \$\endgroup\$ Jul 25, 2021 at 0:53

D1 is most likely unnecessary. The GPIO input protection diodes will do that job.

The ADC leakage is a nonlinear function of both input voltage and die temperature. If you really can't have a buffer in front of the ADC, then you could calibrate each device in an environmental chamber, so it'd measure the ADC input offset as a function of temperature and use that to compensate the variable leakage.

As for why a buffer is not a bad idea:

  • Given the input resistor values, noise is not a concern: plenty of modern RRIO op-amps have the input noise lower than that of a 15kΩ resistor.

  • Given the likely volume of the product, cost is not a concern either. There's an awful lot of op-amp buffers you can probably buy just for the value of the time spent investigating the question, writing out the equations, etc. If the product is not made in 5k-10k quantities and if your time isn't free, then the buffer saves you money (really!).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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