Considerations about energy consumption in sensor nodes over wireless personal area networks using MiWi protocol

Adopting techniques to increase operation time of battery-powered sensor nodes in wireless networks is necessary when implementing practical monitoring applications intended to run over extended periods of time. Energy harvesting; DC-DC converter techniques; and features of modern microcontrollers like extreme lower consumption, Sleep and Idle states, can contribute to improve the performance of network nodes. Designers can also use the possibilities offered by special protocols for wireless sensor networks, routing algorithms, and data aggregation plus collection strategies. Issues related to the process of design and implementation of an energy-efficient sensor node operating under IEEE 802.15.4-compliant MiWi protocol from Microchip® Technology are presented. Operating tests were conducted in different hardware/firmware scenarios in order to verify the changes in node’s performance depending on the adopted configuration.


I. Introduction
During the last decade, monitoring applications using Wireless Sensor Networks [WSN] based on communication standards as IEEE 802.15.4 and IEEE 802.15.1 have risen in number and variety. Applications as diverse as physiological variables monitoring, environmental measuring, and structural integrity checking are just a few examples (Fraser, Elgamal, He, & Conte, 2009). Moreover, WSN are essential in wearable devices and Internet of Things [IoT] (Burns et al., 2010).
As a result of that, scientific literature outlines a well-defined structure for sensor nodes concerning constitutive modules. Apart from basic and traditional components, modules with microelectromechanical systems [MEMS], electronic datasheets [EDS], and energy harvesting are part of this structure (Powering microcontrollers..., 2012).
In optimal working conditions, WSN should operate unattended for long intervals by using techniques to improve energy consumption. However, in order to reach this, it is necessary to adopt design strategies from circuital and firmware approaches. As a consequence, design actions ought to be coordinated with executed code in microcontrollers, responsible to manage input/output node elements.
In this paper, I address energy efficiency topic and its relation with performance of sensor nodes, focusing in modifications related with circuital design and execution of special functions programmed in microcontrollers. My objective is to present some implementation aspects (usually not detailed) but bases of practical WSN applications and determinant to validate the assumption of operation for extended time periods.
Organization of this work is as follows: section 2 explains MiWi protocol features; in section 3, I show hardware and firmware details; implementation is showed in section 4; results discussion is presented in section 5 and section 6 briefly concludes paper.

II. MiWi Protocol
MiWi network protocol is property of Microchip® Technology company, and its foundation is IEEE 802.15.4 standard for Wireless Personal Area Networks [WPAN] (Microchip Technology Inc., 2010b). It proposes a light and royalty-free implementation of IEEE 802.15.4-A and it is also supported on MiMAC, a tool to handle
En este trabajo abordaremos el tema del mejoramiento de la eficiencia energética en el desempeño de un nodo sensor a partir de tomar acciones en cuanto al diseño circuital y a la implementación de funciones especiales en el código programado en el microcontrolador. El objetivo es abordar algunos aspectos de implementación, que generalmente no son detallados, pero que son determinantes para validar el supuesto de operación sobre periodos extendidos sobre los cuales se soportan las aplicaciones prácticas de las redes inalámbricas de sensores.
La organización del trabajo es la siguiente: en la sección 2 se explican las características del protocolo MiWi; la sección 3 muestra los detalles de Hardware y de Firmware; la 4 muestra detalles de la implementación; la 5 comprende la discusión de resultados; y la 6, presenta las conclusiones.  , called PAN coordinator, must always be an FFD. PAN coordinator is always unique, even in mesh or cluster tree topologies, where secondary coordinators in network derivations might exist (called only coordinators). These coordinators are also FFD nodes and each one supports up to 127 nodes (children nodes), with a maximum number of 8 coordinators in the network. Packets are able to travel until 4 hops in the network and 2 hops from PAN coordinator (Microchip Technology Inc., 2010b).

