PDA

View Full Version : ADC, pref and dynamic range



HankMcSpank
- 20th June 2011, 21:20
Still relatively new to ADC'ing, so just want to float a couple of concepts to mkae sure I have them squared away.

Consider a analogue signal 1.024V max peak to peak - with an ADC +ref of VCC @5v....you're not gonna get much range, so what are the options....

1 amplify the actual signal before it gets to the ADC PIN. (uses more components)

2 use a PIC on a lower VCC (say an LF variant at 1.8V - which may necessitate an extra regulator)

3. use a pic that allows you to set the ADC +ve ref.

It's this last option that I hold an interest - a 16lf1824 has an internal 1.024V fixed voltage reference....so using that for the adc pref for the earlier example, would yield the maximum ADC dynamic range.

But what if the signal is only 500mV? Is is a deemed reasonable solution to keep going down if reference level ...ie put a fixed vref of 0.5v on the PIC's ext vref pin (vs simpy amplifying the signal)....how low can we practically take the ADC 'pref' to getter better dynamic range? (& what are the gotchas!)

cheers,
Hank

cncmachineguy
- 21st June 2011, 00:38
Oh Hank, always interesting stuff from your head. From the top of my head I would imagine the datasheet prolly has max/min for the Vref. If not, sounds like trial and error.

HenrikOlsson
- 21st June 2011, 06:06
Yep, the datasheet is indeed your best resource here. Looking at the 12LF1824 datasheet (http://ww1.microchip.com/downloads/en/DeviceDoc/41419A.pdf), page 373 you'll find that the minimum VRef voltage (where VRef is specified as VRef+ minus VRef-) is 1.8V so you can't use the fixed voltage reference when its set to 1.024V, you need to switch it to atleast 2.048V (see note 5), which with your 0.5V signal only gives you ~25% of the available range - bummer.

So the gotcha in this case is the fact the VRef can't be lower than 1.8V.

/Henrik.

HenrikOlsson
- 21st June 2011, 06:24
Bloody h..l, why can't I edit my own posts here, it's not even been 20 minutes since I posted. It's starting to getting on my nerves.

On topic: I just realised I linked to the 16LF1824 datasheet and not the 12LF1824, so make sure you verify the numbers with the correct datasheet.

EDIT: So, editing is alowed, for 10 seconds or whatever... And I just realised that you ARE using the 16LF1824 but I mistakingly wrote 12LF and then got confused when the link opened the 16LF part datasheet.

It's early in the morning, I need my coffee. Sorry about this!

HankMcSpank
- 21st June 2011, 08:02
Hi Bert/Henrik (Henrik no worries...I have mornings like that)

As they say....RTFDS!

I have to say I'm puzzled here.. a day or two ago, while dabbling, I'm pretty sure I set the ADC pref to internal FVREF...and then set the FVREF to 1.024V - it worked?! (so I guess the answer is the lowest I can take VREF is 1.024V....but I'm not meant to! Therefore to get a better 'official range' would be option 2 above....use a lower VCC.....1.8V)

Many thanks