Chapter 20 Time Constant of a Thermistor
For this lab weβre going to use the thermistor located on Pin A9 of the CPX/CPB. In a previous lab we measured the analog signal from the pin and also used the adafruit_thermistor.py module that converts the voltage from the thermistor to celsius (See SubsectionΒ 15.1.3).
For this lab though, weβre not only going to measure the temperature from the thermistor, weβre going to analyze the dynamics of the thermistor and how it responds to an abrupt change in temperature. It is said that a themistor can be modeled as a first order system. The basic form of a first order system can be shown below.
\begin{equation}
\dot{T} = \sigma (T_f - T)\tag{20.0.1}
\end{equation}
where \(T\) is our state variable and \(\dot{T}\) is the derivative of our state. For this example letβs assume that \(T\) is temperature. In this case \(T_f\) is an external temperature that is either higher or lower than current temperature causing the derivative of temperature to be non-zero. You can see in this case that once the temperature of the system is equal to the external forcing temperature, the derivative of the temperature of the system goes to zero. This implies that the system has reached equilibrium. The variable \(\sigma\) has units of \(Hz\) or \(1/sec\text{.}\) The inverse of \(\sigma\) is \(\tau\) the time constant.
\begin{equation}
\tau = \frac{1}{\sigma}\tag{20.0.2}
\end{equation}
The time constant of the system is related to how quickly the system responds to change or even how long it takes for the system to reach equilibrium. Reaching equilibrium quantitatively happens when the state has changed 98%. In other words the state of the system is within 2% of the equilibrium state. This is called the settling time \(t_s\text{.}\) The time constant is related to the settling time using the equation below.
\begin{equation}
\tau = \frac{t_s}{4}\tag{20.0.3}
\end{equation}
The only question now of course is what is the solution \(T(t)\) or rather the temperature as a function of time. In this case, the solution to the above dynamics equation can be solved using standard first order differential equation techniques to obtain the solution below[50].
\begin{equation}
T(t) = (T_0-T_f)e^{-\sigma t} + T_f\tag{20.0.4}
\end{equation}
Looking at the equation now you can see some properties right away. When \(t=0\text{,}\) the first term reduces to \((T_0-T_f)\) which means the initial temperature is \(T_0\) or the initial temperature. When \(t\rightarrow\infty\text{,}\) the first term drops to zero and thus the temperature is \(T_f\) or final temperature. In this lab weβre going to get the time constant of the thermistor on board the CPX[63]. If you take data on the CPX and walk outside or place the thermistor directly into a fridge, the temperature change will not be immediate. In order to estimate the time constant of a thermistor you need to change the temperature somehow. Blelow are some ideas for how to change the temperature of the CPX/CPB. You can do one or more of these methods to get data for this lab but youβre only required to pick one.
-
Start logging data and then place the CPX into the fridge
-
Put the CPX into the fridge and then pull the CPX out of the fridge and watch the temperature return to ambient
-
Walk outside on a hot (or cold) day and watch the CPX change temperature due to your A/C.
-
Walk inside and watch the CPX get warmer (or colder) as your HVAC changes the CPX temperature.
-
Use a hair dryer to heat up the CPX and then watch it cool down.
