Sensor de Peso (LOAD CELL) 0-1KG

:SEN15028
7,90 €
preço com IVA incluído

Sensor de peso capaz de pesar até 1kg.

Para ligares este sensor a um Arduino irás precisar do amplificador HX711.

No link seguinte poderá encontrar um tutorial de como usar este tipo de sensores com Arduino:

Getting Started with Load Cells

Quantidade

DESCRIÇÃO EM PORTUGUÊS BREVEMENTE DISPONÍVEL

Se tiver alguma dúvida neste produto não hesite em contactar-nos.

*Atenção: as imagens são meramente ilustrativas.

Sensor Properties

Weight Capacity Max     1 kg
 

Physical Properties

Operating Temperature Min     -10 °C
Operating Temperature Max     40 °C

 

Wiring Load Cell and HX711 Amplifier to the Arduino

The HX711 amplifier communicates via two-wire interface. You can connect it to any digital pins of your Arduino board. We’re connecting the data pin (DT) to Pin 2 and the clock pin (CLK) to Pin 3.

Follow the next table or schematic diagram to wire the load cell to the Arduino board.

Load Cell HX711 HX711 Arduino
Red (E+) E+ GND GND
Black (E-) E- DT Pin 2
White (A-) A- SCK Pin 3
Green (A+) A+ VCC 5V

Arduino with Load Cell HX711 Wiring Schematic Diagram

 

 

Calibrating the Scale (Arduino with Load Cell)

At this time, we assume you have wired the load cell to the HX711 amplifier and the amplifier to the Arduino board. You should also have your scale set up, and have installed the HX711 library.

Before getting the weight of objects, you need to calibrate your load cell first by getting the calibration factor. Your calibration factor will be different than mine, so you shouldn’t skip this section.

1) Prepare an object with a known weight. I used my kitchen scale and weighed a glass with water (107g).

2) Upload the following code to your Arduino board. We wrote the following code taking into account the instructions to calibrate the load cell provided by the library documentation.

/*
  Rui Santos
  Complete project details at https://RandomNerdTutorials.com/arduino-load-cell-hx711/
*/

// Calibrating the load cell
#include "HX711.h"

// HX711 circuit wiring
const int LOADCELL_DOUT_PIN = 2;
const int LOADCELL_SCK_PIN = 3;

HX711 scale;

void setup() {
  Serial.begin(57600);
  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
}

void loop() {

  if (scale.is_ready()) {
    scale.set_scale();   
    Serial.println("Tare... remove any weights from the scale.");
    delay(5000);
    scale.tare();
    Serial.println("Tare done...");
    Serial.print("Place a known weight on the scale...");
    delay(5000);
    long reading = scale.get_units(10);
    Serial.print("Result: ");
    Serial.println(reading);
  }
  else {
    Serial.println("HX711 not found.");
  }
  delay(1000);
}

//calibration factor will be the (reading)/(known weight)

 

After uploading, open the Serial Monitor at a baud rate of 57600 and then press the Arduino on-board RESET button.

4) Follow the instructions on the Serial Monitor: remove any weights from the scale (it will tare automatically). Then, place an object with a known weight on the scale and wait until you get a value.

5) Calculate your calibration factor using the formula:

calibration factor = (reading)/(known weight)

 

In our case, the reading is -49171. The known weight is 107g, so our calibration factor will be: -49171/107 = -459.542.

calibration factor = -49171/107 = -459.542

 

Save your calibration factor because you’ll need it later. Yours will be different than ours.

 

Weighting Objects (Arduino with Load Cell)

Now that you know your calibration factor, you can use your load cell to weight objects. Start by weighing objects with a known weight and repeat the calibration process if the values are not accurate.

Copy the following code to your Arduino IDE. Before uploading it to your board, don’t forget to insert your calibration factor in line 43/44 of the code.

/**
* Complete project details at https://RandomNerdTutorials.com/arduino-load-cell-hx711/
**/

#include
#include "HX711.h"

// HX711 circuit wiring
const int LOADCELL_DOUT_PIN = 2;
const int LOADCELL_SCK_PIN = 3;

HX711 scale;

void setup() {
  Serial.begin(57600);
  Serial.println("HX711 Demo");
  Serial.println("Initializing the scale");

  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);

  Serial.println("Before setting up the scale:");
  Serial.print("read: \t\t");
  Serial.println(scale.read());      // print a raw reading from the ADC

  Serial.print("read average: \t\t");
  Serial.println(scale.read_average(20));   // print the average of 20 readings from the ADC

  Serial.print("get value: \t\t");
  Serial.println(scale.get_value(5));   // print the average of 5 readings from the ADC minus the tare weight (not set yet)

  Serial.print("get units: \t\t");
  Serial.println(scale.get_units(5), 1);  // print the average of 5 readings from the ADC minus tare weight (not set) divided
            // by the SCALE parameter (not set yet)

  scale.set_scale(-459.542);
  //scale.set_scale(-471.497);                      // this value is obtained by calibrating the scale with known weights; see the README for details
  scale.tare();               // reset the scale to 0

  Serial.println("After setting up the scale:");

  Serial.print("read: \t\t");
  Serial.println(scale.read());                 // print a raw reading from the ADC

  Serial.print("read average: \t\t");
  Serial.println(scale.read_average(20));       // print the average of 20 readings from the ADC

  Serial.print("get value: \t\t");
  Serial.println(scale.get_value(5));   // print the average of 5 readings from the ADC minus the tare weight, set with tare()

  Serial.print("get units: \t\t");
  Serial.println(scale.get_units(5), 1);        // print the average of 5 readings from the ADC minus tare weight, divided
            // by the SCALE parameter set with set_scale

  Serial.println("Readings:");
}

void loop() {
  Serial.print("one reading:\t");
  Serial.print(scale.get_units(), 1);
  Serial.print("\t| average:\t");
  Serial.println(scale.get_units(10), 5);

  delay(5000);
}

 

Documents:

HX711 Arduino Library

SEN15028

Também poderá gostar