

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、-Temperature Control Using a Microcontroller:An Interdisciplinary Undergraduate Engineering Design ProjectJames S. McDonaldDepartment of Engineering ScienceTrinity UniversitySan Antonio, T* 78212Abstract:This paper describes an interdisciplinary design project which was done under the authors superv
2、ision 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 e*h
3、ibit 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 a
4、lso 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 subjec
5、t of this paper originated from a real-world application. A prototype of a microscope slide dryer had been developed around an OmegaTM model -390 temperature controller, and the objective was to develop a custom temperature control system to replace the Omega system. The motivation was that a custom
6、 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. T
7、he 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 (c
8、onstant) 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 by
9、 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 int
10、erdisciplinary 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 -39
12、0 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·allowing a
13、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 e*plicitly a part of the specifications in Table 1, it was clear that
14、 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 to di
15、ctate 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 the s
16、et-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 acmodated by parallel ports on the 6805. Chamber temperature is sensed using a pre-calibrated thermistor
17、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 6805. The
18、 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 and on
19、e 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). Fina
20、lly, 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 plete at this writing, software will not be discussed in deta
21、il 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 ple* than a PID. Some control design issues will be discussed in Section 4, however.4 The Design ProcessAlthough essentially the project is ju
22、st to build a thermostat, it presents many nice pedagogical opportunities. The knowledge and e*perience 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 considerations plicate the
23、 situation significantly.Fortunately these plications are not insurmountable, and the result is a very beneficial design e*perience. 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 discusses some of the fe
24、atures of a simplified mathematical model of the thermal properties of the system and how it can be easily validated e*perimentally. Section 4.2 describes how realistic control algorithm designs can be arrived at using introductory concepts in control design. Section 4.3 points out some important de
25、ficiencies of such a simplified modeling/control design process and how they can be overe 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-element thermal systems
26、 are described in almost any introductory linear control systems te*t, 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 the bo* and Tb of the
27、bo* 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 bo*, respectively, and Ca and Cb their specific heats. 1 and 2 are heat transfer coefficients from the air to the bo* and from the bo* to the
28、e*ternal 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 is a constant and D(s
29、) 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 pletely unknown, but its not hard to show that, regardless of their values, D(s) has two real zeros. Therefore the ma
30、in 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 e*cellent e*ercises for the student, and the
31、 result is the openloop pole-zero diagram of Figure 5.Obtaining a plete 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 e*periments show that 1=tp1 _ 1=tz;1=tp2 so that tz;tp2 _ 0 are good a
32、ppro*imations. 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 e*periments show that,for a wide range of initial temperatures and heat inputs, K _0:14 _=W and t _ 295 s.14.2 Control System Desi
33、gnUsing 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, temperature,C(s) is the pe
34、nsator 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 error, and overshoot specified in
35、 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 may require larger heat outputs
36、 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 determining overall performance limitati
37、ons.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·quantization error in analog-to
38、-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 e*periment, of course).Figure 7 shows a SimulinkTM block diagram of the closed-loop
39、system which incorporates these effects. A/D converter quantization and saturation are modeled using standard Simulink quantizer and saturation blocks. Modeling PWM is more plicated and requires a custom S-function to represent it.This simulation model has proven particularly useful in gauging the e
40、ffects 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 e*cessive relay “chatter, among other things.) PWM is often difficult for students
41、to grasp, and the simulation model allows an e*ploration 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 project incorporates all three. It
42、is therefore an e*cellent all-around e*ercise 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 necessary to develop a plete embedded
43、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 peripherals must be designed and fabric
44、ated.Microcontroller Selection. In view of e*isting local e*pertise, 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 which microcontroller, out of scores of
45、variants, is required for the job. This is difficult for students, as they generally lack the e*perience and intuition needed as well as the perseverance to wade through manufacturers selection guides.Part of the problem is in choosing methods for interfacing the various peripherals (e.g., what kind
46、 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 binations should be considered.The MC68HC705B16 was finally chosen on the basis of its availableA/D
47、 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 plete development system specific to the chosen par
48、t 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 final debugging and testing of a custom printed
49、-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 e*pertise. Motorola makes three grades of development environment
50、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), _ an emulator module (specific to B-series
51、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 es with the simple but sufficient software development environment RAPID 5.Students find learning to use this type of s
52、ystem challenging, but the e*perience they gain in real-world microcontroller application development greatly e*ceeds the typical first-course e*perience using simple evaluation boards.Printed-Circuit Board. The layout of a simple (though definitely not trivial) printed-circuit board is another prac
53、tical 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 gives better results than automatic in an applicati
54、on like thisand the student is therefore e*posed 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 technician.中文翻譯:?jiǎn)纹瑱C(jī)溫度控制:一個(gè)跨學(xué)科的本科生工程設(shè)計(jì)工程JamesS.
55、McDonald工程科學(xué)系三一大學(xué)德克薩斯州圣安東尼奧市78212摘要:本文所描述的是作者領(lǐng)導(dǎo)由四個(gè)三一大學(xué)高年級(jí)學(xué)生組成的團(tuán)隊(duì)進(jìn)展的一個(gè)跨學(xué)科工程工程的設(shè)計(jì)。該工程的目標(biāo)是設(shè)計(jì)一個(gè)氣室溫度控制系統(tǒng)。該系統(tǒng)的要:當(dāng)實(shí)際氣室的溫度階躍響應(yīng)時(shí),規(guī)定圍的溫度進(jìn)入氣室后,穩(wěn)定時(shí)的溫度誤差和超調(diào)量必須少于一個(gè)絕對(duì)溫度。本組學(xué)生開(kāi)發(fā)設(shè)計(jì)是基于摩托羅拉MC68HC05系列單片機(jī)。該問(wèn)題的教學(xué)價(jià)值也通過(guò)*些步驟的關(guān)鍵描述在本文說(shuō)明。研究結(jié)果說(shuō)明,解決該方案需要具有廣泛的工程學(xué)科知識(shí),包括相關(guān)電子、機(jī)械和控制系統(tǒng)工程的知識(shí)。1引言該設(shè)計(jì)工程來(lái)自一個(gè)實(shí)際應(yīng)用問(wèn)題,一個(gè)關(guān)于顯微鏡載玻片枯燥劑溫控器歐米茄-390溫度
56、控制器,而這個(gè)設(shè)計(jì)的目標(biāo)是研發(fā)一個(gè)自定義的通用溫度控制系統(tǒng)取代歐米茄系統(tǒng)、一個(gè)以更低的本錢(qián)實(shí)現(xiàn)一樣功能的自定義控制器,就像歐米茄系統(tǒng)一樣,并不需要能夠全方位的處理各種問(wèn)題。該載玻片枯燥機(jī)的機(jī)械布局如圖1所示??菰餀C(jī)的主體是一個(gè)足夠大的絕緣充氣室,里面依次存放著薄紙包著的石蠟。為了使石蠟保持適當(dāng)穩(wěn)定性,載玻片氣室的溫度必須維持穩(wěn)定。第二個(gè)氣筒電子圍繞元件設(shè)有一個(gè)電阻加熱器、一個(gè)溫度控制器以及一個(gè)安裝在枯燥機(jī)上的風(fēng)扇,是為了把風(fēng)吹過(guò)加熱器,把熱量帶到載玻片氣室。圖1-1載玻片枯燥機(jī)的機(jī)械布局 自1996-97學(xué)年來(lái),本文作者帶著四位三一大學(xué)工程科學(xué)系的高年級(jí)學(xué)生開(kāi)展此工程的研究。本文的目的說(shuō)明了提
57、出一些問(wèn)題并詳細(xì)闡述學(xué)生的一些解決方案,而且討論了這種類(lèi)型的跨學(xué)科設(shè)計(jì)工程在教學(xué)方面應(yīng)用的問(wèn)題。這份學(xué)生報(bào)告曾經(jīng)在1997年全國(guó)本科畢業(yè)生研討會(huì)上提出過(guò)并討論過(guò)。第2節(jié)給出該設(shè)計(jì)的更多詳細(xì)情況,包括性能規(guī)格。第3節(jié)具體 學(xué)生的設(shè)計(jì)。第4節(jié)是論文的主體,討論該設(shè)計(jì)在教學(xué)應(yīng)用方面的實(shí)施問(wèn)題。最后,第5節(jié)全文總結(jié)。2問(wèn)題闡述該工程根本的思想是設(shè)計(jì)一個(gè)自定義溫度控制系統(tǒng)來(lái)取代相關(guān)的歐米茄-390溫度控制器。溫度時(shí)通常保持在一個(gè)穩(wěn)定的常數(shù),但重要的是階躍變化可以被“合理的跟蹤。因此主要要求如下:·可以對(duì)空氣室的溫度進(jìn)展設(shè)定,·同時(shí)顯示設(shè)定值和實(shí)際溫度,·以及在設(shè)定溫度值情況
58、下,可承受?chē)母欕A躍變化,穩(wěn)態(tài)誤差,超調(diào)量。設(shè)定溫度接口設(shè)定溫度顯示室溫度顯示圍精度準(zhǔn)確度60-991°C±1°C室溫度階梯響應(yīng)圍穩(wěn)定狀態(tài)精度穩(wěn)定狀態(tài)最大超調(diào)設(shè)定時(shí)間到±1°60-99±1°C 1°C120s表1準(zhǔn)確的規(guī)格說(shuō)明盡管表1局部說(shuō)明并不明確,但是它清楚的反映了人們對(duì)數(shù)字顯示器在設(shè)定值和實(shí)際溫度的要求和溫度應(yīng)該通過(guò)數(shù)值輸入來(lái)設(shè)定而不是,通過(guò)電位器設(shè)置。3.系統(tǒng)設(shè)計(jì)根據(jù)微控設(shè)計(jì),數(shù)字溫度顯示和單點(diǎn)輸入的要求可能是最適宜的。圖2為學(xué)生的設(shè)計(jì)框圖。圖2-2溫度控制器硬件構(gòu)造圖摩托羅拉MC68HC705B16簡(jiǎn)稱(chēng)
59、6805,是系統(tǒng)的核心。它通過(guò)一個(gè)簡(jiǎn)單的4鍵小鍵盤(pán)對(duì)溫度進(jìn)展設(shè)定,同時(shí)使用兩個(gè)顯示驅(qū)動(dòng)控制7段LED數(shù)碼管來(lái)顯示定值和氣室溫度的測(cè)量值。所有這些,輸入和輸出信號(hào)與6805的并行口相連。氣室的溫度值使用預(yù)校準(zhǔn)熱敏電阻測(cè)量,并通過(guò)6805的數(shù)模轉(zhuǎn)換輸入。最后,6085的脈沖寬度調(diào)制PWM輸出用來(lái)驅(qū)動(dòng)一個(gè)繼電器,以控制線性電阻加熱器的閉合和斷開(kāi)。圖3更詳細(xì)的顯示了6805的接口和電子器件。使用暴風(fēng)3K041103型號(hào)四鍵鍵盤(pán),通過(guò)PA0-PA3端口進(jìn)展數(shù)據(jù)輸入。其中一個(gè)重要的功能是進(jìn)展模式切換。兩種模式:固定模式和運(yùn)行模式。在固定模式下,其他兩個(gè)鍵用于設(shè)定溫度,一個(gè)增加,一個(gè)減少,第四個(gè)按鍵暫無(wú)作用。LED顯示屏由哈里斯半導(dǎo)體ICM7212進(jìn)展驅(qū)動(dòng),通過(guò)PB0-PB6端口與芯片相連,作為輸出。熱敏電阻由電壓分頻器驅(qū)動(dòng),通過(guò)AN0針腳八個(gè)模擬輸入端口中的一個(gè)相連。最后,
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度風(fēng)力發(fā)電項(xiàng)目風(fēng)機(jī)設(shè)備采購(gòu)與投資分析合同
- 2025年度智能制造對(duì)賭協(xié)議約定倍收益合作協(xié)議
- 二零二五年度林地使用權(quán)變更及補(bǔ)償合同
- 2025年度藥店藥店藥品知識(shí)產(chǎn)權(quán)保護(hù)聘用勞動(dòng)合同
- 股權(quán)代持協(xié)議書(shū)標(biāo)準(zhǔn)模板:2025年度股權(quán)激勵(lì)適用
- 2025年度森林土地承包與林木撫育合作協(xié)議
- 二零二五年度企業(yè)內(nèi)部員工外出安全免責(zé)合同
- 二零二五年度汽車(chē)零部件貨物運(yùn)輸保險(xiǎn)協(xié)議
- 二零二五年度歷史文化街區(qū)拆除搬遷保護(hù)協(xié)議
- 2025年度服裝廠職工勞動(dòng)合同模板書(shū)(智能化工廠)
- (新版)廣電全媒體運(yùn)營(yíng)師資格認(rèn)證考試復(fù)習(xí)題庫(kù)(含答案)
- 2024年法律職業(yè)資格考試(試卷一)客觀題試卷與參考答案
- 安全生產(chǎn)重大事故隱患排查報(bào)告表
- 秘書(shū)理論與實(shí)務(wù)教案
- 社區(qū)矯正人員工作手冊(cè)
- 淺圓倉(cāng)滑模及倉(cāng)頂板施工方案
- 應(yīng)用文第一章緒論2016春
- 統(tǒng)編版必修上冊(cè)第五《鄉(xiāng)土中國(guó)》導(dǎo)讀優(yōu)質(zhì)課件PPT
- 電纜敷設(shè)施工方案及安全措施范文
- 市場(chǎng)營(yíng)銷(xiāo)課程標(biāo)準(zhǔn)
- ppt模板:信保專(zhuān)用中國(guó)出口信用保險(xiǎn)公司課件
評(píng)論
0/150
提交評(píng)論