Using a Power Supply as an Energy Measuring Tool

Applications for the Internet of Things represent a class of devices, commonly referred to as edge nodes, which require extended battery life on the order of months, weeks, and even decades. In addition to a transducer and communication mechanism, an edge node typically contains a microcontroller to perform some type of processing (e.g. encryption, compression, error correction, protocol stack, data analysis). The IoT system designer must carefully select the microcontroller to ensure that it will meet the performance and energy requirements to enable the long battery lives that are expected.

Applications for the Internet of Things represent a class of devices, commonly referred to as edge nodes, which require extended battery life on the order of months, weeks, and even decades. In addition to a transducer and communication mechanism, an edge node typically contains a microcontroller to perform some type of processing (e.g. encryption, compression, error correction, protocol stack, data analysis). The IoT system designer must carefully select the microcontroller to ensure that it will meet the performance and energy requirements to enable the long battery lives that are expected.

All microcontroller vendors targeting the IoT domain and other categories of battery-powered devices, claim ultra-low power (ULP) capabilities. However, ULP has a variety of implications. In some cases, the lowest active current is required when the power source is severely limited (e.g. energy harvesting). Alternatively, the lowest sleep-mode current is required when the system spends most of its time in standby or sleep mode, waking up infrequently (periodically or asynchronously) to process some task. Furthermore, ULP can also imply energy efficiency, whereby most work is performed in a limited time period. Overall, the application will require a combination of or tradeoffs on all of the above.

Beware of Datasheet Parameters

One must take care when using datasheet parameters to analyze and compare different devices, although datasheet parameters are typically accurate and essential for anyone doing a system design, they might not tell the complete story. For example, for the microcontroller, what workload should be used when deriving the power specification? What should the operating conditions and the physical setup be for the device under test? What duty cycles should be used to represent the transitions from active to low power state? How should the clock source be utilized? Should the workload run from flash or RAM? What is the input voltage? All of these details must be specified and utilized by all vendors in order to allow a system designer to make apples-to-apples comparisons.

Deriving an industry-standard metric for energy efficiency of ULP microcontrollers is far more complex than a straight-up performance benchmark. To satisfy this industry need, EEMBC established ULPBench to provide a consistent method to measure energy efficiency, demonstrating both active power and idle (sleep) power.

Standardized Energy Measurement

In addition to establishing the run rules and operating environment, the group also realized that to proliferate ULPBench, an accurate energy measuring tool in the sub-$100 price point was needed. The organization produced the EnergyMonitor, a USB-powered power supply for the target device under test (DUT). It connects to a DUT through a 100mil, 2-pin header and can measure the energy consumption of literally anything running on 3V and up to 28mA. The intended application of the EnergyMonitor is to measure microcontroller energy consumption; it can also be used to measure energy consumed by sensors or other components used in IoT applications. However, most importantly, it integrates directly with EEMBC ULPBench and provides a standardized method for measuring energy consumption (Figure 1).

During the benchmark run, the functionality represents a combination of active and low-power operation. The stair-step depicted in Figure 1 is the result of an active mode of about 20,000 CPU cycles (which consumes the majority of the energy) and the remainder of 1 second of low-power operation. Since "bigger is always better" in benchmarking, the ULPMark-CP uses a formula that takes the reciprocal of the energy values. ULPMark-CP = 1000/(median of 5 times average energy per second for 10 ULPBench cycles). The EnergyMonitor GUI also allows you to view the energy values (in µJoules).

Figure 1. The EnergyMonitor integrates with ULPBench and provides a comprehensive GUI to control and record the energy measurement for ULPBench.

EnergyMonitor Design

The EnergyMonitor supplies and measures current delivery. The EnergyMonitor uses a patent-pending modulation method that guarantees a fix quantum of energy in all pulses (Figure 2). The pulse density is a measure for the power and/or energy consumed.

Figure 2. Basic circuitry setup for the EnergyMonitor.

In terms of the patent, EnergyMonitor comprises a switched mode power converter comprising a switched transistor, an inductor and an error amplifier. The switched transistor switches a current through the inductor. The error amplifier controls the switching of the switched transistor to convert a primary voltage applied at the input through USB into 3V at the output. EnergyMonitor also comprises an oscillator, a control logic stage and a digital counter. The control logic stage is coupled to receive a clock signal from the oscillator and to generate switching signals for the switched transistor. Essentially, the counter counts the number of ‘energy pulses’ supplied to the DUT for determining the consumed energy over a time period.

EEMBC’s first version of ULPBench is called CoreProfile because it focuses it can be used to benchmark microcontrollers targeted for ULP application segments that use a typical peripheral set comprising, at a minimum; real-time clock (RTC), RAM and non-volatile memory in combination with the CPU. Going beyond the CoreProfile, the peripherals and the system architecture can contribute significantly to the total energy consumption. The next phase, which is called PeripheralProfile will add specific peripheral accesses and functionalities to the energy benchmark suite. This profile will cover ADC conversions, PWM generation, SPI communication and RTC functionality. Following this, profiles for more advanced data processing as required for filtering and analogue signal evaluation and for components of the Internet of Things (IoT) are in discussion.

ULPBench is the first step for establishing consistent rules for specifying microcontroller datasheet energy values. Ultimately, the user must determine how to compare a benchmark result to the behavior of their real application design. The application’s duty cycle, for example, must be understood (e.g. amount of time in active mode vs. idle mode). If the application wakes up often or for long periods of time, then the active mode energy will dominate. If the application wakes up infrequently and briefly, then the idle mode energy will dominate. The ULPBench score tries to achieve a balance between active mode and idle mode energy. EEMBC ULPBench is available free with the purchase of EnergyMonitor (www.eembc.org/ulpbench/order.php), users can run the tests themselves and even post the results on EEMBC. The energy consumption of microcontrollers varies tremendously, so choose carefully for your next design – a few extra micro Joules/second can mean the difference between one and 10 years of battery life.
 

To Top