溫度控制系統(tǒng)的設計外文翻譯_第1頁
溫度控制系統(tǒng)的設計外文翻譯_第2頁
溫度控制系統(tǒng)的設計外文翻譯_第3頁
溫度控制系統(tǒng)的設計外文翻譯_第4頁
溫度控制系統(tǒng)的設計外文翻譯_第5頁
已閱讀5頁,還剩6頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

1、.溫度控制系統(tǒng)的設計摘要:研究了基于AT89S 51單片機溫度控制系統(tǒng)的原理和功能,溫度測量單元由單總線數(shù)字溫度傳感器DS18B 20構成。該系統(tǒng)可進行溫度設定,時間顯示和保存監(jiān)測數(shù)據(jù)。如果溫度超過任意設置的上限和下限值,系統(tǒng)將報警并可以和自動控制的實現(xiàn),從而達到溫度監(jiān)測智能一定范圍內(nèi)?;谙到y(tǒng)的原理,很容易使其他各種非線性控制系統(tǒng),只要軟件設計合理的改變。該系統(tǒng)已被證明是準確的,可靠和滿意通過現(xiàn)場實踐。關鍵詞:單片機;溫度;溫度I. 導言 溫度是在人類生活中非常重要的參數(shù)。在現(xiàn)代社會中,溫度控制(TC)不僅用于工業(yè)生產(chǎn),還廣泛應用于其它領域。隨著生活質(zhì)量的提高,我們可以發(fā)現(xiàn)在酒店,工廠和家庭

2、,以及比賽設備。而比賽的趨勢將更好地服務于整個社會,因此它具有十分重要的意義測量和控制溫度。 在AT89S51單片機和溫度傳感器DS18B20的基礎上,系統(tǒng)環(huán)境溫度智能控制。溫度可設定在一定范圍內(nèi)動任意。該系統(tǒng)可以顯示在液晶顯示屏的時間,并保存監(jiān)測數(shù)據(jù),并自動地控制溫度,當環(huán)境溫度超過上限和下限的值。這樣做是為了保持溫度不變。該系統(tǒng)具有很高的抗干擾能力,控制精度高,靈活的設計,它也非常適合這個惡劣的環(huán)境。它主要應用于人們的生活,改善工作和生活質(zhì)量。這也是通用的,因此它可以方便地擴大使用該系統(tǒng)。因此,設計具有深刻的重要性。一般的設計,硬件設計和軟件系統(tǒng)的設計都包括在內(nèi)。II. 系統(tǒng)總體設計 該系

3、統(tǒng)硬件包括微控制器,溫度檢測電路,鍵盤控制電路,時鐘電路,顯示,報警,驅(qū)動電路和外部RAM?;贏T89S51單片機,DS18B20的將溫度信號傳送到數(shù)字信號的檢測。和信號發(fā)送到微控制器進行處理。最后,溫度值顯示在液晶12232F。這些步驟是用來實現(xiàn)溫度檢測。使用鍵盤接口芯片HD7279在設定溫度值,使用微控制器保持一定的溫度,并使用液晶顯示的溫度控制設定值。此外,時鐘芯片DS1302用于顯示時間和外部RAM6264是用來保存監(jiān)測數(shù)據(jù)。報警將給予及時蜂鳴器如果溫度超過了上限和下限溫度值。III. 硬件設計A. 微控制器 在AT89S51單片機是一種低功耗,高性能CMOS 8位4K的系統(tǒng)內(nèi)可編程

4、閃存字節(jié)微控制器。該設備是采用Atmel的高密度非易失性內(nèi)存技術,并與業(yè)界標準的80C51指令集和引腳兼容。片上閃存程序存儲器可以編程就可以在系統(tǒng)或由傳統(tǒng)的非易失性存儲器編程。通過結合在系統(tǒng)靈活的8位CPU集成在一個芯片可編程閃存,Atmel的單片機AT89S51是一個功能強大的微控制器提供了一個高度靈活的和具有成本效益的解決方案很多嵌入式控制應用。為了節(jié)省監(jiān)測數(shù)據(jù),6264是用來作為外部RAM。它是一個靜態(tài)RAM芯片,低功耗具有8K字節(jié)的內(nèi)存。B. 溫度檢測電路 溫度傳感器是該系統(tǒng)的關鍵部分。達拉斯DS18B20的使用,它支持1 - Wire總線接口,板上專利是在內(nèi)部使用。所有的傳感器部分和

