APP下载

基于STC8A8K与HX711的高精度电子秤设计

2021-09-03张良玉罗龙伏钊

今日自动化 2021年6期

张良玉 罗龙 伏钊

[摘    要 ]设计制作以电阻应变片为称重传感器的电子称重装置,所在金属悬臂梁上黏贴应变片作为称重传感器。使用了12 V的锂电池自制充电器,称重装置使用了上电自校准功能,并使用LCD液晶屏进行响应数据的显示,在称重为2.00~500 g之间,称重误差要求小于0.50 g,具有去皮功能,去皮范围不超过50 g,并且可以设置单价(元/g),可计算物品金额并实现金额累加、报警和语音等相应功能。

[关键词]自制充电器;LCD液晶屏;去皮功能;设置单价;金额累加

[中图分类号]TH715.1 [文献标志码]A [文章编号]2095–6487(2021)06–0–03

[Abstract]An electronic weighing device with resistance strain gauges as load cells is designed and manufactured, and the strain gauges are pasted on the metal cantilever beam as the load cells. A 12 V lithium battery self-made charger is used, the weighing device uses the power-on self-calibration function, and the LCD screen is used to display the desired data. The weighing error is required to be less than 0.50 g within the weighing range of 2.00-500 g , When the weight is above 50 g, the weighing error is less than 1.00 g, with tare function, the tare range does not exceed 50 g, and the unit price (yuan/gram) can be set, the amount of items can be calculated and the amount of money can be accumulated, alarm and voice, etc. Features.

[Keywords]self-made charger; LCD screen; peeling function; set unit price; sum total

1 方案論证与比较

1.1 重力采样方法比较与选择

在全桥电路中输出电压较小,一般为几毫伏到几十毫伏,所以在进行AD转换之前需要先将电路输出信号进行放大处理,再将放大过后的信号进行AD转换,通过AD把信号转换为电信号输送给MCU进行运算处理。

(1)用OP07将采集的信号进行放大,最后通过ADC0809将所放大的采集信号进行AD转换为数字信号,最后送MCU处理。

(2)直接由32位MCU的定时中断进行信号的采集,然后对信号分析。

(3)将采集的信号通过HX711进行AD转换为数字信号,然后将信号送给MCU处理。

HX711是一款24位的AD转换芯片,内部集成了包括稳压源和信号放大器,片内时钟震荡等其他同类型转换芯片所需要的的电路。所以使用HX711不仅信号稳定、精度高、切电路简单,而且成本较低。

1.2 处理器的选择

(1)使用传统8051内核单片机,运行速度慢,程序储存空间小。

(2)使用增强型8051内核单片机,运行速度快程序储存空间可达64K,成本低、操作方便、电路简单。……

登录APP查看全文