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+
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
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
- Assemble your Zigbee device (connect a load cell, power, etc.).
- Configure and upload the firmware with “Scale factor” = 1.0 and “Shift” = 0.
- Save a custom converter for your device (on the Experts tab) and add it to your Z2M.
- Join your device to your Zigbee network.
- Remove any weight from your load cell.
- 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.
- Place any known weight on your load cell (you can find several tutorials about this on Google).
- You should receive a new raw value for the measured weight.
- Calculate a scale factor: (Measured value – Zero value) / Weight (kilograms or pounds).
- Type the scale factor in the corresponding field in Z2M and press Enter. The device will remember this value in NVRAM.
- 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)
Tom
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
Owner
Could you please submit this issue on Github and attach a screenshot with your firmware configuration settings?
Doc
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.
Owner
Unfortunately, the firmware always uses the gain 32.