3

schematic

simulate this circuit – Schematic created using CircuitLab

Wiring is based on the scheme presented below - enter image description here

(Reference: https://electronics.stackexchange.com/a/174580)

I am using Arduino Mega 2560, HX711 and four load cells to build a weighing scale but having a hard time calibrate the unit. I have tried different libraries and calibration schemes but none of them seem to help. I have found that the raw values corresponding to any given weight (including zero load) are not consistent. Firstly, the readings do not settle even after 10 minutes, and even if I take an average, the next time I put the same weight, I get an entirely different reading making the last average useless. I am seeing errors of the order of +/- 30 lbs when I put a known weight.

I first thought that maybe my load cells are the root cause but when hooked them up directly to Arduino and read the voltage across the bridge, I read stable constant values. Verified the voltage readings with a Voltmeter. (Yes, their resolution is not as good as HX711 but at least they are stable and consistent). I get the voltage reading close to my hand calculations.

Next, I tried testing the HX711 in different ways. In one test, I created a full-bridge using resistors other than load cells, forced the bridge out of balance but cannot read anything other than 16777215. Next, I wanted to see if the board is reacting to any voltage at all, so, I removed the bridge and did not connect anything to E+ and E- pins but supplied known voltages from a DC power supply (from 0 to 4.5V) to the A+ and A- (GND) pins. Now, it is reading only 8388607, no matter what voltage I supply. If I supply +5V or +3.3V from Arduino to the A+ and A- (GND) pins instead of DC Power supply, it then only reads 16777215.

I don't know how to interpret this behavior. How can I resolve the issue and bring the error down? Thanks for your help.

I have included the schematic below. All four Load Cells (LCs) are 3-wired (White, Black & Red). Resistance between W & B wires is around 1980 ohms while that between R & W or R & B is around 990 ohms. SO I connected the four LCs in the manner shown in the schematic. Wire colors have been labelled.

Code:

Code is pretty straightforward as I am simply reading raw values from the HX711 using the following HX711 library - github.com/queuetue/Q2-HX711-Arduino-Library.git

#include <Q2HX711.h>

const byte hx711_data_pin = 4;
const byte hx711_clock_pin = 8;

Q2HX711 hx711(hx711_data_pin, hx711_clock_pin);

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

void loop()
{
  Serial.println(hx711.read());
  delay(500);
}
3
  • Can you draw as a schematic or wiring diagram how everything is connected? And please provide your code in your question. Maybe there is something wrong with one of them
    – chrisl
    Commented Jan 9, 2020 at 8:15
  • I have included both of them in the post. I think the variation in the values that I am seeing is because of residual strain and hysteresis but not sure of that. I have been noting the scale readings for past four days. I have not put any load at all and these are the readings I have obtained - Day 1: 84442XX Day 2: 84447XX Day 3: 84442XX Day 4: 84447XX If zero lbs weight correspond to 84442XX, the same empty scale starts reading a different weight the other day. This is the problem I am trying to solve. I expect variation in readings since HX711 is 24-bit but what I have is too high.
    – PSharma
    Commented Jan 11, 2020 at 19:54
  • If you getting readings at the limit of the HX711, (2^24=16777216) the load cells might not be close enough to identical, and you might have to bias them closer to zero. Do you have a high resolution voltage meter that you can test the voltage difference between the signal+ versus signal-? If it's more than 10-20mV, you could add a trim pot to bias a leg of the wheatstone bridge higher or lower. // Zero could move around significantly from day to day dependent on temperature and creep. Most use-cases of cheap load cells/scales have a means of zeroing them out immediately before use.
    – Dave X
    Commented Oct 3, 2021 at 19:07

1 Answer 1

1

enter image description here

Here is is a picture of how I have seen the sensors connected. Is this how your is?

14
  • When you connected the cells directly to the board, did you do it one at a time or all at once? Is the board combining the weight values or is it done with the sensors/library?
    – Jeff A
    Commented Jan 7, 2020 at 0:34
  • Hi! Thanks for your response. I have tried many and currently am using the following HX711 library - github.com/queuetue/Q2-HX711-Arduino-Library.git And the code is simply reading raw values from ADC using hx711.read(). If I use a full-bridge of 4 load cells, I get continuously changing values and if I connect a full-bridge of one load cell and two external resistors, I only read 16777215 and nothing else.
    – PSharma
    Commented Jan 7, 2020 at 0:34
  • I have connected them both ways. If I use a full-bridge of 4 load cells, I get continuously changing values and if I connect a full-bridge of one load cell and two external resistors, I only read 16777215 and nothing else, even if I put weights on the load cell.
    – PSharma
    Commented Jan 7, 2020 at 0:35
  • My last piece of advice is to go over your connections for stray what ever. Look at all the solder joints on EVERYTHING and see if you can find a bridge or something touching that should not.
    – Jeff A
    Commented Jan 7, 2020 at 1:30
  • Thanks for your time. I have checked it a number of times. Couldn't find any unintended connections plus all GND connections are also good.
    – PSharma
    Commented Jan 7, 2020 at 2:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.