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();
}
}