1、 单片机温度控制系统 摘 要 本次设计对单片机在温度控制系统中的基本理论和应用技术作了较为全面的介绍。主要目的是用单片机设计一个温度控制器,通过运用 PID 控制算法,使得温度保持在 600 度这一恒定温度值上。该控制器具有本机给定和上位机给定的功能。 在生产过程自动的发展历程中, PID 控制是历史最久、生命力最强的基本控制方式。 PID 控制是比例积分微分控制的简称。由于模拟 PID 调节器控制温度的精确模型难以建立,系统的参数又经常发生变化,运用现代控制理论分析综合要耗费很大代价进行模拟辨识,而且不能 得到预期的效果,所以本次设计采用 PID 调节器,由于软件系统的灵活性, PID 算法
2、可以得到修正而更加完善。 根据不同的测温范围选出合适的温度传感器,单片机把测到的温度进行处理(通过内置 PID 控制或与上位机通讯,由上位机实现 PID 控制)后保持恒温输出,来控制执行机构。单片机输出的是数字量,需要经过 D/A 转换变为模拟量后,才能去控制执行机构。 关键 词 PID 控制器;传感器; 8052 温度控制 Abstract This design comprehensively introduced the basic theories and application technology of the MCU (Micro Controller Unit) in the
3、control systems of temperature this time. The main purpose to design one temperature controller with MCU, through use PID control algorithms, make temperature keep on this invariable temperature value of 600 degrees. The controller has the function of given by own machine and top machine. In the dev
4、elopment of automatic production process, PID control has the longest history, strongest vitality which is the basic control method. It is an abbreviation of the proportion, integral and derivative. It is difficult to build accurate model of analogy PID regulator to control temperature, the systemat
5、ic parameter often changes, using the modern control theory to analyze and synthesize that should consume very large cost to analogy identification, and cant get the anticipated result, so the design adopt PID regulator, because of the flexibility of the software system, PID algorithm can be revised
6、 more perfect. To elect the suitable temperature sensor according to different examining the warm range, because the output of the temperature sensor is an analog quantity of changing, therefore, need to change A/D first, transform it into digital quantity to send into the computer. After the MCU ge
7、ts the examining temperature and dealt it (control or communicate with top machine through built-in PID, the top machine realize PID control) and then keep constant temperature exported to control executive body. What the MCU outputted is digital quantity, needs to change into analog quantity, to control the executive body. Key words PID controller; A/D converter; 8051temperature control