Content originally posted in LPCWare by Harrie on Fri Jul 24 03:52:59 MST 2015 For a project I would like to use the ADC from a LPC11C24FBD48 to measure the voltage of 12V and 24V battieries.
However, I'm struggeling with finding the right resistor values. So far I have come to the following result:
To get an output voltage of 3.3 V with and input of 30 volt, using: R1 = 71.2 kOhm R2 = 8.8 kOhm C = 10 nF
From the datasheet I found that the following: Rvsi voltage source interface resistance = 40 kOhm Ri input resistance = 2.5 MOhm
Can someone please advice me how to take the interface and input resistance into account?
For a schematic overview of the divider please following the link below. Circuit drawing
Content originally posted in LPCWare by IanB on Sun Jul 26 10:36:28 MST 2015 What it actually means is that the output resistance the voltage source driving your A/D input must be <40kΩ.
If you use the values you specify, then the source resistance is R1 in parallel with R2 = 7.8kΩ which is plenty good enough.
The input resistance (2.5MΩ) appears in parallel with your lower divider resistor (8.8kΩ) so it will appear as 8.769kΩ, giving a worst-case error of 0.35%.
Presmuing that you are using 1% tolerance resistors, then the error from the input resistance of the A/D converter will less than the error contribution from the resistor tolerance; and probably a LOT better than the tolerance on your reference voltage, which is your 3.3V supply voltage.
C isn't strictly necessary but will filter out any noise above 2kHz - are you expecting much noise beyond 2kHz? Is the noise on the battery voltage or on your 3.3V supply?
By the way, why don't you just divide by 10 (18kΩ and 2kΩ will do the trick) and then the maths is easier?