Load Cell INA125P

Hi,

I am trying to interface Load cell with arduino UNO(328P) and using INA125P as instrumentation amplifier i have 5 wire load cell
RED = E+
Black = E-
Green = S+
WHITE = S-
Shield wire

i am using this as a reference for connection and code.

the values i am getting as a result vary too much that there is too much difference in values with NO LOAD applied. i havn't use the shield wire do i have to use it?

Attached is the screenshot of my output on Serial Monitor and my connection scheme.

Code:
// Arduino as load cell amplifier
// by Christian Liljedahl
// christian.liljedahl.dk

// Load cells are linear. So once you have established two data pairs, you can interpolate the rest.

// Step 1: Upload this sketch to your arduino board

// You need two loads of well know weight. In this example A = 10 kg. B = 30 kg
// Put on load A
// read the analog value showing (this is analogvalA)
// put on load B
// read the analog value B

// Enter you own analog values here
float loadA = 10; // kg
int analogvalA = 200; // analog reading taken with load A on the load cell

float loadB = 30; // kg
int analogvalB = 600; // analog reading taken with load B on the load cell

// Upload the sketch again, and confirm, that the kilo-reading from the serial output now is correct, using your known loads

float analogValueAverage = 0;

// How often do we do readings?
long time = 0; //
int timeBetweenReadings = 2000; // We want a reading every 200 ms;

void setup() {
Serial.begin(9600);
}

void loop() {
int analogValue = analogRead(0);

// running average - We smooth the readings a little bit
analogValueAverage = 0.99analogValueAverage + 0.01analogValue;

// Is it time to print?
if(millis() > time + timeBetweenReadings){
float load = analogToLoad(analogValueAverage);

Serial.print("analogValue: ");Serial.println(analogValueAverage);
Serial.print(" load: ");Serial.println(load,5);
time = millis();
}
}

float analogToLoad(float analogval){

// using a custom map-function, because the standard arduino map function only uses int
float load = mapfloat(analogval, analogvalA, analogvalB, loadA, loadB);
return load;
}

float mapfloat(float x, float in_min, float in_max, float out_min, float out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}

//Reference www.instructables.com/id/Arduino-Load-Cell-Scale/step3/The-Code/

LC2.JPG

Hi,
to answer your sole questions: Yes, it's always good advice to use the shield.
But: I don't think it will help to read more reproducible values.

I have the same wiring as you but I use another resistor. I do not know, what load cell you are using. The INA125 is a very sensitive guy and I used a 190 Ohm resistor for Rg. That gave me a 300 fold amplification.

What I did in the code is reading 10 values in a row, calculate a mean value and then use that one.

My load cell is pretty accurate.
Regards

Hi AgeBee
Attached datasheet of the load cell i am using.
so far i havn't use resistors in between Rg (i just short circuited them :confused: ).
any suggestions on what value of resistor should be used? (and 1watt or 0.5watt resistors..?)

and can you please share your code. it will be very help full for me?
Thanks alot looking forward to hear

Regards
Hussain

L6G (1).pdf (126 KB)

hi hussain
the data sheet you have given is 6 wire while you have asked for 4 wire.
another thing i wanted to ask was are u from PAK? and where do you happen to buy this IC because i am willing to make the same system, and i cant find this IC
and I guess you should put very small delays and take mean of 5 or above readings.

hussain_sheikh:
Hi AgeBee
Attached datasheet of the load cell i am using.
so far i havn't use resistors in between Rg (i just short circuited them :confused: ).
any suggestions on what value of resistor should be used? (and 1watt or 0.5watt resistors..?)

and can you please share your code. it will be very help full for me?
Thanks alot looking forward to hear

Regards
Hussain

Look at the data sheet of the INA125. Especially on page 10 at Fig. 1 where you see the gain table. 0.5 Watt is perfect for this resistor.
You said you short-circuited PIN 8 and PIN 9 (= gain). With this will get a very high gain which makes your output very noisy. Try it with 50 ... 600 Ohms.

Thanks AgeBee
Now i have used 220ohm resistor (0.5 watt) between pin 8 and 9.
cant see any difference in analog readings when load is applied...??

yes Safyan me from Pak.
it is 4 wire Blue and yellow (alternatives) not there making it 4 wire as given in my first post.
yes ordered it through some guy took almost 20 days. i think you can use INA126p too comes with same functions.

Hussain

