Instructables
loading
loading
Picture of Arduino Load Cell / Scale

From the minds at http://arduinotronics.blogspot.com/

Important Update!

Since so many people were having problems with the INA125P, we now have a new and improved version that uses the Hx711 24bit ADC amplifier module. http://arduinotronics.blogspot.com/2015/06/arduino-hx711-digital-scale.html


My goal was to create a programmable scale for weighing objects, parts counting, even directing product flow on a conveyor system.

I needed a load cell, a Arduino, and an amplifier.

 
Remove these adsRemove these ads by Signing Up

Step 1: The Load Cell

Picture of The Load Cell
On this load cell (from a Accuteck  W-8260-86W Postal Scale) the 4 wires coming from the load cell are:

Red: Excitation +
White: Signal +
Green: Signal -
Black: Excitation -

This matches the GSE / NCI / Sensotec wiring scheme.

http://www.controlweigh.com/loadcell_colors.htm
I disconnected the 4 wires from the control board in the scale, so they would be available for the next step.

Step 2: The Amplifier

Picture of The Amplifier
To increase the output of the load cell so that the Arduino can read it on an analog input, we will need a INA125P amplifier and a 10 ohm resistor. Connect to the Arduino as indicated on the attached schematic.

Data Sheet: http://www.ti.com/lit/ds/symlink/ina125.pdf
1-40 of 84Next »
VishuK18 days ago

hi, I am trying to build a arduino load cell which measures 100kgs. I found this guide very helpful. Can u please assist me in how much resistance and supply from arduino is needed to set the gain which can measure load upto 100kg.

regards!!

hube268.1 month ago

Has anybody gotten this to work with the code provided? I'v tried several times with identical equipment and the readings are garbage even after "calibrating".

sspence (author)  hube268.1 month ago
I did. maybe you are having issues with your amplifier. I have a new amplifier coming that is designed for load cells, will be posting another instructable soon.

We tried multiple INA125's and it did not make a difference. Three of them to be exact. The INA was amplifying but not nearly enough to make any sort of difference. We tested using highly precise desktop testing equipment and the when we put over 30lbs on the scale the difference with zero was about 0.000001mV. We were also using a very stable benchtop power supply. When we connect the load cell back to the original scale electronics it works great and is able to measure even 2 grams.

I honestly don't believe this tutorial works. Maybe if someone is successful and gets accurate results they can post and provide details of their code and setup.

hube268 and I figured out what the issue was and wish to share with everyone else what it was.

The scale we used had the E+ (red wire) and the E- (black wire) connections reversed on the PCB from the factory.

If you look carefully at the picture you'll see the E+ wire is directly coupled with the ground (black wire right next to it).

After discovering this, we switched the black and red wires on our breadboard and it worked as intended.

File Jun 06, 10 27 50 AM.jpeg
sspence (author)  GerardV27 days ago

Awesome!

sspence (author)  hube268.28 days ago

I got the code from http://christian.liljedahl.dk/guides/arduino-and-l...

It worked when I first built this project.

Hello Mr.sspence, thanks for sharing your instructable helped me much to understand my scale schema. I bought this scale with 4 load sensors (see the schema) could you please help me, which cables must be connected with the Arduino?

Scale scheam.png
kajitams1 month ago

Hello, thanks for such well written instructions.

I'm getting analog readings all over the place. Any suggestion how I should go about troubleshooting it? I've calibrated as per directions but I'm not getting stable enough readings.
By the way, what should I expect the accuracy of the readings to be? Within 10 grams? I'm using a 7Kg max digital kitchen scale.

hube268.1 month ago
kemalm1 month ago

hi what means by loadA=10kg and loadB=30kg? are those the limit for this coding?

sspence (author)  kemalm1 month ago
Those are weights used to calibrate the scale. Not limits.
kemalm sspence1 month ago
Oh i see..how to calibrate them? Im still newbie in this :/.. can u help me out?
sspence (author)  kemalm1 month ago

As it says right in the code:

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


// You need two loads of well known 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

sspence (author)  sspence1 month ago
you calibrated with those weights, and wrote down the resulting numbers, then put those numbers in to the code and re uploaded the sketch to the arduino?
kemalm sspence1 month ago
But i use yours example to measure the weight still give same weight..i use two different thing with different weight..so can u help me?
MarcoF51 month ago

Hi Thank you for this instructable it is great. I just put one together and use a load cell i bought online. I just calibrated everything and when I put my first weight and second weight on I get the corresponding right weights but if I put on a weight larger, smaller or in between I get the wrong value. Do you have any insight or suggestions?

VikasS91 month ago

i am stuck....i am getting analog reading as 692 and weight as 3 kgs( without any load).....not getting any other readings....help will be appreciated

