基于單片機的溫度控制外文文獻及中文翻譯_第1頁
基于單片機的溫度控制外文文獻及中文翻譯_第2頁
基于單片機的溫度控制外文文獻及中文翻譯_第3頁
基于單片機的溫度控制外文文獻及中文翻譯_第4頁
基于單片機的溫度控制外文文獻及中文翻譯_第5頁
已閱讀5頁,還剩14頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

1、Temperature Control Using a Microcontroller:An Interdisciplinary Undergraduate Engineering Design ProjectJames S. McDonaldDepartment of Engineering ScienceTrinity UniversitySan Antonio, TX 78212Abstract:This paper describes an interdisciplinary design project which was done under the authors supervi

2、sion by a group of four senior students in the Department of Engineering Science at Trinity University. The objective of the project was to develop a temperature control system for an air-filled chamber. The system was to allow entry of a desired chamber temperature in a prescribed range and to exhi

3、bit overshoot and steady-state temperature error of less than 1 degree Kelvin in the actual chamber temperature step response. The details of the design developed by this group of students, based on a Motorola MC68HC05 family microcontroller, are described. The pedagogical value of the problem is al

4、so discussed through a description of some of the key steps in the design process. It is shown that the solution requires broad knowledge drawn from several engineering disciplines including electrical, mechanical, and control systems engineering.1 IntroductionThe design project which is the subject

5、 of this paper originated from a real-world application. A prototype of a microscope slide dryer had been developed around an OmegaTM model CN-390 temperature controller, and the objective was to develop a custom temperature control system to replace the Omega system. The motivation was that a custo

6、m controller targeted specifically for the application should be able to achieve the same functionality at a much lower cost, as the Omega system is unnecessarily versatile and equipped to handle a wide variety of applications.The mechanical layout of the slide dryer prototype is shown in Figure 1.

7、The main element of the dryer is a large, insulated, air-filled chamber in which microscope slides, each with a tissue sample encased in paraffin, can be set on caddies. In order that the paraffin maintain the proper consistency, the temperature in the slide chamber must be maintained at a desired (

8、constant) temperature. A second chamber (the electronics enclosure) houses a resistive heater and the temperature controller, and a fan mounted on the end of the dryer blows air across the heater, carrying heat into the slide chamber. This design project was carried out during academic year 199697 b

9、y four students under the authors supervision as a Senior Design project in the Department of Engineering Science at Trinity University. The purpose of this paper isto describe the problem and the students solution in some detail, and to discuss some of the pedagogical opportunities offered by an in

10、terdisciplinary design project of this type. The students own report was presented at the 1997 National Conference on Undergraduate Research 1. Section 2 gives a more detailed statement of the problem, including performance specifications, and Section 3 describes the students design. Section 4 makes

11、 up the bulk of the paper, and discusses in some detail several aspects of the design process which offer unique pedagogical opportunities. Finally, Section 5 offers some conclusions.2 Problem StatementThe basic idea of the project is to replace the relevant parts of the functionality of an Omega CN

12、-390 temperature controller using a custom-designed system. The application dictates that temperature settings are usually kept constant for long periods of time, but its nonetheless important that step changes be tracked in a “reasonable” manner. Thus the main requirements boil down to·allowin

13、g a chamber temperature set-point to be entered,·displaying both set-point and actual temperatures, and·tracking step changes in set-point temperature with acceptable rise time, steady-state error, and overshoot.Although not explicitly a part of the specifications in Table 1, it was clear

14、that the customer desired digital displays of set-point and actual temperatures, and that set-point temperature entry should be digital as well (as opposed to, say, through a potentiometer setting).3 System DesignThe requirements for digital temperature displays and setpoint entry alone are enough t

15、o dictate that a microcontrollerbased design is likely the most appropriate. Figure 2 shows a block diagram of the students design. The microcontroller, a MotorolaMC68HC705B16 (6805 for short), is the heart of the system. It accepts inputs from a simple four-key keypad which allow specification of t

16、he set-point temperature, and it displays both set-point and measured chamber temperatures using two-digit seven-segment LED displays controlled by a display driver. All these inputs and outputs are accommodated by parallel ports on the 6805. Chamber temperature is sensed using a pre-calibrated ther

17、mistor and input via one of the 6805s analog-to-digital inputs. Finally, a pulse-width modulation (PWM) output on the 6805 is used to drive a relay which switches line power to the resistive heater off and on.Figure 3 shows a more detailed schematic of the electronics and their interfacing to the 68

18、05. The keypad, a Storm 3K041103, has four keys which are interfaced to pins PA0 PA3 of Port A, configured as inputs. One key functions as a mode switch. Two modes are supported: set mode and run mode. In set mode two of the other keys are used to specify the set-point temperature: one increments it

