Arduino and Load cell
I have been doing some experiments to get load cells working with Arduino.
This is a collection of my experiences. Something about:
- What is a load cell
- How did I wire it up to an Arduino board
- What crazy application did I use it for?
Dancing people in a rope in the hull of the illutron ship – Load cell senses the weight and control music and light.
- Light was controlled by using diode boxes and Sonny Windstrups great code
- Music was controlled by using Pure Data to read the Arduino board and generate a midi-controller to use in Ableton Live.
- Dancing: Allison Lorenzen and others. Mounting: Thomas Fabrik. Rigging: Karl Gillick. Interactive music: Bo Boye.
…
So.. What is a load cell anyway
A digital weight.
Usually a piece of steel containing one or more Strain Gauges arranged in a Wheatstone bridge.
…
How to get a load cell
The load cell I have been using is a commercial one.
SKANTRONICS FH SERIES – STAINLESS-STEEL Shear Beam Load Cell
These are quite expensive if you are heading to buy one.
Break a digital weight
There is actually a load cell sitting inside any digital weight you can find. Paper weight, Bath weight.
Buy or find a cheap one, and take it apart. Then rehook the loadcell inside.
Its a little bar of steel with 4 wires coming out of it.
The 4 wires are pretty standard color coded.
Look here for a good reference: http://www.controlweigh.com/loadcell_colors.htm
You can play around with the gain to get the accuracy you want.
…
Connection a load cell to an Arduino board
You need some sort of microvolt amplifier to read the minute change in volt over the bridge.
ina125P – An IC that does it all for you.
- Very simple to use.
- Cheap. Around 7 € at Farnell
- Usable for many different instrumentation amplifications
This is the schematics for hooking it up:
The resistor sets the gain. Look in the datasheet of the ina125p for details.
The connection is as suggested for single supply operation in the datasheet:
And this is how it looked at the breadboard:
…And on a shield
Considerations
- I am using the 5V of the Arduino board as exitation to the load cell, not the 5v-ref on the chip
- Using a 1760 kg load cell I was able to sense 0.1 kg changes
- You may have to swap the voltage applied to the bridge to get a decent range on the analog signal
- Measure the output voltage (input to analog 0) while you change your load, and adjust the gain until you get a good sense
- Analog input at the arduino board is used. Play around with the aref – analogreference – to get a good sense.
- analogReference in my sketch was set to INTERNAL making it 1.1 V – Wich gave me a good range







Hi,
i’m looking to do exactly the same thing, but i cant for the life of me work out the code for the arduino board – are you able to email me the code you have used ?
many thanks.
Hi Barry
What exactly are the problem with your code?
Since its all about sensing at the analog input pin, you should take a voltmeter, and test what you get there. Then adjust accordingly.
I can post my code here when I get to it tomorrow. Or, post your code to me – I may be able to deduct the problem from your code
yt
Christian
Hi,
sorry, been a while – i had to spend some time on another project. anyway, the problem i have is mapping the reading from analog pin 0 to a human readable format – in kilograms and grams …
if you are able to mail me your code (if you created the code with a conversion to kg) that’d be erally useful !
many thanks
Hi Barry
The way to convert your analog data to kilos is by calibrating your load cell.
The great thing about load cells is, that they behave linear. So you only need two data-pairs to do the rest.
I havn’t converted my data to actual weight.
But do something like this:
Lets say you have a 10 Kg load cell
Put 1 kilo on and read the analog value
Put 2 kilo on and read the new analog value
A quick way around converting your values is by using the map-function in Arduino (http://www.arduino.cc/en/Reference/Map)
If I at some point make some actual kilo-conversion-code, I will surely post it.
good luck!
C
ok, thats great – thanks for your help – will let you know how i go !
Hy I am working on the exact same project in scholl and would love it if you`d post the code…
I tryed doing some work on the code, but I do not have an arduino kit yet, and my deadline is coming up…
Would be very grateful for the code.
thank you
Hi,
Good day.
I am trying to use your setup with the load cell for my thrust stand setup.
My load cell is a 40 kg one with 5 pins: red, black, black, green and white.
I connected the pins while coupling the two black ones similar to your circuit.
Apparently, I have not seen much deflection from the INA125P Vout reading.
Can you give me a typical reading from your setup.
I have been literally standing on it while the load cell is on the edge of a wooden table and I can’t see deflections.
I hope you can help me.
Thanks,
Martin
Hi – Regarding sensitivity, then I could get about 0.1 kg sensitivity from a 1700 kilo load cell.
This I did using about 6000 times of amplification with the resistor.
If you don’t see any deflection, then it is off somehow. It is very visible, when it is visible.
Did you build your load cell yourself? Sometime the cell is skewd, and you need to add a resistor to correct it.
You should be able to see a milivolt change on a normal multimeter, even without the amplification of the INA125. My best bet is, that you have connected the wires wrongly. The color codes are completely different from manufacturer to manufacturer.
Hope you get it working!
kind regards
C
Hi vito
Sorry for not posting the code yet. It was developed on an old computer, and I havn’t dug the code up from it yet.
I hope you can make your deadline – It is quite simple – Read an analog value, and change it to a corresponding kilogram value. It is linear, so its a basic linear function.
kind regards
Christian
Thanks for the advice.
I got the load cell to work properly finally.
The problem was bad soldering.
Right now I am running an arduino and processing visual graphing program to visualize deflections.
My new problem is that the reading from the INA125P drifts.
I cannot get a fixed value as a basis or zero line since it keeps on drifting.
Any guess / tip regarding this?
Did you make your load cell yourself, using strain gauges?
In that case, if you have a half-bridge configuration, you will get drifting values due to temperature changes.
This can also be the case, if you are running long wires to your load cell, I think.
I have always made my designs able to auto calibrate every now and then.
Good luck!
Christian