0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

如何制作张力秤

454398 来源:网络整理 作者:佚名 2019-11-09 09:57 次阅读
加入交流群
微信小助手二维码

扫码添加小助手

加入工程师交流群

步骤1:安装称重传感器

首先,我们要安装称重传感器。您的坐骑将是唯一的,但是这里是您需要遵循的准则:

1。钢制称重传感器是一块板,中间装有应变片。称重传感器通过感应称重传感器弯曲多少来测量力。

2。支架通过称重传感器梁两端的孔连接。托架的形状使拉力施加在测力传感器梁的中心。由于其形状和固定位置,拉动托架时称重传感器梁会弯曲。

3。将括号钩到要测量的内容上。为此,最好使用可以自由移动的东西(例如链,钩,结实的绳子或扎带)。您希望称重传感器和托架组件能够使其自身在称重方向上居中,以便测量准确。

步骤2:为称重传感器和HX711接线

请参阅接线图,以了解如何连接称重传感器,HX711和Arduino

在所示的行李箱式称重传感器上,有多个应变仪已经连接到惠斯通电桥。您所需要做的就是以正确的方向将导线连接到HX711板上。

步骤3:将HX711库添加到Arduino IDE

HX711库位于此处:https://github.com/bogde/HX711

有关如何将库添加到Arduino IDE的说明,请参见Arduino网站上的此链接:https://www。 arduino.cc/zh-CN/Guide/Libraries

步骤4:校准并称重!

Sparkfun有出色的Arduino程序可以运行规模。最新版本可以在GitHub上找到,并在下面转载:https://github.com/sparkfun/HX711-Load-Cell-Amplifier

第一步是确定秤的校准因子。为此,请运行以下代码

/*

Example using the SparkFun HX711 breakout board with a scale

By: Nathan Seidle

SparkFun Electronics

Date: November 19th, 2014

License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license)。

This is the calibration sketch. Use it to determine the calibration_factor that the main example uses. It also

outputs the zero_factor useful for projects that have a permanent mass on the scale in between power cycles.

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

Use this calibration_factor on the example sketch

This example assumes pounds (lbs)。 If you prefer kilograms, change the Serial.print(“ lbs”); line to kg. The

calibration factor will be significantly different but it will be linearly related to lbs (1 lbs = 0.453592 kg)。

Your calibration factor may be very positive or very negative. It all depends on the setup of your scale system

and the direction the sensors deflect from zero state

This example code uses bogde‘s excellent library:“https://github.com/bogde/HX711”

bogde’s library is released under a GNU GENERAL PUBLIC LICENSE

Arduino pin 2 -》 HX711 CLK

3 -》 DOUT

5V -》 VCC

GND -》 GND

Most any pin on the Arduino Uno will be compatible with DOUT/CLK.

The HX711 board can be powered from 2.7V to 5V so the Arduino 5V power should be fine.

*/

#include “HX711.h”

#define DOUT 3

#define CLK 2

HX711 scale;

float calibration_factor = -7050; //-7050 worked for my 440lb max 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(DOUT, CLK);

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(), 1);

Serial.print(“ lbs”); //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;

}

}

在校准秤后,您可以运行以下示例程序,然后将其用于自己的目的:

/*

Example using the SparkFun HX711 breakout board with a scale

By: Nathan Seidle

SparkFun Electronics

Date: November 19th, 2014

License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license)。

This example demonstrates basic scale output. See the calibration sketch to get the calibration_factor for your

specific load cell setup.

This example code uses bogde‘s excellent library: “https://github.com/bogde/HX711”

bogde’s library is released under a GNU GENERAL PUBLIC LICENSE

The HX711 does one thing well: read load cells. The breakout board is compatible with any wheat-stone bridge

based load cell which should allow a user to measure everything from a few grams to tens of tons.

Arduino pin 2 -》 HX711 CLK

3 -》 DAT

5V -》 VCC

GND -》 GND

The HX711 board can be powered from 2.7V to 5V so the Arduino 5V power should be fine.

*/

#include “HX711.h”

#define calibration_factor -7050.0 //This value is obtained using the SparkFun_HX711_Calibration sketch

#define DOUT 3

#define CLK 2

HX711 scale;

void setup() {

Serial.begin(9600);

Serial.println(“HX711 scale demo”);

scale.begin(DOUT, CLK);

scale.set_scale(calibration_factor); //This value is obtained by using the SparkFun_HX711_Calibration sketch

scale.tare(); //Assuming there is no weight on the scale at start up, reset the scale to 0

Serial.println(“Readings:”);

}

void loop() {

Serial.print(“Reading: ”);

Serial.print(scale.get_units(), 1); //scale.get_units() returns a float

Serial.print(“ lbs”); //You can change this to kg but you‘ll need to refactor the calibration_factor

Serial.println();

}

责任编辑:wv

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
  • HX711
    +关注

    关注

    7

    文章

    66

    浏览量

    45718
  • Arduino
    +关注

    关注

    190

    文章

    6515

    浏览量

    195990
收藏 人收藏
加入交流群
微信小助手二维码

扫码添加小助手

