5V reference for ADC - Page 1
Forum section: electronics / beginners

author: stefanhartman
author_rank: Newbie
timestamp: February 20, 2017, 10:40:25 pm
content: Hi,I am using a RPi to read a 0-10V pressure transducer.I am using an MCP3201, powered using the RPi's 5V.The Vref for it is obtained from a REF102 10V reference, with Vout connected to a 20kOhm + 20kOhm divider.The transducer output goes to a similar divider which is then buffered by a unity gain op-amp.At 0 Pa, I expect the MCP3201 to output a value representing mid range (12 bits so 4095/2). Instead I get around 2240. I probed, and sure enough the sensor outputs 5V and the op-amp output is 2.5V as desired.The problem lies with the Vref. When I measure I get around 4.4V, not 5V as expected.The data sheet for the REF102 says it can output to 10mA with deviation in the mV range, so surely a 40kOhm potential divider is OK? What else could be the problem?I am supplying the REF102 with external 24V, the 0V is shared with that of RPi.Thanks,Stefan

author: 2N3055
author_rank: Super Contributor
timestamp: February 20, 2017, 10:47:44 pm
content: You must drive REF input with buffer or low impedance. Ref input on that ADC draws 100uA, on 20K resistor that is 2V drop... Huge error.Your best thing would be three terminal reference that outputs 5V directly....

author: suicidaleggroll
author_rank: Super Contributor
timestamp: February 20, 2017, 10:49:18 pm
content: Yes you need a real 5V reference, you can't divide down a 10V reference due to the input current requirements for the ADC. You could buffer it with an opamp after the voltage divider, but between the tolerance on the voltage divider resistors and the offset voltage on the amp, you're far better off just using a 5V reference from the get-go.

author: stefanhartman
author_rank: Newbie
timestamp: February 21, 2017, 12:13:54 am
content: Quote from: 2N3055 on February 20, 2017, 10:47:44 pmThanks. I now see the 100uA drain mentioned on the datasheet. If I understand correctly though, wouldn't it cause 1V drop, not 2V? (see attachment)Also, how can they claim a 100uA, rather than it being dependent on Vref, in other words an equivalent resistor to ground? Or is it, since the datasheet specifies 100uA at 5V, which would be equivalent to 50kOhm to ground.That's inconsistent with what I see because 50kOhm would leave me with 4.16V not 4.4V.How is 100uA only typical (up to 150uA) instead of fixed? What is the equivalent circuit that results in this drain?

author: 2N3055
author_rank: Super Contributor
timestamp: February 21, 2017, 06:39:59 am
content: I didn't even bother to calculate real drop in parallel with divider.. Just a ballpark figure is enough to see it's orders of magnitude worse than it should be..Also, input is not resistive load.. There is semiconductor circuit behind that pin, pretty much all of ADC is connected to it.. It will be dependent on power supply to the ADC, sampling rate, temperature... It won't be DC either, but probably some pulsating mess.... So good decoupling is to good ground is necessary...

author: Monkeh
author_rank: Super Contributor
timestamp: February 21, 2017, 06:48:56 am
content: The value in the datasheet is a typical figure for you to work with to determine what your reference needs to be able to supply, not a precise figure for every possible combination of Vdd, Vref, conversion frequency, etc. It is, as you've found, quite conservative.

author: suicidaleggroll
author_rank: Super Contributor
timestamp: February 21, 2017, 02:23:59 pm
content: That high Vref current draw is only active during a conversion. Between conversions it drops by a couple orders of magnitude (that value is also in the datasheet). It's not a constant draw, and it's not a resistive draw, it will pulse with your conversion speed. Your DMM will smooth that out and give you more of the average drop, which will be somewhat less than the max.

author: tszaboo
author_rank: Super Contributor
timestamp: February 21, 2017, 02:33:48 pm
content: Yes. A SAR ADC is basically a switched capacitor on it's inputs or the REF, which is preatty much also an input, should be treated like that. So for accurate measurements, buffer the input, buffer the voltage reference with an opamp, with reasonably high GBW, otherwise the opamp is not even going to be able to supply the current fast enough to the switched capacitor. On the Vref maybe a high value ceramic cap might be OK (some 10-50uF), but 20KOhm driving is not.Note that some SAR ADCs might have buffers in them, or voltage references output buffers, which are adequate. You want a circuit something like figure 6-3 in the datasheet.Ah and the REF102 is probably overkill for this ADC.

author: kosine
author_rank: Regular Contributor
timestamp: February 21, 2017, 02:52:33 pm
content: I frequently use a 3-pin LP2950 5V regulator. They're rated at 100mA and accurate to +/- 25mV, though usually they're somewhat better than that, +/- 5mV is not uncommon in my experience with them.They're not quite as good as a REF02 (+/- 10mV max), but pretty close considering the current capability. You can run a whole circuit off them! (And I think there are 150mA versions of the 2950 as well.) The REF02 also needs at least 8V supply, whereas the 2950 is low dropout, and should run on a 5.6V supply even at full 100mA current.You could also go with a LM4040 precision zener. They hit +/- 0.1% and come in a range of voltages, though only up to 15mA. The 4.096V version is quite useful for ADC since it gives exactly 4mV per division, so no rounding errors in your code.I'd also suggest using precision resistors if you need to divide anything down. 0.1% are not too expensive (about 10-20p in the UK), but as with all precision components, make sure you source them from a reputable supplier. The cheap stuff on ebay is a crap-shoot and usually a waste of money.