As we stated above, our objective is to estimate the average power consumption in different scenarios. For this, we divided the study into three parts: “deep-sleep consumption”, “measuring-only consumption” and “measuring-and-uploading consumption” (Wi-Fi activated). With these base data, we studied the evolution of consumption in complete cycles, with different duration of each of the parts.
3.2. Global Consumption and Estimation of Battery Life
For the estimation of global consumption we must know when, and for how long, each of the partial consumptions acts. In a complete cycle (see
Figure 12), the charge consumption will be given by the expression in Equation (
8).
The number of cycles (
) that we can be performed with a battery of capacity
is given by Equation (
9).
Logically, to estimate the duration of the battery (
) we must multiply the cycle time (
) by the number of cycles (
) that can be performed with that battery. The cycle time is the sum of the individual times that the system is in each of the three states. Two of those times are obvious: the deep-sleep time (
) and the upload time (
). However, the time used in the measurement is not exactly the product of the number of measurements per cycle by the measurement time, since as we can see in
Table 4, the average measurement time takes about 0.45 s more than the measurement time of the
initial action period. Therefore, the cycle time would be given by the expression in Equation (
10), and the battery life in Equation (
11).
Substituting the previous equations in Equation (
11), and using the numerical values, we obtain the final expression shown in Equation (
12).
As we can see, the battery life is a function of the three fundamental parameters of the method used (
,
and
). In
Table 5 we can observe the estimated battery life for some combinations of these parameters that we think are more likely, assuming a battery capacity of 750 mAh.
It is also interesting to graphically see the evolution of battery life.
Figure 14 shows the evolution of the battery life keeping the deep-sleep time fixed at 180 s. On the other hand, in
Figure 15 we can observe this evolution when fixing the number of measurements between data uploads (5 measurements in the figure).
In
Figure 14, we can see how increasing the number of measurements stored between data uploads (
) improves battery life, but with an asymptotic behaviour (which would be easy to obtain by calculating the limit on Equation (
12)). This way, from a certain number of stored measurements on, battery saving is not worth very much. Therefore, we could say that between 3 and 5 stored measurements would be adequate in most cases (except perhaps when the measurement time is 1 s).
On the other hand, we can see graphically in
Figure 15 how the battery duration depends very sharply (especially for long deep-sleep times between measurements) on the duration of the
initial action period. It is for this reason that, thanks to our methodology, we can consider building a system of this type powered by batteries.
Finally, if we analyse the results in
Table 5 (along with the Figures mentioned above), it can be observed that in many cases a battery life of more than 15 days is achieved, provided that the deep-sleep time between measurements (
) is equal to or greater than 120 s, and the measurement time of the
initial action period is at most 3 s. Specifically, if we consider a 750 mAh battery and take measurements every 240 s, with a measurement time of 2 s and uploading data every five measurements, we could obtain a battery life of 1 month.
With the previous data, the energy consumption per day would be about 90 mWh (considering a battery voltage of 3.7 V), an amount of energy that can be easily recovered with a small solar cell, and we would have a completely autonomous system.
To emphasize the importance of using the measurement in the first seconds of the
initial action period, let’s consider the case in which we do not use the first seconds, but we follow the usual measurement procedure. In this scenario, we should let the sensor stabilize at least around 2 min [
20] (i.e., we would have
s). Therefore, to have a measurement every 240 s, we should set
in 120 s. Keeping
, and applying Equation (
12), we would have a battery duration of about 17 h. This means that using the measurement in the
initial action period makes the battery last about 42 times longer.
If we calculate the energy consumption of this last case (waiting for the sensor to stabilize 2 min), we obtain 3.75 Wh. This way, to maintain the system with solar cells we would need a panel that gave an energy 42 times higher than the one needed when we use the measure in the initial action period.
Although the use of Wi-Fi is not common in the WSNs world, it avoids having to provide gateways and routing nodes to access IoT platforms, allows us to take advantage of an extensive indoor connectivity, and it significantly lowers the cost of the node. We mitigate the increase in consumption due to Wi-Fi by turning off the modem when not needed and accumulating measures to upload data to the IoT platform in batches.
We should also consider what would happen if we use an array of sensors instead of a single sensor. In this case, the correction in the initial action period would be made individually on each sensor, and then the corrected values would be used as input to a pattern classification system (formed, for example, by a feature extraction stage with PCA or ICA, and followed by a classifier based on SVM or neural networks). This classification could also be done in ThingSpeak, as MatLab is available on this platform. Regarding the consumption, we do not reckon that making the classifier’s inference calculation in the microcontroller would involve a significant power cost.
However, the use of several sensors would boost the consumption very significantly. For example, if we include a second sensor of the same type, the consumption of the new sensor heater would be, according to the manufacturer, about 210 mW. This power, with a voltage of around 3.7 V and a DC-DC converter efficiency of 90%, would result in an additional battery current of around 63 mA. If we consider the case in which the battery had a duration of one month ( s, and s), only would change with the new sensor, increasing from 194 mAs to 348 mAs, while the value of both and would remain the same. As a result we would obtain a consumption per cycle of 2011 mAs instead of 1237 mAs, and now the battery would last approximately 18 days, that is, about a 40% less.
We would also like to comment on some of the limitations and disadvantages of our design. In our view, the main one is the need for maintenance, i.e., the need to recharge the battery and the possible recalibration due to sensor ageing, although the latter is common to all the systems based on MOX sensors. Another aspect that could be seen as a disadvantage is the use of WiFi as a communication system, as its power consumption is quite high. However, as we said before, it also has an important advantage, as the WiFi infrastructure is available in many places and is directly usable without the need of any additional gateway.