## Help - ADC1115 with external op-amp Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Help - ADC1115 with external op-amp

Hi,

I’m a civil engineering student and I’m currently developing my master’s thesis, for which I need to gather data through some piezoelectric sensors and load cell sensor.

I have a load cell sensor (5mVout,max) with 50Kg capacity, although I’m only using 20Kg; I used the op-amp INA125 to amplify its signal, and with an analogReference of 1,1 (Arduino Uno) I ended up getting a resolution of approximately 16g/step.

Recently I purchased an ADC1115 (ADAFRUIT Board) with the purpose of getting until 1g of resolution, and here’s where the problems begin.

Initially, I connected directly the load cell to the ADC1115, with “voltage input range = 0,256V” (PGA gain = 16), and a resolution of 0,008mV/step, but since the load cell has 5mVout,max I could only read 184steps, out of the 65536 possible.

So I realized I needed to amplify the signal before sending it to the ADC1115. Here’s my line of thinking: since the “maximum analog input voltage of ADC1115 is 0,3V” I calculated the necessary gain so that the INA125 reached 0.3V.

• ADC1115: max analog in = 0,3V (used 0,2V)
• Load Cell: mVout, max = 5mV
• Gain = 0,2/0,005 = 40
• Rg = 60000 / (Gain - 4) = 1,7 kOhm

And therefore, with this resistor I could amplify the signal until 0.2V (theoretically and according to my thinking, which I don’t know if is correct).

• ADC1115: max analog in = 0,2V
• ADC1115 resolution: 0,008mV (voltage input range = 0,246V)

0,2V / 0,000008V = 25 000 steps

25 000 steps ---- 20 000gr
1 step ---- X X = 0,8 gr (as I intended)

The truth is that after all these calculations and after putting the system all together, the results are not what I expected, the number of counts starts on 8700, and pressing the maximum force on the load cell it only goes to 8728, so something’s not right… where could I have done something wrong?

Doubts:
- When I connected directly the load cell to the ADC1115, the connection was the “differential” type. On the other hand, when I used the INA125, since it only has one Vout, the connection to the ADC1115 was the “single-ended” type. Is it possible to connect the INA125 to the ADC1115 in the “differential” type?

I got the arduino code for ADC1115 in this post in arduino forum :
http://forum.arduino.cc/index.php/topic ... #msg508428

By the way, the examples in Adafruit_ADS1X15 library are by default "ADC Range: +/- 6.144V (1 bit = 3mV)", to change this settings, must I rewrite the Adafruit_ADS1015.cpp and the Adafruit_ADS1015.h ?

I really appreciate your attention.

Thanks,
Carlos Esteves
Last edited by amagro on Fri Aug 09, 2013 5:24 am, edited 2 times in total.
amagro

Posts: 24
Joined: Tue Aug 06, 2013 10:50 am

Re: Help - ADC1115 with external op-amp

when I used the INA125, since it only has one Vout, the connection to the ADC1115 was the “single-ended” type. Is it possible to connect the INA125 to the ADC1115 in the “differential” type?

You can connect a single ended output to a differential input. Just connect the ground of the output to A0 and the output signal to A1.

the examples in Adafruit_ADS1X15 library are by default "ADC Range: +/- 6.144V (1 bit = 3mV)", to change this settings, must I rewrite the Adafruit_ADS1015.cpp and the Adafruit_ADS1015.h ?

That is correct.

adafruit_support_bill

Posts: 79956
Joined: Sat Feb 07, 2009 10:11 am

Re: Help - ADC1115 with external op-amp

Hi Bill,

Thank you for responding so quickly.

Could I ask your personal opinion on the amplification issue (ie, the need to previously amplify the signal before connecting to ADS1115)?
That is my really big problem...

You can connect a single ended output to a differential input. Just connect the ground of the output to A0 and the output signal to A1.

And will I still get the 16bit resolution?

Thanks again,
Carlos Esteves
amagro

Posts: 24
Joined: Tue Aug 06, 2013 10:50 am

Re: Help - ADC1115 with external op-amp

Load cells typically require a lot of gain. The Burr Brown INA125 is a good op-amp for the purpose. Most people interface this directly to the Aruduino analog input. But the ADC1115 should give you much better resolution. Here are a couple example load-cell/op-amp circuits:

