摘 要
温度是一个非常重要地物理量,因为它直接影响燃烧、化学反应、发酵、蒸馏、浓度、结晶以及空气流动等物理和化学过程温度控制失误可能引起生产安全、产品质量、产品产量等一系列问题。
本文介绍地是一个以单片机为核心地无线温度控制系统,主要通过WIFI模块完成远程温度控制功能在一定地区间内,在自动控制系统地控制下,温度始终在人们要求地范围之内它利用单片机STC89C51、温度传感器DS18B20及LCD等器件实现。
基本工作原理是单片机利用DS18B20对温度进行采集,通过串口传递给WIFI模块,再利用无线信号将数据传递给上位机(笔记本电脑或手机)进行温度显示同时,上位机可以利用无线信号和通信串口发送目标温度给单片机,单片机利用内置地PID算法进行控温。
关键词:单片机;WIFI发送接收;PID;温度控制;LCD显示
Abstract
Temperature is a very important physical quantity because it directly affects combustion, chemical reactions, fermentation, distillation, concentration, crystallization and air flow and other physical and chemical processes. Temperature control errors can cause a series of problems such as production safety, product quality, product yield.
This article describes a wireless sensor for the core of the wireless temperature control system, mainly through the WIFI module to complete the remote temperature control function in a certain interval, under the control of the automatic control system, the temperature is always within the scope of people it requires the use of single-chip STC89C52, temperature sensor DS18B20 and LCD and other devices to achieve.
The basic working principle is the use of DS18B20 single-chip temperature acquisition, through the serial port to the WIFI module, and then use the wireless signal to the data transmission to the host computer (laptop or mobile phone) for temperature display at the same time, the host computer can use wireless signal and communication serial The target temperature to the microcontroller, microcontroller using built-in PID algorithm for temperature control.
Key words: single chip; WIFI transmit and receive; PID; temperature control; LCD display
目录
目录 3
第1章 绪 论 5
1.1 概述 5
1.2 温度控制技术的发展与现状 6
1.3 课题研究的内容及要求 8
1.4 课题的研究方案 9
第2章 设计理论基础 13
2.1 单片机的发展概况 13
2.2 AT89C51系列单片机介绍 14
2.3 通讯芯片MAX232 23
2.4 显示器LCD1602 25
2.5 矩阵键盘 26
2.6 光耦芯片MOC3051 28
2.7 数字温度计DS18B20 35
2.8 双向可控硅 37
2.9 PID算法 42
第3章 电路设计 47
3.1 电源电路 47
3.2 51起震和复位电路 48
3.3 程序下载电路 49
3.4 报警电路 50
3.5 显示电路 51
3.6 键盘输入电路 52
3.7 传感器电路 52
3.8 控制电热得快电路 53
第4章 软件设计 54
4.1 程序构架 54
4.2 主程序 55
4.3 初始化程序 56
4.4 读取温度传感器DS18B20数据程序 57
4.5 按键扫描程序 58
4.6 温度控制PID程序 60
4.7 中断程序 61
第5章 系统调试及结论分析 62
参考文献 64
致 谢 66
附录 67