内容发布更新时间 : 2024/12/23 6:09:30星期一 下面是文章的全部内容请认真阅读。
教学单位 信息工程系 学生学号
嵌入式课程设计论文
(设计)
题 目 基于STM32的电子秤系统 学生姓名 专业名称 电子信息工程 指导教师 成 员
- I -
基于STM32 的电子秤系统设计与实现 摘要:
智能电子秤是将检测与转换技术、计算机技术、信息处理、数字技术等技术综合一体的现代新型称重仪器。它与我们日常生活紧密结合成为一种方便、快捷、称量精确的工具,广泛应用于商业、工厂生厂、集贸市场、超市、大型商场、及零售业等公共场所的信息显示和重量计算。
本作品使用STM32单片机作为中心控制单元,通过称重传感器采集质量信息,以HX711进行模数转换单元,在配以TFT液晶显示和触摸屏控制,及WT588D进行语音播报组成。该电子称不但计量准确、快速方便,更重要的自动称重、计价功能外,还可实现去皮、净/毛转,自动计算,数字显示,语音播报,显示实时温度,实时时间。
本系统是针对是电子称的自动称重、自动计价、数据处理,语音播报进行研究的。为了阐明用单片机是如何对采样数据进行处理,对数据的采集和转换、计算问题进行了研究。讨论了单片机控制系统中关键的中断、计算问题,结果表明通过软件设计实现更完善。本文在给出智能电子称硬件设计的基础上,详细分析了电子称的软件控制方法。由于单片机控制的电子称结构简单,成本低廉,深受人们的喜爱,本文将对此进行详细讨论
关键字:
电子秤;STM32; 称重传感器;HX711; TFT液晶屏幕;WT588D
Abstract:
Intelligent electronic balance values detection and the modern new-type names of technical comprehensive one body such as conversion technical, computer technology, message handling and digital technology instrument. Its and our close combination of daily life becomes a kind of convenient, shortcut, weighing accurate tool ,
- II -
is applied extensively in commercial, factory raw factory , gathers trade market, supermarket and large scale market , the message of the etc. public place of retail trade shows and weight calculation.
Intelligent electronic name passes through name mainly with STM32 as central control unit, value sensor to carry out modulus conversion unit , it is matching with keyboard , show by TFT
and powerful software to form. It is accurate that this electron claims to not only measure , fast convenience, more important automatic name may still realize besides heavy, valuation function to remove the peel , completely / hair turns , calculate voluntarily, figure shows , is welcomed by masses of user. Intelligent electronic name since carry convenience.
This system aims at is the automatic name of electronic name heavy, automatic valuation and data handling carry out research. To expound to use single flat machine , it is to how to carry out handling for sampling data , is for the collection of data and conversion and calculation problem has studied. Have discussed the suspension of the key in single flat machine control system , calculate problem , show as a result that through software design, realization is perfected more. This text is weighing the foundation of hardware design to intelligent electron , has analysed the software control method of electronic name in detail. Since the electron of single flat machine control weighs structure, is simple, cost is cheap, receive deeply people like , this text will carry out detailed discussion for this.
Key words:
Intelligent and electronic to scale; Single flat machine 89c52; Weigh heavy sensor; LED shows
- III -
目 录
摘 要 ...................................................................................................... 错误!未定义书签。 Abstract ..................................................................................................... 错误!未定义书签。 第1章 绪 论 ......................................................................................................................... 8 1.1 课题来源及研究的目的和意义 .................................................................................. 8 1.2 本论文的技术要求和主要工作 .................................................................................. 9 第2章 电子秤的总体设计方案 ......................................................................................... 10 2.1 电子秤称重系统的整体设计方案 ............................................................................ 10 2.2 系统基本功能及其性能指标 .................................................................................... 10 2.3 称重传感器要求及选择 ............................................................................................. 11 2.4 质量的计算................................................................................................................... 12 第3章 电子秤硬件电路设计 ............................................................................................. 13 3.1 A/D采集的电路设计 ................................................................................................... 13 3.2 单片机外扩电路设计 ................................................................................................. 14 3.2.1 STM32F103RBT6的最小系统硬件设计 .......................................................... 14 3.2.2 TFT液晶屏的硬件电路设计 ............................................................................... 16 3.2.3 WT588D语音模块的硬件电路设计 .................................................................. 17 3.2.4 电源模块的硬件电路设计 .................................................................................. 18 第4章 测量装置的软件设计及其优化 ............................................................................ 20 4.1 单片机软件设计流程 ................................................................................................. 20 4.2 各个模块的程序设计思路及部分代码 ................................................................... 20 4.2.1 TFT触控液晶模块部分 ....................................................................................... 20 4.2.2 WT588D语音模块部分 ....................................................................................... 24 4.2.3 HX711芯片部分 ................................................................................................... 27 4.2.4 DS18B20芯片部分 ............................................................................................... 28 4.2.5 实时时钟部分 ....................................................................................................... 33 4.2.6 数据计算部分 ....................................................................................................... 34 4.3 提高测量精度的数字滤波软件设计 ........................................................................ 35 结 论 ...................................................................................................................................... 37 致 谢 ...................................................................................................................................... 38 参考文献 .................................................................................................................................. 39
- IV -
附录1:电子秤实物图 ......................................................................... 错误!未定义书签。 附录2:系统总体电路图 ..................................................................... 错误!未定义书签。 附录3:PCB电路板 ............................................................................. 错误!未定义书签。
- V -