HX711 Calibration

Materials

Example

Introduction

This example shows how to calibrate SparkFun HX711 to get actual measurements (in grams) from a Load Cell.

Procedure

Connect the Load Cell to HX711.

  • Connect the red wire of Load Cell to RED pin (Excitation +) of HX711.

  • Connect the black wire of Load Cell to BLK pin (Excitation -) of HX711.

  • Connect the green wire of Load Cell to GRN pin (Signal +) of HX711.

  • Connect the white wire of Load Cell to WHT pin (Signal -) of HX711.

Connect the AMB82-mini to HX711.

  • Connect the V_USB of AMB82-mini to VDD of HX711.

  • Connect the GND of AMB82-mini to GND of HX711.

  • Connect the Pin 2 of AMB82-mini to DAT of HX711.

  • Connect the Pin 3 of AMB82-mini to CLK of HX711.

The final wiring should look like the diagram below.

image01

Open the example in File -> Examples -> AmebaGPIO -> HXH711 -> Calibration

image02

The calibration process here involves 3 main steps:

  1. Taring (Zeroing) - Remove any offset to ensure the scale reads 0g when empty.

  2. Calibration - Use a known weight to calculate the calibration factor.

  3. Verification - Use another known weight to verify if the scale is accurate.

Compile and run the example.

image03

Step 1: Taring the Scale

Purpose: Zero out the scale to remove any initial offset or bias.

  1. Remove any objects from the Load Cell.

  2. Ensure the Load Cell is on a level, stable surface.
    • Please take note that the Load Cell is very sensitive to any form of vibration or pressure, you should ensure the Load Cell is firmly mounted a flat surface to get accurate readings.

  3. When prompted, send t (tare) from the Serial Monitor.

  4. Wait for the confirmation message: “Tare completed”.

What’s happening: The HX711 takes multiple readings and sets this as the zero point (baseline). Any future measurements will be relative to this baseline.

Step 2: Measuring Known Weight

Purpose: Calculate the calibration factor by comparing raw sensor readings to a known weight.

Procedure:

  1. Place your 1st known weight (e.g., 200g) on the Load Cell.

  2. When prompted, type the weight in grams in the Serial Monitor (e.g., 200.0 for 200g).

  3. Press Enter to send the value.

  4. The system will take 30 readings and calculate the calibration factor.

  5. Note down the NEW CALIBRATION VALUE displayed in the Serial Monitor.

What’s happening: The code reads the raw and amplified signal from the HX711 and divides it by your known weight to determine how many raw units equal one gram. This ratio is your calibration factor.

Step 4: Calibration Complete

After completing all three steps, your scale is now calibrated! The Serial Monitor will continuously display weight readings every second.

  1. Now, place you 2nd known weight to test if the calibrated setup is accurate.

  2. Finally, you can use these commands in the Serial Monitor:

    • t - Tare (zero) the scale

    • r - Run the full calibration procedure again

    • c - Manually change the calibration factor

Tip

Use heavier calibration weights (200g-1000g) as they provide more reliable calibration factors.