The HX711 Load Cell Amplifier is a module that is used to take the signal coming from your load cell and convert it into a digital signal that your Zigbee-compatible chip can take and process.

⚠️ THIS FEATURE IS AVAILABLE ON CC2652 or CC1352 CHIPS ONLY

Connecting HX711 and Load Cell to a Zigbee module

From Load Cell to HX711:
Red wire: E+ on HX711
White wire: A-
Black wire: E-
Green wire: A+

HX711 Load Cell
Load Cell
HX711 module

From HX711 to a Zigbee module:
GND: connected to GND on a Zigbee module.
DT (data): Connected to any pin configured as HX711 (P00 – DIO0, see below).
SCK: Connected to any pin configured as I2C SCL/SPI CLK (e.g., P02 – DIO2).
VCC: Connected to 3.3V.

Firmware configuration

Zigbee’s firmware settings

Scale factor – allows you to convert a raw sensor’s value to a weight value.

Shift – allows you to calibrate a zero offset (tare weight).

Calibration

  1. Assemble your Zigbee device (connect a load cell, power, etc.).
  2. Configure and upload the firmware with “Scale factor” = 1.0 and “Shift” = 0.
  3. Save a custom converter for your device (on the Experts tab) and add it to your Z2M.
  4. Join your device to your Zigbee network.
  5. Remove any weight from your load cell.
  6. You should start receiving raw measurement data. It is the shift value (tare weight). Write it down somewhere. Then you can enable the “Enable zero calibration” switch in Z2M, and the device will remember this value in NVRAM.
  7. Place any known weight on your load cell (you can find several tutorials about this on Google).
  8. You should receive a new raw value for the measured weight.
  9. Calculate a scale factor: (Measured value – Zero value) / Weight (kilograms or pounds).
  10. Type the scale factor in the corresponding field in Z2M and press Enter. The device will remember this value in NVRAM.
  11. Finally, you can update these constants in the firmware and re-flash it. In this case, you do need to make a new calibration when you reset a device to the factory defaults.

Zigbee commands

Zigbee cluster: ZCL_CLUSTER_ID_GEN_ANALOG_INPUT_BASIC
Zigbee attributes: ATTRID_IOV_BASIC_PRESENT_VALUE (single precision float)
Zigbee commands: write

Zigbee2MQTT commands

on/off - Enables the zero calibration process (tare). Look for commands and examples for GPIO outputs.
write - sets the PWM duty cycle.
Topic: zigbee2mqtt/[friedly_name]/[channel]/set/brightness
Channel: l1, l2, l3 … l16
Payload: value (1-99999999, scale factor)

Comments
Harvey Specter
Posted at 13:31 June 4, 2024
Tom
Reply
Author

Hi!

I found a alleged bug. If I add 2 HX711 to a CC2652, the first HX711 shows a constant value and its changes (I set reporting interval to 1s). The second HX711 however jumps from 0 to the actual value all the time. Anything to prevent this from happening?

KR
Tom

    Harvey Specter
    Posted at 06:23 June 19, 2024
    Owner
    Reply
    Author

    Could you please submit this issue on Github and attach a screenshot with your firmware configuration settings?

Harvey Specter
Posted at 14:05 September 12, 2023
Doc
Reply
Author

Hello, is there a parameter to send set_gain(128),set_gain(32) ,set_gain(64) commands?
I would need them to interface to HX710A/B chip.

    Harvey Specter
    Posted at 05:08 September 13, 2023
    Owner
    Reply
    Author

    Unfortunately, the firmware always uses the gain 32.

Leave a Reply to Owner
Cancel Reply