## 2 Principle of Operation of the Single Transistor Soil Water Content Sensor  
The bipolar transistor in this soil water content sensor has to perform as both the heating and temperature-sensing element. The transistor is heated with a fixed power pulse, obtained by applying a current pulse with a fixed collector voltage and with a duration \(\Delta t=t_{f}-t_{0}\). During the operation of the sensor, the values of the transistor's \(V_{BE}\) are measured using an analogue-to-digital converter (A/D) embedded in the microcontroller that controls the measurement procedure and calculates the soil water content. The values of \(V_{BE}\) are used to calculate the sensor's temperature. A diagram of the measurement scheme and a typical curve of the temperature rise and the \(V_{BE}\) as a function of the time, for an SHPP sensor, is shown in Figure 1.  
The variation of \(V_{BE}\) with temperature is well known [15]. For a transistor biased with a constant collector current \(I_{C0}\), it can be conveniently expressed as the sum of a constant term, a linear term (which decreases with temperature), and a term that is non-linear with temperature [16]:  
\[V_{BE}(T)=\left(V_{g0}+\eta\frac{kT_{r}}{q}\right)-\lambda T+\eta\frac{k}{q} \left[T-T_{r}-Tln\left(\frac{T}{T_{r}}\right)\right] \tag{1}\]  
where:  
\[\lambda=\frac{\left(V_{g0}+\eta\frac{kT_{r}}{q}\right)-V_{BE}(T_{r})}{T_{r}} \tag{2}\]  
and \(V_{g0}\) is the extrapolated band-gap voltage at 0 K; \(\eta\) is a constant (dependent on the transistor fabrication process), and \(T_{r}\) is a reference temperature, in K.  
Thus, by measuring the \(V_{BE}\) of a transistor biased with a constant current \(I_{C0}\) at a known temperature \(T_{r}\), it is possible to calculate the value of \(\lambda\) for the transistor when it is biased with \(I_{C0}\). With the value of \(\lambda\) calculated, it is possible to calculate the temperature \(T\) of the transistor by measuring the value of its \(V_{BE}\). Since the value of \(\lambda\) is in the order of \(\approx 1.8\) mV/K and the last term of Equation (1) (a non-linear term) is typically in the order of 10 \(\upmu\)V/K, \(V_{BE}(T)\) is usually approximated by the constant and linear terms of Equation (1):  
\[V_{BE}(T)=\left(V_{g0}+\eta\frac{kT_{r}}{q}\right)-\lambda T \tag{3}\]  
and this approximation is used to calculate the temperature of the sensors in this work. Before the transistor is encapsulated in the porous ceramic block (from Hidrosense Ltda), the value of \(V_{BE}\) of the transistor is measured, at a known temperature \(T_{r}\), in two situations: with \(I_{C}=100\,\upmu\)A, and \(I_{C}=10\) mA. These measured values of \(V_{BE}\) are used to calculate the values of the \(\lambda\) of the transistors in these two situations, so that we can easily calculate the temperature of the sensor before the application of the heat pulse (with \(I_{C}=100\,\upmu\)A) and during the application of the heat pulse (with \(I_{C}=10\) mA), by simply measuring the values of \(V_{BE}\) during these measurement phases. The initial value of the sensor's temperature (before the heat pulse is applied) is obtained with the transistor biased with \(I_{C}=100\,\upmu\)A. With this value of \(V_{BE}\), we can precisely calculate the value of the sensor's temperature, which is in thermal equilibrium with the soil. The sensor's response depends on the soil's temperature, so the calibration must be performed at different soil temperatures. For each calibration temperature, the value of \(V_{BE}\) (the soil's temperature) must be written, and a table with the results of calibration and its associated soil temperatures must be stored in the microcontroller. If a heat pulse of duration of \(\Delta t=t_{f}-t_{0}\) is applied to a SHPP sensor, reference [9] showed that the temperature change \(\Delta T=T_{f}-T_{0}\) can be approximated by:  
Figure 1: Basic measurement scheme of a single transistor soil water content sensor and a typical measured curve of the temperature rise as a function of time.