## 4 LOKA: LOw Power Consumption Algorithm
We have not evaluated the package loss rate, the node connectivity errors or the transmission throughput since these parameters depend on the protocol, the radio and the environment, and our algorithm does not modify them. Then, we have assumed those parameters do no vary. Instead, our analysis focuses on the platform power consumption where LOKA is deployed. The sensor more prototype enables us to evaluate the impact of our algorithm in the power consumption of the mode. To provide a comprehensive point of view, this section is divided into three subsections: _Prototype Note_, _Energy Measure_ and _Comparative Between Platforms_. The first subsection details the sensor devices used for the sensor more prototype. The second subsection explains how we have measured the energy consumption during operation and the result obtained for the energy consumption for the two prototype modes (with and without LOKA) in different operation scenarios. The third subsection compares our prototype with different platforms of the WSN state of the art that implement duty-cycling mechanisms. For our experiments we have not compared our approach with other methods from the literature as we are exploiting a specific hardware that has not been used, to the best of our knowledge, in other similar works. In this regard, our algorithm is designed to work with the ZigBee protocol, so we cannot compare our approach with algorithms designed to work with other communication protocols. Moreover, some state of the art methods do not provide enough details to build prototypes to be evaluated. ### Prototype Note

This subsection presents the prototype sensor more. In this sense, we have taken into account the requirements imposed by the electronic components described in the Section 3.3: the LPC824, the XB24, the battery and some sensors. This subsection goes into the electronic implementation details to allow that the prototype mode works as a whole. In this case, the prototype mode is divided into four parts:

* Circuit supply. It provides energy to power on the more devices. * Sensors devices. The sensors integrated in the more: measure motion, temperature, humidity and light. * The LPC824 connection. This item was discussed in Section 3.3. It implements the logic of the sensor more. * The XB24 socket. This item was also discussed in Section 3.3. It enables the communication using the ZigBee protocol. For electricity grid independence, the motes are equipped with a 3.7 V lithium-ion (Li-Ion)battery. Related to the charger circuit, a standalone linear Li-ion single cell battery charger with thermal regulation (model TP4056) is included. It corresponds to the TP (or IC1) initials in the Figure 5. Also, the electronic components suggested by manufacturer are included. Two leds are incorporated to display the charging state of the battery, R6 and R7. On the one hand, when the red led (R6) is on, the battery is charging. On the other hand, when the green led (R7) is on, the battery is full. Regarding to the supply circuit, the prototype mote can be powered by a 5 V microUSB or by a 3.7 V Li-ion battery. Also, a MOSFET transistor is included for switching between the microUSB supply and the battery, allowing us to charge the Li-Ion battery in a safe way without interrupting the power supply. The MOSFET transistor included in the prototype mote meets this premise since the microUSB supply has higher priority than the Li-ion battery. That is, the MOSFET transistor is polarized when there is a microUSB supply. In this case, the Li-ion battery transistor is kept in isolation and the circuit powered by the microUSB is charging the battery at the same time. Otherwise, the circuit is powered by the Li-ion battery. Also, there are two XC6206 voltage regulators after the connection at the supply power. One powers up the XB24 module since it has a high power demand while transmitting data. The second regulator powers up the other devices of the prototype mote. On the sensor side, the prototype mote includes sensors to get samples with the values of some phenomenons.