# An Energy Aware Adaptive Sampling Algorithm for Energy Harvesting WSN with Energy Hungry Sensors
## 5 Experimental Results  
To evaluate the energy consumption of the sensor node in different states, power consumption has been measured. Tables 1 and 2 present the power consumption and energy consumption of each of the states, together with the relevant task duration, for the two deployments respectively. To characterize the power consumption of the Waspmote platform in different states, a full power characterization was performed using a DC Power analyzer (Agilent N6705B DC) logging data for the current consumption of the platforms while running the firmware described in detail in the text below. Knowing the duration of each state allowed us to calculate the number of samples acquired by the power analyzer and then calculate the average current consumption and energy spent in each of the individual states described below. In both deployments, the energy consumed during some of the tasks is dependent upon: the sampling rate of the sensor, which changes according to the dynamics of the wind speed (in I), and \begin{table}
\begin{tabular}{c c c c} \hline
**Task** & **Power (mW)** & **Time (ms)** & **Energy (\(\mu\)J)** \\ \hline Data Transmission (16 bytes) & 108.9 a  & \(t_{\text{TX}}=0.5\) & 54.45 \\ \hline Data Receiving (16 bytes) & 59.4 a  & \(t_{\text{RX}}=0.5\) & 29.7 \\ \hline Wind Sensor & 36 b  & 10,000 & 360,000 \\ \hline MCU active & 0.858 c  & \(t_{\text{ACTIVE}}=10,000+t_{\text{TX}}+t_{\text{RX}}\) & 8584.29 \\ \hline MCU sleep & 0.0129 c  & \(T-t_{\text{ACTIVE}}\) & N/A \\ \hline Wind Sampling & & & \\ (MCU active + Wind Sensor) & 36.858 & 10,000 & 368,580 \\ \hline MCU sleep +Radio sleep + & & & \\ Wind Sensor off + other ICs & 0.055 d  & \(T-t_{\text{ACTIVE}}\) & N/A \\ \hline \end{tabular}
\end{table} 
Table 1: Power and energy consumption for various tasks (figures taken from datasheet). \begin{table}
\begin{tabular}{c c c c} \hline
**State** & \(\boldsymbol{I_{\text{AVG}}}\) **(mA)** & **Time (s)** & **Energy (m)** \\ \hline Sleep & 2 & \(T\)-\(t_{\text{ACTIVE}}=10\) & 74 \\ Initializations of sensor board and configuration of uC & 112.7 & \(t_{\text{INIT}}=5\) & 2084.95 \\ Sampling CO\({}_{2}\) & 190.6 & \(t_{\text{CO}2}=41\) & 28,914.02 \\ Sampling NO\({}_{2}\) & 156 & \(t_{\text{NO}2}=41\) & 23,665.2 \\ Sampling O\({}_{2}\) & 115.1 & \(t_{\text{CO}2}=1.6\) & 681.392 \\ Sampling Pollution sensor 1 & 113.2 & \(t_{\text{PO}1}=41\) & 17,172.44 \\ Sampling Pollution sensor 2 & 83.1 & \(t_{\text{PO}2}=41\) & 12,606.27 \\ Send packet (82 bytes) & 40 & \(t_{\text{TX}}=0.0026\) & 0.3848 \\ Receive packet (82 bytes) & 40 & \(t_{\text{RX}}\) a = 0.0026 & 0.3848 \\ Write packet to SD card & 45 & \(t_{\text{SD}}=0.017\) & 2.8305 \\ Processing (SPI comm., ADC _etc._) & 30 & \(t_{\text{PROC}}=0.002\) & 0.222 \\ Join ZigBee network & 50 & \(t_{\text{ZB}}=3\) & 555 \\ \hline \end{tabular}
\end{table} 
Table 2: Measured average current consumption of the Waspmote in different states at supply voltage of 3.7 V.  
CO\({}_{2}\) levels (in II); and also the energy available in the system. An energy model used in the simulations was derived using the measured results presented in Tables 1 and 2 and Equations (5)-(7) presented in previous sections once the period \(T\) is known, which, as mentioned earlier, is related to the sampling rate\(f_{sampling}\). In deployment (I), the time \(t_{ACTIVE}\) is equal to the sum of the time for sampling the sensors (10 s), communication time between the sensor and the MCU (RS485-UART) and the wireless communication which includes sending and receiving the 16 byte long messages. The data transfer speed of the transceiver CC2520 is 250 kbps and the transmit power is fixed to +5 dBm. The duration of this task is directly related to the number of bytes in the message. The average power extractable from the airflow can be calculated using Equation (8).