sspence (author)  VikasS91 month ago
Did you calibrate the scale?
VikasS9 sspence1 month ago

could you please tell me how exactly could it along with the codes for calibration and the measuring

sspence (author)  VikasS91 month ago

Step 3, read the instructions in the code:

and I quote,

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

// You need two loads of well known 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

Can I use ina128 instead of ina125?Does it work?

sspence (author)  furkan.gulturk12 months ago
The INA128 uses a dual supply (+/- 2.5v), where the INA125 uses a single supply (+5v), and is therefore easier to use with an arduino.
sspence (author) 2 months ago
yes, just connect your favorite lcd, add the lcd code, and do a lcd.print(weight); to the screen type of thing.
syakm2 months ago

hi sir.

i wanna ask about,if i want to display in a lcd what are the coding part that need to be change or add in order to display the weight in kg. thanks. A.S.A.P

sspence (author)  syakm2 months ago
The units are already in kg.
syakm sspence2 months ago

so basically what i need to do is to connect the circuit with LCD only??

AnthonyT62 months ago

Also, can you shed some light on the sketch?

1. We add the weight to the sketch: float loadA = 5; // kg, for instance I have 11lbs.

2. After entering the weight I make a note of this and then repeat for the second weight

3. I then upload the sketch and then repeat the above to see if the numbers noted are correct

sspence (author)  AnthonyT62 months ago
Did you enter the numbers you got from the first set of measurements into the code?
AnthonyT6 sspence2 months ago

yes, thank you for reminding me.

AnthonyT62 months ago

I have had another chance to look at this circuit. I find three of my cells give one or no resistor reading, thus they are bad. Also while looking at the sketch, If one of my weights is 11 lbs, I would convert that to 5kg and then match the analogValue:

analogvalue = 1024/50 (50kg is my load sensor max) = 20.28 (per kg)

20.28*5 = 101

loadA = 11

analogvalue=101

Does this look correct?

sspence (author)  AnthonyT62 months ago
I'll have to reload that project to be sure, but analog value 1023 would be zero, and analog value 0 would be 50kg, IIRC.
AnthonyT62 months ago

Hi, I have wired up the above several times to assure all pins were correct. I am viewing the display monitor and I find the numbers basically stay the same averaging between analogValue: 13.50 and 13.59. I do not see any changes when weight is applied.without anything on pin one, numbers fluctuate between 18-20. Any ideas why I am not see a change or is it always that little?

sspence (author)  AnthonyT62 months ago
do a serial print of your analogRead, see what the adc is seeing. what value resistor did you add to the amplifier?
AnthonyT6 sspence2 months ago

I am using same 10 ohms. Found E- and E+ were backwards. Now I get 5v out from analog pin not connected to Arduino. When connected to Arduino, I get: 25

analogValue: 870.01

load: 43.50033

analogValue: 870.01

load: 43.50046

analogValue: 870.02

load: 43.50091

I have not set anything, setup just as shown. I just want to make sure my setup is correct.

sspence (author)  AnthonyT62 months ago

IIRC, You will get 5v (1023 adc) at no load, and decreasing voltage with increased load.

AnthonyT6 sspence2 months ago

Ok, so with analog pin not connected to the Arduino, I should see the voltage drop as I apply weight to load sensors, right? Yea. I don't see any changes. I guess the load cells I got from an old working digital scale don't work.

sspence (author)  AnthonyT62 months ago

Could be an issue with your amplifier chip as well. or a wiring issue. I have no way to tell from here. want to send a picture? greentrust@gmail.com

AnthonyT6 sspence2 months ago

I am using jumpers on a bread board. You know how messy that can look. Three more questions:

1. The code states using two weights. I am looking to eventually do something when weight exceeds 50 lbs, perhaps trigger a relay, alarm, etc. How far apart in the two weights would be sufficient for a good calibration?

2. How is a minimum and maximum value set? For instance, 5v is 1024 correct? If I wanted 50lbs to be maximum value, what do I need to do?

2. Where can I find code that will not produce a continuous serial output if there is no weight on the load cells? Serial is continuous, whether the value is the same or not.

If I haven't thanked you yet, THANKS!!!

sspence (author)  AnthonyT62 months ago

the larger the difference in weights, the better the calibration I would think. The maximum is the the value in the data sheet for your scale. What ever it's capable of measuring. If it's a 150 lb scale, it will output 0v at 150 lbs, and 5v at zero lbs. You can code your sketch to only do a serial print if the scale reads not equal to zero.

if (weight!=0){

Serial.print(weight);

}

With a LCD output, you want to display continuously.

1-40 of 84Next »