Hello,
I have been looking to use a full bridge strain gauge configuration to make a weighing scale. I successfully began prototyping it with an HX-711 amplifier and some preliminary strain gauges to verify if my approach works and thankfully it did with those components.
I was looking to upgrade to more sophisticated equipment with the anyload 202WA - 12.5 lb load cell found here: 202WA Planar Load Cell • ANYLOAD Weigh & Measure
to connect to a junction box from the same manufacturer:
and a substitute amplifier Tacuna systems EMBSGB200:
My issue now is configuring the code to read the correct weight from the voltage calculated at the output of my amplifier without using the HX-711 predefined library functions.
Here is my code so far:
/**
* Central class that operates the dispenser's data, sensors and actuators.
*
* Relies on the tacuna systems knowledge base:
https://tacunasystems.com/knowledge-base/load-cell-faq/
*
*
*/
const float offset = 4.1056; // offset for the load cell to indicate 0 load at 2.5 V
const float vpp = 0.0048828125; // 5V/1024 for ADC conversion
const float totalLoad = 22.68; // maximum load capacity 12.5 pounds
const float a = 1100; // Amplifier Gain
const float s = 0.0008998; // load cell sensitivity
const float ve = 4.97; //Excitation voltage
float points;
float voltage;
float load;
float numerator; // numerator of load calculation
float voutmax; // denominator of load calculation
#define VOUT A0
void setup() {
Serial.begin(9600);
Serial.println("Weighing code");
}
void loop() {
calculatevoltage();
calculateweight();
}
float calculatevoltage(){
points = analogRead(VOUT)- offset;
voltage = (points * vpp) - 0.54;
Serial.print("calculated voltage is:");
Serial.println(voltage);
delay(3000);
}
void calculateweight(){
numerator = totalLoad * (voltage);
voutmax = s * a * ve; // raw output voltage to its maximum rated capacity
load = numerator/voutmax; // weight in kgs
Serial.print("calculated weight in kilograms is:");
Serial.println(load);
delay(300);
}
My reference for the weight calculation is in this FAQ: https://tacunasystems.com/knowledge-base/load-cell-faq/ under:
How do I convert load cell output voltage to pounds or kilograms or Newtons?
I feel that my scaling is off since the voltage gain at the output changes by a maximum of 0.1 V when loaded. I went ahead and changed the amplifier gain built into the boards DIP switches which did not yield much notable results.
Also my starting voltage when not loaded is 0.55 V hence the subtraction in the calculatevoltage() function.
Any help with this would be great!
Thank you