19、 and one decrements. The fourth key is unused at present. The LED displays are driven by a Harris Semiconductor ICM7212 display driver interfaced to pins PB0PB6 of Port B, configured as outputs. The temperature-sensing thermistor drives, through a voltage divider, pin AN0 (one of eight analog inputs

20、). Finally, pin PLMA (one of two PWM outputs) drives the heater relay.Software on the 6805 implements the temperature control algorithm, maintains the temperature displays, and alters the set-point in response to keypad inputs. Because it is not complete at this writing, software will not be discuss

21、ed in detail in this paper. The control algorithm in particular has not been determined, but it is likely to be a simple proportional controller and certainly not more complex than a PID. Some control design issues will be discussed in Section 4, however.4 The Design ProcessAlthough essentially the

22、project is just to build a thermostat, it presents many nice pedagogical opportunities. The knowledge and experience base of a senior engineering undergraduate are just enough to bring him or her to the brink of a solution to various aspects of the problem. Yet, in each case, realworld consideration

23、s complicate the situation significantly.Fortunately these complications are not insurmountable, and the result is a very beneficial design experience. The remainder of this section looks at a few aspects of the problem which present the type of learning opportunity just described. Section 4.1 discu

24、sses some of the features of a simplified mathematical model of the thermal properties of the system and how it can be easily validated experimentally. Section 4.2 describes how realistic control algorithm designs can be arrived at using introductory concepts in control design. Section 4.3 points ou

25、t some important deficiencies of such a simplified modeling/control design process and how they can be overcome through simulation. Finally, Section 4.4 gives an overview of some of the microcontroller-related design issues which arise and learning opportunities offered.4.1 MathematicalModelLumped-e

26、lement thermal systems are described in almost any introductory linear control systems text, and just this sort of model is applicable to the slide dryer problem. Figure 4 shows a second-order lumped-element thermal model of the slide dryer. The state variables are the temperatures Ta of the air in

27、the box and Tb of the box itself. The inputs to the system are the power output q(t) of the heater and the ambient temperature T¥. ma and mb are the masses of the air and the box, respectively, and Ca and Cb their specific heats. 1 and 2 are heat transfer coefficients from the air to the box an

28、d from the box to the external world, respectively.Its not hard to show that the (linearized) state equationscorresponding to Figure 4 areTaking Laplace transforms of (1) and (2) and solving for Ta(s), which is the output of interest, gives the following open-loop model of the thermal system:where K

29、 is a constant and D(s) is a second-order polynomial.K, tz, and the coefficients of D(s) are functions of the variousparameters appearing in (1) and (2).Of course the various parameters in (1) and (2) are completely unknown, but its not hard to show that, regardless of their values, D(s) has two rea

30、l zeros. Therefore the main transfer function of interest (which is the one from Q(s), since well assume constant ambient temperature) can be writtenMoreover, its not too hard to show that 1=tp1 <1=tz <1=tp2, i.e., that the zero lies between the two poles. Both of these are excellent exercises

31、 for the student, and the result is the openloop pole-zero diagram of Figure 5.Obtaining a complete thermal model, then, is reduced to identifying the constant K and the three unknown time constants in (3). Four unknown parameters is quite a few, but simple experiments show that 1=tp1 _ 1=tz;1=tp2 s

32、o that tz;tp2 _ 0 are good approximations. Thus the open-loop system is essentially first-order and can therefore be written (where the subscript p1 has been dropped).Simple open-loop step response experiments show that,for a wide range of initial temperatures and heat inputs, K _0:14 _=W and t _ 29

33、5 s.14.2 Control System DesignUsing the first-order model of (4) for the open-loop transfer function Gaq(s) and assuming for the moment that linear control of the heater power output q(t) is possible, the block diagram of Figure 6 represents the closed-loop system. Td(s) is the desired, or set-point

34、, temperature,C(s) is the compensator transfer function, and Q(s) is the heater output in watts.Given this simple situation, introductory linear control design tools such as the root locus method can be used to arrive at a C(s) which meets the step response requirements on rise time, steady-state er

35、ror, and overshoot specified in Table 1. The upshot, of course, is that a proportional controller with sufficient gain can meet all specifications. Overshoot is impossible, and increasing gains decreases both steady-state error and rise time.Unfortunately, sufficient gain to meet the specifications

36、may require larger heat outputs than the heater is capable of producing. This was indeed the case for this system, and the result is that the rise time specification cannot be met. It is quite revealing to the student how useful such an oversimplified model, carefully arrived at, can be in determini

