摘要
摘 要
智能电子秤是将检测与转换技术、计算机技术、信息处理、数字技术等技术综合一体的现代新型称重仪器。它与我们日常生活紧密结合成为一种方便、快捷、称量精确的工具,广泛应用于商业、工厂生厂、集贸市场、超市、大型商场、及零售业等公共场所的信息显示和重量计算。
智能电子称主要以单片机作为中心控制单元,通过称重传感器进行模数转换单元,在配以键盘、显示电路及强大软件来组成。该电子称不但计量准确、快速方便,更重要的自动称重、计价功能外,还能自动计算,数字显示,受到广大用户欢迎。智能电子称由于携带方便,使用简单,对人们生活的影响越来越大。
本系统是针对是电子称的自动称重、自动计价、数据处理进行研究的。为了阐明用单片机是如何对采样数据进行处理,对数据的采集和转换、计算问题进行了研究。讨论了单片机控制系统中关键的中断、计算问题,结果表明通过软件设计实现更完善。本文在给出智能电子称硬件设计的基础上,详细分析了电子称的软件控制方法。由于单片机控制的电子称结构简单,成本低廉,深受人们的喜爱,本文将对此进行详细讨论。 关键词
电子秤;单片机;A/D转换;称重传感器
I
严正长:电子秤设计
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 , 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 single flat machine as central control unit, value sensor to carry out modulus conversion unit , it is matching with keyboard , show circuit 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, it is more and more big to use the simple influence for that people live.
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.
Keywords
Intelligence electronic weighing ; MCU; A/D converter; weighing sensor ;
II
目录
目 录
摘 要 ........................................................................................................ I Abstract .................................................................................................... II 绪论........................................................................................................... 1 1. 智能电子秤系统的概况 ....................................................................... 2 1.1 电子秤的发展史 ........................................................................... 2 1.2 智能电子秤应用范围 ................................................................. 2 1.3智能电子秤的研究动态................................................................. 2 2.智能电子秤的工作原理 ......................................................................... 4 2.1 智能电子秤性能及技术要求 ........................................................ 4 2.2 工作原理 ...................................................................................... 4 2.3 基本结构 ...................................................................................... 4 3 智能电子秤的硬件设计 ......................................................................... 5 3.1信号采集电路 ............................................................................... 5 3.2 单片机控制系统 ........................................................................... 7 3.3键盘显示接口电路 ...................................................................... 10 4 智能电子秤的软件设计 ....................................................................... 13 4.1主程序设计 ................................................................................. 13 4.1.1主程序设计思路 ................................................................. 13 4.1.2 主程序工作原理............................................................... 14 4.1.3 主程序流程框图 ................................................................ 15 4.2系统初始化 ................................................................................. 16
III
严正长:电子秤设计
4.2.1 AT89C52的初始化 .......................................................... 16 4.2.2 8279的初始化 ................................................................. 18 4.2.3 ICL7109的初始化 ........................................................... 18 4.3 A/D转换结果处理程序 ............................................................. 18 4.3.1 A/D转换过程 ................................................................... 18 4.3.2采样数据处理 ...................................................................... 19 4.4 键盘与显示处理程序 .................................................................. 19 4.4.2 键盘模块 ............................................................................ 20 4.5数据处理程序 .............................................................................. 23 4.5.1 重量输出 ............................................................................ 23 4.5.2 置零 .................................................................................. 23 5机械部分 ............................................................................................... 25 5.1设计原理...................................................................................... 25 5.2各个零部件的作用....................................................................... 27 结 论 ..................................................................................................... 28 致 谢 ..................................................................................................... 30 参考文献.................................................................................................. 31 附录一 系统主程序 ............................................................................. 32
IV
华东交通大学毕业设计
绪论
随着科学技术和经济的发展,出售商品品种的增加,需要称量物品的设备也需要更新换代,人们对称重装置的要求也越,电子称重装置推广,从而进入到传感器,电子学和微处理机领域、使得称重装置变成为电子仪器。它的特点是:精确、智能、方便、明了、可靠,克服了传统的杆秤、盘秤不精确、速度慢、不能计价、易作弊等缺点,在商业领域应用越来越多。
称重技术的突破是微处理机的应用。称重技术的这种发展是由于不仅要求获得静态称重数据,而且进一步要求称重工作的自动化,实现快速称量,以及测量各种动态参数,提高测量精度和各种数据的及时处理。这些精度、速度、性能和功能方面的要求是传统的机械测量系统无法满足的。也就是说、这种技术发展中的突破是必然的结果。
电子称重装置出现于80年代初,随着电子元器件集成化的迅速发展,随着微处理机,单片机的发展和计算机软件的开发,产品价格的下降、电子称重装置在技术上的优势;多功能、高精度、操作方便等,使得不仅实验室的传统称量装置已被电子称重装置所取代,这种趋势已经扩展到工业和其他领域。
本系统是针对自动称重、计算价格进行了研究的。讲述了用单片机控制A/D转换、键盘输入和数据显示,对如何实现键盘中断、A/D采样进行研究。着重讨论了数据处理问题,结果表明利用软件实现一系列功能使的性能价格比达最优。设计特别适用于测量精度要求较高的场合, 具有较高的实用价值和推广价值。
本课题本着电子秤向高精度、高可靠方向研究, 而且向多种功能的方向发展的思想,主要对电子秤一些简单功能进行了研究。主要通过强大软件实现多种计算和数据处理功能, 以满足多种使用的要求。
今后, 随着电子高科技的飞速发展, 电子秤技术的发展定将日新月异。同时, 功能更加齐全的高精度的先进电子秤将会不断问世, 其应用范围也会更加拓宽。
本文中第一章讲述了电子秤的发展情况,第二章讲述了电子秤的工作原理,第三章讲述了电子秤的硬件电路组成部分。第四章是本文的重点部分,详细介绍了电子秤的软件设计,及各部分功能实现的软件设计。
1