Op werkdagen vóór 14:00 uur besteld = dezelfde dag verzonden en in 98% van de gevallen de volgende dag in huis. Gratis retourneren 30 dagen bedenktijd 1 jaar garantie
← Terug naar overzicht

Bij afspelen wordt de video van YouTube geladen.

Aansluitschema en codevoorbeeld

Zo sluit je de Gewichtsensor tot 50KG aan op een Arduino UNO of ESP32, met een voorbeeldsketch die je direct kunt uploaden.

Gewichtsmeting met 50kg load cell en HX711

Dit project meet gewicht met een 50kg load cell die via een HX711-versterkermodule is aangesloten op een Arduino Uno. De sketch tareert de weegschaal bij het opstarten en geeft het gemeten gewicht herhaaldelijk weer op de Serial Monitor. Je kunt de meting kalibreren door de calibratiefactor aan te passen met een bekend gewicht.

Aansluitschema: Gewichtsensor tot 50KG op een Arduino UNO
Aansluitschema · Klik om te vergroten
Aansluittabel: Gewichtsensor tot 50KG op een Arduino UNO
Aansluittabel · Klik om te vergroten
50kg_Load_Cell_Weight_Measurement_with_H.ino · gecompileerd en getest
/*
 * ==================================================================
 *  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);
}

Benodigde bibliotheken: HX711 Arduino Library 0.7.5

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

50kg load cell met HX711-versterker

Dit project leest gewichtwaarden uit één 50kg half-bridge load cell met behulp van een HX711-versterker en twee 1kΩ weerstanden om de Wheatstonebrug te voltooien. Sluit het circuit aan, upload de sketch en open de Serial Monitor op 115200 baud om de real-time metingen van de gewichtsensor te bekijken.

Aansluitschema: Gewichtsensor tot 50KG op een ESP32 DevKit V1
Aansluitschema · Klik om te vergroten
Aansluittabel: Gewichtsensor tot 50KG op een ESP32 DevKit V1
Aansluittabel · Klik om te vergroten
50kg_Load_Cell_with_HX711_Amplifier.ino · gecompileerd en getest
/*
 * ==================================================================
 *  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);
}

Benodigde bibliotheken: HX711 Arduino Library 0.7.5

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