37、ng overall performance limitations.4.3 Simulation ModelGross performance and its limitations can be determined using the simplified model of Figure 6, but there are a number of other aspects of the closed-loop system whose effects on performance are not so simply modeled. Chief among these are·

38、quantization error in analog-to-digital conversion of the measured temperature and· the use of PWM to control the heater.Both of these are nonlinear and time-varying effects, and the only practical way to study them is through simulation (or experiment, of course).Figure 7 shows a SimulinkTM bl

39、ock diagram of the closed-loop system which incorporates these effects. A/D converter quantization and saturation are modeled using standard Simulink quantizer and saturation blocks. Modeling PWM is more complicated and requires a custom S-function to represent it.This simulation model has proven pa

40、rticularly useful in gauging the effects of varying the basic PWM parameters and hence selecting them appropriately. (I.e., the longer the period, the larger the temperature error PWM introduces. On the other hand, a long period is desirable to avoid excessive relay “chatter,” among other things.) P

41、WM is often difficult for students to grasp, and the simulation model allows an exploration of its operation and effects which is quite revealing.4.4 The MicrocontrollerSimple closed-loop control, keypad reading, and display control are some of the classic applications of microcontrollers, and this

42、project incorporates all three. It is therefore an excellent all-around exercise in microcontroller applications. In addition, because the project is to produce an actual packaged prototype, it wont do to use a simple evaluation board with the I/O pins jumpered to the target system. Instead, its nec

43、essary to develop a complete embedded application. This entails the choice of an appropriate part from the broad range offered in a typical microcontroller family and learning to use a fairly sophisticated development environment. Finally, a custom printed-circuit board for the microcontroller and p

44、eripherals must be designed and fabricated.Microcontroller Selection. In view of existing local expertise, the Motorola line of microcontrollers was chosen for this project. Still, this does not narrow the choice down much. A fairly disciplined study of system requirements is necessary to specify wh

45、ich microcontroller, out of scores of variants, is required for the job. This is difficult for students, as they generally lack the experience and intuition needed as well as the perseverance to wade through manufacturers selection guides.Part of the problem is in choosing methods for interfacing th

46、e various peripherals (e.g., what kind of display driver should be used?). A study of relevant Motorola application notes 2, 3, 4 proved very helpful in understandingwhat basic approaches are available, and what microcontroller/peripheral combinations should be considered.The MC68HC705B16 was finall

47、y chosen on the basis of its availableA/D inputs and PWMoutputs as well as 24 digital I/O lines. In retrospect this is probably overkill, as only one A/D channel, one PWM channel, and 11 I/O pins are actually required (see Figure 3). The decision was made to err on the safe side because a complete d

48、evelopment system specific to the chosen part was necessary, and the project budget did not permit a second such system to be purchased should the firstprove inadequate.Microcontroller Application Development. Breadboarding of the peripheral hardware, development of microcontroller software, and fin

49、al debugging and testing of a custom printed-circuit board for the microcontroller and peripherals all require a development environment of some kind. The choice of a development environment, like that of the microcontroller itself, can be bewildering and requires some faculty expertise. Motorola ma

50、kes three grades of development environment ranging from simple evaluation boards (at around $100) to full-blown real-time in-circuit emulators (at more like $7500). The middle option was chosen for this project: the MMEVS, which consists of _ a platform board (which supports all 6805-family parts),

51、 _ an emulator module (specific to B-series parts), and _ a cable and target head adapter (package-specific). Overall, the system costs about $900 and provides, with some limitations, in-circuit emulation capability. It also comes with the simple but sufficient software development environment RAPID

52、 5.Students find learning to use this type of system challenging, but the experience they gain in real-world microcontroller application development greatly exceeds the typical first-course experience using simple evaluation boards.Printed-Circuit Board. The layout of a simple (though definitely not

53、 trivial) printed-circuit board is another practical learning opportunity presented by this project. The final board layout, with package outlines, is shown (at 50% of actual size) in Figure 8. The relative simplicity of the circuit makes manual placement and routing practicalin fact, it likely give

54、s better results than automatic in an application like thisand the student is therefore exposed to fundamental issues of printed-circuit layout and basic design rules. The layout software used was the very nice package pcb,2 and the board was fabricated in-house with the aid of our staff electronics