A. MiWi P2P
Since my focus is low-node applications (under 127) and communication ranges smaller than 120 meters, I concentrated this work on the MiWi protocol (Microchip Technology Inc., 2010a). MiWi P2P modifies MAC layer of IEEE 802.15.4, simplifying handshaking (communication establishment) process and it supports P2P and star network topologies. It does not have a routing mechanism; hence, the radio range defines wireless communication coverage. In addition, MiWi P2P is not multi-hop and it supports only beaconless networks.

B. Star topology
In relation to role perspective in devices, the topology has a PAN coordinator, which starts communication and accepts remote connections from other devices. Several end devices join this communication and they can only establish connections with the PAN coordinator, not among them. As mentioned previously, the PAN coordinator is a FFD device; nevertheless, end devices can be FDD with their radio constantly on, or they can assume RFD roles with their radio off when the idle state is reached. Regardless of their functional style, end devices can only communicate with the coordinator, whilst he coordinator can communicate with every node presented in the network (Microchip Technology Inc., 2010a).
MiWi P2P protocol only supports one-hope communications; thus, message transmission is carried out using Extended Unique Identifier [EUI] address (i.e. the long address). Broad diffusion messages (broadcast) use short addressing only. For Microchip® Technology transceivers, the size of the unique address is between 2 and 8 bytes, depending on application necessities. The message format in MiWi P2P protocol derives from the one specified in IEEE 802.15.4 standard. Figure 3 illustrates package format and its fields (Microchip Technology Inc., 2010a).

III. Firmware and hardware relative aspects
There are some research projects related to performance evaluation of nodes in MiWi networks; so, this work is intended to focus in some aspects where these projects do not emphasize. In one of these proposals, the authors analyze a network conformed of 7 nodes and measure current in transmission, reception, and idle states, obtaining values between 60 and 95 mA. Adoption of hardware/firmware actions to reduce energy consumption is not reported (Portillo-Rodríguez, Alcaide-Barragán, Sandoval-González, Vilchis-Gonzalez, & Ávila-Vilchis, 2011). In my research, I also found a paper that analyzes case study of nodes powered by solar panels where, at firmware level, they are programmed to access the sleep mode to reduce energy consumption. Nevertheless, authors show neither the node's current consumption nor extended operation tests; the study is focused on performance evaluation of energy acquisition in a specific time (6AM-6PM) (Gargiulo et al., 2010). In addition, I analyzed the work conducted by Pannila, Tuominen, and Edirisinghe (2011); they propose combined use of Radio-frequency Identification [RFID] tags with MiWi protocol to get data from gas sensors. In this work, the y acepta conexiones de otros dispositivos. Se tienen varios dispositivos terminales (end devices) que se unen a la comunicación. Los dispositivos terminales pueden establecer conexiones solo con el coordinador de la PAN, no entre ellos. En cuanto al tipo de funcionalidad, el coordinador de la PAN es un dispositivo FFD. Un dispositivo terminal puede ser un FFD con su radio encendido todo el tiempo o un dispositivo de funciones reducidas RFD con su radio apagado cuando está inactivo -idle-. Sin importar su tipo funcional, los dispositivos terminales solo se pueden comunicar con el coordinador, mientras que el coordinador si puede comunicarse con todos (Microchip Technology Inc., 2010a).

III. Aspectos relativos al firmware y al hardware
Existen en la literatura algunos trabajos relacionados con la valoración del desempeño de los nodos en redes MiWi, este trabajo pretende ahondar es algunos aspectos de los que no se encontraron mayores detalles. En uno de estos trabajos se analiza una red de siete nodos y se mide la corriente en periodos de transmisión, recepción y espera, oscilando este valor entre unos 60 y 95mA. En este trabajo no se reporta la adopción de medidas de hardware o firmware para reducir el consumo de energía (Portillo-Rodríguez, Alcaide-Barragán, Sandoval-González, Vilchis-Gonzalez, & Ávila-Vilchis, 2011). También se ha encontrado un trabajo que analiza el caso de un nodo alimentado con un panel solar fotovoltaico, el cual, a nivel de firmware, accede al modo sleep para reducir el consumo de energía; no obstante, no se indican detalles de consumo de corriente del nodo ni de pruebas de operación extendida, authors recognize benefits derived from reduced consumption of MiWi nodes in sleep mode; notwithstanding, no experimental results or verifications are shown.

