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

## Step 1: 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.

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

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.

## Step 3: The 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.

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

// Enter you own analog values here
float loadA = 10; // kg

float loadB = 30; // kg

float analogValueAverage = 0;

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

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

void loop() {

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

// Is it time to print?

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

// using a custom map-function, because the standard arduino map function only uses int