I am trying to derive an equation to calculate voltage at ADC pin for below circuit:
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?