Parallel connection between two full-bridge load cells - Unstable readings

Thread Starter

giuliapri

Joined Jun 17, 2021
8
Hello,

Let me start by saying that I have no real experience with electronics, so I might be making some obvious wiring mistakes.

I have two 4-wire (full bridge) load cells, and I would like to use them to build a set of scales. Most examples I have seen online use 3-wire load cells, connecting them in a Wheatstone bridge configuration, but from what I understand it should also be possible to use multiple 4-wire sensors connected in parallel.

I am using a HX711 amplifier and an Arduino MKR WAN 1300, as in the attached schematics. When I try to measure any values, though, the readings I get from the sensors are quite unstable, so that calibrating the device is not really possible. The values do go up when I apply a load, they just oscillate a lot. I have tested the two load cells individually, so I know that they work.

I’m trying to understand how to fix the problem (assuming that it can be done), but I am struggling. I’ve read a post (https://forum.allaboutcircuits.com/...into-wheatstone-bridge-configurations.152354/) where, among other things, they suggested connecting each load cell to a separate HX711 amplifier. However, by doing so I would end up having separate readings for each sensor, if I understand correctly. Is that the only solution?

Please let me know if there’s any relevant information I forgot to add.
 

Attachments

Irving

Joined Jan 30, 2016
3,843
Looks ok to me. I've been using generic 4-wire 5kg cells from eBay wired exactly the same way and it works fine...
 

Thread Starter

giuliapri

Joined Jun 17, 2021
8
hi g,
Welcome to AAC.
Check this PDF.
What is the specification of your load cells.? Type number etc...

Post your code and can I check it on my Arduino HX711 project.

E
Thank you for your reply.
I had already read the pdf before trying the parallel connection, when I was trying to figure out how to connect the sensors.
Part of the problem is that they gave me these two load cells for this project, but they do not have the specifications anymore. I realise that that makes solving the issue a lot harder. I have ordered two new ones, but I don’t have them yet. My goal right now is mostly to understand if there are errors in the way I wired the circuit.
Here’s the calibration script.

C++:
#include "HX711.h"

const int DOUT_PIN = 3;
const int SCK_PIN = 2;
HX711 scale;

float calibration_factor = 2230; // this calibration factor is adjusted according to my load cell
float units;
float ounces;

void setup() {
  Serial.begin(9600);
  scale.begin(DOUT_PIN, SCK_PIN);
  Serial.println("HX711 calibration sketch");
  Serial.println("Remove all weight from scale");
  Serial.println("After readings begin, place known weight on scale");
  Serial.println("Press + or a to increase calibration factor");
  Serial.println("Press - or z to decrease calibration factor");

  scale.set_scale(calibration_factor);
  scale.tare();  //Reset the scale to 0

  long zero_factor = scale.read_average(); //Get a baseline reading
  Serial.print("Zero factor: "); //This can be used to remove the need to tare the scale. Useful in permanent scale projects.
  Serial.println(zero_factor);
}

void loop() {

  scale.set_scale(calibration_factor); //Adjust to this calibration factor

  delay(1000);
  Serial.print("Reading: ");
  units = scale.get_units(), 10;
  if (units < 0)
  {
    units = 0.00;
  }
  ounces = units * 0.035274;
  Serial.print(units);
  Serial.print(" grams");
  Serial.print(" calibration_factor: ");
  Serial.print(calibration_factor);
  Serial.println();

  if(Serial.available())
  {
    char temp = Serial.read();
    if(temp == '+' || temp == 'a')
      calibration_factor += 1;
    else if(temp == '-' || temp == 'z')
      calibration_factor -= 1;
  }
}
I did an approximate calibration (as I said, the values oscillate too much) and then I used another script to get the measurements and begin working on the data. I can upload that too, if needed?
 

Thread Starter

giuliapri

Joined Jun 17, 2021
8
Looks ok to me. I've been using generic 4-wire 5kg cells from eBay wired exactly the same way and it works fine...
Ok, thanks.
Can I ask if you used a junction box? Or did you just solder the wires?
I don't think it's a connection problem, strictly speaking, as I tried checking the wires with a multimeter, but it might be possible.
 

ericgibbs

Joined Jan 29, 2010
18,766
hi giu,
What are the lengths of the connection of the LC's to the HX711, do you have a photo shot of the project, to post.
Are the two LC's the same specification.?

Will set up a HX711 test project today, try you program and also post the program I use, works with most Arduino.

E
C-like:
// 010521_ AAC  Test EG57
// 5kG L/C Arduino Nano
// Test weight 2kG Calibrated Mass
#include <HX711.h>

HX711 scale;


void setup() {
  Serial.begin(38400);
  Serial.println("HX711 PJ Demo");
 
  Serial.println("Initializing the scale");
  // parameter "gain" is ommited; the default value 128 is used by the library
  // HX711.DOUT    - pin #A1
  // HX711.PD_SCK    - pin #A0
  scale.begin(A1, A0);
 
 // scale.set_gain(1);
 
  Serial.println("Before setting up the scale:");
  Serial.println();
  Serial.print("Raw Reading: ");
  Serial.println(scale.read());            // print a raw reading from the ADC

  Serial.print("Read 20 average: ");
  Serial.println(scale.read_average(20));      // print the average of 20 readings from the ADC

  Serial.print("Get 10 avg value: ");
  Serial.println(scale.get_value(10));        // print the average of 10 readings from the ADC minus the tare weight (not set yet)

  Serial.print("Get 10 avg units: ");
  Serial.println(scale.get_units(10), 1);    // print the average of 10 readings from the ADC minus tare weight (not set) divided
// by the SCALE parameter (not set yet)
// this value is obtained by calibrating the scale with known weights;
  scale.set_scale(363.f);
  scale.tare();// reset the scale to 0
Serial.println();

  Serial.println("Scale now Setup:");

  Serial.print("Read raw: ");
  Serial.println(scale.read());// print a raw reading from the ADC

  Serial.print("Read 20 average: ");
  Serial.println(scale.read_average(20));// print the average of 20 readings from the ADC

  Serial.print("Get avg 10 value: ");
  Serial.println(scale.get_value(10));// print the average of 5 readings from the ADC minus the tare weight, set with tare()

  Serial.print("Avg 10 units: ");
  Serial.println(scale.get_units(10), 1);// print the average of 5 readings from the ADC minus tare weight, divided
  // by the SCALE parameter set with set_scale
Serial.println();
  Serial.println("Weight gms:");
}

void loop() {
  Serial.print("Wt= ");
  Serial.print(scale.get_units(1), 1);
  Serial.print("  Avg= ");
  Serial.println(scale.get_units(1), 1);

 // scale.power_down();                    // put the ADC in sleep mode
  delay(1000);
 // scale.power_up();
}
 

Irving

Joined Jan 30, 2016
3,843
I soldered them but a good tight junction should be OK. It's important that the wires are well supported and kept together to avoid erroneous readings due to mechanical strain from the wires and differential noise getting into the system.

Secondly, looking at your code, I see a problem. Although you are only reading once per second you are not waiting for the "scale ready" indication from the HX711. Here's some code that checks how fast you can read... note the wait for scale.is_ready()

scale speed test:
#include "HX711.h"

// HX711 circuit wiring
const int LOADCELL_DOUT_PIN = 2;
const int LOADCELL_SCK_PIN = 3;

HX711 scale;

void setup() {
  Serial.begin(115200);
  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
}

void loop() {
  static long x = millis();
  if (scale.is_ready()) {
    long wait = millis()-x;
    x = millis();
    long reading = scale.read();
    Serial.print("HX711 wait time: ");
    Serial.println(wait);
  }   
}
 

Thread Starter

giuliapri

Joined Jun 17, 2021
8
I soldered them but a good tight junction should be OK. It's important that the wires are well supported and kept together to avoid erroneous readings due to mechanical strain from the wires and differential noise getting into the system.

Secondly, looking at your code, I see a problem. Although you are only reading once per second you are not waiting for the "scale ready" indication from the HX711. Here's some code that checks how fast you can read... note the wait for scale.is_ready()
Thank you.

If I run your script, I get these readings:
Scale.PNG

I have also just tried adding the
if (scale.is_ready())
line in my calibration sketch, but it didn't change much.
 

Thread Starter

giuliapri

Joined Jun 17, 2021
8
hi giu,
What are the lengths of the connection of the LC's to the HX711, do you have a photo shot of the project, to post.
Are the two LC's the same specification.?

Will set up a HX711 test project today, try you program and also post the program I use, works with most Arduino.

E
Hi,

The connection is about 30 cm long, I would say.
Thank you for the code. I tried using it, but the "result" is mostly the same, in the sense that it doesn't give me usable/stable values.
 

Thread Starter

giuliapri

Joined Jun 17, 2021
8
hi,
Post your results.
Can you answer post #6 queries.?
E
Sorry, my replies are a little slow. The results meaning the values I obtain with my calibration sketch?

Here they are (the red line indicates what happens when I add a weight).
Scale.PNG
 
Last edited:

ericgibbs

Joined Jan 29, 2010
18,766
hi,
This is your program, what do expect to see on the printout.??
E


Update:
Just checked your +/- for Cal, thats not the way its done, try my program, post the result.

Added another result for your program, used a 500gm weight, the cal is off, byut the readings are steady.
 

Attachments

Last edited:

ericgibbs

Joined Jan 29, 2010
18,766
hi g,
You have either a faulty Load Cell or a poor connection or HX711
Can you retry with just one Load Cell connected, then try the other LC on its own.

Without any weight on the Load Cells.

Post what you measure,

E
Check my post #14 with your program, looks OK to me.
 

Attachments

Thread Starter

giuliapri

Joined Jun 17, 2021
8
hi g,
You have either a faulty Load Cell or a poor connection or HX711
Can you retry with just one Load Cell connected, then try the other LC on its own.

Without any weight on the Load Cells.

Post what you measure,

E
Check my post #14 with your program, looks OK to me.
I should get the new load cells tomorrow, so I'll just wait and see if that helps. Thank you for all your help!
 

Irving

Joined Jan 30, 2016
3,843
I'd be wary of the header you're connecting the load-cell to. The connection resistance on those can be very poor and vary significantly with vibration unless there is a good mechanical interface. Either replace with screw terminals or solder your LC wires to a proper matching pin-header (apologies if you have done so, but from this angle it appears not).

Also, where the wires come off the LC tape them down to the base plate within the first few cm and away from the strain-gauges themselves. Finally its a good idea to twist the flying leads together, about 1 twist per cm, this significantly reduces noise and coil them neatly to reduce the overall physical length; it also helps to keep the leads well away from power supplies, microcontrollers or anything generating electrical noise.
 

kaindub

Joined Oct 28, 2019
125
I had exactly the same problem.
I think I solved it by using a different hx711 sketch.
im sorry I’m not more helpful but once I solved the problem I moved on.
It is not a hardware problem, I can be certain.
 
Top