Estou com dificuldade para medição de um sensor de carga de capacidade 50kg usando o módulo HX711 e um Arduino UNO. Eu gostaria de saber se alguém tem ideia do que pode estar acontecendo, visto que já segui todos os tutoriais possíveis. O erro estaria nas conexões, no módulo ou no sensor? Segue em foto o circuito montado, com exceção de eu ter tirado o display (LCD). Além disso, também coloquei o print do monitor serial, onde o valor supostamente medido sofre alterações aleatórias mesmo sem ela estar sendo pressionada.
Obrigada por ter respondido! Eu fiz isso hoje pela manhã e tudo funcionou por alguns minutos, porém do nada a célula volta a realizar medições aleatórias mesmo que nenhum peso esteja sobre ela. Estou pensando se seriam os jumpers (fios) que podem estar fazendo conexões "frouxas". Eu não tenho outra ideia, porque hora dá certo e hora não dá. Segue meu código abaixo (modelo que achei em um site americano):
/*
Setup your scale and start the sketch WITHOUT a weight on the scale
Once readings are displayed place the weight on the scale
Press +/- or a/z to adjust the calibration_factor until the output readings match the known weight
Arduino pin 6 -> HX711 CLK
Arduino pin 5 -> HX711 DOUT
Arduino pin 5V -> HX711 VCC
Arduino pin GND -> HX711 GND
*/
#include "HX711.h"
HX711 scale(5, 6);
float calibration_factor = 32000; // this calibration factor is adjusted according to my load cell
float units;
void setup() {
Serial.begin(9600);
Serial.println("HX711 calibration sketch");
Serial.println("Remove all weight from scale");
Serial.println("After readings begin, place known weight on scale");
Serial.println("Press + or a to increase calibration factor");
Serial.println("Press - or z to decrease calibration factor");
scale.set_scale();
scale.tare(); //Reset the scale to 0
long zero_factor = scale.read_average(); //Get a baseline reading
Serial.print("Zero factor: "); //This can be used to remove the need to tare the scale. Useful in permanent scale projects.
Serial.println(zero_factor);
}
void loop() {
scale.set_scale(calibration_factor); //Adjust to this calibration factor
Serial.print("Reading: ");
units = scale.get_units(), 10;
if (units < 0)
{
units = 0.0;
}
Serial.print(units);
Serial.print(" kg");
Serial.print(" calibration_factor: ");
Serial.print(calibration_factor);
Serial.println();
delay(500);