基于单片机的水温控制系统设计

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
1.1 课题研究背景和意义 .............................................. 1 1.2 设计任务与要求 .................................................. 1 1.3 总体方案选择 .................................................... 2 1.4 硬件选型 ........................................................ 3 第二章 系统硬件设计 .................................................... 5 2.1 系统总体设计 .................................................... 5 2.2 电源与单片机最小系统设计 ........................................ 6
本设计采用宏晶科技 STC12C5A60S2 单片机为核心。LCD1602 液晶上进行实时显示温度 参数,三个独立按键可设置水温控制系统的温度参数,key1 选择设置温度模式,key2、key3 设置目标温度、温度上下限的值。单片机通过 DS18B20 温度传感器采集水的温度,将采集 的温度与目标温度进行比较。比较的差值送给 PID 算子进行运算,计算出最优的波形的占 空比控制热得快的加热,当温度大于目标温度通过风扇进行降温,最终达到目标温度。该 设计的研究将体积小、功能强、成本低等优点的单片机应用到水温控制系统中,非常适合 现在对水温控制的要求,该系统可以运用到各种环境温度的检测中,该系统是具有很高的 实际运用价值。
目录
摘要 .................................................................... I Abstract: .............................................................. II 第一章 绪论 ............................................................ 1
The design uses a PWM wave control thyristor-off, in order to control the heating equipment. Crossing signal through zero-crossing detection circuit is formed as a control standard thyristor control signal. Digital PID control algorithm to change the SCR conduction time, digital PID by SCM software program to calculate the duty cycle of the PWM wave. By controlling the duty cycle of the PWM wave thyristor conduction time, in order to change the heating time and control accuracy. Digital PID control of the temperature range can be continuously adjusted between room temperature and 100 ℃, through the key may be provided between room temperature and 100 ℃ any temperature, so the water temperature controlled at this temperature is basically stable.
2.2.1 电源电路设计 .............................................. 6 2.2.2 单片机最小系统设计 ........................................ 6 2.3 温度检测电路设计 ................................................ 7 2.4 显示电路设计 .................................................... 8 2.5 按键电路设计 .................................................... 8 2.6 加热控制电路设计 ................................................ 9 2.7 降温控制电路设计 ............................................... 10 第三章 系统软件设计 ................................................... 11 3.1 系统设计思路 ................................................... 11 3.2 系统主程序流程图 ............................................... 11 3.3 部分程序 ....................................................... 12 3.3.1 PID 控制运算 ............................................. 12 3.3.2 中断服务程序 ............................................. 14 第四章 系统调试 ....................................................... 15 4.1 软硬件联调 ..................................................... 15 4.1.1 实物各模块独立测试 ....................................... 15 4.1.2 系统运行调试 ............................................. 15 结 论 ................................................................ 17
I
Microcontroller-based temperature control system design
Abstract: Articles using STC12C5A60S2 microcontroller core, to achieve the design of a temperature control system. The design by three separate buttons can be freely set the target temperature and the minimum temperature on the target temperature range, and in real-time on the LCD1602 LCD display; SCM through DS18B20 temperature sensor to collect the water temperature, the collected temperature and the target temperature Compare. Compare the difference to the PID operator conduct, and calculates the optimal duty cycle control heat wave faster heating, when the temperature is higher than the target temperature for cooling by the fan, and ultimately reach the target temperature.
Keywords: STC89C52 SCM, DS18B20 temperature sensor, 1602 LCD, BAT16 Triac, Digital PID
II
第一章 绪论
1.1 课题研究背景和意义 现在人们的生活质量越来越高了,对生活中家用电器的要求也越来越高。家用电器也
从简单模拟电路控制到自动控制,甚至于发展到现在已经开始运用了智能控制。在我们的 日常生活周围有很多的物理量温度就是其中之一,工程控制领域中温度的检测与控制也是 非常Fra Baidu bibliotek要的。温度控制技术的关键是要更快、更准确的达到目标温度。水温控制技术在日 常的生活和工业生产中都是运用很频繁的。早期水温控制系统大都是采用模拟电路控制, 利用开关控制水温的加热。采用模拟电路控制水温的效果是非常的不好,不能够自由的调 节加热水的温度。温度在很多的应用控制领域,都需要温度控制精度比较高的恒温控制, PID 在连续控制系统中,在控制对象是一阶、二阶惯性环节或者同时带有滞后时间不是很 大的滞后环节时,PID 控制是一种非常好的一种优秀的控制方法。对于本设计的 PID 控制 可以采用数字 PID 控制,通过单片机控制算法程序完成温度的恒温控制。
II
基于单片机的水温控制系统设计
专业:自动化 学号:7021311035 学生姓名:昌志辉 指导老师:陈艳 摘要:文章采用 STC12C5A60S2 单片机为核心,实现了一种水温控制系统的设计。本设计 可以通过三个独立按键设定水温控制系统的温度参数目标温度、上下限温度,并在 LCD1602 液晶上进行实时显示;单片机通过 DS18B20 温度传感器采集水的温度,将采集的温度与目 标温度进行比较。比较的差值送给 PID 算子进行运算,计算出最优的波形的占空比控制热 得快的加热,当温度大于目标温度通过风扇进行降温,最终达到目标温度。
I
参考文献 ............................................................... 18 致 谢 ................................................................ 19 附录一.原理图 .......................................................... 20 附录二.PCB 图 .......................................................... 21
本设计采用 PWM 波控制可控硅的通断,以此控制加热设备。通过过零检测电路形成的 过零信号作为控制可控硅的标准控制信号。数字 PID 算法控制改变可控硅的导通时间,数 字 PID 通过单片机软件程序计算出 PWM 波的占空比。通过 PWM 波的占空比进行控制可控硅 导通时间,以此来改变加热时间和控制精度。数字 PID 控制可以使温度的范围在室温到 100℃之间连续调节,通过按键可以设置在室温到 100℃之间任何一个温度,使得水温控制 在这个温度基本稳定不变。 关键词:STC12C5A60S2 单片机、DS18B20 温度传感器、1602 液晶显示、BAT16 双向晶闸管、 数字 PID
相关文档
最新文档