hussain_sheikh:
Thanks AgeBee
Now i have used 220ohm resistor (0.5 watt) between pin 8 and 9.
cant see any difference in analog readings when load is applied...??

yes Safyan me from Pak.
it is 4 wire Blue and yellow (alternatives) not there making it 4 wire as given in my first post.
yes ordered it through some guy took almost 20 days. i think you can use INA126p too comes with same functions.

Hussain

Did you check the voltage on PIN 10 of the INA125 without connection to Arduino ? Is there also the fluctuation in voltage ? If yes then I suspect either a wiring problem, defect in the amplifier or load cell.
Can you check if the resistances (of the Wheatstone bridge within the load cell) are as listed in the spec ?

hussain_sheikh:
Thanks AgeBee
Now i have used 220ohm resistor (0.5 watt) between pin 8 and 9.
cant see any difference in analog readings when load is applied...??

yes Safyan me from Pak.
it is 4 wire Blue and yellow (alternatives) not there making it 4 wire as given in my first post.
yes ordered it through some guy took almost 20 days. i think you can use INA126p too comes with same functions.

Hussain

check the powering of the INA125 ! +5 Volts exactly ?

you think same thing can be done with UA741?

safyan:
you think same thing can be done with UA741?

UA741 is an operational amplifier and INA125 is an instrumentation amplifier.
The term instrumentation amplifier (INA) often is misused, referring to the application rather than the architecture of the device. Historically, any amplifier that was considered precision (i.e., implementing some sort of input offset correction) was considered an INA, since it was designed for use in measurement systems. INAs are related to operational amplifiers (op amps), since they are based on the same basic building blocks. But an INA is a specialized device, designed for a specific function, as opposed to a fundamental building block. In this regard, INAs aren’t op amps, since they are designed to function differently.
So using UA471 can be a bit tricky in terms of setting gain and sensing load cell out.

AgeBee:
Did you check the voltage on PIN 10 of the INA125 without connection to Arduino ? Is there also the fluctuation in voltage ? If yes then I suspect either a wiring problem, defect in the amplifier or load cell.
Can you check if the resistances (of the Wheatstone bridge within the load cell) are as listed in the spec ?

yes it shows fluctuations as pressure applied on load cell in mv.
how can i check resistance of wheatstone bridge of load cell ?

AgeBee:
check the powering of the INA125 ! +5 Volts exactly ?

yes its from Arduino 5v. so its exactly 5v.
Arduino 5v to pin 1 and 2 and to E+ of load cell.

it shows some difference in reading of analogue pin on Serial monitor but when very high load applied...crossing the load cell limit.
as it shows analog reading of 12 when no load applied but when applied too mush it goes hardly and Rarely upto around 20...
Should i use resistance of lesser ohms ?
currently i am using 220ohms

hussain_sheikh:
it shows some difference in reading of analogue pin on Serial monitor but when very high load applied...crossing the load cell limit.
as it shows analog reading of 12 when no load applied but when applied too mush it goes hardly and Rarely upto around 20...
Should i use resistance of lesser ohms ?
currently i am using 220ohms

I don't understand what your setup was what you described above. What I wanted to know in my post #6 was: What is a voltmeter reading when PIN 10 is not connected to the Arduino input but to the input of a voltmeter. Did your description above apply to this setup ?

The resistor you use is just effecting the amplitude of output (amplification). That must fit to the input of the Arduino. And: Please use units in your measured data you post.

The Wheatstone bridge is schematically a connection of four resistors (see datasheet). So check if the resistance between Input + and output + is equal to Output + and Input -. And the the other two resistors ...
See details in Wheatstone bridge

well i have used UA741 and it is simple. i needed a gain of 208.3% so all i did was connect 1M ohm from output to -tive in and then and then a 4.8k ohm to EX-.

And hussain can u help me find this IC?
I am unable to find it.

Hi Safyan
ok i can give u the contact number of a guy from hall road lhr.
he can get u ina125p in about 2 weeks.
Safyan its great hearing that u achieved the required task using UA741.
i have trouble setting gain. can't understand the requirment of it ??
Can u guide me in that..

Thanks

AoA Hussain,
U hadn't replied for a long time, so i stopped checking the forum.
Sure i can guide you through it, not a big deal. :wink:

Could i also use my opamp op 90 instead of the INA125P as an amplifier ? Im totally new to load cell's and im not experienced with arduino, please help

hi i have s type of loadcell capacity is 3 tons and i dnt know how much of load should be put to get proper output