A. Hardware relative considerations
As readers might infer, we usually call hardware to the set of physical devices, in this case, conforming nodes' circuits in a wireless sensor network. Particularly in this work, my focal point is the analysis of circuital elements of sensor nodes and the manner they have influence over general energy consumption performance. In the following paragraphs, I present some considerations relative to design approaches associated with hardware in nodes.
• DC-DC converters. Relative to circuitry, it is common to find design methods centered on DC-DC converters, which deliver normalized voltage for nodes (e.g. 3.3V provided by Li-ion batteries). Application notes from several manufacturers give general information about step-up and step-down switched converters, which are supported in specific-use integrated circuits and inductors.
• Energy harvesting. Energy harvesting devices (photovoltaic, thermal, piezoelectric, vibrational, etc.) are a good hardware option to improve energy autonomy in nodes. In general, application type mainly determines energy harvesting options applicable in varied situations. For instance, in certain applications where sensor nodes are moving (either carried by people or within vehicles), piezoelectric and vibrational energy harvesting options are the most suitable. Another important aspect is related with location of sensors, i.e. indoors, outdoors, urban, rural, or industrial environments. Depending on this location, photovoltaic energy sources might be used to complement main supply in sensor nodes.
Adoption of energy harvesting elements results on rises in size and weight of nodes; besides, this approach affects price, flexibility, and maintenance. Furthermore, another relevant factor is maturity in devices and technologies used in energy harvesting. Therefore, it is evident that photovoltaic option is one of the most consolidated technologies comparing with other developing elements.

A. Consideraciones relativas al hardware
Denominamos hardware al conjunto de dispositivos físicos que hacen parte del circuito de los nodos de una red inalámbrica de sensores. En particular nos centraremos en el análisis de los elementos circuitales de un nodo sensor y en la manera cómo influyen sobre el desempeño de este, desde el punto de vista del consumo de energía. A continuación presentamos algunas consideraciones relativas a las modalidades de diseño que tienen que ver con el hardware de los nodos.
to compare specifications given by technical datasheets. As an example, microcontrollers present several references with low power consumption and extra-reduced size, making them optimal for battery-operated applications. In addition to that, batteries present various features that are particularly useful for certain applications. Lithium-ion [Li-ion] and lithium polymer [LiPo] batteries are very popular for their performance, although they are more expensive than other types like nickel-metal hydride [NiMH] or popular alkaline batteries.
• Other strategies. Adoption of techniques like switching in sensors energy supply (which might lead to high prices and, consequently, affect budget), could significantly contribute to energy efficiency, resulting in optimal performance over long periods. The cost of maintaining switching circuits must be considered because switching is not electronic and, commonly, it is expensive from an energy point of view.

B. Firmware relative considerations
Code executed by a microcontroller that controls actions in nodes is also a key aspect. Throughout it, functions and special resources in a microcontroller can be accessed and, in terms of MiWi protocol, this code provides access to special features over MiApp interface and MiMAC peculiarities (Microchip Technology Inc., 2009).
Eight bit microcontrollers like PIC18F4620 (Microchip Technology Inc., 2004) manufactured by Micro-chip® Technology, allow operation in low-power states using sleep instruction. With respect to energy consumption, Run, Idle and Sleep operation states are defined, distinguishing among them by CPU resource management and peripherals. Table 1 illustrates the resource management over these three states.
The OSCCON register presented in PIC18F4620 permits you to choose between Idle and Sleep modes (Microchip Technology Inc., 2004). There are several ways to exit these modes: • enabling one or more interruption sources; • watch dog timer overflow; and • exit forcing restart (reset).
Invoking the "Mi_AppTransceiverPowerState" function means to put the transceiver into Sleep mode periodically: The only parameter in the previous function is the operation mode. Predefined operation modes (Microchip Technology Inc., 2009) are: • POWER_STATE_SLEEP: puts transceiver in Sleep mode; • POWER_STATE_WAKEUP: wakes up transceiver without any data request; and • POWER_STATE_WAKEUP_DR: not only wakes up transceiver, but also sends data request to its main associated device to ask for incoming data.