http://edg.uchicago.edu/tutorials/load_cell/
http://arduinotronics.blogspot.com/2013 ... cells.html

adafruit_support_bill

Posts: 79956
Joined: Sat Feb 07, 2009 10:11 am

Re: Help - ADC1115 with external op-amp

Hi,

The problem is: my load cell has a maximum out voltage of 5mV. With the highest ADC1115 gain (16) I have a resolution of 0,008mV/step, i.e, in 184 steps I'll reach the 5mV, so I need to amplify those 5mV to get more resolution with ADC1115.

The truth is that I thought I was thinking correctly, but apparently something's wrong...

Thanks for the links.

Here's one very well documented that I followed for my project:
http://www.hw2sw.com/2011/10/20/weight- ... d-arduino/

Thanks,
Carlos Esteves
amagro

Posts: 24
Joined: Tue Aug 06, 2013 10:50 am

Re: Help - ADC1115 with external op-amp

Have you verified the output of your INA125 circuit?

adafruit_support_bill

Posts: 79956
Joined: Sat Feb 07, 2009 10:11 am

Re: Help - ADC1115 with external op-amp

Hi Bill,

I’ve been experimenting different amplifications on INA125 and I got better results, for example, with RG = 520 Ohm I already got a range from 8732 to 32767 (24035 steps).

You can connect a single ended output to a differential input. Just connect the ground of the output to A0 and the output signal to A1.

I have 3 ground connections from the INA125, should I connect them to the A0?
If I connect them this way, will I get 16bit?

Thanks
amagro

Posts: 24
Joined: Tue Aug 06, 2013 10:50 am

Re: Help - ADC1115 with external op-amp

Connect the VrefCOM pin from the INA219 to the A0 input of the ADC1115. Then connect Vo to A1. Then, if you call readADC_Differential_0_1(), you will get 16 bit resolution.

adafruit_support_bill

Posts: 79956
Joined: Sat Feb 07, 2009 10:11 am

Re: Help - ADC1115 with external op-amp

Hi,

Connect the VrefCOM pin from the INA219 to the A0 input of the ADC1115. Then connect Vo to A1. Then, if you call readADC_Differential_0_1(), you will get 16 bit resolution.

With the connections you indicated I only got 15 bits (negative) from - 8843 to - 32768.

I altered the Adafruit_ADS1015.ccp file to a voltage range input of 0,256V (0_256V).

I have a doubt about the multiplier 3 that appears in the arduino examples:

Serial.println("ADC Range: +/- 6.144V (1 bit = 3mV)");
Serial.print(results * 3);

Wouldn’t it be:

(6,144 * 2 ) / 65536 = 0,1875 mV/bit (instead of 3mV!)
(0,256 * 2) / 65536 = 0,0078 mV/bit

Thanks
amagro

Posts: 24
Joined: Tue Aug 06, 2013 10:50 am

Re: Help - ADC1115 with external op-amp

Looks like the INA219 only outputs positive voltage. Since the measurement range of the A/D is +/- .256v, you will still only get an effective 15 bits.

Wouldn’t it be:

(6,144 * 2 ) / 65536 = 0,1875 mV/bit (instead of 3mV!)
(0,256 * 2) / 65536 = 0,0078 mV/bit

That is correct. The 3mV from the example is for the 12-bit ADS1015. This is noted in the tutorial: http://learn.adafruit.com/adafruit-4-ch ... rogramming

adafruit_support_bill

Posts: 79956
Joined: Sat Feb 07, 2009 10:11 am

Re: Help - ADC1115 with external op-amp

can anyone help me.i am confused how to connect INA125 to ADS115 with arduino uno.
please help me as soon as possible.
i would really appreciate anyone's help in this matter. i have connected the circuit but its not reading properly.
harsheel

Posts: 10
Joined: Mon Mar 03, 2014 3:46 pm

Re: Help - ADC1115 with external op-amp

First, please don't post the same question in multiple places.

Second, you'll have much better luck getting answers if you post a new topic in the forum instead of adding a reply to an existing thread that's been dormant for weeks.

Start a new topic in the Arduino forum (posting.php?mode=post&f=25) with a photo of your hardware and your code and we'll see if we can help you.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.

adafruit_support_mike

Posts: 61700
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.