5、轉換電路集成在一個晶體管集成電路像1。其測量范圍為-55125,在-1085精度為±0.52,3。由DS18B20的溫度采集傳輸在1 - Wire總線的方式,這種高度提高了系統(tǒng)的抗干擾,使之適合在惡劣的環(huán)境現(xiàn)場溫度測量4。有兩個電源DS18B20的供應方式。首先是外部電源供給:DS18B20的第一腳連接到地面,第二引腳用作信號線,三是連接到電源。第二種方式是寄生電源5。由于寄生電源會導致硬件電路,軟件控制的難度和芯片的性能下降等,但DS18B20的(s)的復雜性,可以連接到I/ O端口的單片機在外部電源供電方式,它更受歡迎。因此,外部電源供應使用,而第二個接腳連接到引腳P1.3可單片

6、機AT89S51。其實,如果多有被檢測,DS18B20的(S)可以連接到1 - Wire總線。但是,當數(shù)超過8,有一個向駕駛和更復雜的軟件設計,以及1 - Wire總線長度的關注。一般而言,這是不超過50米。為了實現(xiàn)遠程控制,該系統(tǒng)可在一個無線之一,旨在打破了1 - Wire總線長度的限制6。C. LCD顯示器電路 液晶顯示12232F使用,這可以用來顯示字符,溫度值和時間,并提供一個友好的顯示界面。該12232F是一個具有8192128×32像素的漢字數(shù)據(jù)庫和128個16 ×8像素的ASCII字符集圖形液晶顯示。它主要由行驅(qū)動器/列驅(qū)動器和128× 32點陣的充

7、分顯示圖形,以及7.5 ×2個漢字功能的液晶顯示器。它是在并行或串行方式連接到外部CPU7。為了節(jié)約硬件資源,12232F應以串行方式連接到單片機AT89S51,只有4個輸出使用的端口。液晶顯示屏灰度可以通過調(diào)整可變電阻連接的液晶VLCD的PIN碼。CLK是用于傳輸串行通信時鐘。SID是用于傳輸串行數(shù)據(jù)。CS是用來使能控制,液晶顯示。L+是用來控制LCD背光電源。D. 時鐘電路 達拉斯DS1302的使用,這是一種高性能,低功耗和實時時鐘芯片與RAM。在DS1302的服務于帶有日歷時鐘系統(tǒng),用于監(jiān)測的時間。讀取數(shù)據(jù)的時間由AT89S51單片機,再由液晶顯示處理。另外的時間可以調(diào)整鍵盤。

8、在DS1302的晶體振蕩器設定為32768Hz的,建議的補償電容是6pF。振蕩器的頻率較低,所以有可能不連接的電容器,這不會有很大的不同的時間精度。備用電源可以連接到3.6V的可充電電池。E. 鍵盤控制電路 系統(tǒng)中的鍵盤接口HD7279A的驅(qū)動下,它有一個+5 V單電源,這是連接,無需使用任何有源設備的鍵盤和顯示。根據(jù)基本要求和系統(tǒng)功能,只有6個按鈕是必要的。該系統(tǒng)的功能是由輸入的數(shù)據(jù)接收單片機AT89S51。為了節(jié)省外部電阻器,1× 6使用鍵盤和鍵盤代碼定義為:07h的,0FH,17H條,1FH,27H款,2Fh的。該命令可以讀出通過閱讀代碼指令。 HD7279A是連接到單片機AT

