Conditioning lines for ADC reference voltage?
rwgast_logicdesign
Posts: 1,464
Ok originally I had planned to set my vRef pins using a DAC and opamp buffer if needed, but I ran out of PCB space, so I decided to just use my 5v line for the vRef. I currently have an AVR with ADC, and an MCP3208 connected to a propeller. I have already wired everything up except the MCP3208's vRef Line. The AVR will be using it's AVCC line as the voltage reference.
Earlier I hooked a scope up to the AVRs Agrnd and AVCC pins, then set it at 100ms and 100mv AC to check out the ripple. As expected I get about 4.65mv of ripple voltage, which I am ok with. Here is how I have set it up, The 5v and G for analog are isolate throughout the whole circuit, they only meet with the digital lines at the board input. Next I have a 22uf tant, 10uf ceramic, 2.2uf aluminium, .1uf ceramic .22uf ceramic, and .01uf ceramic, as decoupling caps on the line (these gave me the best results on the scope). I also have a 10uh inductor and .1uf cap, filtering the AVRs AVCC/AREF line, as specified in the data sheet. The reason I started adding all these caps was I made the AVR flash an LED, and depending on how much current the LED drew every flash would cause my analog reference to swing from 4.6mv ripple up to a 15mv ripple. I have gotten that down to a max of about 7mv when the LED flashes. Next I need to run the 5v line down to the mcp3208's vRef pin, what I was wondering is if there is any need to add the .1uf cap and 10uh inductor on it's vRef line, to create the same filter, the data sheet says nothing about this but kind of assumes you are using a precision voltage reference and buffer?
Lastly, what's done is done is done, i'm not going to go ripping things up but I am wondering if there is a way to totally eliminate ripple of the reference lines, obviously supplying vRef with a precision reference, a dac, or just a separate analog voltage rail would do this, but i'm more wondering how one could share the standard VCC for the board with the analog references as I have and get better results.
Earlier I hooked a scope up to the AVRs Agrnd and AVCC pins, then set it at 100ms and 100mv AC to check out the ripple. As expected I get about 4.65mv of ripple voltage, which I am ok with. Here is how I have set it up, The 5v and G for analog are isolate throughout the whole circuit, they only meet with the digital lines at the board input. Next I have a 22uf tant, 10uf ceramic, 2.2uf aluminium, .1uf ceramic .22uf ceramic, and .01uf ceramic, as decoupling caps on the line (these gave me the best results on the scope). I also have a 10uh inductor and .1uf cap, filtering the AVRs AVCC/AREF line, as specified in the data sheet. The reason I started adding all these caps was I made the AVR flash an LED, and depending on how much current the LED drew every flash would cause my analog reference to swing from 4.6mv ripple up to a 15mv ripple. I have gotten that down to a max of about 7mv when the LED flashes. Next I need to run the 5v line down to the mcp3208's vRef pin, what I was wondering is if there is any need to add the .1uf cap and 10uh inductor on it's vRef line, to create the same filter, the data sheet says nothing about this but kind of assumes you are using a precision voltage reference and buffer?
Lastly, what's done is done is done, i'm not going to go ripping things up but I am wondering if there is a way to totally eliminate ripple of the reference lines, obviously supplying vRef with a precision reference, a dac, or just a separate analog voltage rail would do this, but i'm more wondering how one could share the standard VCC for the board with the analog references as I have and get better results.
Comments
I'm not sure what you mean by being 6 units off but if you used 5.0V as the Vref in your calculations and the actual Vref was 4.9V your calculated voltage would be high by about 2%. With a 4.9V Vref the voltage per bit would be 4.9 / 4096 = 1.196289 mV per bit.
If your input voltage was 4.0V, the Vref was 4.9V and your calculations assumed a 5.0V Vref the adc output would be 4.0 / .001196289 = 3344. The calculated output voltage would be 3344 x .0012207 = 4.082 V
No, those 6 LSB units belong to the original 12bit number, not your BCD readout.
You first need to scale your 12b to that BCD space
eg - you might have 15V Full scale for, a meter of 9.340v, 15V is 15/2^12 => 3.66 mV per LSB
If you get 6 LSB variance in your ref, you have 22mV change in your 9.34V
Only if your 9.34V meter has a full scale of 40.96V, will the Binary LSB variance map 1:1 to a BCD meter 10mV digit variance.