温度检测无线传输系统的设计毕业设计

  • 格式:doc
  • 大小:1.21 MB
  • 文档页数:40

金陵科技学院学士学位论文 目录

I 目 录

摘 要 .......................................................... III

abstract ........................................................ IV

1 绪 论 .......................................................... 1

2 总体方案设计 ................................................... 2

2.1 方案论证 .................................................. 2

2.1.1 传感器 ............................................... 2

2.1.2 主控部分 ............................................. 2

2.2 总结 ...................................................... 3

3 硬件电路的设计 ................................................. 4

3.1 单片机介绍 ................................................ 4

3.1.1 STC89C52简介 ........................................ 4

3.1.2 STC89C52引脚说明 .................................... 4

3.2 电源电路 .................................................. 6

3.3 温度采集电路 .............................................. 7

3.3.1 DS18B20简介 ......................................... 7

3.3.2 DS18B20硬件连接电路设计 ............................. 8

3.4 无线发送与接收电路 ........................................ 9

3.4.1 KYL-610无线数据传输模块主要特征 .................... 9

3.4.2 接口定义 ............................................. 9

3.4.3 软件设置 ............................................ 10

3.4.4 硬件使用方法 ........................................ 10

3.5 数码管显示电路 ........................................... 11

3.5.1 LED数码管简介 ...................................... 11

3.5.2 数码管显示电路硬件设计 .............................. 12

4 软件设计 ...................................................... 14

4.1系统概述 ................................................. 14

4.2 程序设计流程图 ........................................... 14

4.3 数据采集程序设计 ......................................... 15 金陵科技学院学士学位论文 目录

II 4.3.1 DS18B20初始化 ...................................... 15

4.3.2 DS18B20读一个字节 .................................. 16

4.3.3 DS18B20写一个字节 .................................. 16

4.3.4 温度数值显示处理程序 ................................ 17

4.4 串口通信程序设计 ......................................... 18

4.4.1 发送端程序设计 ...................................... 18

4.4.2 接收端程序设计 ...................................... 20

4.5 上位机软件设计 ........................................... 21

4.5.1 界面设计 ............................................ 21

4.5.2 温度曲线绘制 ........................................ 21

5 调试及结果 .................................................... 23

5.1 测试环境及工具 ........................................... 23

5.2 测试方法 ................................................. 23

5.3 测试结果分析 ............................................. 23

6 总 结 ......................................................... 24

附录1:电路原理图 .............................................. 25

附录2:单片机主程序 ............................................ 26

附录3:上位机程序 .............................................. 31

参考文献 ........................................................ 35

致 谢 ........................................................... 36

金陵科技学院学士学位论文 摘要

III 基于单片机温度数据无线传输系统设计

摘 要

本设计用廉价51单片机和无线射频模块KYL-610为主要硬件,设计了包括温度采集,温度显示,系统控制,串口通信等外围电路。单片机STC89C52作为主单片机完成测量和控制以及与PC的数据通信功能。温度传感器使用DALLAS公司的DS18B20,将它采集到的温度数据直接送到单片机,KYL-610模块将单片机的待传数据调制成射频调制信号,再无线远程发送到PC机端的KYL-610模块,解调后通过RS232串口接至上位机,实现数据传输,最后经过处理的温度数据实时显示在电脑屏幕上供用户察看。该系统实现了数据处理功能强大、显示直观、界面友好、性价比高、应用广泛的特点,可广泛应用于工业控制、仪器、仪表、机电一体化、智能家居等诸多领域。

关键词:单片机;DS18B20;无线传输;上位机显示

金陵科技学院学士学位论文

Abstract

IV Design of temperature wireless data transmission system

based on MCU

abstract

This design with the cheap 51 MCU and RF module of KYL-610 as the main hardware,

including of temperature acquisition, temperature display, system control, serial communication,

and other peripheral circuits. The MCU STC89C52 as a master MCU complete the measurement

and control as well as data communication with the PC. The temperature sensor DS18B20 which

come from DALLAS company, send temperature data collected to the MCU directly. The

module KYL-610 modulate the MCU data which wait to be sent into the RF modulation signal,

and then Wireless send to the module KYL-610 of PC, after demodulation connect to position

machine through the serial port to realize data transmission.At last, the temperature data will

real-time display on computer screen for users. This system has realized the data processing

function is powerful, intuitive, user-friendly, cost-effective, application of a wide range of