Werktags vor 14:00 Uhr bestellt = am selben Tag versendet 30 Tage Widerrufsrecht 1 Jahr Garantie
← Zurück zur Übersicht

Beim Abspielen wird das Video von YouTube geladen.

Schaltplan und Codebeispiel

So schließt du den Gewichtsensor bis 50KG an einen Arduino UNO oder ESP32 an, mit einem Beispiel-Sketch, den du direkt hochladen kannst.

Gewichtsmessung mit 50kg Load Cell und HX711

Dieses Projekt misst das Gewicht mit einer 50kg Load Cell, die über ein HX711-Verstärkermodul mit einem Arduino Uno verbunden ist. Der Sketch tariert die Waage beim Start und gibt das gemessene Gewicht fortlaufend im Serial Monitor aus. Du kannst die Messung kalibrieren, indem du den Kalibrierungsfaktor mit einem bekannten Gewicht anpasst.

Anschlussplan: Gewichtsensor bis 50KG an einem Arduino UNO
Anschlussplan · Zum Vergrößern klicken
Anschlusstabelle: Gewichtsensor bis 50KG an einem Arduino UNO
Anschlusstabelle · Zum Vergrößern klicken
50kg_Load_Cell_Weight_Measurement_with_H.ino · kompiliert und getestet
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : 50kg Load Cell Weight Measurement with HX711
 *  Board     : Arduino UNO (arduino:avr:uno)
 *  Parts     : 50kg Load Cell Weight Sensor
 *  Libraries : HX711 Arduino Library 0.7.5
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

#include "HX711.h"

const int LOADCELL_DOUT_PIN = 3;
const int LOADCELL_SCK_PIN = 2;

HX711 scale;

// Adjust this calibration factor after testing with a known reference weight
float calibration_factor = -7050.0;

void setup() {
  Serial.begin(115200);
  while (!Serial) {
    ; // Wait for serial port to connect
  }

  Serial.println(F("--- HX711 Load Cell Scale ---"));
  Serial.println(F("Initializing scale, do not place weight on the sensor..."));

  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
  scale.set_scale(calibration_factor);
  scale.tare(); // Reset the scale to 0

  Serial.println(F("Tare complete. Ready for measurements."));
}

void loop() {
  if (scale.is_ready()) {
    float weight = scale.get_units(5);
    Serial.print(F("Weight: "));
    Serial.print(weight, 2);
    Serial.println(F(" units"));
  } else {
    Serial.println(F("HX711 not ready."));
  }

  delay(500);
}

Benötigte Bibliotheken: HX711 Arduino Library 0.7.5

Wiring diagram and example code generated by Codey.online — https://www.codey.online

50kg-Wägezelle mit HX711-Verstärker

Dieses Projekt liest Gewichtswerte von einer einzelnen 50kg half-bridge load cell mit einem HX711-Verstärker und zwei 1kΩ-Widerständen aus, um die Wheatstone-Brücke zu vervollständigen. Schließe die Schaltung an, lade den Sketch hoch und öffne den Serial Monitor mit 115200 baud, um die Gewichtssensormesswerte in Echtzeit anzuzeigen.

Anschlussplan: Gewichtsensor bis 50KG an einem ESP32 DevKit V1
Anschlussplan · Zum Vergrößern klicken
Anschlusstabelle: Gewichtsensor bis 50KG an einem ESP32 DevKit V1
Anschlusstabelle · Zum Vergrößern klicken
50kg_Load_Cell_with_HX711_Amplifier.ino · kompiliert und getestet
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : 50kg Load Cell with HX711 Amplifier
 *  Board     : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
 *  Parts     : 50kg Load Cell Weight Sensor
 *  Libraries : HX711 Arduino Library 0.7.5
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

#include "HX711.h"

// Pin definitions for HX711
const int DOUT_PIN = 19;
const int SCK_PIN = 18;

HX711 scale;

void setup() {
  Serial.begin(115200);
  Serial.println("50kg Load Cell Demo");

  scale.begin(DOUT_PIN, SCK_PIN);

  Serial.println("Taring scale... Please keep sensor unloaded.");
  delay(1000);
  scale.tare();
  Serial.println("Tare complete. Ready for readings!");
}

void loop() {
  if (scale.is_ready()) {
    long rawValue = scale.get_value(5);
    Serial.print("Raw Load Cell Value: ");
    Serial.println(rawValue);
  } else {
    Serial.println("HX711 not found or not ready.");
  }
  
  delay(500);
}

Benötigte Bibliotheken: HX711 Arduino Library 0.7.5

Wiring diagram and example code generated by Codey.online — https://www.codey.online

Zuletzt angesehen

LED-Matrix-Modul MAX7219 Blau

LED-Matrix-Modul MAX7219 Blau

€ 2,90
Vibrationssensor SW-18020P

Vibrationssensor SW-18020P

€ 0,55
Voltmeter 0V-100V Grün

Voltmeter 0V-100V Grün

€ 1,95