 # 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.

• 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 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:
http://forum.arduino.cc/index.php/topic#msg508428

Thanks,
Carlos Esteves

When you connect something to ads1115 unipolar (-Vin to gnd, +Vin to INA output) you get 15bit resolution (0..32768) only. It has no sense to connect INA differentially to the ads1115, I think (except you cope with noise).

Most probably you need to compensate the INA125 offset (or, the initial offset of your load cell)- that makes the initial 8700 reading probably (=1.69mV at the load cell in your setup). Mind the messing with uVolts resolutions needs very careful construction.

0.256V/32768*8700/40 = 1.69mV

Are you running the INA125 from a single supply, or from positive and negative supplies? If you are running it from a single supply, then your problem is that the output of the INA125 can’t go right down to ground. A count of 8700 indicates that the INA125 output is (8700/65536) * 4.096V/16 = 34mV. There are a couple of solutions:

1. Feed the V- pin of the IN125 from a negative supply. If you have a spare Arduino PWM pin then you can easily generate a -3V supply for this purpose using a resistor, 2 diodes and 2 capacitors.

2. Connect both IAref pin of the IN125 and the -ve differential input of the ADC1115 to a voltage source of between 0.3V and about 2V. One possibility is to connect a small signal diode (e.g. 1N4148) between these pins and ground (cathode to ground), and a 1K resistor to +5V. Also connect a 0.1uF or greater capacitor in parallel with the diode. You will get around 0.65V drop across the diode. The INA125 datasheet says that the source resistance of the supply to IAref should be very low to avoid reducing the common mode rejection ratio, however because we are referencing both the INA125 output and the ADC1115 input to this voltage, the source resistance doesn’t matter in this case, provided that the voltage is stable during the ADC sampling time (hence the capacitor).

Hi

I’m sorry for the late answer.

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).

dc42

I’m running INA125 with only a positive supply. Although I’m getting better results, should I still consider one of the solutions you gave?

Thanks

amagro: I’m running INA125 with only a positive supply. Although I’m getting better results, should I still consider one of the solutions you gave?

Yes. If you don't, then you'll probably find the following:

1. The output you get at no load (around 8732) will vary somewhat, e.g. as the temperature changes;

2. At low loads the output will stay stuck around 8732, and it won't increase significantly until you have exceeded some minimum load.

Hi,

1. The output you get at no load (around 8732) will vary somewhat, e.g. as the temperature changes;

Absolutely true…

1. At low loads the output will stay stuck around 8732, and it won’t increase significantly until you have exceeded some minimum load.

… true again.

It’s odd that in all the websites where I found information regarding the construction of the load cell with INA125, no one ever found a solution for the problems you mentioned. Actually that issue is approached as a load cell non-linearity problem, i.e., until a certain cargo the load cell presents wrong values, and only after exceeding that initial cargo it starts to behavior in a linear way. In my case, first I had to exceed 3Kg in order to obtain the correct values.

For what I understood, your 2 suggestions allow me to correct this problem.

I would like to use this suggestion:

1. Connect both IAref pin of the IN125 and the -ve differential input of the ADC1115 to a voltage source of between 0.3V and about 2V. One possibility is to connect a small signal diode (e.g. 1N4148) between these pins and ground (cathode to ground), and a 1K resistor to +5V. Also connect a 0.1uF or greater capacitor in parallel with the diode. You will get around 0.65V drop across the diode.

At the moment, I only have 1N4007 and 1N5817, could I use one of these to replace 1N4148?

I believe these are the main characteristics:

1N4007 1N5817 1N4148
Vrrm (V): 1000 20 100
Io (mA): 1000 25000 200

As you can see the difference towards 1N4148 is significant, and since I don’t know how you calculated the final 0,65V, I ask if eventually using another capacitor or using a larger resistor would make it possible to use of the diodes I have…

Another doubt is if the Maximum Analog Voltage In of ADC1115 = 0,3V, then 0,65V exceeds this value – what should I do?

In attachment, I send an image of my scheme, and I would appreciate if you could tell me if the connection you suggested between the diode, capacitor and resistor is correct.

Thank you very much!
Carlos Esteves

Mind the voltage drop temperature coeficient of a Si diode is aprox 2mV/degC.

A 1n4007 will do. I don’t have access to the adc datasheet right now, but as long as it can handle 0.65v common mode voltage, this solution should be ok. It is the differential voltage that you need to limit to 0.3v to get sensible readings. The temperature coefficient of the diode voltage drop doesn’t matter because the voltage is used as both the IA reference and the ADC input reference.

Hi dc42,

This is what appears in the ADC1115 datasheet:

ABSOLUTE MAXIMUM RATINGS