【问题标题】:Load cell Arduino HX711 Fluctuating up称重传感器 Arduino HX711 上下波动
【发布时间】:2022-01-01 11:20:40
【问题描述】:

我用四个 50 Kg 称重传感器和 HX711 放大器构建了一个 Arduino 浴室秤。一些称重传感器线连接在一起以形成惠斯通电桥布置。我使用的是 Arduino MEGA 2560。我之前在另一个工作站上构建了相同的比例,并且效果很好。我的新站不停地波动,即使秤上没有任何重量。 这是我的校准:

#include "HX711.h"

#define LOADCELL_DOUT_PIN  3
#define LOADCELL_SCK_PIN  2

HX711 scale;

float calibration_factor = -6440; //-6440 worked for my previous scale setup

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.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
  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: ");
  Serial.print(scale.get_units(), 2);
  Serial.print(" kg"); //Change this to kg and re-adjust the calibration factor if you follow SI units like a sane person
  Serial.print(" calibration_factor: ");
  Serial.print(calibration_factor);
  Serial.println();

  if(Serial.available())
  {
    char temp = Serial.read();
    if(temp == '+' || temp == 'a')
      calibration_factor += 10;
    else if(temp == '-' || temp == 'z')
      calibration_factor -= 10;
  }
}

【问题讨论】:

  • 这次有什么不同,是软件还是电子部分?希望不是两者兼而有之。只是想知道你说的第一个项目和这个项目有什么不同。
  • 实际上没有什么不同。我正在使用相同的软件和称重传感器。我检查了所有内容,但似乎无法发现问题。

标签: arduino


【解决方案1】:

我最近买了一些非常便宜的(5 个 10.00 美元)HX 711 板。我注意到你做的同样的事情;价值向上漂移。我检查了车载称重传感器电源,它似乎有缺陷。应该是 1.25 伏的带隙参考电压 (VBG) 实际上是 1.9 伏,因此车载调节器只是将输入的 5 伏直接发送到称重传感器;没有规定。 5伏可能漂移,HX711上的传输晶体管的电压降可能随温度变化。我买的所有 5 块板都以相同的方式运行。如果我只是将发射极短接到传输晶体管上的集电极,我可能会得到更少的漂移。我会尝试购买“Real”板,看看是否更好。

【讨论】:

    猜你喜欢
    • 2019-08-02
    • 2013-07-01
    • 1970-01-01
    • 2021-12-02
    • 1970-01-01
    • 2014-10-17
    • 2016-04-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多