CNAP

HX711 Load Cell Amplifier Reference

A precision 24-bit analog-to-digital converter designed to amplify and read the tiny differential signal from a load cell (weight sensor), communicating over a simple two-wire protocol.

Pin names

NameDescription
GNDGround
DTData — serial data output
SCKClock — serial clock input
VCCPower (5V)

Attributes

This component has no configurable attributes.

Usage

Connect VCC to 5V, GND to GND, and DT/SCK to two digital pins. Read weight with the HX711 Arduino library, which handles the bit-banged protocol and calibration.

#include <HX711.h>

const int DT_PIN  = 3;
const int SCK_PIN = 2;

HX711 scale;

void setup() {
  Serial.begin(9600);
  scale.begin(DT_PIN, SCK_PIN);
  scale.set_scale(2280.f); // calibration factor — determine per load cell
  scale.tare();            // zero the scale
}

void loop() {
  Serial.print("Weight: ");
  Serial.print(scale.get_units(10), 1);
  Serial.println(" g");
  delay(500);
}

The calibration factor (set_scale) is specific to each physical load cell and must be determined experimentally by comparing readings against a known weight.

Examples

DescriptionAttrs
Default HX711 module{}

See also

  • MicroSD Card — another common precision module for data logging (e.g. logging weight readings)