## 3 Wireless Sensor Networks
### Energy Harvesting and SPWS Perpetual Operation
#### 3.4.2 SPWS Energy Consumption  
For the next battery of tests, a fully integrated SPWS, as shown in Figure 7 (right), was employed, with the PV panel removed to guarantee that the current used was coming only from the battery. The calculations shown subsequently were based on an application note available from Jennic Company [32]. For all sensors, except for the room activity sensor, as soon as the radio transmits a packet, the microcontroller enters deep sleep mode, and the current drawn becomes constant, equal to 7 \(\upmu\)A. The tests employed duty cycles of 34 and 135 s. As an example, the current consumed during the active part of the duty cycle of a doors/windows state sensor is presented in Figure 12.  
The boxes aside the instants marked with a square show the consumption at instants that are used to divide the graph into sections. Assuming a constant current in each section, the average power consumption during a given section can be obtained as:  
\[I_{Avg}=\frac{I_{sec}\times t_{sec}}{t_{total}}, \tag{10}\]  
Figure 11: Current provided by 10 PV panels.  
where \(I_{sec}\) is the current of the section concerned, \(t_{sec}\) is the section duration, and \(t_{total}\) is the total time of a whole duty cycle. The consumption profiles are similar for all the sensors except for the room activity sensor. As this sensor has to be powered during its 30 s warm-up delay, it draws more current during the deep-sleep period. This way, the existence or absence of movement will cause different consumption during this period. Movement is measured at 2.1 s intervals during 30 interrupts and on the 30 th, transmission is done.  
To compensate for the insufficient data resolution at low values, and the fluctuation in each section, an upper bound value was determined for each section. This means that the consumption values assume a worst case scenario. By using this assumption and the calculations shown above, the average current consumption for each transmitter type SPWS over a duty cycle is presented in Table 2.  
The activity detection sensor is the one demanding more energy, followed by the temperature and relative humidity sensor, the wall temperature sensor, and finally the doors/windows state sensor. By using the battery capacity (850 mAh), the sensor life time can be estimated. For the wall temperature and door/window sensors, using simple calculations harvested (850 mAh/18.9 uA \(\approx\) 44,270.8 h \(\approx\) 1844.6 days \(\approx\) 5.1 years), we conclude that it can operate approximately during five years without the PV panel. Using similar calculations, we can estimate that life time of the temperature and relative humidity sensor is approximately three years, whereas the motion detection sensor achieves 112 days with permanent movement, or 224 days with no movement. As indicated before, a photo resistor was added to the SPWS to enable a software policy aiming to decrease the activity sensor use in periods that the rooms are not being used, and consequently the energy consumed.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Sensor** & **2.1 s** & **34 s** & **135 s** \\ \hline Doors/windows & - & 18.9 uA & 10.0 uA \\ \hline PT1000 & - & 19.2 uA & 10.1 uA \\ \hline SI7021 & - & 32.4 uA & 13.4 uA \\ \hline \multirow{2}{*}{Motion detection} & Sensor ON & Sensor OFF & - \\ \cline{2-4}  & 315.3 uA & 157.8 uA & \\ \hline \hline \end{tabular}
\end{table}
Table 2: Average current consumption of SPWS over three different duty cycles. SPWS: Self-Powered Wireless Sensors.  
Figure 12: Current drawn from the SPWS battery during the active part (reading the sensor and transmitting the result) of the door/windows state sensor duty cycle.