55、 technician.中文翻譯:單片機溫度控制:一個跨學科的本科生工程設(shè)計項目JamesS.McDonald工程科學系三一大學德克薩斯州圣安東尼奧市78212摘要:本文所描述的是作者領(lǐng)導由四個三一大學高年級學生組成的團隊進行的一個跨學科工程項目的設(shè)計。該項目的目標是設(shè)計一個氣室內(nèi)溫度控制系統(tǒng)。該系統(tǒng)的要求是:當實際氣室的溫度階躍響應時,規(guī)定范圍內(nèi)的溫度進入氣室后,穩(wěn)定時的溫度誤差和超調(diào)量必須少于一個絕對溫度。本組學生開發(fā)設(shè)計是基于摩托羅拉MC68HC05系列單片機。該問題的教學價值也通過某些步驟的關(guān)鍵描述在本文說明。研究結(jié)果表明,解決該方案需要具有廣泛的工程學科知識,包括相關(guān)電子、機械和控制

56、系統(tǒng)工程的知識。1引言該設(shè)計項目來自一個實際應用問題,一個關(guān)于顯微鏡載玻片干燥劑溫控器歐米茄CN-390溫度控制器,而這個設(shè)計的目標是研發(fā)一個自定義的通用溫度控制系統(tǒng)取代歐米茄系統(tǒng)、一個以更低的成本實現(xiàn)相同功能的自定義控制器,就像歐米茄系統(tǒng)一樣,并不需要能夠全方位的處理各種問題。該載玻片干燥機的機械布局如圖1所示。干燥機的主體是一個足夠大的絕緣充氣室,里面依次存放著薄紙包著的石蠟。為了使石蠟保持適當穩(wěn)定性,載玻片氣室的溫度必須維持穩(wěn)定。第二個氣筒(電子圍繞元件)設(shè)有一個電阻加熱器、一個溫度控制器以及一個安裝在干燥機上的風扇,是為了把風吹過加熱器,把熱量帶到載玻片氣室。圖1-1載玻片干燥機的機械

57、布局 自1996-97學年來,本文作者帶領(lǐng)四位三一大學工程科學系的高年級學生開展此項目的研究。本文的目的說明了提出一些問題并詳細闡述學生的一些解決方案,而且討論了這種類型的跨學科設(shè)計項目在教學方面應用的問題。這份學生報告曾經(jīng)在1997年全國本科畢業(yè)生研討會上提出過并討論過。第2節(jié)給出該設(shè)計的更多詳細情況,包括性能規(guī)格。第3節(jié)具體 學生的設(shè)計。第4節(jié)是論文的主體,討論該設(shè)計在教學應用方面的實施問題。最后,第5節(jié)全文總結(jié)。2問題闡述該項目基本的思想是設(shè)計一個自定義溫度控制系統(tǒng)來取代相關(guān)的歐米茄CN-390溫度控制器。溫度時通常保持在一個穩(wěn)定的常數(shù),但重要的是階躍變化可以被“合理”的跟蹤。因此主要要

58、求如下:·可以對空氣室的溫度進行設(shè)定,·同時顯示設(shè)定值和實際溫度,·以及在設(shè)定溫度值情況下,可接受范圍內(nèi)的跟蹤階躍變化,穩(wěn)態(tài)誤差,超調(diào)量。設(shè)定溫度接口設(shè)定溫度顯示室內(nèi)溫度顯示范圍精度準確度60-991°C±1°C室內(nèi)溫度階梯響應范圍(穩(wěn)定狀態(tài))精度(穩(wěn)定狀態(tài))最大超調(diào)設(shè)定時間(到±1°)60-99±1°C 1°C120s表1精確的規(guī)格說明盡管表1部分說明并不明確,但是它清楚的反映了人們對數(shù)字顯示器在設(shè)定值和實際溫度的要求和溫度應該通過數(shù)值輸入來設(shè)定(而不是,通過電位器設(shè)置)。3.系統(tǒng)設(shè)

59、計根據(jù)微控設(shè)計,數(shù)字溫度顯示和單點輸入的要求可能是最合適的。圖2為學生的設(shè)計框圖。圖2-2溫度控制器硬件結(jié)構(gòu)圖摩托羅拉MC68HC705B16(簡稱6805),是系統(tǒng)的核心。它通過一個簡單的4鍵小鍵盤對溫度進行設(shè)定,同時使用兩個顯示驅(qū)動控制7段LED數(shù)碼管來顯示定值和氣室溫度的測量值。所有這些,輸入和輸出信號與6805的并行口相連。氣室的溫度值使用預校準熱敏電阻測量,并通過6805的數(shù)模轉(zhuǎn)換輸入。最后,6085的脈沖寬度調(diào)制(PWM)輸出用來驅(qū)動一個繼電器,以控制線性電阻加熱器的閉合和斷開。圖3更詳細的顯示了6805的接口和電子器件。使用暴風3K041103型號四鍵鍵盤,通過PA0-PA3端口進行數(shù)據(jù)輸入。其中一個重要的功能是進行模式切換。兩種模式:固定模式

溫馨提示

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

評論

0/150

提交評論