The Scales Kit is an electronic scale kit that uses four sets of half-bridge resistive strain gauges, with a total weighing capacity of up to 200kg
. It is paired with a high-precision 24-bit A/D converter chip, the HX711
, which features a built-in low-noise programmable amplifier supporting gain adjustments of 32
, 64
, and 128
. When combined with the M5Stack main controller, it allows for the quick and easy construction of an IoT weighing application in just a few minutes.
Specification | Parameters |
---|---|
HX711 | Output sensitivity: High-precision 24-bit ADC Programmable gain amplification: 32, 64, 128 10SPS output data rate |
Half-bridge strain gauges | Output sensitivity: 1.0±0.1mV/V Non-linearity: 0.3%F.S Comprehensive accuracy: 0.3%F.S Zero-point output: ±0.3mV/V Impedance difference: 0.8Ω Input/output impedance: 1000±5Ω |
Gross weight | 92.5g |
Net weight | 126.3g |
Package dimensions | 105 x 65 x 40mm |
M5Core | G36 | G26 | 5V | GND |
---|---|---|---|---|
Unit Weight | DATA Pin (DAT) | CLOCK Pin (CLK) | VCC | GND |
#include "HX711.h"
HX711 scale;
void setup() {
// 1. Set the ADC value at 0g and set it as the offset
scale.tare();
}
void loop() {
// 2. Read the average ADC value with a standard weight (e.g., 5kg)
long kg_adc = scale.read_average(20);
// 3. Read the current offset at 0g
kg_adc = kg_adc - scale.get_offset();
// 4. Calculate and configure the scale parameter
scale.set_scale( kg_adc / (5 * 1000.0));
}