9、89S51的串行模式,只有4個端口的需要。DIG0DIG5和DP分別列線和六個鍵是實現(xiàn)鍵盤監(jiān)控,解碼和識別關鍵代碼行線端口。F. 報警電路 為了簡化電路,調(diào)試方便,是一個5V的蜂鳴器自動報警電路中的應用8。這使得軟件編程簡化。它是由9012 PNP晶體管的基連接到AT89S51單片機的引腳P2.5。當溫度超過上限和下限的值,P2.5輸出低電平使晶體管上,然后由一個報警蜂鳴器定。G. 驅(qū)動電路 一個步進電機作為驅(qū)動裝置來控制溫度。四相和八打脈沖分配模式是用來驅(qū)動電機和簡單的延時程序是用來處理脈沖之間的時間間隔,獲得不同的轉速。有兩個步進電機的輸出狀態(tài)。一:當溫度超過上限值時,電機反向旋轉(以低的

10、溫度),而當?shù)陀谙孪拗禃r,電機旋轉正常(提高溫度),除了不等于預設值。二:當溫度在兩者之間的某處結束,等于設定值時,電機停止。這些步驟是用來實現(xiàn)溫度控制。此外,電機的轉速也可以調(diào)整相對按鈕。代碼數(shù)據(jù)是通過港口答11A8的輸入(P2.3P2.0的是)的逆變器74LS04由AT89S51單片機和反向輸出。最后,它被放大功放2803A權力電機。IV. 軟件設計 按照一般設計要求,該系統(tǒng)的硬件電路原理,以及該程序的可讀性,可移植性和改進的調(diào)試方便,軟件設計模塊化。系統(tǒng)流程主要包括以下8個步驟:POST(加電自檢),系統(tǒng)啟動,溫度檢測,報警處理,溫度控制,時鐘芯片DS1302的操作,液晶顯示和鍵盤操作。

11、給一點分析,上述8個任務,很容易地發(fā)現(xiàn),過去五年任務需要實時操作。但對溫度的檢測,可與TIMER0計時1秒,即出現(xiàn)溫度檢測達到每秒。系統(tǒng)啟動包括全局變量的定義,內(nèi)存啟動,啟動特殊功能寄存器和外圍設備的啟動。全局變量的定義,主要完成對外部接口連接到單片機AT89S51芯片,內(nèi)存單位和一些特殊的定義的接口定義。開始主要是指RAM的內(nèi)存處理。例如,當系統(tǒng)通電時間碼將在內(nèi)部單位地址或閃爍標志存儲的信息將被清除。特殊功能寄存器包括加載啟動定時器初值的開放中斷。例如,當系統(tǒng)通電定時器初始化。外圍設備的啟動,是指設置外圍設備的初始值。例如,當系統(tǒng)通電后,LCD應該被初始化,啟動顯示器應該叫,溫度轉換命令時,

12、必須先發(fā)出的時鐘芯片DS1302也要被初始化。報警處理主要是降低和溫度的提高使溫度保持在預設范圍。當溫度之間的上限和下限的值,這是不言而喻的溫度控制處理,即需要的溫度升高或降低根據(jù)預設值。這樣做的條件溫度等于設定值,從而達到溫度的目標。V. 結論 溫度控制系統(tǒng)具有友好的人機交互界面,硬件簡單,成本低,溫度控制精度高(誤差在±1范圍內(nèi)誤差),便利性和多功能性等,它可廣泛的場合使用的優(yōu)點與-55至125范圍內(nèi),且有一定的實用價值。Design of the Temperature Control System Based on AT89S51ABSTRACT The principle

13、and functions of the temperature control system based on microcontroller AT89S51 are studied, and the temperature measurement unit consists of the 1-Wire bus digital temperature sensor DS18B20. The system can be expected to detect the preset temperature, display time and save monitoring data. An ala

14、rm will be given by system if the temperature exceeds the upper and lower limit value of the temperature which can be set discretionarily and then automatic control is achieved, thus the temperature is achieved monitoring intelligently within a certain range. Basing on principle of the system, it is

