版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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.中文翻译:单片机温度控制:一个跨学科的本科生工程设计工程JamesS.
55、McDonald工程科学系三一大学德克萨斯州圣安东尼奥市78212摘要:本文所描述的是作者领导由四个三一大学高年级学生组成的团队进展的一个跨学科工程工程的设计。该工程的目标是设计一个气室温度控制系统。该系统的要:当实际气室的温度阶跃响应时,规定围的温度进入气室后,稳定时的温度误差和超调量必须少于一个绝对温度。本组学生开发设计是基于摩托罗拉MC68HC05系列单片机。该问题的教学价值也通过*些步骤的关键描述在本文说明。研究结果说明,解决该方案需要具有广泛的工程学科知识,包括相关电子、机械和控制系统工程的知识。1引言该设计工程来自一个实际应用问题,一个关于显微镜载玻片枯燥剂温控器欧米茄-390温度
56、控制器,而这个设计的目标是研发一个自定义的通用温度控制系统取代欧米茄系统、一个以更低的本钱实现一样功能的自定义控制器,就像欧米茄系统一样,并不需要能够全方位的处理各种问题。该载玻片枯燥机的机械布局如图1所示。枯燥机的主体是一个足够大的绝缘充气室,里面依次存放着薄纸包着的石蜡。为了使石蜡保持适当稳定性,载玻片气室的温度必须维持稳定。第二个气筒电子围绕元件设有一个电阻加热器、一个温度控制器以及一个安装在枯燥机上的风扇,是为了把风吹过加热器,把热量带到载玻片气室。图1-1载玻片枯燥机的机械布局 自1996-97学年来,本文作者带着四位三一大学工程科学系的高年级学生开展此工程的研究。本文的目的说明了提
57、出一些问题并详细阐述学生的一些解决方案,而且讨论了这种类型的跨学科设计工程在教学方面应用的问题。这份学生报告曾经在1997年全国本科毕业生研讨会上提出过并讨论过。第2节给出该设计的更多详细情况,包括性能规格。第3节具体 学生的设计。第4节是论文的主体,讨论该设计在教学应用方面的实施问题。最后,第5节全文总结。2问题阐述该工程根本的思想是设计一个自定义温度控制系统来取代相关的欧米茄-390温度控制器。温度时通常保持在一个稳定的常数,但重要的是阶跃变化可以被“合理的跟踪。因此主要要求如下:·可以对空气室的温度进展设定,·同时显示设定值和实际温度,·以及在设定温度值情况
58、下,可承受围的跟踪阶跃变化,稳态误差,超调量。设定温度接口设定温度显示室温度显示围精度准确度60-991°C±1°C室温度阶梯响应围稳定状态精度稳定状态最大超调设定时间到±1°60-99±1°C 1°C120s表1准确的规格说明尽管表1局部说明并不明确,但是它清楚的反映了人们对数字显示器在设定值和实际温度的要求和温度应该通过数值输入来设定而不是,通过电位器设置。3.系统设计根据微控设计,数字温度显示和单点输入的要求可能是最适宜的。图2为学生的设计框图。图2-2温度控制器硬件构造图摩托罗拉MC68HC705B16简称
59、6805,是系统的核心。它通过一个简单的4键小键盘对温度进展设定,同时使用两个显示驱动控制7段LED数码管来显示定值和气室温度的测量值。所有这些,输入和输出信号与6805的并行口相连。气室的温度值使用预校准热敏电阻测量,并通过6805的数模转换输入。最后,6085的脉冲宽度调制PWM输出用来驱动一个继电器,以控制线性电阻加热器的闭合和断开。图3更详细的显示了6805的接口和电子器件。使用暴风3K041103型号四键键盘,通过PA0-PA3端口进展数据输入。其中一个重要的功能是进展模式切换。两种模式:固定模式和运行模式。在固定模式下,其他两个键用于设定温度,一个增加,一个减少,第四个按键暂无作用。LED显示屏由哈里斯半导体ICM7212进展驱动,通过PB0-PB6端口与芯片相连,作为输出。热敏电阻由电压分频器驱动,通过AN0针脚八个模拟输入端口中的一个相连。最后,
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年学生学习合同
- 2024年天然蜂蜜采购合同
- 2024年干果坚果加工销售合同
- 2024辅导班个性化课外辅导合同
- 2024【英文版买卖合同】英语销售合同模板
- 2024正式的代理合同模板
- 2024职业培训学校章程、合同、承诺
- 2024年基础设施建设项目分包合同
- 2024股权信托合同参考范本
- 2024宾馆员工合同范本
- 小学生劳动技能培养与就业市场需求
- 导管相关性尿路感染学习课件
- 疑难信访培训课件
- 云南省昆明市五华区2023-2024学年九年级上学期期末英语试卷+
- 人教版七年级数学上册期中测试卷-附带有答案
- 道路旅客运输企业双体系建设的政策法规与标准培训
- DB3714-T 0004-2021 肉种鸭强制换羽技术规程
- 概率论与数理统计考试卷题库2 (七)
- 【制药废水预处理技术的发展综述报告6000字(论文)】
- 树立信心主题班会课件1
- 展开友谊共享愉快小学二年级主题班会
评论
0/150
提交评论