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 HX711 Wägezellen-Verstärkermodul an einen Arduino UNO oder ESP32 an, mit einem Beispiel-Sketch, den du direkt hochladen kannst.

Gewichtsmessung mit HX711-Verstärker

Dieses Beispiel verbindet ein HX711 24-Bit-ADC-Modul mit dem Arduino Uno, um Gewichtsdaten von einer Wägezelle auszulesen. Beim Start tariert das Modul die Waage (setzt sie auf Null) und gibt fortlaufend Gewichtsmessungen im Seriellen Monitor aus.

Anschlussplan: HX711 Wägezellen-Verstärkermodul an einem Arduino UNO
Anschlussplan · Zum Vergrößern klicken
Anschlusstabelle: HX711 Wägezellen-Verstärkermodul an einem Arduino UNO
Anschlusstabelle · Zum Vergrößern klicken
Weight_Reading_with_HX711_Amplifier.ino · kompiliert und getestet
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : Weight Reading with HX711 Amplifier
 *  Board     : Arduino UNO (arduino:avr:uno)
 *  Parts     : HX711 Load Cell Amplifier
 *  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 DOUT_PIN = 3;
const int SCK_PIN = 2;

HX711 scale;

void setup() {
  Serial.begin(115200);
  Serial.println(F("HX711 Load Cell Demo"));

  scale.begin(DOUT_PIN, SCK_PIN);

  Serial.println(F("Taring... ensure no weight is on the scale."));
  scale.set_scale();
  scale.tare();
  Serial.println(F("Tare complete. Place weight on load cell."));
}

void loop() {
  if (scale.is_ready()) {
    long reading = scale.get_units(5);
    Serial.print(F("Reading: "));
    Serial.println(reading);
  } else {
    Serial.println(F("HX711 not detected."));
  }
  delay(500);
}

Benötigte Bibliotheken: HX711 Arduino Library 0.7.5

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

HX711 Gewichtsmessung mit Load Cell

Dieses Projekt verbindet einen HX711 24-bit Load-Cell-Verstärker mit dem ESP32. Beim Start tariert der Sketch die Waage und gibt anschließend kontinuierlich rohe Load-Cell-Messwerte im Serial Monitor mit 115200 baud aus. Die Versorgung des HX711 mit 3.3V stellt sicher, dass die Signalpegel direkt mit den GPIOs des ESP32 kompatibel sind.

Anschlussplan: HX711 Wägezellen-Verstärkermodul an einem ESP32 DevKit V1
Anschlussplan · Zum Vergrößern klicken
Anschlusstabelle: HX711 Wägezellen-Verstärkermodul an einem ESP32 DevKit V1
Anschlusstabelle · Zum Vergrößern klicken
HX711_Load_Cell_Weight_Measurement.ino · kompiliert und getestet
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : HX711 Load Cell Weight Measurement
 *  Board     : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
 *  Parts     : HX711 Load Cell Amplifier
 *  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 (GPIO 19 for DOUT, GPIO 18 for SCK)
const int DOUT_PIN = 19;
const int SCK_PIN = 18;

HX711 scale;

void setup() {
  Serial.begin(115200);
  while (!Serial) { delay(10); }

  Serial.println("HX711 Weight Sensor Demo");
  scale.begin(DOUT_PIN, SCK_PIN);

  Serial.println("Initializing sensor...");
  delay(1000);

  if (scale.is_ready()) {
    scale.set_scale();    // Set default scale factor
    scale.tare();         // Reset the scale to 0 (tare)
    Serial.println("Tare complete. Place weight on the load cell.");
  } else {
    Serial.println("HX711 not detected. Check wiring.");
  }
}

void loop() {
  if (scale.is_ready()) {
    long reading = scale.get_units(5); // Average of 5 readings
    Serial.print("Raw reading: ");
    Serial.println(reading);
  } else {
    Serial.println("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