15、 easy to make a variety of other non-linear control systems so long as the software design is reasonably changed. The system has been proved to be accurate, reliable and satisfied through field practice. KEYWORDS: AT89S51; microcontroller; DS18B20; temperatureI. INTRODUCTION Temperature is a very im

16、portant parameter in human life. In the modern society, temperature control (TC) is not only used in industrial production, but also widely used in other fields. With the improvement of the life quality, we can find the TC appliance in hotels, factories and home as well. And the trend that TC will b

17、etter serve the whole society, so it is of great significance to measure and control the temperature. Based on the AT89S51 and temperature sensor DS18B20, this system controls the condition temperature intelligently. The temperature can be set discretionarily within a certain range. The system can s

18、how the time on LCD, and save monitoring data; and automatically control the temperature when the condition temperature exceeds the upper and lower limit value. By doing so it is to keep the temperature unchanged. The system is of high anti-jamming, high control precision and flexible design; it als

19、o fits the rugged environment. It is mainly used in people's life to improve the quality of the work and life. It is also versatile, so that it can be convenient to extend the use of the system. So the design is of profound importance. The general design, hardware design and software design of t

20、he system are covered. II. SYSTEM GENERAL DESIGN The hardware block diagram of the TC is shown in Fig. 1. The system hardware includes the microcontroller, temperature detection circuit, keyboard control circuit, clock circuit, Display, alarm, drive circuit and external RAM. Based on the AT89S51, th

21、e DS18B20 will transfer the temperature signal detected to digital signal. And the signal is sent to the microcontroller for processing. At last the temperature value is showed on the LCD 12232F. These steps are used to achieve the temperature detection. Using the keyboard interface chip HD7279 to s

22、et the temperature value, using the microcontroller to keep a certain temperature, and using the LCD to show the preset value for controlling the temperature. In addition, the clock chip DS1302 is used to show time and the external RAM 6264 is used to save the monitoring data. An alarm will be given

23、 by buzzer in time if the temperature exceeds the upper and lower limit value of the temperature. III. HARDWARE DESIGN A. Microcontroller The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of in-system programmable Flash memory. The device is manufactured using Atm

24、els high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system

25、 programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. Minimum system of the microcontroller is shown in Fig. 2. In order to save monitoring data, the 6264 is used a

26、s an external RAM. It is a static RAM chip, low-power with 8K bytes memory. B. Temperature Detection Circuit The temperature sensor is the key part in the system. The Dallas DS18B20 is used, which supports the 1-Wire bus interface, and the ON-BOARD Patented is used internally. All the sensor parts a

27、nd the converting circuit are integrated in integrated circuit like a transistor 1. Its measure range is -55 125 , and the precision between -10 85 is ±0.5 2 ,3. The temperature collected by the DS18B20 is transmitted in the 1-Wire bus way, and this highly raises the system anti-jamming and mak

28、es it fit in situ temperature measurement of the rugged environment 4.There are two power supply ways for the DS18B20. The first is external power supply: the first pin of the DS18B20 is connected to the ground; the second pin serves as signal wire and the third is connected to the power. The second

29、 way is parasite power supply 5. As the parasite power supply will lead to the complexity of the hardware circuit, the difficulty of the software control and the performance degradation of the chip, etc. But the DS18B20(s) can be connected to the I/O port of the microcontroller in the external power

30、 supply way and it is more popular. Therefore the external power supply is used and the second pin is connected to the pin P1.3 of the AT89S51. Actually, if there are multipoint to be detected, the DS18B20(s) can be connected to the 1-Wire bus. But when the number is over 8, there is a concern to th

31、e driving and the more complex software design as well as the length of the 1-Wire bus. Normally it is no more than 50m. To achieve distant control, the system can be designed in to a wireless one to break the length limit of the 1-Wire bus 6. C. LCD Circuit The LCD 12232F is used, which can be used

32、 to show characters, temperature value and time, and supply a friendly display interface. The 12232F is a LCD with 8192 128×32 pixels Chinese character database and 128 16×8 pixels ASCII character set graphics. It mainly consists of row drive/column drive and 128×32 full lattice LCD w

