0

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);
}
  • 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 Jan 9 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. – Priyesh Sharma Jan 11 at 19:54
0

enter image description here

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

  • 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 Jan 7 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. – Priyesh Sharma Jan 7 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. – Priyesh Sharma Jan 7 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 Jan 7 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. – Priyesh Sharma Jan 7 at 2:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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