M5Stack K121

Manual d'usuari del kit de bàscula oficial M5Stack amb unitat de pes

Model: K121 | Brand: M5Stack

1. Introducció

The M5Stack Official Scale Kit is a high-precision, low-cost weighing solution designed for various applications. This digital scale kit comprises four half-bridge resistive strain gauges, enabling a total weighing range of up to 200 kilograms. It integrates a 24-bit A/D converter chip, the HX711, specifically engineered for high-precision electronic scales. The built-in low-noise programmable amplifier offers gain adjustments of 32, 64, and 128 times, ensuring accurate measurements. Compatible with M5Stack Core for programming, this kit allows users to quickly develop IoT-based weighing scales.

Nota important: The Scale Kit requires a rigid cover plate for proper operation. The dimensions of this cover plate should not exceed 50cm on any side to ensure stability and accuracy.

2. Producte acabatview

2.1 Contingut del paquet

The M5Stack Official Scale Kit includes the following components:

  • 4x Half-bridge resistive strain gauges
  • 1x WEIGHT UNIT (HX711 A/D converter module)
  • 1x HY2.0-4P Cable (20cm)
  • 4x Double-sided adhesive paper (39 x 20 x 0.8mm)
  • 4x Double-sided adhesive paper (39 x 12 x 0.8mm)
M5Stack Scale Kit components
Figure 1: M5Stack Scale Kit components, including four half-bridge strain gauges, the HX711 Weight Unit, connecting cable, and adhesive pads. The kit supports a total weighing range of 200kgs.

2.2 Característiques clau

  • Total Weighing Range: Fins a 200 kg
  • HX711 A/D Converter:
    • High precision 24-bit ADC
    • Guany programable amplification: 32, 64, and 128
    • 10SPS (Samples Per Second) output data rate
  • Half-Bridge Resistive Strain Gauge:
    • Output sensitivity: 1.0 ± 0.1 mV/V
    • Non-linearity: 0.3% F.S (Full Scale)
    • Integrated Accuracy: 0.3% F.S
    • Zero output: ±0.3 mV/V
    • Difference between upper and lower impedance of each strain gauge: 0.8Ω
    • Output (input) impedance: 1000 ± 5Ω
  • Development Platforms:
    • UIFlow (support to be added)
    • Arduino

3. Especificacions

EspecificacióParàmetre
HX711 Output SensitivityHigh Precision 24bit ADC
HX711 Programmable Gain Amplificació32, 64, 128
HX711 Output Data Rate10 PS
Strain Gauge Output Sensitivity1.0 ± 0.1 mV/V
Strain Gauge Non-linearity0.3% FS
Strain Gauge Comprehensive Accuracy0.3% FS
Strain Gauge Zero Output± 0.3 mV / V
Strain Gauge Impedance Difference (Upper/Lower)0.8Ω
Strain Gauge Output (Input) Impedance1000 ± 5Ω
Pes brut92.5 g
Pes net126.3 g
Mida de l'embalatge105 mm x 65 mm x 40 mm
Specifications table, PinMap, and Schematic for M5Stack Scale Kit
Figure 2: Detailed specifications, PinMap for the WEIGHT UNIT (G36, G26, 5V, GND), and the internal schematic diagram of the HX711-based WEIGHT UNIT.

4. Instruccions de configuració

4.1 Assembly of Strain Gauges

  1. Prepare a rigid cover plate (not included) with dimensions not exceeding 50cm on any side.
  2. Attach the four half-bridge resistive strain gauges to the underside of the cover plate using the provided double-sided adhesive paper. Ensure they are evenly distributed and positioned to support the load.
  3. Connect the wires from the strain gauges to the green terminal blocks. The diagram below illustrates the typical wiring configuration for a full-bridge setup using four half-bridge sensors.
Strain gauges mounted on a plate
Figura 3: Example of four half-bridge strain gauges mounted on the underside of a plate, ready for wiring.
A dalt view of assembled scale with clear plate
Figura 4: superior view of the assembled scale, showing the clear cover plate over the mounted strain gauges.

4.2 Wiring the Weight Unit (HX711)

  1. Connect the wires from the strain gauge assembly to the green terminal block on the HX711 Weight Unit. Refer to the PinMap and Schematic in Figure 2 for detailed connections. The common wiring for four half-bridge sensors to form a full bridge is typically:
    • Two strain gauges (e.g., R1, R2) connected in series to form one side of the bridge.
    • The other two (e.g., R3, R4) connected in series to form the other side.
    • The output of these series pairs connects to the A+ and A- inputs of the HX711.
    • El volum d'excitaciótage (E+ and E-) for the bridge is supplied by the HX711.
  2. Connect the HY2.0-4P cable from the HX711 Weight Unit to your M5Stack Core or other microcontroller. The PinMap for the WEIGHT UNIT is as follows:
    • G36: Data Pin (DAT)
    • G26: Clock Pin (CLK)
    • 5 V: Font d'alimentació (VCC)
    • GND: Terra
