第一范文网 - 专业文章范例文档资料分享平台

基于51单片机压力检测系统设计资料 - 图文

来源:用户分享 时间:2025/8/9 4:25:03 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

基于51单片机的压力检测系统设计

摘 要:本设计借助压力传感器将压力信号转换成电信号,经过信号放大,使用高精度A/D转换器件,将模拟信号转换成数字信号,再经单片机运算处理转换成LCD液晶可以识别的信息,最后显示输出。初始化后可以重设阈值,系统能够实现手动存储八个以内的数据,并可以查询历史记录,对存储的数据进行统计分析,并且在实时压力检测的过程中,预警电路一直监视系统的运行。

本设计根据压力传感器零点补偿与非线性补偿原理,设计出了测量压力传感器的硬件电路。采用单片机设计实现,具有精度高、功能强等特点。但是由于自身的稳定性其测量结果仍存在误差。本课题设计的压力检测系统具有压力测量、超重报警、压力存储及历史数据查阅和压力值数据的统计分析。该系统的压力检测范围为0-10Kg,测量精度可以达到10g,具有高精度,低成本,易携带的特点。采用LCD12864液晶显示测量结果,比传统压力检测系统的精确度更高和直观性更好。另外,该系统电路简单,成本低,使用寿命长,应用范围广等优点。 关键词:压力传感器;A/D转换器;LCD12864

I

Design of pressure detection system based on MCU 51

Abstract:Using pressure sensor converts the pressure signal into electrical signal, after amplification, using high precision A/D conversion device that converts analog signals into digital signals in this design, then through single chip microcomputer processing into the information that LCD can identify, at last displaying and outputting information. After initialization the system can reset the threshold, achieve storing within eight data manually, and can query the history records, the statistic analysis the stored data and in the process of real-time pressure detection, early warning circuit has been monitoring the operation of the system.

This paper according to the principle of zero compensation and nonlinear compensation for pressure sensor, designing measuring pressure sensor hardware. Single-chip implementation has the characteristics of high precision, strong function. Because of its stability errors still exist in the measurement. The topic functions for pressure detection system are overweight alarm, storage, statistical analysis of historical data access and pressure value. The measurement range of the system is from 0 to 10 kg, measurement accuracy can reach to 10 g. It has the advantage of high precision, low cost, easy to carry. Measurement results display with LCD 12864 , Contrast to the traditional pressure test system, it has higher accuracy and intuitive. In addition, the system circuit is simple, low cost, long service life and wide scope of application.

Key words:Pressure sensor; A/D converter; LCD12864

II

目 录

摘 要 ......................................................................................................................................... I Abstract .................................................................................................................................... III 目 录 ...................................................................................................................................... III 1 引言 ........................................................................................................................................ 1

1.1 研究背景及意义 .......................................................................................................... 1 1.2 压力检测系统的研究现状 .......................................................................................... 1 1.3 课题任务 ...................................................................................................................... 2 2 系统分析与总体方案设计 .................................................................................................... 3 2.1 压力检测系统的整体设计 .......................................................................................... 3 2.2 压力检测系统的设计方案 .......................................................................................... 3

2.2.1 实时压力测量显示方案 .................................................................................... 4 2.2.2 实时压力监控预警方案 .................................................................................... 4

3 系统硬件电路设计 ................................................................................................................ 5

3.1 单片机系统 .................................................................................................................. 5

3.1.1 单片机选型 ........................................................................................................ 5 3.1.2 单片机晶振电路和复位电路 ............................................................................ 7 3.2 数据采集模块 .............................................................................................................. 8 3.2.1 压力传感器 ........................................................................................................ 9 3.2.2 信号放大电路 .................................................................................................. 10 3.2.3 A/D模数转换 ....................................................................................................11 3.3 人机交互模块 ............................................................................................................ 15

3.3.1 液晶显示单元 .................................................................................................. 15 3.3.2 矩阵键盘单元 .................................................................................................. 17 3.4 声光报警模块 ............................................................................................................ 18 3.5 电源供电模块 ............................................................................................................ 18 4 软件程序设计 ...................................................................................................................... 20

4.1 软件开发环境 ............................................................................................................ 20 4.2 I/O端口分配 ............................................................................................................... 21 4.3 软件主程序构架 ........................................................................................................ 22 4.4 主要功能子程序的设计 ............................................................................................ 23

4.4.1 A/D子程序设计 ............................................................................................... 24 4.4.2 中断子程序设计 .............................................................................................. 25 4.4.3 查询历史数据子程序设计 .............................................................................. 25 4.4.4 数据统计分析子程序设计 .............................................................................. 26 4.4.5 阈值重设子程序设计 ...................................................................................... 27 4.4.6 人机交互子程序设计 ...................................................................................... 28

III

5 系统调试 .............................................................................................................................. 33

5.1 数据采集调试 ............................................................................................................ 33 5.2 数据统计分析调试 .................................................................................................... 33 5.3 声光报警调试 ............................................................................................................ 34 5.4 软件调试 .................................................................................................................... 34 5.5 实物展示 .................................................................................................................... 34 6 结束语 .................................................................................................................................. 39 参 考 文 献 ............................................................................................................................ 40 致 谢 ........................................................................................................................................ 41 附 录 A ................................................................................................................................... 42 附 录 B ................................................................................................................................... 44

IV

基于51单片机压力检测系统设计资料 - 图文.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c3qd1s4gosd1j03v4iv5u208bi7808n00a8o_1.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top