# HX711 Always reading zero

**URL:** <https://community.sparkfun.com/t/hx711-always-reading-zero/45093>\
**Category:** Force & Weight\
**Created:** [February 2, 2023, 3:33pm UTC](https://community.sparkfun.com/t/hx711-always-reading-zero/45093 "2023-02-02T15:33:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmdurbin](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jmdurbin](https://community.sparkfun.com/u/jmdurbin)\
**Post date:** [February 2, 2023, 3:33pm UTC](https://community.sparkfun.com/t/hx711-always-reading-zero/45093/1 "2023-02-02T15:33:22Z")

</div>

I am making a custom load cell for work. I am using an Arduino Nano to read SparkFun’s HX711 Load Cell Amplifier which reads a wheatstone bridge. I have the bridge balanced to plus/minus 5 mV and is attached to the HX711 board using the attached schematic. For testing, I have attached the strain gage to a piece of aluminum which is easily deflected by hand. I have downloaded the recommended library and I’ve been trying to use SparkFun’s Calibration file to obtain the calibration factor. No matter how little or much I deflect the bar, the Arduino always reads zero with an occasional spike (up to 1000 lbs when not touching the bar). Any help troubleshooting this would be greatly appreciated.

[https://www.sparkfun.com/products/13879](https://www.sparkfun.com/products/13879)

[https://learn.sparkfun.com/tutorials/lo … 1669999055](https://learn.sparkfun.com/tutorials/load-cell-amplifier-hx711-breakout-hookup-guide?_ga=2.71420432.2001703076.1675344329-302133027.1669999055)

 ![Strain Gage.jpg](https://canada1.discourse-cdn.com/sparkfun/original/3X/b/4/b44f8eab475aa2362418cbb269953b390d67d3c1.jpeg)

![HX711 Bridge Schematic.jpg](https://canada1.discourse-cdn.com/sparkfun/original/3X/f/0/f08e8e182d8f9141c8b16e046c086e23abcef780.jpeg)

---

<div class="post-metadata">

**Author:** ![jremington](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/jremington/32/6595_2.png) [@jremington](https://community.sparkfun.com/u/jremington)\
**Post date:** [February 2, 2023, 5:38pm UTC](https://community.sparkfun.com/t/hx711-always-reading-zero/45093/2 "2023-02-02T17:38:29Z")

</div>

Have you verified proper function of the strain gauge alone, using your multimeter?

If not, power it with 5V and check that the voltage across the two outputs varies as expected, when you apply force.

For help with the Arduino setup, please post a complete schematic, with pins and parts clearly labeled, and the code, using code tags.

---

<div class="post-metadata">

**Author:** ![jmdurbin](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jmdurbin](https://community.sparkfun.com/u/jmdurbin)\
**Post date:** [February 2, 2023, 7:40pm UTC](https://community.sparkfun.com/t/hx711-always-reading-zero/45093/3 "2023-02-02T19:40:21Z")

</div>

Thanks for the quick response. After performing some checks, I found that there wasn’t any voltage differential between the RED/BLK pins on the HX711 board. After replacing the wire from the Arduino to the CLK pin, it started working. However, after getting numbers printing out, I noticed that there is some rather significant drift (see attached graph) and the readings are sinusoidal. What could be causing this?

The pins between the HX711 board and Arduino are as follows:

VDD/BCC → 5v

DAT → A3

CLK → A2

GND → Gnd

I am using the SparkFun\_HX711\_Calibration code with the only modification being to the DAT and CLK pins.

#include “HX711.h” //This library can be obtained here [http://librarymanager/All#Avia\_HX711](http://librarymanager/All#Avia_HX711)

#define LOADCELL\_DOUT\_PIN A3

#define LOADCELL\_SCK\_PIN A2

HX711 scale;

float calibration\_factor = -7050; //-7050 worked for my 440lb max scale setup

void setup() {

Serial.begin(9600);

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.begin(LOADCELL\_DOUT\_PIN, LOADCELL\_SCK\_PIN);

scale.set\_scale();

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

Serial.print("Reading: ");

Serial.print(scale.get\_units(), 1);

Serial.print(" lbs"); //Change this to kg and re-adjust the calibration factor if you follow SI units like a sane person

Serial.print(" calibration\_factor: ");

Serial.print(calibration\_factor);

Serial.println();

if(Serial.available())

{

char temp = Serial.read();

if(temp == ‘+’ || temp == ‘a’)

calibration\_factor += 10;

else if(temp == ‘-’ || temp == ‘z’)

calibration\_factor -= 10;

}

}

![HX711 Drift.jpg](https://canada1.discourse-cdn.com/sparkfun/original/3X/1/3/139408c1e803c7f5385a5ee9e258df5ca6a7cc8f.jpeg)

---

<div class="post-metadata">

**Author:** ![jremington](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/jremington/32/6595_2.png) [@jremington](https://community.sparkfun.com/u/jremington)\
**Post date:** [February 3, 2023, 12:43am UTC](https://community.sparkfun.com/t/hx711-always-reading-zero/45093/4 "2023-02-03T00:43:15Z")

</div>

The drift could be due to temperature change, possibly self heating of the strain gauge.

I see no sinusoidal signal, but long unshielded wires are antennas and readily pick up electrical noise from the environment.
