This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
projects:electronics:weller:wxp80_reverse_engineer:analog_measurements [2018/05/13 17:19] – [PTC resistance and voltages WXP80] beerput | projects:electronics:weller:wxp80_reverse_engineer:analog_measurements [2018/05/15 00:39] (current) – [WXP80 analog measurements] admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== WXP80 analog measurements ====== | ====== WXP80 analog measurements ====== | ||
- | This page shows the analog measurements of the WXP80 heating element connected to an operation | + | This page shows the analog measurements of the WXP80 heating element connected to an operational |
===== PTC resistance and voltages WXP80 ===== | ===== PTC resistance and voltages WXP80 ===== | ||
Line 32: | Line 32: | ||
Based on the observations we assume that the relationship between temperature and resistance is linear. We can thus find a first order formula which approaches the data pretty well. A general function looks like: | Based on the observations we assume that the relationship between temperature and resistance is linear. We can thus find a first order formula which approaches the data pretty well. A general function looks like: | ||
$R = aT + b \tag{1}$\\ | $R = aT + b \tag{1}$\\ | ||
- | where a is the slope and b the intercept of the vertical-axis. | + | where $\begin{align*}a\end{align*}$ |
The so called normal equations for the estimated slope $a$ and intercept $b$ are: | The so called normal equations for the estimated slope $a$ and intercept $b$ are: | ||
- | $n\ a + ST\ b = SR $\\ | + | $$\begin{align*}n\ a + ST\ b = SR \end{align*}$$ |
- | $ST\ a + STT\ b = SRT $\\ | + | |
- | with\\ | + | |
- | $n$ the number of data\\ | + | |
- | $ST = \sum\limits_{i=1}^n T_i $\\ | + | |
- | $STT = \sum\limits_{i=1}^n T_i^2 $\\ | + | |
- | $SR = \sum\limits_{i=1}^n R_i $\\ | + | |
- | $SRT = \sum\limits_{i=1}^n T_iR_i $\\ | + | |
- | + | ||
- | with solution\\ | + | |
- | $a= \frac{n\ SRT- SR\ ST}{n\ STT - ST^2} $\\ | + | |
- | $b= \frac{1}{ST} (SR-n\ a) $\\ | + | |
- | or alternatively\\ | + | |
- | $b=\frac{STT\ SR - ST\ STR}{n\ STT - ST^2} $\\ | + | |
- | + | ||
- | A formula to calculate the slope is:\\ | + | |
- | + | ||
- | $a = \frac{n (\sum\limits_{i=1}^n T_iR_i) - (\sum\limits_{i=1}^n T_i)(\sum\limits_{i=1}^n R_i)}{n (\sum\limits_{i=1}^n T_i^2) - (\sum\limits_{i=1}^n T_i)^2} \tag{1}$\\ | + | |
- | where n is the number of samples (in our case 24 samples), T the temperature and R the resistance of TH1. | + | |
- | + | ||
- | The intercept of the vertical axis is given with following equation: | + | |
- | $b = \frac{(\sum\limits_{i=1}^n T_i^2)(\sum\limits_{i=1}^n | + | $$\begin{align*}ST\ a + STT\ b = SRT \end{align*}$$ |
+ | with $\begin{align*}n\end{align*}$ the number of data\\ | ||
+ | $$\begin{align*}ST = \sum\limits_{i=1}^n T_i \end{align*}$$ | ||
+ | $$\begin{align*}STT = \sum\limits_{i=1}^n | ||
+ | $$\begin{align*}SR = \sum\limits_{i=1}^n | ||
+ | $$\begin{align*}SRT = \sum\limits_{i=1}^n T_iR_i | ||
+ | with solution | ||
+ | $$\begin{align*}a= \frac{n\ SRT- SR\ ST}{n\ STT - ST^2} \end{align*}$$ | ||
+ | $$\begin{align*}b= \frac{1}{ST} (SR-n\ a) \end{align*}$$ | ||
+ | or alternatively | ||
+ | $$\begin{align*}b=\frac{STT\ SR - ST\ STR}{n\ STT - ST^2} \end{align*}$$ | ||
With the data from the table above, the least squares trendline is:\\ | With the data from the table above, the least squares trendline is:\\ | ||
- | $R = 0.465T + 98.17 \tag{3}$\\ | + | $R = 0.465T + 98.17 \tag{2}$\\ |
- | where T is the temperature in °C and Rv the resistance of TH1 in Ω. | + | where $\begin{align*}T\end{align*}$ |
- | Please note that libre office offers an easy method to acquire this equation directly, using the 'show equation' | + | Please note that libre office |
The opamp is configured as a DC coupled non-inverting amplifier with a bias. To calculate the gain (G) and bias (Vb), we use following equations: | The opamp is configured as a DC coupled non-inverting amplifier with a bias. To calculate the gain (G) and bias (Vb), we use following equations: | ||
- | $G = 1 + \frac{R6}{R4 + \frac{R3 \cdot R5}{R3 + R5}} = 1 + \frac{1.0 \cdot 10^6}{33\cdot10^3 + \frac{33\cdot10^3 \cdot 47}{33\cdot10^3 + 47}} = 31.1 \tag{5}$\\ | + | $G = 1 + \frac{R6}{R4 + \frac{R3 \cdot R5}{R3 + R5}} = 1 + \frac{1.0 \cdot 10^6}{33\cdot10^3 + \frac{33\cdot10^3 \cdot 47}{33\cdot10^3 + 47}} = 31.1 \tag{3}$\\ |
- | where R3 = 4.3kΩ, R4 = 33.0kΩ, R5 = 47Ω and R6 = 1.0MΩ\\ | + | where $\begin{align*}R3\end{align*}$ |
- | The bias voltage is a simply | + | The bias voltage is a simple |
- | $V_b = V_{dd} \frac{R5}{R5 + R3} = 4.66 \frac{47}{47 + 4300} = 0.0501 \tag{6}$\\ | + | $V_b = V_{dd} \frac{R5}{R5 + R3} = 4.66 \frac{47}{47 + 4300} = 0.0501 \tag{4}$\\ |
- | where Vdd is 4.66v\\ | + | where $\begin{align*}V_{dd}\end{align*}$ = 4.66v\\ |
\\ | \\ | ||
We now are able to calculate a transfer function using the PTC resistor value to find the opamp output voltage relative to the temperature. (Alternatively we could calculate the transfer function using the least squares method of the output voltage data from the table above.)\\ | We now are able to calculate a transfer function using the PTC resistor value to find the opamp output voltage relative to the temperature. (Alternatively we could calculate the transfer function using the least squares method of the output voltage data from the table above.)\\ |