1、 摘 要 近年来单片机发展十分迅速,单片机的应用已经渗透到各个行业。而温度的测 量及控制变得越来越重要,温度的控制在各个领域都有积极的意义。传统的温度采 集方法不仅费时费力,而且精度差,单片机的出现使得温度的采集和数据处理问题 能够得到很好的解决。所以采用单片机对温度进行控制不仅具有控制方便、简单、 灵活性大等特点,而且还可以大幅度提高被控温度的技术指标,从而能够大大提高 产品的质量。 本设计是基于 AT89C51 单片机的恒温箱控制系统,系统分为硬件和软件两部 分,其中硬件包括:温度传感器、显示、控制和报警的设计;软件包括:显示程序 设计、控制程序设计和温度报警程序设计。编写程序结合硬件进行
2、调试,能够实现 设置和调节初始温度值,进行显示屏显示,当加热到设定值后立刻报警。本设计从 实际应用出发选取了体积小、精度相对高的数字式温度传感元件 DS18B20 作为温 度采集器,单片机 AT89C51 作为主控芯片,LCD1602 作为显示输出,并且其中包 含了 PID 算法,实现了对温度的实时测量与恒定控制。 关键词:单片机;恒温;控制;报警;PID Abstract In recent years, microcontroller is developed very rapid,microcontroller applications have penetrated into vari
3、ous industries.And the measurement and control of temperature becomes more and more important, the temperature control has a positive significance in various fields.The traditional method of temperature acquisition is not only time-consuming and laborious, but poor accuracy,the emergence of microcon
4、troller makes the problem of data acquisition and processing temperature can get very good settlement.So using microcontroller to control temperature is not only easy to control, simple, flexibility and other characteristics, but also can greatly improve the temperature which was charged with techni
5、cal indicators, which can greatly improve the quality of the product. Thermostatic control play a decisive role in the process of industrial production, temperature control directly affects the yield and quality of industrial production.This design is the constant temperature box control system base
6、d on AT89C51 microcontroller, the system is divided into two parts of hardware and software,the hardware includes:temperature sensor,display,control and alarm design;software includes:a display program design, programdesign and temperature alarm program design. Write a program combining hardware debugging,can realize the setting and adjusting the initial temperature, for display, alarm immediately when heated to the set value.The design from practical application selected small,relatively hig