Close-up of HX711 Weight Unit connection
Figura 5: Primer pla view of the HX711 Weight Unit showing the connection points for the strain gauges and the HY2.0-4P cable.
Wiring diagram for M5Stack Scale Kit
Figure 6: Comprehensive wiring diagram illustrating the connection of four half-bridge strain gauges to the HX711 module and its subsequent connection to an M5Stack Core.

5. Instruccions de funcionament

5.1 Initializing and Calibration

Before accurate weighing can begin, the HX711 module needs to be initialized and calibrated. The ADC chip GAIN should be set to 128, and the output data rate is 10SPS. Under a 5kg weight measurement, the error is approximately ±1%. Calibration is crucial for precise readings.

The following code snippet demonstrates a basic calibration procedure using the HX711 library (e.g., for Arduino):

#include "HX711.h"

HX711 scale;

void setup() {
  // Initialize the scale object with DAT and CLK pins (e.g., G36 and G26 for M5Stack)
  // scale.begin(DAT_PIN, CLK_PIN); // Replace DAT_PIN and CLK_PIN with actual GPIOs

  // 1. Set the ADC value in the case of 0g and set it to offset
  scale.tare(); // Zeros the scale, setting the current reading as the offset
}

void loop() {
  // 2. Read the average value of ADC in the case of standard weight (such as 5kg)
  long kg_adc = scale.read_average(20); // Read average of 20 samples

  // 3. Read the offset in the current 0g case (after tare)
  // This step is typically done once during calibration to find the raw offset.
  // For continuous operation, you would use scale.get_value() or scale.get_units().
  long current_offset = scale.get_offset(); // Get the raw offset value

  // 4. Calculate and configure the scale parameter
  // Assuming 'kg_adc' is the raw reading for a known 5kg weight.
  // The scale factor is (raw_reading_for_known_weight - offset) / known_weight_in_units.
  // Here, 5 * 1000.0 assumes 5kg and converts to grams if the output is desired in grams.
  // If kg_adc is already offset-adjusted, then it's just kg_adc / (5 * 1000.0)
  // A more robust calibration involves placing a known weight (e.g., 5kg) and then setting the scale factor.
  // Example: scale.set_scale( (float)kg_adc / 5000.0 ); // If kg_adc is raw reading for 5000g
  // The provided snippet seems to imply kg_adc is already offset-adjusted or the offset is implicitly handled.
  scale.set_scale( kg_adc / (5 * 1000.0) ); // This line needs careful interpretation based on the HX711 library used.
                                           // Typically, you'd get a raw reading for a known weight, then calculate the scale factor.
                                           // For example: scale.set_scale(scale.get_value(20) / KNOWN_WEIGHT_IN_UNITS);
}
            
Code snippet for HX711 calibration
Figure 7: Code example demonstrating the calibration process for the HX711 Weight Unit, including zeroing (tare) and setting the scale factor.

Calibration Steps (General):

  1. Upload the calibration sketch to your M5Stack Core.
  2. Ensure no weight is on the scale and perform a tare() operation to zero the scale.
  3. Place a known weight (e.g., 5kg) on the scale.
  4. Read the raw ADC value for this known weight.
  5. Calculate the scale factor: (raw_reading_with_weight - raw_reading_without_weight) / known_weight_in_units.
  6. Set this scale factor using set_scale().
  7. Verify accuracy by placing different known weights.

5.2 Reading Weight

Once calibrated, you can read the weight using functions provided by the HX711 library. The get_units() function typically returns the weight in the units defined during calibration (e.g., grams or kilograms).

void loop() {
  Serial.print("Weight: ");
  Serial.print(scale.get_units(), 1); // Get weight in units, 1 decimal place
  Serial.println(" kg"); // Or " g" depending on your calibration
  delay(100);
}
            
Assembled scale kit with display showing weight
Figure 8: An assembled M5Stack Scale Kit connected to an M5Stack Core displaying a weight reading of "0kg".

6. Consells d'usuari

  • Superfície estable: Always place the scale on a flat, stable surface to ensure accurate readings. Vibrations or uneven surfaces can significantly affect precision.
  • Consistent Cover Plate: Use a cover plate that is rigid and does not flex under load. The material and thickness of the plate can influence the overall accuracy and maximum load.
  • Factors ambientals: Temperature fluctuations can affect strain gauge readings. For best accuracy, operate the scale in a stable temperature environment.
  • Integritat del cablejat: Ensure all wiring connections are secure and properly insulated to prevent interference and ensure reliable data transmission.
  • Calibració regular: For applications requiring high accuracy, recalibrate the scale periodically or if it has been moved or subjected to significant temperature changes.