IV. Methodology
The sensor node used to verify energy consumption conditions under several configurations, both at hardware and firmware levels, is based on an 8-bit microcontroller, a MiWi transceiver, and a 6 degrees of freedom inertial measurement unit [IMU]. Specifically, I used a PIC18F4620 microcontroller (Microchip Technology Inc., 2004), MRF24J40MA transceiver (Microchip Technology Inc., 2008), and an IMU consisting of accelerometer and gyroscope over X, Y, and Z axes. Complements to sensor nodes are an 8.4V rechargeable battery and a 3.3V regulated power supply. Table 2 shows the technical specifications of these devices. • DEEP_SLEEP: selecciona el estado Sleep para el transceptor con el consumo de energía más bajo; y • OPERATE: operación en estado pleno del transceptor. La FIGURA 4 muestra, de manera simplificada, cómo se integran la interfaz MiApp y MiMAC en el proceso de programación de una aplicación bajo el protocolo MiWi. packets are transmitted over this configuration, total consumption is, on average, 40mA; although in some cases, system reaches peaks up to 47.2mA.
Clearly, the studied node presents high energy consumption in two elements, somehow controlled by the hardware or firmware: radio transceiver and IMU sensor. Firstly, I decided to switch the sensor connection in order to avoid continuous current consumption; only when analog/digital conversion takes place in microcontroller, is the sensor connection on. To achieve this switching, I employed as first option a Bipolar Junction Transistor [BJT], which interrupts connection to one of two external voltage supplying sources when data transferring was inactive. This method showed inefficiency, since delivered measurements from sensor presented degradations given partial switching; in consequence, supplying voltage was not nominal. To solve this, I tried both positive pole and ground pole switching, together with a Darlington pair and bilateral interrupters, without obtaining favorable results. Switching was commanded from microcontroller pin that synchronizes this task with lecture moments of analog/digital conversion channels.
Considering unsatisfactory results with BJT and bilateral interrupters, I decided to use a Field Effect Transistor [FET] to implement switching process. I used N-channel FET with reference 2N7000 (Fairchild Semiconductor, 1997), and it led to successful results. In order to verify circuit appropriate operation, procedure consisted in allowing uninterrupted operation in sensor node for several hours; this produced satisfactory results since chose time was enough to maintain switching active. Table 4 resumes results related with node current consumption after switching in IMU sensor.
In order to optimize energy consumption over specific time periods (named continuous mode), which correspond to intervals where sensor node is active, I verified
Claramente, el nodo presenta un consumo elevado en dos elementos que pueden ser controlados, de alguna forma, por medio de hardware o firmware, el radio transceptor y el elemento sensor IMU. En primer lugar se decidió conmutar la conexión del sensor para que el consumo de corriente no sea permanente, sino que se presente solo cuando se realice la conversión análoga/digital en el microcontrolador. Para conmutar el sensor se probó inicialmente con un transistor bipolar (BJT) de uso común, que interrumpía la conexión a uno de los extremos del suministro de voltaje cuando la toma de datos de medición estaba inactiva. Este método mostró no ser eficiente puesto que las mediciones entregadas por el sensor se degradaban, dado que la conmutación no era total y, por ende, el voltaje de alimentación del sensor no era el nominal. Para tratar de resolver esto se probó, tanto la conmutación del polo positivo, como la del polo de tierra, así como la utilización de un par Darlington y de un interruptor bilateral, sin obtener resultados favorables. La conmutación se comandó desde un pin del microcontrolador que sincronizaba la conmutación con los momentos de lectura de los canales de conversión A/D de entrada.
La Tabla 4 resume los resultados en cuanto a consumo de corriente del nodo luego de la conmutación del sensor IMU.
Con el fin de optimizar el consumo de energía sobre los periodos que hemos denominado modo continuo, que corresponden a los periodos en que permanece principalmente el nodo sensor, se optó por verificar las prestaciones de consumo reducido de energía que ofrece el microcontrolador. the reduced consumption data that the microcontroller offers.
Considering that the main objective of this proposal is to obtain the lowest consumption possible, sleep mode activation is programmed via invocation from code execution with the same name (sleep). The IDLEN bit from the OSCCON register permits enabling of input in sleep mode, whilst exiting from this mode is possible in several ways. In this case, exit of this state is activated through overflowing method called Watchdog Timer [WDT]. As a result of that, postscaler of WDT was configured in several relations, until obtaining an adequate periodicity in transmission. CONFIG2H register and its WDTPS3 and WDTPS0 bits were modified to check different relations in postscaler, since they start in 1:32768, continue to 1:16384 and so forth.
The best conditions related with node current consumption are achieving programming in both the microcontroller and transceiver sleep mode condition, together with "Mi_AppTransceiverPowerState()" function (Microchip Technology Inc., 2009). The IMU sensor only turns on to gather data; after that, it is powered off by the FET. Detailed results of current consumption are shown in Table 5; in addition, Figure 5 shows a photograph of utilized prototype working over conditions described in previous two tables. Table 4 and Table 5, results suggests a noticeable reduction in current consumption from the sensor node in continuous mode. This reduction is mainly because of the sleep state of both Puesto que se desea obtener el menor consumo posible, se programa en el microcontrolador la habilitación del modo sleep cuando este sea invocado desde la ejecución del código con la función del mismo nombre. El bit IDLEN del registro OSCCON permite habilitar la entrada en modo sleep, mientras que la salida de dicho modo se puede lograr por diferentes vías, en este caso, se activa la salida de este estado mediante el mecanismo de desbordamiento del denominado Perro Guardián (Watchdog Timer-WDT); se configuró el postscaler del WDT en diferentes relaciones, hasta tener una periodicidad en los envíos que se consideró adecuada. El registro CONFIG2H y sus bits WDTPS3 a WDTPS0 fueron modificados para revisar las diferentes relaciones del postcaler que comienzan 1:32768, luego pasan a 1:16384, y así sucesivamente.

Comparing data in
Programando en el microcontrolador la condición de modo sleep y habilitando la misma condición en el radio transceptor, con la función Mi_AppTransceiverPowerState( ) (Microchip Technology Inc., 2009), se lograron las mejores condiciones, en cuanto a consumo de corriente del nodo. El sensor IMU solo se conecta para adquirir sus datos y se desconecta luego mediante el transistor de efecto de campo. 6.1mA 29.4mA Figure 5. Measurements of sensor node current consumption working in situations described in Table 4 and Table 5 / Medición del consumo de corriente en el nodo sensor en las situaciones ilustradas por las Tablas 4 y 5 the transceiver and microcontroller. If the reader considers that the consumed current from voltage regulator is about 6mA, consumption of transceiver-microcontroller duo is 0.1mA (100µA), datum in accordance with datasheet specifications.
Some high-efficiency regulators (and, subsequently, more expensive) than the one utilized in this work might reduce sensor node consumption up to 2mA. TSR 1-2433 step-down regulator (Traco Power, 2012) is one of them that introduces a nominal 2mA of current in stand-by mode.
References PIC18F4620 and PIC18LF4620 (Microchip Technology Inc., 2004) were used during tests that obtained similar results. This is because Low Frequency [LF] devices only present variations in nominal voltage supply from 5.5V to 2V, but they do not change their energy consumption features. LF devices specified in their serial number are more suitable for battery-fed applications, since they guarantee microcontroller operation for low supplying voltages.
The MiWi function called MiWiAppWriteData (Microchip Technology Inc., 2009) is factory configured to send one byte (character) per transmission; this is very inefficient in terms of energy consumption, as the reader infers the energy-related critical moment corresponds to activity time in the transceiver. To improve performance in this aspect, I programmed a function that sends strings to reduce the number of transmissions per message and take advantage of payload capacity (127 bytes in total as IEEE 802.15.4 standard suggests). For instance, if the system needs to send 12 characters, the number of transmissions is incremented in a factor of 12 (the number of characters to send) if strings are not used, resulting in sending 1200 packets that represent only 100 measurements. Correct string management and use of separated characters between consecutive measurements leads to 9 measurements per transmission (i.e. 10,800 measurements in 1200 packets). If the system is programmed to send only one measurement per message, the number of transmitted measurements equals the number of packets, as experiments that have been conducted show.
In order to validate changes presented in energy consumption after implementing changes over nodes hardware and software structure, I implemented a network with two nodes, coordinator and sensor node. This prototype is shown in Figure 6. Tests consisted of counting received messages from the coordinator when con-Se obtiene así una disminución significativa en el consumo de corriente del nodo sensor. Efectivamente se comprueba la drástica reducción del consumo de corriente al poner ambos, sensor y transceptor, en modo sleep. Si tenemos en cuenta que la corriente derivada por el regulador de voltaje es de unos 6mA, entonces el consumo del tándem microcontrolador-transceptor es de 0.1mA (100µA), lo que está en mayor consonancia con lo prometido en las hojas de datos de ambos dispositivos.

V. Results discussion
After elements are placed as Figure 6 shows, I proceeded to program continuous operation in nodes until package reception ends due to battery depletion; this test was carried out in an internal environment. The display in the coordinator node showed messages indicating the arrival and number of received packages. Table 6 summarizes the obtained results for two scenarios previously described in Tables 4 and 5.
Obtained results showed an increase up to 62% more in operation time and transmitted packages in optimal conditions compared with scenario where only firmware measurements to reduce energy consumption are implemented. Experimentation was executed with the same battery and similar charging conditions.
With a couple of Li-Ion batteries and nodes working in optimal conditions, the system was able to send 1032 messages in a 15-hour time period approximately. Afterwards, under the same conditions, I used only one battery and the system managed up to 688 packets in about 10 hours of uninterrupted sensor operation. Figure 7 shows the implemented hardware/firmware mechanisms in this experimentation searching for improvements in sensor node energy consumption. Some parts of implemented code in microcontroller are shown and generalizations of identified improvement options (from hardware elements until sensor switching) are also displayed.
Adoption of efficient circuital schemes can affect the nodes cost significantly; consequently, this aspect should be considered to implement larger networks with an elevated number of nodes, since cost/benefit analysis must be evaluated for both scenarios. To illustrate this aspect, I explain a hypothetical situation where the system uses a high efficiency and low consumption step-

V. Discusión de resultados
Luego de realizar la disposición de los elementos, como se indica en la Figura 6, en un ambiente interior, se procede a dejar operar los nodos de manera continua, hasta que no se reciban más paquetes del nodo sensor por agotamiento de la batería. En el display del nodo coordinador se verificó el arribo de los mensajes y se llevó la cuenta de los paquetes recibidos. la Tabla 6 resume los resultados obtenidos para los dos escenarios mencionados en las Tablas 4 y 5.  Figure 7. Schematic of hardware/firmware measurements taken in sensor node to increase energy efficiency / Representación esquemática de las medidas a nivel de hardware/firmware tomadas sobre el nodo sensor con el fin de mejorar su desempeño en consumo de energía down regulator. The price of common regulators such as the LD1117 is U$0.77 in the local market; compared with price of high efficiency and low consumption regulators as TSR 1-2433(Traco Power, 2012 located between U$30 and U$32 in the local market too, the increase in price between these two products is appreciable. Consequently, the rise in cost is about 39 times if implementation of the most efficient regulator is considered. This is no minor fact and it is the responsibility of the system designer what is better for its project.
Using the TSR 1-2433 regulator and a NiMH rechargeable battery, the system was able to transmit 1606 packets operating continuously during 24 hours approximately. In optimal configuration, i.e. switching the sensor and entering sleep mode periodically, current consumption was 1.32mA for inactive periods and values between 9 and 13 mA during analog/digital conversion and data transmission. I tried to implement a Li-ion battery to feed this proposal, but the TSR regulator only operates for input voltages higher than 4.75V, making this test impossible.
The switching device chosen in successful tests (2N700 reference) (Fairchild Semiconductor, 1997) presents a Manufacturer's Suggested Retail Price [MSRP] of U$0.73 in the local market; although it is considerably more expensive than other NPN/PNP options (with MSRP only at U$ 0.04), choosing the Fairchild® option does not increase costs of circuitry in the sensor nodes dramatically.
Another hardware element with upgrade possibilities is the battery. In this experiment, I used NiMH rechargeable batteries with MSRP of U$7.6 and a U$21.6 battery charger, available in local market. For lithium polymer batteries, prices in Colombia are between U$8 and U$21.8 for batteries, plus U$6 and U$35.3 for chargers. These prices suggest that the equilibrium point between LiPo and NiMH batteries can be found in order to assume battery change in sensor nodes.
Data reliability and stability in wireless communications between sensor node and coordinator was supervised using Wireless Development Studio, traffic analysis tool suitable for MiWi connections. This software operates together with the sniffer node called ZENA (Microchip Technology Inc., 2011). Figure 9 displays detail of data sent from node 3 (sensor node) to node 1 (PAN coordinator).
La Figura 7 muestra los mecanismos de hardware y firmware implementados en este experimento para mejorar el consumo de energía del nodo sensor. Se muestran algunos apartes del código implementado en el microcontrolador y se indican las generalidades de las opciones de mejora identificadas desde los elementos de hardware, así como la conmutación del sensor.
Otro elemento de hardware susceptible de mejora es la batería. En el experimento se utilizaron baterías recargables de tipo NiMH que cuestan 7.6 dólares en el mercado local y un cargador de 21.7 dólares. En el caso de las baterías tipo LiPo, en el mercado local los Extended operation tests were carried out later, where the system dropped a total of 600 packets transmitted and received successfully from the sensor node to coordinator; these tests presented batteries with enhanced charging conditions, non-optimal conditions, and neither switching nor sleep modes in microcontroller. The projection of these results implies an improvement of almost twice in packets processed by the microcontroller in the sleep mode, and an increasing of over 1500 packets with best conditions (i.e. using FET and sleep mode in microcontroller as well as transceiver). This scenario represents more than 24 hours of non-stop data transmission for a single battery charge (NiMH type at 8.4V). It is important to remark that none of the batteries used in this experiment was brand-new; the batteries had experienced several charge cycles since their usage in other WSN projects.
Finally, in another extended test, the sensor was fed with a wet lead-acid battery operating at 12V. Under this configuration, the system was able to transmit 10800 messages during 150 hours of operation.

VI. Conclusions and future work
In this work, it was possible to verify some procedures that allow reduction in current consumption of the sensor node under continuous operation time. Through instructions like sleep -recognized for compilers like MPASM and C18 -I was able to force a low-power state in microcontroller that rules sensor node. Also, I verified sleep mode operation in the MiWi MRF24J40MA transceiver through the function MiApp_TransceiverPowerState(), called in the MiApp interface. In a complementary way, the developer can access this low-consumption state through
According to the obtained results, the reader infers that, in order to verify the assumption related with low consumption that sensor nodes should have in wireless networks in long operation times, it is necessary to follow approaches that present interventions, both at firmware level (e.g. implemented code in microcontroller) and hardware level (i.e. circuitry).
The results showed that utilizing devices with better specifications in sensor node circuits lead to increments in efficiency in terms of energy consumption. Nevertheless, the cost/benefit balance can be inclined towards a non-return point, resulting in low or even absence of economic profitability for projects with high number of sensor nodes.
From performance evaluation of sensor nodes implementing several applications and located in outdoors and indoors, some indicators regarding cost/benefit relationship can be established. These indicators are related to adoption of measurements in firmware, hardware, or both, following the reduction of energy consumption in MiWi networks.
Some previous considerations indicate that greater optimization difficulties might be faced implementing outdoor networks, in applications in urban or industrial environments. This because installation conditions and sensor specifications related with robustness are required in these environments; in many cases, these sensors are not conceived for operation with low voltage and current levels. Additionally, switching loads is more complex if electric specifications in sensors change.