33、ith the function of displaying graphics as well as 7.5×2 Chinese characters. It is in a parallel or serial mode to connect to external CPU 7. In order to economize the hardware resource, the 12232F should be connected to the AT89S51 in serial mode with only 4 output ports used.The LCD grayscale

34、 can be changed by adjusting the variable resistor connected the pin Vlcd of the LCD. CLK is used to transmit serial communication clock. SID is used to transmit serial data. CS is used to enable control the LCD. L+ is used to control the LCD backlight power. D. Clock Circuit The Dallas DS1302 is us

35、ed, which is a high performance, low-power and real-time clock chip with RAM. The DS1302 serves in the system with calendar clock and is used to monitor the time. The time data is read and processed by the AT89S51 and then displayed by the LCD. Also the time can be adjusted by the keyboard.The DS130

36、2 crystal oscillator is set at 32768Hz, and the recommended compensation capacitance is 6pF. The oscillator frequency is lower, so it might be possible not to connect the capacitor, and this would not make a big difference to the time precision. The backup power supply can be connected to a 3.6V rec

37、hargeable battery. E. Keyboard Control Circuit The keyboard interface in the system is driven by the HD7279A which has a +5V single power supply and which is connected to the keyboard and display without using any active-device. According to the basic requirements and functions of the system, only 6

38、 buttons are needed. The system's functions are set by the AT89S51 receiving the entered data. In order to save the external resistor, the 1×6 keyboard is used, and the keyboard codes are defined as: 07H, 0FH, 17H, 1FH, 27H, 2FH. The order can be read out by reading the code instruction. HD

39、7279A is connected to the AT89S51 in serial mode and only 4 ports are need. As shown in Fig. 6, DIG0DIG5 and DP are respectively the column lines and row line ports of the six keys which achieve keyboard monitoring, decoding and key codes identification. F. Alarm Circuit In order to simplify the cir

40、cuit and convenient debugging, a 5V automatic buzzer is used in the alarm circuit 8. And this make the software programming simplified. As shown in Fig. 7, it is controlled by the PNP transistor 9012 whose base is connected to the pin P2.5 of the AT89S51. When the temperature exceeds the upper and l

41、ower limit value, the P2.5 output low level which makes the transistor be on and then an alarm is given by the buzzer. G. Drive Circuit A step motor is used as the drive device to control the temperature. The four-phase and eight-beat pulse distribution mode is used to drive motor and the simple del

42、ay program is used to handle the time interval between the pulses to obtain different rotational speed. There are two output states for the step motor. One: when the temperature is over the upper value, the motor rotates reversely (to low the temperature), while when lower than the lower limit value

43、, the motor rotates normally (to raise the temperature); besides not equals the preset value. Two: when the temperature is at somewhere between the two ends and equals the preset value, the motor stops. These steps are used to achieve the temperature control. In addition, the motor speed can also be

44、 adjusted by relative buttons. As shown in Fig. 8, the code data is input through ports A11A8 (be P2.3P2.0) of the AT89S51 and inverted output by the inverter 74LS04. Finally it is amplified by the power amplifier 2803A to power the motor.IV. SOFTWARE DESIGN According to the general design requireme

45、nt and hardware circuit principle of the system, as well as the improvement of the program readability, transferability and the convenient debugging, the software design is modularized. The system flow mainly includes the following 8 steps: POST (Power-on self-test), system initiation, temperature d

46、etection, alarm handling, temperature control, clock chip DS1302 operation, LCD and keyboard operation. The main program flow is shown in Fig. 9. Give a little analysis to the above 8 tasks, it is easy to find out that the last five tasks require the real time operation. But to the temperature detec

47、tion it can be achieved with timer0 timing 1 second, that is to say temperature detection occurs per second. The system initiation includes global variable definition, RAM initiation, special function register initiation and peripheral equipment initiation. Global variable definition mainly finishes the interface definition of externa

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論