search.noResults

search.searching

note.createNoteMessage

search.noResults

search.searching

orderForm.title

orderForm.productCode
orderForm.description
orderForm.quantity
orderForm.itemPrice
orderForm.price
orderForm.totalPrice
orderForm.deliveryDetails.billingAddress
orderForm.deliveryDetails.deliveryAddress
orderForm.noItems
MPUs & MCUs


Select and apply the right low-power microcontroller for the IoT


In this article, Rich Miron, applications engineer at Digi-Key Electronics will describe how to go about selecting a low-power microcontroller for the IoT, and what to look for with regard to on-board peripherals. It will also show how to use power monitoring tools, and provide tips and tricks for optimum power and performance


These microcontroller cores are supported across the industry by multiple vendors, making for a robust ecosystem for support and resources. To minimise energy consumption, there


Rich Miron E


nergy consumption is critical for battery-powered, connected devices to maximise the time between battery changes, or even allow devices to be run off ambient energy sources. While many embedded systems developers are well versed in optimising code, conserving energy for Internet of Things (IoT) devices requires a more comprehensive approach. Such an approach must not only factor in the memory size, MCU performance, and power consumption; it must also consider the radio, analog circuits, power converters, and sensors. While all contribute to the overall energy profile of the system, the major contributor that developers also have the greatest control over is the microcontroller.


Selecting a low-power microcontroller architecture Selecting a low-power microcontroller starts with identifying the right processor core that the microcontroller should use. There are many proprietary microcontroller cores available in the industry today, but a good place to start is with the ARM Cortex-M microcontrollers.


www.cieonline.co.uk


are two factors to consider early on: performance and energy efficiency. These can be difficult to quantify for a microcontroller, but there are two benchmarking standards that developers can use: EEMBC’s CoreMark and ULPmark. CoreMark measures the processing power that is available on a microcontroller where the higher the value, the more processing power. For example, the STMicroelectronics STM32L053 processor, which can be tested from a STM32L053 Nucleo Board, has a CoreMark value of 75.18. Another STMicroelectronics part, the STM32F417, has a CoreMark value of 501.85. At first glance, a developer might think it’s a good idea to go with the STM32F417 since it appears to have far superior performance. However, there are few more things to think about before making a decision. First, the CoreMark simply tells a developer how many benchmark iterations it is able to perform in a second. Processors running at different clock rates will yield vastly different values. A better comparison for processing power would be to compare the CoreMark/MHz. In this case, the STM32L053 processor yields a result of 2.35 while the STM32F417 yields a result of 2.98 (source: EEMBC). The two processors are very close in efficiency. Second, a developer needs to look at


the core architecture. The STM32L053 is based on an ARM Cortex-M0+, which is optimised for low power consumption and has a minimal number of debugging modules. In addition, all the bells and whistles that are found on high- performance processors, that also draw the most power, have been removed. The STM32F417, on the other hand, is based on an ARM Cortex-M4, which is designed to be a high-performance processor and runs at a clock speed of 168 MHz, versus 32 MHz. That’s nearly five times the clock speed for only a 26 per


cent increase in CoreMark/MHz. The ULPmark measures how efficiently


the microcontroller is able to perform operations such as calculations and memory operations. The latest releases even include peripheral efficiency, providing a developer with a good overview on how efficient the processor is overall from an energy usage standpoint.


Finding the right peripheral mix The microcontroller core is only the first consideration that a developer should take into account when selecting a low- power microcontroller. Another consideration should be the on-board peripherals. The peripherals make a major difference in how much energy is being drawn by the CPU. Developers want to make sure that they select parts that have low-energy peripherals that are as automated as possible. To start, developers should be looking for devices with more than just a single direct memory access (DMA) channel. The DMA allows a developer to move information around the internals of the microcontroller without the CPU. This means that the CPU can either be doing something else like running application code, or it could be turned off and in a deep-sleep mode to conserve energy. Meanwhile, the DMA channel is being used to move data from peripheral to memory, memory to peripheral, and even between different areas in memory. An example is to look for a plethora of low-power modes. When examining a microcontroller’s low-power states, it is useful to also examine the tool chains and ecosystem capabilities. Setting up and configuring low-power modes and the events that wake them up can be challenging and time consuming. Newer microcontrollers, such as the Synergy microcontrollers from Renesas, contain configuration software within their development environment that allows a developer to configure these modes with just a few simple clicks. For a low-power application, a developer would be interested in checking out the S124, 32-bit


MCUs with either 64 or 128 Kbytes of flash. To kickstart development with these devices, the Synergy DK-124 development board is available.


Measuring and verifying microcontroller energy consumption


Selecting a low-power microcontroller is only the first step in ensuring that a system can reach its lowest energy potential. In order to truly use minimum energy consumption, developers need to carefully monitor their microcontroller’s energy consumption throughout the entire software development process. There are several different methods that a developer can use to monitor the microcontroller’s energy consumption, including current probes and energy-aware debuggers. Current probes do nothing more than


measure the voltage across a shunt resistor and then calculate the current based on the voltage and the resistance of the shunt. This solution works great if you want to measure the entire system’s current draw, but if you really want to correlate what the microcontroller is doing with the energy consumed, an energy- aware debugger is the way to go. This allows a developer to determine which code areas may require further optimisations or rework.


Conclusion


Selecting a low-power microcontroller for an IoT device can be tricky. As we have seen, there are multiple considerations that need to be taken into account, ranging from the microcontrollers architecture through its on-board peripheral capabilities. Once a low-power microcontroller is selected, there is no guarantee that a developer will reach minimum energy consumption. The next stage is careful software architecture design and monitoring of the software’s performance throughout the development life cycle. Only then will a developer be able to fully capitalise upon the chosen microcontroller’s low-power characteristics and features.


www.digikey.co.uk Components in Electronics April 2018 27


Page 1  |  Page 2  |  Page 3  |  Page 4  |  Page 5  |  Page 6  |  Page 7  |  Page 8  |  Page 9  |  Page 10  |  Page 11  |  Page 12  |  Page 13  |  Page 14  |  Page 15  |  Page 16  |  Page 17  |  Page 18  |  Page 19  |  Page 20  |  Page 21  |  Page 22  |  Page 23  |  Page 24  |  Page 25  |  Page 26  |  Page 27  |  Page 28  |  Page 29  |  Page 30  |  Page 31  |  Page 32  |  Page 33  |  Page 34  |  Page 35  |  Page 36  |  Page 37  |  Page 38  |  Page 39  |  Page 40  |  Page 41  |  Page 42  |  Page 43  |  Page 44  |  Page 45  |  Page 46  |  Page 47  |  Page 48  |  Page 49  |  Page 50  |  Page 51  |  Page 52