版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、精選優(yōu)質(zhì)文檔-傾情為你奉上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 au
2、thors supervision 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 rang
3、e and to exhibit 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
4、problem is also 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 i
5、s the subject 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
6、 that a custom 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
7、in Figure 1. 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 a
8、t a desired (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
9、year 199697 by 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 off
10、ered by an interdisciplinary 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. Se
11、ction 4 makes 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 o
12、f an Omega CN-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
13、·allowing 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,
14、it was clear 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
15、 are enough to 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 speci
16、fication of the 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-ca
17、librated thermistor 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 interfac
18、ing to the 6805. The keypad, a Storm 3K, 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 increm
19、ents it 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
20、 inputs). 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
21、discussed 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 essential
22、ly the 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 consid
23、erations 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.
24、1 discusses 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 po
25、ints out 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 MathematicalModelL
26、umped-element 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
27、air in 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
28、 box and 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:
29、where K 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
30、two real 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 ex
31、ercises 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;
32、1=tp2 so 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
33、 t _ 295 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 se
34、t-point, 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-s
35、tate error, 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 specific
36、ations 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 de
37、termining 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 ar
38、e·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 Simuli
39、nkTM block 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 pr
40、oven particularly 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 thi
41、ngs.) PWM 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, an
42、d this 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,
43、its necessary 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 microcontrolle
44、r and peripherals 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 spe
45、cify which 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 interfa
46、cing the 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
47、 finally 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 com
48、plete development 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,
49、and final 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. Moto
50、rola makes 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
51、parts), _ 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 environmen
52、t RAPID 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 definit
53、ely not 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 like
54、ly gives 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 elec
55、tronics technician.中文翻譯:?jiǎn)纹瑱C(jī)溫度控制:一個(gè)跨學(xué)科的本科生工程設(shè)計(jì)項(xiàng)目JamesS.McDonald工程科學(xué)系三一大學(xué)德克薩斯州圣安東尼奧市78212摘要:本文所描述的是作者領(lǐng)導(dǎo)由四個(gè)三一大學(xué)高年級(jí)學(xué)生組成的團(tuán)隊(duì)進(jìn)行的一個(gè)跨學(xué)科工程項(xiàng)目的設(shè)計(jì)。該項(xiàng)目的目標(biāo)是設(shè)計(jì)一個(gè)氣室內(nèi)溫度控制系統(tǒng)。該系統(tǒng)的要求是:當(dāng)實(shí)際氣室的溫度階躍響應(yīng)時(shí),規(guī)定范圍內(nèi)的溫度進(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é)果表明,解決該方案需要具有廣泛的工程學(xué)科知識(shí),包括相關(guān)電
56、子、機(jī)械和控制系統(tǒng)工程的知識(shí)。1引言該設(shè)計(jì)項(xiàng)目來(lái)自一個(gè)實(shí)際應(yīng)用問(wèn)題,一個(gè)關(guān)于顯微鏡載玻片干燥劑溫控器歐米茄CN-390溫度控制器,而這個(gè)設(shè)計(jì)的目標(biāo)是研發(fā)一個(gè)自定義的通用溫度控制系統(tǒng)取代歐米茄系統(tǒng)、一個(gè)以更低的成本實(shí)現(xiàn)相同功能的自定義控制器,就像歐米茄系統(tǒng)一樣,并不需要能夠全方位的處理各種問(wèn)題。該載玻片干燥機(jī)的機(jī)械布局如圖1所示。干燥機(jī)的主體是一個(gè)足夠大的絕緣充氣室,里面依次存放著薄紙包著的石蠟。為了使石蠟保持適當(dāng)穩(wěn)定性,載玻片氣室的溫度必須維持穩(wěn)定。第二個(gè)氣筒(電子圍繞元件)設(shè)有一個(gè)電阻加熱器、一個(gè)溫度控制器以及一個(gè)安裝在干燥機(jī)上的風(fēng)扇,是為了把風(fēng)吹過(guò)加熱器,把熱量帶到載玻片氣室。圖1-1載玻
57、片干燥機(jī)的機(jī)械布局 自1996-97學(xué)年來(lái),本文作者帶領(lǐng)四位三一大學(xué)工程科學(xué)系的高年級(jí)學(xué)生開(kāi)展此項(xiàng)目的研究。本文的目的說(shuō)明了提出一些問(wèn)題并詳細(xì)闡述學(xué)生的一些解決方案,而且討論了這種類型的跨學(xué)科設(shè)計(jì)項(xiàng)目在教學(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)題闡述該項(xiàng)目基本的思想是設(shè)計(jì)一個(gè)自定義溫度控制系統(tǒng)來(lái)取代相關(guān)的歐米茄CN-390溫度控制器。溫度時(shí)通常保持在一個(gè)穩(wěn)定的常數(shù),但重要的是階躍變化可以被“合理”的跟
58、蹤。因此主要要求如下:·可以對(duì)空氣室的溫度進(jìn)行設(shè)定,·同時(shí)顯示設(shè)定值和實(shí)際溫度,·以及在設(shè)定溫度值情況下,可接受范圍內(nèi)的跟蹤階躍變化,穩(wěn)態(tài)誤差,超調(diào)量。設(shè)定溫度接口設(shè)定溫度顯示室內(nèi)溫度顯示范圍精度準(zhǔn)確度60-991°C±1°C室內(nèi)溫度階梯響應(yīng)范圍(穩(wěn)定狀態(tài))精度(穩(wěn)定狀態(tài))最大超調(diào)設(shè)定時(shí)間(到±1°)60-99±1°C 1°C120s表1精確的規(guī)格說(shuō)明盡管表1部分說(shuō)明并不明確,但是它清楚的反映了人們對(duì)數(shù)字顯示器在設(shè)定值和實(shí)際溫度的要求和溫度應(yīng)該通過(guò)數(shù)值輸入來(lái)設(shè)定(而不是,通過(guò)電位器設(shè)置
59、)。3.系統(tǒng)設(shè)計(jì)根據(jù)微控設(shè)計(jì),數(shù)字溫度顯示和單點(diǎn)輸入的要求可能是最合適的。圖2為學(xué)生的設(shè)計(jì)框圖。圖2-2溫度控制器硬件結(jié)構(gòu)圖摩托羅拉MC68HC705B16(簡(jiǎn)稱6805),是系統(tǒng)的核心。它通過(guò)一個(gè)簡(jiǎn)單的4鍵小鍵盤對(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)3K型號(hào)四鍵鍵盤,通過(guò)PA0-PA3端口進(jìn)行數(shù)據(jù)輸入。其中一個(gè)重要的功能是進(jìn)行模式切換。兩種模
溫馨提示
- 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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 職業(yè)理想 課件
- 2024年湖南省長(zhǎng)沙市中考生物真題卷及答案解析
- 愛(ài)迪生課件兒童
- 西京學(xué)院《微電網(wǎng)技術(shù)及應(yīng)用》2022-2023學(xué)年期末試卷
- 北師大小學(xué)數(shù)學(xué)六年級(jí)上《分?jǐn)?shù)混合運(yùn)算(三)》教程
- 中等職業(yè)學(xué)校教師教育教學(xué)水平能力測(cè)試成績(jī)單附件2
- 西京學(xué)院《電工電子學(xué)》2022-2023學(xué)年期末試卷
- 西華師范大學(xué)《中學(xué)歷史課程標(biāo)準(zhǔn)解讀與教材分析》2022-2023學(xué)年第一學(xué)期期末試卷
- 如何提高 課件
- 西華師范大學(xué)《計(jì)算思維》2021-2022學(xué)年期末試卷
- 建國(guó)集團(tuán)財(cái)務(wù)制度匯總
- 安裝工程預(yù)算照明配管配線
- 區(qū)最新關(guān)于生活垃圾分類工作推進(jìn)會(huì)上的講話稿
- 除塵器安裝專業(yè)監(jiān)理實(shí)施細(xì)則
- 任現(xiàn)職以來(lái)教學(xué)改革情況
- 八年級(jí)黃金矩形(數(shù)學(xué)活動(dòng))ppt課件
- 銷售技巧個(gè)頂尖電梯銷售技巧
- 工程施工管理協(xié)議書(共7頁(yè))
- 《幼兒園衛(wèi)生保健后勤材料資料》幼兒園保健醫(yī)生每日檢查工作記錄表
- 換鋪長(zhǎng)鋼軌施工方案(工機(jī)段版)
- 第二章算法與問(wèn)題解決PPT課件
評(píng)論
0/150
提交評(píng)論