Reduced levels of energy consumption is one of the major goals in Wireless Sensor Networks (WSNs), making the design of a sensor node a challenging task. On-field realtime measurement of the energy consumption of sensor nodes could have a major impact on developing wireless networks. It could be applied to predict the remaining battery charge or to asses the energy efficiency of communication protocols. However, designing such a system presents many challenges that will be discussed in this work. Moreover, we present a measurement method and circuit, named self-energy meter (SEM), that easily adds to a sensor node the capability of measuring its own energy consumption. SEM is a novel approach focused in solving the problem of covering a dynamic range of five decades in dutycycle battery operated sensor nodes. Experimental results show that SEM has very low power consumption, ensuring an almost negligible impact in the battery lifetime, is highly linear, presents a very low temperature drift, and is almost independent of the power supply.