In this lab, you will construct a temperature control circuit, which will keep an aluminum block at a nearly fixed voltage by controlling a cooling device.
Figure 1 shows a block diagram of a simplified version of a temperature control circuit taken from [1]. The original circuit was designed to allow the user to maintain the temperature of a diode laser at a stable value, either above or below the ambient temperature.
[1] K. B. MacAdam, A. Steinbach, and C. Wieman , “A narrow‐band tunable diode laser system with grating feedback, and a saturated absorption spectrometer for Cs and Rb”, American Journal of Physics 60, 1098-1111 (1992) https://doi.org/10.1119/1.16955
The 5 key parts of the circuit can be broken down as follows:
This lab will involve quite a few op-amp circuits, which is why you'll be using a TL074CN chip, which contains four op-amps in a single part.
Note that the power is connected along the middle pins instead of opposite corners here.
A thermistor (temperature-dependent resistor) has been embedded in the aluminum block to allow its temperature to be monitored. This particular thermistor has a resistance of ~100kΩ at 20°C and approximately 150kΩ at 15°C. Eq. 1 shows the relationship between the thermistor resistance and temperature from 20°C to 0°C.
$T = 51.9160 − 0.4376R +1.8229 X 10^{−3} R^{2} − 4.3102 X 10^{−6}R^3 + 4.1807 X 10^{−9}R^4$ | (1) |
Here T is temperature in °C and R is resistance in kΩ. This was determined empirically by testing one thermistor, so while the same trends are likely for your component the coefficients might differ.
Design a voltage divider circuit using the thermistor and a fixed resistor that produces an output that increases with temperature. For this experiment, we have the constraint that the power supply's variable voltages will be set to $+15 V$ and $-15 V$ for the op-amps.
What would you expect $V_{out,sen}$ to be when the thermistor is at room temperature ($20^\circ$)?
What would you expect $V_{out,sen}$ to be when the thermistor is cooled to $15^\circ$ ?
Build the temperature sensing circuit. Record what the actual value of $V_{out,sen}$ is at room temperature. You may also want to verify that the resistance of the thermistor decreases as temperature increases by heating the sensor slightly (e.g., by holding the aluminum block).
Now that you have an idea of what sensor voltage corresponds to room temperature, you can create a circuit that will generate a target (setpoint) voltage.
Design a voltage divider that will let you produce a range of setpoint voltages, using a potentiometer.
For the circuit you choose, what range of $V_{out,set}$ values do you expect to be able to achieve?
Construct your circuit, and record what range of values of $V_{out,set}$ can be generated.
Before you continue, you should build a pair of op-amp follower circuits for the setpoint and sensor circuits and connect them for later use. From here on out, $V_{out,sen}$ and $V_{out,set}$ will refer to the output of the op-amp circuits.
The temperature control circuit will be used to control the current flowing through a Thermo Electric Cooler (TEC) so as to maintain the temperature of an Al block at about 15°C. The TEC uses the Peltier effect to transfer heat from the cold side to the hot side. The rate of heat transfer is governed by the magnitude of the current passing through the TEC. The TEC is a semiconductor device (distantly related to diodes), so polarity of the current flow through the device is important. Reversing the current switches which side is cooled or heated.
As shown below, the hot side of the TEC is attached with thermal paste to a heat sink while the cold side is attached to the Al block we wish to cool.
To start, we'll connect just the TEC and a resistor to the power supply. In this instance the resistor is used to limit the maximum current to the TEC, as otherwise it will happily try to draw more than 3A from the power supply.
Construct the circuit, and verify that the TEC gets hotter on one side and cooler on the other. If the side with the heat sink is getting cold, reverse the connections. Note that you'll probably have to turn up the current limit on your power supply here, and that the resistor will become quite hot.
To control the current through the TEC, we will be using a Field Effect Transistor (FET), depicted below. We haven't used FETs yet in this course, but essentially the resistance between the Source (S) and Drain (D) may vary between infinite and a few ohms, depending on the Gate (G) voltage. They're fundamentally controlled by voltages, rather than a BJT's current control.
To use the FET as a switch, we'll just pop it into our circuit as follows:
Modify your circuit with the addition of the FET. Test that, at the very least, the TEC cools when $V_{in}$ is +15 V and that it doesn't when $V_{in}$ is 0V.
The FET, its heatsink, and the power resistor will get hot while you are doing this lab. Take care to not touch other wires to them or brush against either when working. If you aren't sure if the part is cool, you can hold your hand near it or very gingerly touch it with the back side of your finger.
Also, the FET's heat sink is connected to the drain pin. If you touch it with other wires, you may find some very odd behavior popping up.
To test your circuit, you should try a variety of input voltages $V_{in}$ between 0V and 15V. This can be done a variety of ways; you can use a DC signal from your function generator or you might be able to use your setpoint circuit depending on the design.
Test the behavior of your cooling circuit, making a note of your choice of inputs voltages and the current through the device for each value.
At what input voltage does the FET (S)ource voltage begin to change?
What is the maximum current through the positive power supply as you test different inputs? You don't need to be precise, you can just read off the value from the LCD screen. Don't worry if you see 100s of mA; we'll need substantial power to make significant temperature changes.
It may be that you observe both your setpoint and sensor voltages drop whenever the TEC starts drawing much current. Some of this behavior can be explained by the fact that, when we start moving over an amp of current through our wires, their small resistances may still result in measurable voltage changes. Consider that if a wire has even $0.01\Omega$ resistance, we'd get a 10mV drop across it when passing an amp of current through it. A more sophisticated circuit would take care to stabilize the voltage divider circuits, using a diode clamp or a voltage regulator.
To begin with, consider a control circuit without any negative feedback at all, shown below.
What do you predict $V_{out,fb}$ will be when $V_{in,1} > V_{in,2}$? What about when $V_{in,1} < V_{in,2}$?
What would happen if you switched the setpoint and sensor connections?
Build the comparator circuit shown below and test your predictions. In this instance it may be useful to use a function generator as a dc voltage for $V_{in,1}$ and then use ground $V_{in,2}$.
Now that you know how to control the cooler and you have the sensors and a basic feedback circuit constructed, it's time to put things together.
You should probably be able to tell if the cooler is actively working or not somehow other than by touching it. To start, you might use the output of your feedback circuit to light up an LED when the cooler is on.
Add an LED indicator to your circuit, however you wish. It can be as simple as one LED and a resistor, or you can use a transistor driver if you need things to be brighter. If you really wanted to be fancy you could pass the temperature sensor's output to a chain of resistors in series, then use comparators to light up more LEDs the higher the temperature of the block.
In order to log voltages from your circuit as a function of time, you'll have to do a little bit of setup first.
run all
button shaped like two arrows in the menu bar ⏩ )
This will connect to the oscilloscope using Python, set it to make measurements of the mean values of channel 1 and channel 2, and then save values once per second. The default runtime is 240 seconds, but you can change the value after the runtime
variable to however long you want.
To keep a copy of a plot after it runs, click the ⏻ icon in the corner of the plot and then right-click the image to save.
If you get an error message about parameter conflicts, hit the default setup
button on your scope, turn on channel 2 again, and then re-run the software.
Start the software and turn on your power supply.
Save a copy of the error signal voltage vs. time. Note any relevant information such as the starting and ending voltages and times.
It should be noted that this is not a very precise way of doing this; the scope is not a great tool for measuring small, instantaneous dc voltages. You may see some quantization of values occur that will distort your readings. A better option would be to use a dedicated benchtop voltmeter, but for instructional purposes we decided to keep the same instruments you've been using.
We are still doing some apparatus construction to make the purpose of the advanced feedback controls more apparent. Stop here if this is your first day.
This portion of the lab is being revised this year due to there being a mismatch between the affordances of our cooling apparatus and the properties needed for more sophisticated feedback. As such, the remaining instructions do not make much sense to do with the setup you've been using. The portions on proportional / integral feedback are thus considered optional, and if you've done everything up until this point you are finished with the graded portion of the lab. Be sure to include a final diagram of your circuit in your report.
If you want to experiment more with control systems, we have a handful of modified units that feature a much larger block of aluminum and a thermistor that is further away, shown below. Early in the day on Wednesday you may need to team up with another student or wait to experiment with a modified unit.
If you want to find the temperature / resistance relationship for this thermistor, it is given below:
This particular thermistor has a nominal resistance of 150k$\Omega$ at 25°C (or 298.15 K). A first order approximation of the relationship between thermistor resistance and temperature is called the $\beta$ equation, given by Eq. 1
$R = R_0 e^{\beta\left(\frac{1}{T} - \frac{1}{T_0} \right)}$ | (1) |
Here T is temperature in Kelvin and R is resistance in kΩ. $R_0$ is the 150 k$\Omega$ value, $T_0$ = 298.15 K, and $\beta$ is 3892K for this model.
This can be solved for the temperature T to get Eq. 2:
$T =\dfrac{\beta}{ln(R/R_\infty)} $ | (2) |
where $R_\infty = R_0 e^{-\beta / T_0} \approx 0.32 \Omega $
Higher order accuracy can be gained with appropriate calibration measurements and the use of the Steinhart-Hart Equation or its higher-order cousins for mK level precision.
Now that you've got a functioning circuit, it is time to alter the way in which it controls the temperature; this can be done by modifying the control circuitry. Right now, with the op-amp acting as a comparator, the cooler is either fully off or fully on. This works reasonably well for our setup, which has a small aluminum block with the thermistor close to our very powerful cooling unit. However, in many systems the feedback is more delayed and thus this method would oscillate above / below the setpoint temperature by a wide margin.
Consider the circuit below, which is a modified inverting amplifier:
What do you predict $V_{feedback}$ will be in terms of $V_{sensor}$, $V_{setpoint}$, $R_1$, and $R_2$?
Why is this called proportional control? What is the thing that is proportional to what?
Modify your control circuit as shown in Fig 6. We suggest starting with a 100:1 ratio of $R_2$ to $R_1$.
You may want to disconnect the sensor, setpoint, and feedback connections in order to test this circuit with a known signal; otherwise it may be difficult to tell if the modified circuit is behaving as intended. After you are satisfied that your control circuit is functioning, re-connect it to the other sub-circuits. Once again, prepare to record both $V_{sensor}$ and $V_{setpoint}$ with the computer.
After turning off your circuit for a bit and letting the Al block come to equilibrium, start the data collection on the computer and then turn on the power supply.
Observe how the temperature of the block approaches the setpoint temperature.
Does the Al block reach the set point temperature?
What is the characteristic time with which the block reaches equilibrium?
Repeat the measurement for different values of the proportional gain.
How does the characteristic response time of the TEC change as a function of gain?
Finally, consider the control circuit shown below
What do you predict $V_{feedback}$ will be in terms of $V_{sensor}$, $V_{setpoint}$, $R_1$, $R_2$, and $C_1$ ? (Note: your prediction should reduce to your previous circuit as $C_1 \rightarrow \infty$ )
Modify your control circuit as shown in Fig 7. Choose a capacitor which, when combined with $R_1$, produces an RC time constant about a factor of 3 shorter than the response time you measured using only proportional feedback.
Use the computer to record $V_{sensor}$ and $V_{setpoint}$ again, using the same procedure as before.
How does the addition of the capacitor change the network's behavior?
There're no new instructions here, feel free to skip.
There are a few possible directions modifying this circuit could take. One would be to add derivative-based feedback, which could increase the feedback voltage (and thus current in the cooler) if it isn't changing quickly/ or reduce it if the signal is changing too much to prevent overshooting. This makes sense if you're working with a more open, unknown system than a particular block of aluminum. The other would be to add integral-based feedback, which can help drive the system closer to the desired setpoint if it has a tendency to be consistently high or low.
A circuit utilizing all three types of feedback is know as a PID controller, which you could spend an entire quarter or two learning the theory of operation. Thankfully, it is possible to construct a control circuit that works well enough by observing the effect of altering the strengths of the different feedback signals.
While we chose to cool a block with a peltier, this technique is ubiquitous and used for things like: