Increasing precision in Load Cell Values

Hi There,

I’ve recently made a simple weight scale from an Arduino Uno, a 0.78 kg Load Cell and a Wheatstone Amplifier Shield (Part links and code have been attached at the bottom). After calibration, I noticed something peculiar: The steps that the ADC displays are pretty weak in how precise they can get. For example, an ADC value of 436 might indicate something like 4.0 grams, but the smallest increase that it can display; 437; will display something like 5.4 grams. It just doesn’t seem to be able to move in smaller and more precise increments than this.

That’s why I am a bit stumped on how I can deal with this issue to better harness the sensitivity of the load cell.

Any ideas on the coding, adjusting the potentiometers on the shield, etc are appreciated.

Part links:


Code after Calibration:
// SGS Calibration by linear interpolation for Strain 1 and Strain 2
// Apply two known loads to the Strain Gauge sensor and record the values obtained below
// You can use Strain 1 or Strain 2 or the two Strains at the same time.
float ReadingA_Strain1 = 340;
float LoadA_Strain1 = 10.2; // (Kg,lbs…)
float ReadingB_Strain1 = 506.00;
float LoadB_Strain1 = 505.8; // (Kg,lbs…)

int time_step = 2500 ; // reading every 2.5s
long time = 0;
void setup() {
Serial.begin(9600); // setup serial baudrate
}
void loop() {
float newReading_Strain1 = analogRead(0); // analog in 0 for Strain 1

// Calculate load by interpolation
float load_Strain1 = ((LoadB_Strain1 - LoadA_Strain1)/(ReadingB_Strain1 - ReadingA_Strain1)) *
(newReading_Strain1 - ReadingA_Strain1) + LoadA_Strain1;

// millis returns the number of milliseconds since the board started the current program
if(millis() > time_step+time) {
Serial.print("Reading_Strain1 : “);
Serial.print(newReading_Strain1); // display strain 1 reading
Serial.print(” Load_Strain1 : ");
Serial.println(load_Strain1); // display strain 1 load
Serial.println(’\n’);

Serial.println(’\n’);
time = millis();
}
}

Hello @CasualElectron,

You could try using a calibration procedure with more data points
https://www.phidgets.com/docs/Calibrating_Analog_Sensors

Also note that you should not exceed the maximum weight capacity, in this case, 780 gr.

Let us know how it goes!

Hi There,

I could give calibration with more datapoints a shot to verify the linearity of my readings, but this won’t really help with the main issue of a lack of precise enough raw values from the shield.

Any idea on possible tackling that aspect of the project?

Cheers

You could adjust the Gain to take full advantage of the limited resolution of the ADC. The gain through the amplifier is dependent on the resistor value RGAIN1/2 marked as Gain1/Gain2 on the board layout. The standard gain resistor value of the shield is 100 Ohm (for each channel) for a gain of 495. These resistors can be replaced and the gain factor needs to be picked based on the specific application and sensitivity of the total Wheatstone bridge with the strain gauges incorporated.

The gain can be calculated by referring to the following table or by using the following gain equation:
image

The AD8426 defaults to G = 1 when no gain resistor is used. The tolerance and gain drift of the RG resistor should be added to the AD8426 specifications to determine the total gain accuracy of the system. When the gain resistor is not used, gain error and gain drift are minimal.

You can find this information and more on the AD8426 datasheet and SF SG User manual available in the Useful Links on the products page.