7. Solució De Problemes

  • Lectures inexactes:
    • Ensure the scale is properly calibrated. Recalibrate if necessary.
    • Check for any physical obstructions or uneven loading on the cover plate.
    • Verify that the strain gauges are securely attached and not damaged.
    • Confirm that the cover plate is rigid and not flexing excessively.
  • No Readings / Erratic Readings:
    • Check all wiring connections between the strain gauges, the HX711 Weight Unit, and the M5Stack Core. Ensure they are firm and correct according to the PinMap.
    • Verify power supply to the HX711 module and M5Stack Core.
    • Ensure the correct GPIO pins are defined in your code for DAT and CLK.
    • Test individual components if possible (e.g., check if the HX711 module is communicating).
  • Scale Not Zeroing (Tare Issue):
    • Ensure no weight is on the scale when calling the tare() funció.
    • Check for any residual stress on the strain gauges or the cover plate.

8. Manteniment

  • Neteja: Keep the strain gauges and the HX711 module clean and free from dust, dirt, or moisture. Use a soft, dry cloth for cleaning. Avoid using harsh chemicals or abrasive materials.
  • Protecció del medi ambient: Protect the components from extreme temperatures, humidity, and direct sunlight.
  • Inspecció física: Periodically inspect the wiring and connections for any signs of wear, corrosion, or damage. Ensure the strain gauges remain firmly attached to the cover plate.
  • Actualitzacions de programari: Keep your M5Stack Core firmware and HX711 library up to date to benefit from performance improvements and bug fixes.

9. Garantia i Suport

For warranty information, technical support, and further resources, please refer to the official M5Stack documentation and support channels. You can typically find detailed information on the M5Stack Official Store website or their community forums.

Documents relacionats - K121

Preview Guia d'operació i configuració de l'M5StickC Plus2
Guia completa de la placa de desenvolupament M5StickC Plus2 de M5Stack, que cobreix la configuració, el flasheig de firmware, les característiques, les especificacions i les aplicacions per a projectes d'IoT.
Preview Placa de desenvolupament M5Stack StickC-Plus2: característiques, especificacions i ús
Més detallatview de la M5Stack StickC-Plus2, una placa de desenvolupament ESP32-PICO-V3-02 compacta. Cobreix les característiques, les especificacions tècniques, les opcions de programació com ara UIFlow i Arduino IDE, la gestió d'energia i les comparacions de maquinari.
Preview M5StickC: Placa de desenvolupament IoT ESP32 portàtil i tutorials
Exploreu l'M5StickC, una placa de desenvolupament IoT compacta i de codi obert basada en ESP32. Aquesta guia proporciona especificacions, mapes de pins, instal·lació de controladors i una col·lecció completa de tutorials i projectes per a la creació ràpida de prototips amb UIFlow, MicroPython i Arduino.
Preview Manual d'usuari de M5STICKC Lite - M5Stack
Manual d'usuari complet per a la placa de desenvolupament M5STICKC Lite de M5Stack. Cobreix la composició del maquinari, les descripcions dels pins, les característiques de l'ESP32-PICO-V3, la gestió d'energia, la configuració del desenvolupament de l'Arduino IDE i UIFlow, la gravació de firmware, la configuració de WiFi, BLE UART i el compliment de la FCC.
Preview M5Stack Atom-Lite: Placa de desenvolupament ESP32 compacta | Més deview i especificacions
Descobreix l'M5Stack Atom-Lite (SKU: C008), una placa de desenvolupament ESP32-PICO-D4 compacta per a sistemes integrats i IoT. Aprèn sobre les seves característiques, especificacions, GPIO, compatibilitat de programari (Arduino, UiFlow) i aplicacions.
Preview Placa de desenvolupament IoT M5Stack NanoC6: Guia d'inici ràpid i especificacions
Una guia completa de la M5Stack NanoC6, una placa de desenvolupament IoT en miniatura i de baix consum alimentada per la MCU ESP32-C6. Detalla les capacitats de la placa, incloent-hi Wi-Fi 6, Zigbee i Bluetooth 5.0, proporciona especificacions tècniques i ofereix una guia d'inici ràpid amb instruccions per a la configuració de l'IDE d'Arduino, la comunicació sèrie Bluetooth, l'escaneig WiFi i la funcionalitat Zigbee.