Supplementary material for “The bug: a temperaturecontrolled experiment on a protoboard” Paul K. Dixon Department of Physics, California State University at San Bernardino, San Bernardino, California 92407 1 In this document, the supplementary material is organized by section with a oneto-one correspondence with the section headings in the primary article. The sub-headings refer to the particular topic of relevance in the primary article. II. Sample Construction Capacitor choice: Commercial ceramic capacitors are made with high dielectric constant materials, most typically titanates; doped barium titanate and doped strontium titanate are the most common ingredients [1]. The large dielectric constant in these materials is a result of a ferroelectric transition [2-4]. In a pure single crystal material, this results in power-law divergent dielectric susceptibility at the transition temperature. This divergent susceptibility is suppressed and broadened with impurity doping, resulting in a material that has a very high dielectric susceptibility over a fairly broad operational temperature range near room temperature, but at the expense of an unusually strong variation with temperature. This allows for the construction of low-cost nonpolar capacitors in the 1 pF – 1 µF range in very small packages. Such capacitors are used in electronics for situations where the value tolerance in the design is very loose, usually a factor of 2 or more. This unsuitability in regards to temperature variation is exactly the property that makes them interesting for our use. For our experiment, we wanted the largest capacitance variation possible. The primary criterion for choosing the capacitor was to pick the one with the largest dielectric constant, and thus hopefully the weakest doping and strongest variation with temperature. We also wanted to avoid values in the pF range to make the measurement easier. Another issue was that we wanted a capacitor package that was similar in size and shape to the thermistor package to create a symmetric geometry for the bug. This helps to balance the temperature gradients on both sides of the heater resistor, thus minimizing the difference of the temperature measurement of the thermistor on one side to that actual temperature of the capacitor on the other side. Within our collection of ceramic capacitors on hand, the apparent best choice was 10 nF. This choice has turned out to work quite well, and the cost is negligible, just a few cents per capacitor. After the fact, we have since deduced that we chose a capacitor made of the material Z5V, which is a relatively lightly doped 2 barium titanate mixture with a peak dielectric susceptibility of ~ 20,000 and transition temperature of ~ 25 oC. Those wishing to choose a capacitor with such sharp temperature-dependent properties should acquire capacitors specified as Z5V, Y5V, or with temperature specifications: +20% to -80% [5]. Thermistor choice and temperature calibration: The thermistors that we use are standard Vishay Dale NTC 10 kΩ @ 25 oC silicon thermistors. They can be obtained from a variety of electronics vendors, both calibrated and uncalibrated. The uncalibrated version is under $1; the calibrated version typically is 5-10X more expensive. We purchase the uncalibrated model and do a calibration against a NIST-traceable platinum resistance thermometer ourselves. We find that a three point calibration over the active temperature range of the experiment (25 oC – 85 oC) is adequate to obtain ±100 mK accuracy consistently with the widely-used Steinhart-Hart equation [6] ( ) 3 −1 T = A + B [ ln( R) ] + C [ ln( R) ] . (1) We improve the accuracy of the calibration to ±30 mK by using a 20 (or more) point measurement and our own ad-hoc fitting form T = C1 + C2 e− C3 R + C4 e− C5 R . (2) Although it would be very instructive to have the students do the calibration themselves in the lab, we do it beforehand and give them the calibration curves to use. They learn a variety of thermometry calibration procedures in their senior-level advanced laboratory course, and this experience would be redundant. Heater resistor choice: The choice of the ½-Watt 60-Ω metal-film resistor for the heater was motivated by a variety of considerations. The 60-Ω resistance value was chosen as a rough impedance match to the ~ 50-Ω output impedance of the power amplifier that we use to drive it; the amplifier will be described in detail below. In addition, the 60-Ω value allows us to overdrive the resistor to a desired maximum power of 1.2 Watts at an applied voltage of 8.5 Volts, well within our working voltage band. 3 This results in a temperature in the neighborhood of 85 oC, which is our target maximum temperature. At this temperature, all three components show no long term degradation effects. Even with our maximum possible applied voltage of 10 Volts resulting in a power of 1.7 Watts, the ½-Watt metal film package design is robust enough to survive with just a little discoloration. This typically is not the case for carbon resistors, and they should be avoided for this application. As is the case with the capacitor, the cost is negligible, just a couple of cents per resistor. Adhesive choice: The three components are bonded together with an adhesive. We have tried a wide variety of readily available adhesives over the years and have found just a couple of good choices. Standard 5-minute epoxy is adequate, but it tends to yellow after a few cycles and become brittle after repeated use for a month or so. The best adhesive that we have found is Plastic Fusion Adhesive, product #15277, from the Super Glue Corporation, a division of Pacer Technology. It is a 2-component adhesive that is available in “big-box” home centers. We have found that it doesn’t show any degradation even after repeated cycles to 125 oC. As can be seen in Fig. 1b in the primary article, we try to minimize the amount of adhesive so that the structure of the bug is visible to the students. Including the cost of the adhesive, a set of 25 bugs can be constructed for under $20. III. Temperature Measurement and PID Feedback Power Control Temperature measurement and manual power control set-up: The first experiment that the students do with the bug is to set up a simple circuit for manual control of the power, and measurement of the thermistor resistance. The bug is placed on a prototyping breadboard, raised above the board to a height of 2-3 cm. The component leads are left at their full length so that there is adequate stand-off from the board; if pushed down to the surface, the bug can discolor and even melt the breadboard at its maximum temperature. The heater resistor is connected to a simple variable voltage 4 power supply capable of delivering at least 150 mA of current at a voltage of 8.5 Volts. The thermistor resistance is measured with a Hewlett Packard HP34401A digital multimeter (DMM) that communicates with a PC via an IEEE-488 parallel bus interface. When we started this series of experiments 10 years ago, we used a low-cost Elenco 550 breadboard trainer and used the on-board power supply. Since then, we designed the NI-ELVIS workstation [7] for our applied physics curricula partly with this series of experiments in mind, and now use NI-ELVIS instead. Its variable power supply is more than adequate to the task. Even though we use NI-ELVIS for these experiments, they can still be done with standard electronics instructional tools. In fact, for pedagogical reasons, we avoid using many of the integrated hardware/software features of NI-ELVIS that could be applied to these experiments. For example, we use the Hewlett Packard 34401A digital multimeter to measure the resistance of the thermistor even though we could do it using the ohmmeter capability integrated into NI-ELVIS. The reason for this is that we want the students to gain the valuable experience of interfacing a standard measurement instrument to the PC. The first major LabVIEW (LV) student software project in this series of experiments is the development of an instrument driver for the HP34401A. The students start with a series of in-class exercises to establish communication with the instrument over the IEEE-488 interface using the basic “VISA” ASCII read and write commands included in LabVIEW. The VISA tools are a wrapper for ASCII communication over a range of protocols including parallel IEEE-488, serial RS-232, Ethernet, etc. The now almost-ubiquitous use of Standard Commands for Programmable Instruments (SCPI) for instrument control on all of these ASCII-based interfaces makes developing an IEEE-488 instrument driver a skill that is easily transferable to these other protocols as well. After the students establish communication with the instrument, they then proceed through a series of given command sets to configure the instrument, perform a measurement, and return the data. One of the issues that we address at this point in the lab is the tradeoff of speed and resolution. This then leads to a discussion of the issue of 60 Hz power line noise rejection via line cycle integration – in our opinion, an important but often overlooked topic in measurement instruction. 5 Once they have learned the basic communication protocol, they then proceed with a relatively large project to build an instrument driver for the DMM capable of a variety of basic measurements including voltage, current, and resistance. The instrument driver is a stand-alone virtual instrument (VI) that can be used in a one-shot mode or can return measurements continuously in response to a software trigger over the bus. To keep the amount of new coding to a minimum, we take advantage of earlier inclass programming exercises to do some of the work ahead of time. For example, one of the critical components of the driver is a command generator. The command generator is a subVI that creates command sequences of the proper syntax in response to a series of menu choices made by the user (or the higher level program); for example, a sequence of the two commands “CONF:RES DEF,DEF” and then “TRIG:COUN 1” sets the instrument in a state ready for the software triggering of a resistance measurement with a default range of 10-kΩ and a default resolution of 5½ digits using 10 line cycle integration. We have the students build this subVI three weeks earlier as an in-class exercise in string manipulation. The same is true for the subVI that converts the returned measurement string to a floating point numeric value. In fact, numerous subVIs in this project and the projects to follow are developed earlier in the course as programming exercises in array manipulation, signal averaging, string manipulation, file I/O, etc. This helps to make this series of projects manageable in the allotted three weeks. Once the instrument driver is complete, the students then integrate it into a toplevel VI called “Temperature Chart” that measures the resistance of the thermistor every half-second, converts the resistance to temperature using Eq. 2, and charts the temperature versus time. For this assignment and all of the other homework assignments in this sequence of projects, the students are given LabVIEW VIs with fully designed front panels but empty block diagrams. They spend quite a bit of time earlier in the course learning how to design front panels; at this stage in the course, their time is put to better use on the coding. In addition, the students are given working versions of the VIs with block diagrams that have been password protected. This allows them to both test their hardware and explore the features that they are being asked to re-create. Once a 6 given assignment is complete, they are then given the password and can inspect our solution. Power control and measurement interfacing: The next major student project is to interface the power control and power measurement to the PC via the multifunction DAQ card that is part of the NI-ELVIS system. The students then incorporate both features into the temperature charting software. They start by building a power amplifier and interfacing the electronics as shown in Fig. 1. The current-boosted DAC outputs on NI-ELVIS have enough current capability without enhancement, but we choose to have them build the power amplifier anyway. In part, this is to refresh their memories and reinforce the interfacing techniques that the learned in the freshman electronics course that is a prerequisite to this one. Fig. 1. (a) A circuit schematic for interfacing the heater resistor to automatic power control. (b) A detailed schematic of the power follower (1XP). The power amplifier is a conventional design in which the relatively low-current push-pull output transistors inside the op-amp are effectively replaced with a pair of discrete transistors capable of much higher current capability. Note that the discrete pushpull transistors are still inside the feedback loop, making this a power voltage-follower design. This power booster can deliver up to 200 mA of current to the 60-Ω resistor, much in excess of the 2 mA capability of typical DAQ card analog outputs. Even with very inexpensive components like the 741 op amp, 2N3904 NPN transistor, and 2N3906 PNP transistor, the power-follower has an output impedance of ~ 50 Ω and an effective bandwidth in excess of 1 kHz. One of the analog outputs of a PC multifunction DAQ card is used to set the voltage across the heater. The actual voltage across the heater resistor is measured using one of the DAQ card differential analog input pairs. 7 The students build and test this circuit in a matter of minutes. The component cost is well under $1. If they make a mistake, the most common failure mode is an easily replaced blown transistor, at a cost of 10 cents or so. A basic PID algorithm: The PID algorithm presented below is a rudimentary version with a somewhat standard improvement in the integral power calculation. The integral power is cleared (reset to zero) if the system leaves the control band to avoid “integral windup”; this leads to much smaller temperature overshoots and quicker settling for setpoint changes larger than the control bandwidth. An added feature is that the integral term is only reset to zero if the system leaves the control bandwidth for two consecutive temperature measurements, thus avoiding inadvertently clearing the integral due to measurement noise or an occasional unexplained spike in the measurement. Definition of terms (memory elements in Italics): Counting indices: j = represents the index of the current cycle j -1 = represents the index of the previous cycle Temperature measurement: Tj = current temperature of this cycle [oC], also can be written as just T Tj-1 = temperature of the last cycle [oC] δT = Tj – Tj-1 temperature change since the last cycle [oC] Time measurement: tj = current time of this cycle (sec), also can be written as just t tj-1 = time of the last cycle (sec) δt = tj – tj-1 elapsed time since the last cycle (sec) Control Parameters: Ts = Setpoint (desired temperature) [oC] 8 ∆ = Control bandwidth [oC] S = Settle bandwidth [oC] τi = Integral time (sec) Ion = Integral control on, Boolean, True = on, False = off τd = Derivative time (sec) Don = Derivative control on, Boolean, True = on, False = off ts = Settle time [sec] TH = Ts + ∆/2 High limit of control band [oC] TL = Ts - ∆/2 Low limit of control band [oC] TSH = Ts + S/2 High limit of settle band [oC] TSL = Ts - S/2 Low limit of settle band [oC] Power terms: Pp = Proportional power [normalized 0-1] kj = current count of the number of cycles outside of the control band kj-1 = previous count of the number of cycles outside of the control band PIj = current integral power [normalized], also can be written as just PI PIj-1 = integral power of last cycle [normalized] Pd = Derivative power [normalized] Pr = Pp + PIj + Pd Pt = Final total power [normalized] Raw total power [normalized] Settle terms: Go = Temperature is settled, Boolean, True = on, False = off tej = current elapsed running time in the settle band [sec] tej-1 = elapsed running time in the settle band of the previous cycle [sec] Power algorithm: Proportional power: Pp = or 1/2 +(Ts-Tj)/∆ if 9 TL < Tj < TH = or 1 if Tj < TL = 0 if TH < Tj Derivative power: Pd = or -[τd/∆]*[δT/δt] if Don = True = 0 if Don = False = kj-1 + 1 if Tj < TL = 0 if TL < Tj < TH Out counter: kj and kj-1 = 0 or TH < Tj Integral power: PIj = PIj-1 - [(Tj-Ts)*δt]/[∆∗τi] if TL < Tj < TH and Ion = True = 0 if kj > 1 and PIj-1 = 0 or Raw power: Pr = Pp + PIj + Pd Final total power: Pt = Pr if 0 < Pr < 1 Pt = 1 if 1 < Pr Pt = 0 if Pr < 0 Settle algorithm: Settle time tracking: tej = tej-1 + δt if TSL < Tj < TSH = 0 if Tj < TSL = 0 if TSH < Tj Determination of settled condition: 10 Ion = False Go = True if ts < tej Initialization: Tj-1 = Tj tj-1 = tj kj-1 = 0 PIj-1 = 0 tej-1 = 0 Pd = 0 PIj = 0 Reasonable starting values for loose control of “the bug”: ∆ = 4 Control bandwidth [oC] S = 1 Settle bandwidth [oC] τi = 30 Integral time (sec) τd = 0.5 Derivative time (sec) ts = 100 Settle time [sec] 11 PID power control exploration: In addition to exploring the PID control concepts in lecture, we explore the behavior of the actual bug system under PID control using a password protected version of the VI “temp chart with PID” that the students will be coding for this specific project. Figure 2 shows the front panel of this VI. Fig. 2. The front panel of the “temp chart with PID” LabVIEW virtual instrument (VI) used in the bug experiments. Also shown is the minimized version obtained by activating a “shrink” feature. Fig. 3. The temporal autocorrelation of the temperature deviations from the setpoint for To = 50 oC and for a variety of conditions. Each autocorrelation was produced from a data set in excess of 2 hours: the original control parameters [∆ = 4 oC, τi = 30 s, and τd = 0.5 s] for an unwrapped and exposed bug (bold dotted line), the ZN control parameters [∆ = 0.833 oC, τi = 3.5 s, and τd = 0.875 s] for the wrapped and shielded bug (bold solid line), both ZN time constants doubled (dashed line), both ZN time constants cut in half (dotted line), and doubling just the integral time while leaving the derivative time unchanged (solid line). Autocorrelation of the temperature fluctuations: In Fig. 3, we show the temporal autocorrelation of the temperature fluctuations from the long data sets used to produce Fig. 7 in the primary article. As can be seen in the figure, the overshoot and settling time are both much more sensitive than the size of the fluctuations to these 12 control parameter changes. Doubling just the integral time leads to a slightly more underdamped response than the ZN response, but at the benefit of smaller fluctuations from the setpoint as demonstrated in Fig. 7 of the primary article. On the other hand, cutting the time constants in half leads to instability as was seen in the step response experiments shown in Fig. 5 of the primary article. Fig. 3 is instructive, but the correlation analysis that it presents is beyond the mathematical prerequisites for this course. Because of this, we prefer to present essentially the same information to the students in a more tractable fashion, using the simple large step response measurements shown in Fig. 5 in the primary article. The step response measurements have the added benefit of clearly illustrating the effects of the derivative time on the maximum ramping rate outside of the control band. V. Fully Automated Experimental Control Fig. 4. The C(T) data viewer VI that launches at the end of an experimental sequence. This VI automatically does a simple linear exponential fit to the RC decays to obtain an estimate of the capacitance at each temperature, and displays the results. Student C(T) experiments: Once the students finish the development process, we have them use their resulting software to execute a series of C(T) experiments. In Fig. 4, we show the C(T) data viewer VI after the execution of a sequence from To=80 oC to 13 To=35 oC in steps of 5 oC. This experiment takes ~ 20 min and is typical of the runs that the students perform in the lab. The data shows a significant variation of capacitance with temperature, increasing from ~ 7 nF to ~ 13 nF as the temperature drops from To=80 oC to To=35 oC, as well as a suggestion of a possible peak in the capacitance below 35 oC. 14 References [1] G.H. Haertling, “Ferroelectric Ceramics: History and Technology”, J. Am. Cer. Soc., Volume 82, Number 4, pp. 797-1615, 1999. [2] D. Hennings, “Barium Titanate Based Ceramic Materials for Dielectric Use”, Int. J. High Technol. Ceram. Vol. 3, no. 2, pp. 91-111, 1987. [3] K. Uchino, Ferroelectric Devices (Marcel Dekker, 2000). [4] D. Damjanovic, “Ferroelectric, dielectric and piezoelectric properties of ferroelectric thin films and ceramics” Rep. Prog. Phys. 61, pp. 1267-1324, 1998. [5] M. Khan, AVX Corp., “Multilayer Ceramic Capacitors – Materials and Manufacture”, http://www.avxcorp.com/docs/techinfo/mlcmat.pdf. [6] Vishay Components, “NTC Thermistor Overview” and “NTC Accuracy Line”, vishay.com. [7] P. K. Dixon and T. D. Usher, “Universal Laboratory Prototyping and Interfacing System (ULIS)”, United States Patent # 6,895,563 (2001). 15