加入工程师交流群

    评论

    相关推荐
    热点推荐

    广州唯创电子WT588F02KD-40N:当电子学会“说话”,一颗语音芯片如何重塑家庭健康终端?

    清晨的厨房,当您站上智能电子,一个清晰温柔的语音随即响起:“您的体重是58.6公斤,体脂率22.3%。”这不再是科幻电影中的场景,而是广州唯创电子,通过一颗高度集成的语音芯片
    的头像 发表于 11-13 08:56 448次阅读
    广州唯创电子WT588F02KD-40N:当电子<b class='flag-5'>秤</b>学会“说话”,一颗语音芯片如何重塑家庭健康终端?

    引领AI图像识别+营养分析技术!涂鸦AI食物方案,端云协同可分析30万种食物

    近两年,中国牌AI食物彻底火了,一些品牌单品在亚马逊月销量突破2万台,长期霸榜厨房用品类前三名。在AIIPC与精密传感技术的助力下,AI食物不仅能通过AI算法自动识别食材、精准称重,还可同步分析
    的头像 发表于 11-07 18:32 370次阅读
    引领AI图像识别+营养分析技术!涂鸦AI食物<b class='flag-5'>秤</b>方案,端云协同可分析30万种食物

    广州唯创电子WTN6040-8S语音芯片:智能电子体重的语音解决方案

    1.引言:智能健康管理的新需求随着人们健康意识的不断提升,智能电子体重已从简单的称重工具升级为综合健康管理设备。现代消费者不仅需要精确测量体重,更希望获得体脂率、肌肉量、骨密度等多项健康数据,并
    的头像 发表于 09-04 09:28 287次阅读
    广州唯创电子WTN6040-8S语音芯片:智能电子体重<b class='flag-5'>秤</b>的语音解决方案

    智能蓝牙厨房方案开发设计

    随着人们对健康饮食和烹饪便捷性的追求,传统的厨房已经无法满足人们的需求。现在,借助辉芒微8位MCU,我们可以打造一款智能蓝牙厨房,它不仅具备高精度的称重功能,还能通过蓝牙与手机无缝连接,实现数据
    的头像 发表于 08-26 16:09 477次阅读
    智能蓝牙厨房<b class='flag-5'>秤</b>方案开发设计

    解密基于磁编码器的印刷张力控制系统精度提升技术

    在印刷行业,张力控制可是个至关重要的环节。想象一下,如果印刷过程中张力不稳定,那印出来的东西可能就像一幅抽象派画作,歪歪扭扭、图案模糊,根本没法看。而基于磁编码器的印刷张力控制系统,就像是印刷过程中的“定海神针”,它的精度直接决
    的头像 发表于 08-18 17:29 530次阅读
    解密基于磁编码器的印刷<b class='flag-5'>张力</b>控制系统精度提升技术

    PCB 板表面张力对三防漆涂覆的影响及改善方法

    PCB板表面张力与三防漆的涂覆质量密切相关:当板面张力低于漆料张力时,漆料会像“荷叶上的水珠”收缩成块,出现缩边、漏涂、针孔;当张力过高且不稳定时,又可能因润湿性过强导致流挂。这种“不
    的头像 发表于 07-28 09:33 485次阅读
    PCB 板表面<b class='flag-5'>张力</b>对三防漆涂覆的影响及改善方法

    工业安卓主板在智能电子设备中的应用

    随着工业自动化与智能化需求的增长,工业安卓主板凭借其高可靠性、灵活性和扩展性,逐渐成为智能电子设备的核心控制单元。以下从技术特性、应用场景、功能实现及优势等方面详细分析工业安卓主板在智能电子中的应用。
    的头像 发表于 04-18 16:00 594次阅读
    工业安卓主板在智能电子<b class='flag-5'>秤</b>设备中的应用

    #电子 有没有朋友知道这个电子是什么问题

    电子
    jf_16202292
    发布于 :2025年03月14日 18:27:23

    皮带PLC数据采集远程监控系统方案

    一、系统概述 皮带PLC数据采集远程监控系统主要针对皮带位置分散、计量监督管理难、称重数据传输滞后、计量数据误差大等问题,通过集成PLC数据采集、无线通信技术、云计算和大数据分析等技术,实现
    的头像 发表于 03-14 14:02 656次阅读
    皮带<b class='flag-5'>秤</b>PLC数据采集远程监控系统方案

    体脂语音芯片方案-WTV380芯片的应用节约BOM综合成本

    随着健康管理意识的提升,智能体脂逐渐成为家庭健康监测的重要工具。用户不仅关注体重数据,还希望通过体脂获取体脂率、肌肉量、基础代谢率等多项健康指标。同时,智能体脂的交互体验也成为产品竞争力
    的头像 发表于 03-07 15:35 604次阅读
    体脂<b class='flag-5'>秤</b>语音芯片方案-WTV380芯片的应用节约BOM综合成本

    使用Labview做一个485串口电子程序

    232、485串口通讯是最常见的仪器仪表通讯方式之一,本文详细介绍,用Labview编写一个电子的485串口程序.
    发表于 03-06 18:11 0次下载

    张力控制变频收卷程序方案

    张力控制变频收卷程序方案
    发表于 12-24 14:36 1次下载

    基于PLC的拉丝机张力控制系统研究

    拉丝机张力控制的关键计算公式
    发表于 12-24 14:35 2次下载

    咖啡电子PCBA方案设计

    在当今科技飞速发展的时代,电子在各个领域都发挥着重要作用。而在咖啡领域,一款精准可靠的电子更是不可或缺。今天我们就来聊聊咖啡电子方案的功能实现。 一、主要性能指标 开机方式: 按键开机、上电
    的头像 发表于 12-11 17:04 808次阅读

    鼎盛合——蓝牙体脂方案设计

    在当今社会,人们对健康的关注度越来越高,对健康管理工具的需求也日益增长。蓝牙体脂作为一种创新的健康管理设备,正逐渐成为人们日常生活中的必备品。今天我们就来聊聊蓝牙体脂方案,从它的软硬件方面剖析
    的头像 发表于 12-10 16:04 910次阅读