摘 要
在水资源利用方面,对流量、水质等参数的测量非常重要,但很多水库资源在高山
地区,难以对其进行实时监测。无线通讯技术的迅速发展和普及,为远程监控系统的实
现提供了理想的平台,因此越来越多的水文站把基于无线通讯技术的监控系统作为水利
系统自动化管理的新手段。而随着水利自动化技术不断发展,水利系统的自动化水平逐
步提高,各水库都能通过远程监控系统逐渐实现少人、无人监管的管理模式,以提高生
产效益。
本文主要探讨了基于无线通讯的模拟水库监测系统的设计问题。该系统要求对水库
的水位,流量等参数进行远程实时监测,能控制阀门开/关,调节水位的高度,保证水
库的安全。设计思路是在下位端利用单片机将传感器采集的水库信息进行处理,将处理
好的数据通过 CC1100 无线模块传送到上位机端,在上位机上可以清楚地观察水库的实
时情况。上位机对信息进行监测分析,并将分析后的信息反馈回到下位端,通过单片机
控制步进电机正反转,模拟阀门开/关,来控制水库水位和流量,保证水库的安全。近年
来,本课题在国内外已受到非常多的关注与研究,并且不断地得到改进,在实际应用中
也取到了较好的效果,具有非常好的应用推广价值。
关键词:水库;CC1100;单片机;自动化
Abstract
In water resources utilization, the measurement of parameters such as the rainfall, flow,
water quality,etc. These are very important, but a lot of reservoir resources are in the alpine
areas, it is difficult to monitor it in real time. Rapid development and popularization of
wireless communication technology, which have offered the ideal platform for realization of
the long-range monitoring system, so more and more hydrometric stations regard monitoring
system based on wireless communication technology as the systematic automatic
management new means of water conservancy. And as the automatic technology of water
conservancy is being developed constantly, the automatic level of the water conservancy
system is being improved progressively, every reservoir can realize the management mode
that few people, nobody supervises gradually through the long-range monitoring system, in
order to improve the productivity effect.
This text has mainly probed into the design question based on simulation reservoir
monitoring system of the wireless communication. This system requires the water level to the
reservoir, the flow is monitored when the parameter is carried on long-range and really, can
control valve turn on or off,height to regulate water level, security to guarantee reservoir.
Mentality of designing to utilize one-chip computer go on, dealing with reservoir information
that transducer gather in the next end, it is ones that handle well data until CC1100 convey to
modules wireless for location machine, in location can situations real-time to observe
reservoir clearly. Go location plane go on, monitor, analyzed to information and information
feedback analyze, got back to the next end, control, and walk into electrical machinery to be
positive and negative to look around through one-chip computer, simulation valve turn on or
off, controlling reservoir water level and flow, guarantee the security of the reservoir. In
recent years, subject this pay close attention to the fact and study a very many one already at
home and abroad, and is being improved constantly, fetch in practical application to better
result, having very good application value to popularize.
Key word: Reservoir; CC1100; Monolithic integrated circuit; Automation
目 录
引言.......................................................................................................................1
1 绪论.................................................................................................................1
1.1 本课题的发展现状......................................................................................................1
1.2 本课题的发展趋势......................................................................................................2
1.3 本课题的研究意义和目的..........................................................................................3
1.4 本课题的主要研究工作和各章节内容安排..............................................................3
2 相关技术和基本理论介绍.............................................................................3
2.1 CC1100 无线模块的相关特性.....................................................................................4
2.1.1 CC1100 无线模块接口电路...............................................................................4
2.1.2 CC1100 无线模块的特性与应用.......................................................................5
2.2 串口通讯应用............................................................................................................6
2.3 传感器应用................................................................................................................8
2.3.1 水流量传感器的应用 ........................................................................................8
2.3.2 超声波传感器的应用 ......................................................................................10
2.4 步进电机的控制原理................................................................................................12
2.5 主要器件和应用........................................................................................................13
2.5.1 AT89S52 单片机 ..............................................................................................13
2.5.2 TLC549 A/D 转换器..........................................................................................15
2.5.3 MAX232 芯片...................................................................................................17
2.5.4 七段数码管 ......................................................................................................18
2.5.5 LM298 芯片.......................................................................................................18
3 系统设计.......................................................................................................19
3.1 系统要求....................................................................................................................19
3.2 系统总体方案............................................................................................................20
4 硬件原理与设计...........................................................................................21
4.1 步进电机的控制电路................................................................................................21
4.2 单片机工作电路........................................................................................................22
4.3 数码管显示电路........................................................................................................22
4.4 电源模块设计............................................................................................................23
4.5 CC1100 无线模块及串口通讯电路...........................................................................24
5 软件设计.......................................................................................................24
5.1 程序流程图................................................................................................................24
5.2 CC1100 模块发送和接收部分程序分析...................................................................26
6 误差与干扰分析...........................................................................................27
6.1 干扰因素及解决方法................................................................................................27
6.2 硬件系统设计的抗干扰技术....................................................................................28
7 系统调试.......................................................................................................30
7.1 软件调试....................................................................................................................30
7.2 硬件调试....................................................................................................................31
7.3 整体调试....................................................................................................................32
8 结论与展望...................................................................................................32
谢 辞.................................................................................................................34
参考文献.............................................................................................................35
附 录.................................................................................................................36
引言
水库是我国防洪和蓄水广泛采用的工程措施之一。随着计算机及无线通信技术的发
展,水库自动监测的信息采集、处理及发布已完成手工方式向自动方式的转变。通过建
设水文站实时监控系统,利用先进的无线通讯监控手段对水库信息实施监测。采用
CC1100 无线网络实时网上传输水文数据,能实现对水库及其附属建筑物及管理区进行全
面视频监控。
长期以来,水文工作者都是,靠手测、目测收集水文信息。直接影响到测报的精度
和成果质量。利用无线监控系统采集数据,不但可提高精确度,还可以使水文工作者告
别传统的工作方式。
在通常情况下,由于水文站点在地理位置上分布较广或位置较偏僻。并且与监控中
心的距离较远,利用传统的有线连接方式,线路铺设成本高昂,而且施工周期长,同时,
因为物理因素如河流山脉等障碍而难以架设线缆。而且水文信息安全防范要求高,采用
有线通讯在遇到刮风、暴雨、决口等灾害时,线路一断,水文信息就无法及时传递上去,
因此有线传输的抗灾性比较差,难以适应高可靠性要求,加之流域地形复杂、偏僻,铺
设光纤成本也比较高。相比之下,无线通信布线简单、方便,抗灾性比较好,成本也比
较低,可大量节省投资。
本文中提到的 CC1100 水文数据无线监控解决方案可很好地解决上述问题。用户采
用无线水库监测系统,无需铺设网络电缆,可迅速方便地采集各种需要的实时数据资料,
建立新的无线监控系统或对现有的无线监控系统进行扩展,具有很强的灵活性和可扩充
性。可实现真正意义的实时水文信息的采集和监控、统一管理。
本课题所研究的水库监测系统采用了自动控制、计算机网络和无线通讯新技术,具
有实时信息自动采集、传输、视频监控、远程数据和图像传输、信息、查询等功能。系
统应用了单片机,传感器,CC1100 无线模块,步进电机等元器件。可实时监控管理区水
库的实时参数。该监控系统采用无线传送,传递速度快,系统结构简单。被监控点实时
采集的数据文件通过无线网络通信线路及时地传输给监控中心,实时动态地报告被监测
点的情,及时发现问题并进行处理,既方便又简捷。并可确保系统在各种恶劣天气情况
下,都能正常运行,满足系统各种信号相互传输的准确性。可全面实现水文信息采集自
动化、数字化和网络化。大大提高了水库了安全系数和水资源利用率。
1 绪论
1.1 本课题的发展现状
当前,我国水资源的短缺已严重影响了经济的可持续发展,可以说已经成为社会经