Author Topic: ADC user definable + and - Vreffs  (Read 3231 times)

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14995
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
ADC user definable + and - Vreffs
« on: October 13, 2011, 11:55:59 am »
So I have a project where I will need to sense the current in a high side line. Naturally I want the voltage drop to be quite low so I'll be sensing in the low mV range, I could of course set my +Vreff and -Vreff to suitable values so as to avoid other circuitry. but will that work ? how small a range can I give to a pic's ADC ?say i wanted it to be 10 mV, can I ?

As always there is no information at all readily available from micro chip, their datasheet only talks registers and the so called separate pic manual is just the datasheet stripped of the part numbers it is seriously worrying that they even bothered as it takes the piss
 

Online Psi

  • Super Contributor
  • ***
  • Posts: 7602
  • Country: nz
Re: ADC user definable + and - Vreffs
« Reply #1 on: October 13, 2011, 12:10:31 pm »
i think you will run into noise issues with a difference that low, but just how bad i'm not sure.
Only way to find out is to try it first.

I know some avrs have a programmable differential adc gain of up to 200x so it probably is possible with an equivlent pic.

If you cant get it to work there are some quite nice current sense chips designed for monitoring the voltage across a low R resistor and generating an amplified analog output

 
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14995
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: ADC user definable + and - Vreffs
« Reply #2 on: October 13, 2011, 12:13:19 pm »
Yes so far my design has incorporated a current sensing chip, I thought that if I can make the pic do what i what i may be able to do away with it, I mean if you specify the two limits surely the chip know no better. Or does it reference to another voltage as well ?
 

Offline ChrisKiwi

  • Contributor
  • Posts: 41
  • Country: nz
Re: ADC user definable + and - Vreffs
« Reply #3 on: October 13, 2011, 12:33:26 pm »
i think you will run into noise issues with a difference that low, but just how bad i'm not sure.
Only way to find out is to try it first.

I know some avrs have a programmable differential adc gain of up to 200x so it probably is possible with an equivlent pic.
Some of the PIC's do allow that, some also allow you to apply a DC offset to the differential amp as well.  I have a feeling they might be 16 bit parts but I can't remember any part numbers of the top of my head, sorry.  I have gone down to 512mV but not 10mV (on 18F13K50).  I would have thought a differential amp with some gain would have been the best bet (apart form a dedicated IC)
« Last Edit: October 13, 2011, 12:35:27 pm by ChrisKiwi »
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14995
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: ADC user definable + and - Vreffs
« Reply #4 on: October 13, 2011, 12:35:14 pm »
yes looks like I'd best use a dedicated chip
 

Offline baljemmett

  • Supporter
  • ****
  • Posts: 666
  • Country: gb
Re: ADC user definable + and - Vreffs
« Reply #5 on: October 13, 2011, 12:41:32 pm »
For Pic's they usually have the ADC reference requirements in the back under A/D converter specs but most that I've used 16F need at least 2.2V difference between
+ REF and -REF for 10b specification guarantee.

Yep -- to pick an example part (the 16F88, since Simon has been looking at it recently in another thread!), the relevant ADC specs under Electrical Characteristics are:

Code: [Select]
Param   Sym     Characteristic           Min         Typ   Max        Units
A20     VREF    Reference Voltage        2.0          —    VDD + 0.3    V
                (VREF+ – VREF-)         
A21     VREF+   Reference Voltage High   AVdd – 2.5   —    AVdd + 0.3   V
A22     VREF-   Reference Voltage Low    AVss – 0.3   —    VREF+ – 2.0  V
A25     VAIN    Analog Input Voltage     Vss – 0.3    —    VREF + 0.3   V

... so a VREF of 10mV is going to be a fair way out of spec.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 14995
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: ADC user definable + and - Vreffs
« Reply #6 on: October 13, 2011, 01:15:11 pm »
yes I was actually lookig into the 16F88 for this too. so yes it is impossible to do what i planned. you say these specs were under the electrical specs ? I think i looked there but maybe not hard enough  ;)
 

Offline baljemmett

  • Supporter
  • ****
  • Posts: 666
  • Country: gb
Re: ADC user definable + and - Vreffs
« Reply #7 on: October 13, 2011, 02:02:43 pm »
you say these specs were under the electrical specs ? I think i looked there but maybe not hard enough  ;)

Yep, table 18-13 on page 190 of the datasheet (which is 192 in PDF page numbers) -- there's a whole lot of stuff in those tables at the back, so it can take some careful reading to spot what you're after!  :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf