Author Topic: Adc Vref and Gain consideration(AD7715)  (Read 1719 times)

0 Members and 1 Guest are viewing this topic.

Offline tlhsglmTopic starter

  • Contributor
  • Posts: 41
  • Country: 00
Adc Vref and Gain consideration(AD7715)
« on: December 02, 2019, 08:18:40 pm »
Hi fellows,

I will make a current measurement, application needs a fast sampling rate and high resolution.Thus i bought an AD7715 ANZ5, i will supply this with +5v and 0v (single supply rail), datasheet is here;
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7715.pdf

I'm confused about Vref and Gain. My voltage range is 0V to 1V.Some sources tells Vref's purpose is to let ADC know what voltage ranges will come to ADC and ADC makes 16 bit devision based on that.

1- Is this true;  if tie +Vref to 2.5 volt's(that maximum voltage for my package) and -Vref to ground.Adc will make calculations like this:+2,5volts/65536(16bit).And my max voltage is 1 Volt so i have to put an opamp with gain of 2,5.

2- Is this true; But can i tie +Vref to 1 volts? So there is no neccessary to use an opamp?

 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: Adc Vref and Gain consideration(AD7715)
« Reply #1 on: December 02, 2019, 09:19:32 pm »
I won't comment on the choice of this ADC, not really my turf, but the following comes from reading the DS.

It is possible to use as low as 1V for the reference, but the DS clearly states that noise performance will be affected (page 21, Reference Input)
Still you could set an internal gain of 2, so that the actual range in unipolar mide would be 2.5/2=1.25.

Using an external calibration, it woul be even possible to get the full codes fo the 0-1V range, as the supported span is 0.8*Vref/Gain, but I imagine this might be a little too complicated... probably a Vref of 2(.048)V might be a reasonable compromise, still setting a gain of 2.

You don't specify if the input voltage is referenced to GND, note that for buffered mode the AIN- input cannot be 0V.
Since you mention current sensing, I expect the source impedance to be quite low, so you should be fine with keeping the buffer disabled.
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Offline tlhsglmTopic starter

  • Contributor
  • Posts: 41
  • Country: 00
Re: Adc Vref and Gain consideration(AD7715)
« Reply #2 on: December 03, 2019, 10:27:16 pm »
I won't comment on the choice of this ADC, not really my turf, but the following comes from reading the DS.

It is possible to use as low as 1V for the reference, but the DS clearly states that noise performance will be affected (page 21, Reference Input)
Still you could set an internal gain of 2, so that the actual range in unipolar mide would be 2.5/2=1.25.

Using an external calibration, it woul be even possible to get the full codes fo the 0-1V range, as the supported span is 0.8*Vref/Gain, but I imagine this might be a little too complicated... probably a Vref of 2(.048)V might be a reasonable compromise, still setting a gain of 2.

You don't specify if the input voltage is referenced to GND, note that for buffered mode the AIN- input cannot be 0V.
Since you mention current sensing, I expect the source impedance to be quite low, so you should be fine with keeping the buffer disabled.

Thank you for detailed answer.I'm confused somewhere again, in page 20 and Bipolar/Unipolar Inputs section, datasheet says;

Quote
As a result, the voltage to which the unipolar and
bipolar signals on the AIN(+) input are referenced is the voltage
on the respective AIN(−) input. For example, if AIN(−) is
2.5 V
and the AD7715 is configured for unipolar operation with
a gain of 2 and a VREF of 2.5 V, the input voltage range on the
AIN(+) input is 2.5 V to 3.75 V.

I didn't understand this part, Is based on the ground 2.5volts?In my circuit when PWM is maximum AIN+ and AIN- voltage difference is 1 volts.But AIN is 10 volts when looking based on circuit's ground.Do you think is this a problem?My circuit is;

« Last Edit: December 03, 2019, 10:34:40 pm by tlhsglm »
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4790
  • Country: pm
  • It's important to try new things..
Re: Adc Vref and Gain consideration(AD7715)
« Reply #3 on: December 03, 2019, 10:39:19 pm »
AIN+ and AIN- are referenced to the AD's analog ground AGND (0V).
Thus with Vref=2.5V and Gain=2 the max difference (AIN+) - (AN-) will be 2.5V/2 = 1.25V.
And because you set AIN- to +2.5V (against agnd) the ADC range will be from 2.5V till 2.5+1.25=3.75V for unipolar operation.

Mind you can't go with AIN+ and/or AIN- beyond AGND and AVDD. Both inputs must be inside AGND..AVDD, where AVDD is 3..5V.

PS: for bipolar operation, Vref=2.5V, Gain=1 and AIN- set to +2.5V the ADC range will be from +1.25V till 3.75V (ADC will return negative values for voltages < +2.5V because the AIN- is set to +2.5V ).
« Last Edit: December 03, 2019, 11:05:02 pm by imo »
 
The following users thanked this post: tlhsglm

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: Adc Vref and Gain consideration(AD7715)
« Reply #4 on: December 04, 2019, 08:07:26 am »
What imo said.

Some more explanation about unipolar/bipolar vs differential/single ended: this ADC has got differential inputs, so it will measure the difference in voltage between its AIN+ and AIN- terminal.

This difference can either be measured in unipolar mode:
  the code points will span from 0 to maximum (0xFFFF) for positive values of the difference from 0V to Vref/gain V,
or in bipolar mode:
  the total span is the same, but the range is centered on AIN- allowing for positive and negative differences.

The circuit as is will not work, look at page 9 of the DS "Absolute Maximum Rating":
Quote
Analog Input Voltage to AGND            −0.3 V to AVDD+ 0.3V
You are largely exceeding this, so no reliable data will be produced (if the chip does not immediately fry...).

So, you need to either move the shunt on the low side, or provide an input stage to offset the range into something usable by the ADC (it might also be a current sense amplifier, such as INA139 or similar).
Nandemo wa shiranai wa yo, shitteru koto dake.
 
The following users thanked this post: tlhsglm

Offline tlhsglmTopic starter

  • Contributor
  • Posts: 41
  • Country: 00
Re: Adc Vref and Gain consideration(AD7715)
« Reply #5 on: December 04, 2019, 02:24:12 pm »
What imo said.

Some more explanation about unipolar/bipolar vs differential/single ended: this ADC has got differential inputs, so it will measure the difference in voltage between its AIN+ and AIN- terminal.

This difference can either be measured in unipolar mode:
  the code points will span from 0 to maximum (0xFFFF) for positive values of the difference from 0V to Vref/gain V,
or in bipolar mode:
  the total span is the same, but the range is centered on AIN- allowing for positive and negative differences.

The circuit as is will not work, look at page 9 of the DS "Absolute Maximum Rating":
Quote
Analog Input Voltage to AGND            −0.3 V to AVDD+ 0.3V
You are largely exceeding this, so no reliable data will be produced (if the chip does not immediately fry...).

So, you need to either move the shunt on the low side, or provide an input stage to offset the range into something usable by the ADC (it might also be a current sense amplifier, such as INA139 or similar).

I have an Ad623 which is a current sense amplifier, if i simply use this with, AIN+(in my circuit below) goes opamp's AIN+, AIN-(in my circuit below) goes opamp's AIN-, and opamp's output will connect to ADC's AIN+ and ADC's AIN- will be connected to ground is it?Opamp's and ADC's Vref voltages will be at same voltage?

By the way i really appriciated your help thank you very much
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: Adc Vref and Gain consideration(AD7715)
« Reply #6 on: December 05, 2019, 08:19:15 am »
I have an Ad623 which is a current sense amplifier
It is, as AD puts it and can be seen from the block diagram, an "Instrumentation Amplifier".
Unfortunately, its common mode range does not include the positive rail so it's not suitable to directly connect to the high side shunt, see the DS "Input voltage Range", bottom of page 3.

You could bring down the voltage with a resistive divider, but that will affect noise, offset, increase the needed gain, and, more important, won't solve your problems as the minimum output voltage is 0.2V (for a 10kohm load).
To address this last point, you have the possibility to offset the output to a fixed voltage via AD623 REF pin, and use the same reference for the AIN- of the ADC...but it really seem an unneeded complication.

I had suggested a current sense amplifier as their common mode voltage largely exceeds the supply voltage, but you should find one with the needed bandwidth, transconductance and input range.

But, once again I'll ask: could you move the shunt on the low side and have all of these complications disappear?
Since you are after a 1V range, the measured current will be 2A maximum, it's probably even possible to use a lower valued shunt and higher gain directly in the ADC...


Nandemo wa shiranai wa yo, shitteru koto dake.
 
The following users thanked this post: tlhsglm

Offline tlhsglmTopic starter

  • Contributor
  • Posts: 41
  • Country: 00
Re: Adc Vref and Gain consideration(AD7715)
« Reply #7 on: December 05, 2019, 09:26:44 am »
I have an Ad623 which is a current sense amplifier
It is, as AD puts it and can be seen from the block diagram, an "Instrumentation Amplifier".
Unfortunately, its common mode range does not include the positive rail so it's not suitable to directly connect to the high side shunt, see the DS "Input voltage Range", bottom of page 3.

You could bring down the voltage with a resistive divider, but that will affect noise, offset, increase the needed gain, and, more important, won't solve your problems as the minimum output voltage is 0.2V (for a 10kohm load).
To address this last point, you have the possibility to offset the output to a fixed voltage via AD623 REF pin, and use the same reference for the AIN- of the ADC...but it really seem an unneeded complication.

I had suggested a current sense amplifier as their common mode voltage largely exceeds the supply voltage, but you should find one with the needed bandwidth, transconductance and input range.

But, once again I'll ask: could you move the shunt on the low side and have all of these complications disappear?
Since you are after a 1V range, the measured current will be 2A maximum, it's probably even possible to use a lower valued shunt and higher gain directly in the ADC...

I've missed your question, sorry.Yes in this complications i will have to move it, and i will do it right now.I will put the shunt resistor between mosfet and electromagnet.I didn't do it previously because internet pages tells it is not recommended because of ground fluctations but if i not put shunt resistor below of mosfet it will not be problem i guess.
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: Adc Vref and Gain consideration(AD7715)
« Reply #8 on: December 05, 2019, 09:49:22 am »
I will put the shunt resistor between mosfet and electromagnet.
Still not so good: when the mosfet is switched off, the ADC inputs will be subjected to the full 12V, exceeding maximum input voltage.
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Offline tlhsglmTopic starter

  • Contributor
  • Posts: 41
  • Country: 00
Re: Adc Vref and Gain consideration(AD7715)
« Reply #9 on: December 05, 2019, 10:45:03 am »
I will put the shunt resistor between mosfet and electromagnet.
Still not so good: when the mosfet is switched off, the ADC inputs will be subjected to the full 12V, exceeding maximum input voltage.
Can i put a resistor(4k-5k) inputs of opamp in this case?
If you not recommend then i will put shunt resistor in between mosfet and ground?
 

Offline tlhsglmTopic starter

  • Contributor
  • Posts: 41
  • Country: 00
Re: Adc Vref and Gain consideration(AD7715)
« Reply #10 on: December 05, 2019, 11:16:02 pm »
I have put shunt resistor between mosfet and ground and tracked the signal with pwm increasing one by one from minimum to maximum value and start from minimum again.With this i adjusted gain to move 0volt to 2.5 volts.I will make adc's sofware tomorrow.I will not use PGA of ADC.So i will use unbuffered mode?The circuit is like this;
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf