[PDF] AN092 -- Measuring Bluetooth Low Energy Power Consumption





Previous PDF Next PDF





BC805M Compact Lowest Cost BLE 5.2 Module

The following figure shows recommended mounting of BC805 module on the host PCB. • For the best Bluetooth range performance the antenna area of BC805M 



User Manual for AT Commands on UART Interface of Fanstels

2 Jul 2021 BC805 Series Nordic nRF52805 modules (BC805M). • BC833M Series Nordic nRF52833 QDAA modules (BC833M BC833E).



BC807-16LT1 - General Purpose Transistor PNP Silicon

Junction and Storage Temperature. TJ Tstg. -55 to +150. °C. Stresses exceeding those listed in the Maximum Ratings table may damage the device.



Job Description

The role of the Assistant Venue Manager is to assist the Audience Experience Management team in providing an efficient effective and welcoming experience: 



AN092 -- Measuring Bluetooth Low Energy Power Consumption

13 Apr 2012 The Bluetooth® low energy (BLE) standard was developed with long battery life in mind allowing for devices that can.



4 PIN DIP PHOTOTRANSISTOR PHOTOCOUPLER EL817 Series

29 May 2010 •Current transfer ratio. (CTR: 50~600% at IF =5mA VCE =5V). • High isolation voltage between input and output (Viso=5000 V rms ).



User Manual for AT Commands on UART and SPI Interfaces of

2 Jul 2018 AT Commands with Bluetooth 5 Features. Draft Ver 0.2 July 2018. 1. Introduction. An MCU can use AT Commands to communicate with a Bluetooth ...



nRF5 Series: Developing with SEGGER Embedded Studio

16 Sept 2019 This guide will help you get started with your nRF5 Series DK (Development Kit) and developing your application with SEGGER Embedded Studio ...



Carl Albert State College

financial aid educational services. For further information contact the affirmative action officer

Application Note AN092

SWRA347a Page 1 of 23

Measuring Bluetooth® Low Energy Power Consumption

By Sandeep Kamath & Joakim Lindh

Keywords

Bluetooth Low Energy

BLE

Power Consumption

Battery Life CC2540

CC2541

CC2540DK-MINI

1 Introduction

The Bluetooth® low energy (BLE)

standard was developed with long battery life in mind, allowing for devices that can last anywhere from several months to several years while operating on a single coin-cell battery. This application note describes the setup and procedures to measure power consumption on a

CC2541 device operating as a GAP

"Peripheral" in a BLE connection.

It is assumed the reader of this application

note has knowledge about the BLE standard and the CC2541. The example is based on the Texas Instruments CC2541 running version 1.2 of the BLE stack.

Please refer to [1] and the [2] for further

information.

In addition, it is assumed that the reader

has some knowledge of basic electrical engineering concepts, and understands how to use laboratory test equipment such as an oscilloscope and DC power supply.

The current consumption measurements

are presented, and battery life time is calculated for an example application. An accompanying Excel sheet is provided so that users can estimate their battery life based on their own custom usage scenario.

Note that the results presented in this

document are intended as a guideline only. A variety of factors will influence the battery life calculation and final measurements. Measurements should be performed on customer hardware, in a controlled environment, and under the target application scenario. Project collateral discussed in this application note can be downloaded from the following

URL: http:www.ti.com/lit/zip/SWRA347.

Application Note AN092

SWRA347a Page 2 of 23

Table of Contents

KEYWORDS .............................................................................................................................. 1

1 INTRODUCTION ............................................................................................................. 1

2 ABBREVIATIONS ........................................................................................................... 2

3 UNDERSTANDING POWER METRICS IN BLUETOOTH LOW ENERGY ................... 3

4 TEST SETUP .................................................................................................................. 4

4.1

SYSTEM OVERVIEW ............................................................................................................................ 4

4.2

HARDWARE MODIFICATIONS ............................................................................................................. 5

4.3

EMBEDDED SOFTWARE MODIFICATIONS ....................................................................................... 6

4.3.1 Remove Periodic Event..................................................................................................... 6

4.3.2 Configure General-Purpose Input / Output (GPIO) Pins ................................................. 6

4.4

CENTRAL DEVICE AND BTOOL SETUP ............................................................................................ 7

5 MEASUREMENT AND ANALYSIS ................................................................................ 8

5.1

CAPTURING A WAVEFORM DURING A CONNECTION EVENT ....................................................... 8

5.2 DETERMINING VARIANCE IN THE LENGTH OF CONNECTION EVENTS .................................... 12 5.3 PERFORMING MEASUREMENTS FOR CONNECTION EVENTS ................................................... 12 5.4

PERFORMING MEASUREMENTS OF SLEEP CURRENT ............................................................... 14

5.5

FORMULAS AND CALCULATIONS .................................................................................................... 17

5.6

USING EXCEL SPREADSHEET FOR CALCULATIONS ................................................................... 18

GENERAL INFORMATION ..................................................................................................... 23

5.7

DOCUMENT HISTORY ....................................................................................................................... 23

2

Abbreviations

BLE

Bluetooth low energy

DC Direct current

DK Development kit

DMM Digital Multimeter

GAP

Generic Access Profile

GPIO General-Purpose Input / Output

HAL Hardware Abstraction Layer

I/O Input / Output

MCU Microcontroller unit

OSAL Operating system abstraction layer

PC Personal computer

PDU Packet data unit

PM2 Power mode 2

PM3 Power mode 3

RF Radio frequency

Rx Receive

Tx Transmit

Application Note AN092

SWRA347a Page 3 of 23

3 Understanding Power Metrics in Bluetooth Low Energy It is not possible to compare the power consumption of a BLE device to another using a single metric. For example, sometimes a device gets rated by its "peak current". While the peak current plays a part in the total power consumption, a device running the

BLE stack will only

be consuming current at the peak level while it is transmitting. Even in very high throughput systems, a BLE device is transmitting only for a small percentage of the total time that the device is connected. Figure 1- Current Consumption versus Time during a BLE Connection In addition to transmitting, a BLE device will most likely go through several other states, such as receiving, sleeping, waking -up from sleep, etc... Even if a device's current consumption in each different state is known, this is still not enough information to determine the total power consumed by the device. The different layers of the BLE stack all require certain amounts of processing in order to remain connected and comply with the protocol's specifications. The MCU takes time to perform this processing, and during this time current is consumed by the device. In addition, the device might take some time when switching between states. All of this must be taken into account in order to get an accurate measurement o f the total current consumed. Figure 2- Current Consumption versus Time during a single Connection Event

Application Note AN092

SWRA347a Page 4 of 23

In a typical application, a device running the BLE stack will spend most of the time in a sleeping state between connection events. When the CC2541 goes into "Power mode 2" (PM2) between connection events, the internal digital voltage regulator is turned off, along with the 16 MHz RCOSC and 32 MHz crystal oscillator. The 32 kHz sleep timer remains active while the RAM and registers are retained. The only way that the device will wake up is if an I/O interrupt or sleep timer interrupt occurs. The primary metric that takes all of these other time and current measurements into account is the "average current". It is this value that can be used to determine the battery life of a device running the BLE stack. Note that a single "average current" value cannot be given for a device in its datasheet or in the device's specifications, as the average current is highly dependent on the connection parameters used. Anytime an "average current" specification is given, it is very important to understand the exact use -case during which the measurement was made. For a complete system-on-a-chip such as the CC2541, it is important to understand that the MCU is typically not only running the BLE protocol stack, but it is also running profiles and an application. The application not only uses the MCU on the device, but it may also be using peripherals on the chip, such as an ADC or op -amp. In addition, other devices on the circuit board, aside from the device running the BLE protocol stack, may be drawing current as well. This document will focus on strictly measuring current consumed as a result of the BLE protocol stack; however it is important to be aware of other sources of current consumption, as they will affect the battery life. 4

Test Setup

This section describes the general setup required for performing power testing. 4.1

System Overview

In order to properly measure average current consumption, the current must be measured with respect to time. Therefore, a basic multimeter is not sufficient, and an oscilloscope is required. The simplest way to measure current with an oscilloscope is to use a current probe and directly monitor the current going into the system. If you do not have a current probe available, an easy alternative is to use a small resistor in line with the power supply input to the system. You can then use a standard oscilloscope voltage probe to measure the voltage across the resistor, and effectively measure the current by dividing the voltage by the affect the existing circuitry, and large enough to provide a voltage that can be measured with

ȍ easy.

When performing measurements, it is best to use a regulated DC power supply as opposed to an actual battery. This eliminates variables that might be caused by a defective or low battery.

Figure 3 below shows the full setup.

Application Note AN092

SWRA347a Page 5 of 23

BLE Peripheral

Device Under

Test

BLE Central

Device

LE Connection

Figure 3- Test Setup using Oscilloscope with Voltage Probe 4.2

Hardware Modifications

In the CC2540DK-MINI kit, the peripheral device is the "Keyfob" board. A few simple hardware modifications are required to implement the setup in Figure 3. 1.

Solder a wire on the Keyfob PCB to ground. An easy location to do this is at pin 1 of the DEBUG connector on the board, as shown in Figure 4.

2.

ȍion to do this is

at the left side (with the board oriented so that the text is read properly) of the unpopulated resistor R1, as shown in, as shown in Figure 4.

Figure 4- ȍ

3. The Keyfob board contains a 47uF capacitor (C7) to smooth out the current going into the CC2541 and reduce peaks. For the purposes of power testing, it is best to remove the capacitor from the board in order to get cleaner and more accurate current measurements. Use a soldering iron to remove C7, as shown in Figure 5. 4. [Optional] Replace CC2540 with the CC2541 for better power consumption figures.

This is optional and depend o

n what chip you want to perform power consumption measurements on. For this Application Note, the CC2541 is in focus and thereby this step is essential. The easiest way to replace the chip is to heat the chip from the backside of the PCB, with a heat source (Recommended 290 °C)

Resistor

Oscilloscope w/

Voltage Probe

Power Supply

VDD GND

Application Note AN092

SWRA347a Page 6 of 23

Figure 5- Capacitor C7 Removed

You should now be able connect the DC power supply and oscilloscope voltage probe to the board, with the hardware configured properly for current measurements. 4.3

Embedded Software Modifications

Before testing can begin, the Keyfob software must be properly configured. To properly measure current consumption resulting from the BLE stack, additional application processing must be turned off. The SimpleBLEPeripheral project, included with the BLE stack, is simple in that the device immediately starts advertising upon power-up, and will accept any connection request from a master device. A couple of modifications to the software can help to reduce unnecessary power consumption. 4.3.1

Remove Periodic Event

As long as no buttons the Keyfob are pressed, the only regular application processing that occurs should be the periodic event, which is set to occur once every five seconds. This reading may throw off the power measurements, and therefore must be removed. To eliminate the periodic event from the application, simply comment out the following line of source code from the SimpleBLEPeripheral_ProcessEvent function in the file simpleBLEPeripheral.c: // osal_start_timerEx( simpleBLEPeripheral_TaskID, PERIODIC_EVT, PERIODIC_EVT_PERIOD ); By commenting out this line, the OSAL timer for the first periodic event will never get set. By preventing the first timer from being set, all subsequent OSAL timers are set after the initial event. This will stop the application from performing unnecessary processing. Once you have implemented this change, rebuild the project and download to the keyfob. 4.3.2 Configure General-Purpose Input / Output (GPIO) Pins If the GPIO pins are not configured properly, unnecessary current draw may be occur. Ideally, each GPIO pin will be unconnected, and therefore no leakage of current will occur. In the case of the keyfob, as with most boards, many of the GPIO pins are connected to peripheral devices, such as the LEDs, the buzzer, the accelerometer, and the buttons. To maximally reduce the current, all GPIO pins must be set to outputs at a low level. Note that this has already been implemented in the SimpleBLEPeripheral_Init function in version 1.2 of the BLE stack.

P0SEL = 0; // Configure Port 0 as GPIO

P1SEL = 0; // Conf

igure Port 1 as GPIO

P2SEL = 0; // Configure Port 2 as GPIO

P0DIR = 0xFC; // Port 0 pins P0.0 and P0.1 as input (buttons), // all others (P0.2-P0.7) as output

P1DIR = 0xFF; // All port 1 pins (P1.0

-P1.7) as output

P2DIR = 0x1F; // All port 1 pins (P2.0

-P2.4) as output

Application Note AN092

SWRA347a Page 7 of 23

P0 = 0x03; // All pins on port 0 to low except for P0.0 and P0.1 (buttons) P1 = 0; // All pins on port 1 to low P2 = 0; // All pins on port 2 to low This will put all of the GPIO pins in a power-optimized state after all of the HAL and board initialization processes complete.

4.4 Central Device and BTool Setup

You will also need to have a central device in order to form a connection with the Keyfob. The simplest way to do this is to use the USB Dongle in the CC2540DK-MINI kit running the standard HostTestRelease application, with BTool used to control the dongle With dongle connected to the PC and the Keyfob powered by the DC power supply, open up BTool. Press the right button on the Keyfob to make it discoverable, and then press the "Scan" button in BTool to verify that the dongle and the Keyfob are able to ta lk to each other. The advertisement and scan response data from the Keyfob should show up in the BTool log window. You are now ready to form a connection between the devices. Before forming the connection, the proper connection parameters should be used. This will be dependent on the application that is being considered. The supervision timeout setting should not affect the power measurements; however be sure to use a legal value as per the Bluetooth 4.0 specification. For our first example, you will use a connection interval of 1 second, with zero slave latency. Therefore, use the values as shown in Figure 6. Be sure to hit the "Set" button after entering in the values. Figure 6- BTool set up for 1 Second Connection Interval and Zero Slave Latency With the connection parameters set as needed, click the "Establish" button to connect to the

Keyfob.

Application Note AN092

SWRA347a Page 8 of 23

5

Measurement and Analysis

If all of the instructions in section 0 were followed properly, the oscilloscope should be set up to measure the voltage across the resistor with respect to time. 5.1

Capturing a Waveform during a Connection Event

In Figure 7, the voltage waveform is captured using a rising-edge trigger, set to trigger each time that the CC2541 wakes up from power mode 2 for a connection event.

Figure 7- Single-Triggered Capture of Waveform

calculated by dividing the voltage by 10. One of the first things that you may notice when looking at the capture is a large spike in current at the moment when the MCU wakes up from sleep. This spike is caused by the digital voltage regulator inside the CC254

1 re-powering up.

The regulator contains capacitors that must be re-charged, and thus quickly draw current when the device wakes up. This spike normally would not appear with capacitor C7 still populated on the board; and therefore while testing power consumption this spike can be ignored. In addition to the voltage spike, you will notice that the current draw changes as the CC2541 goes through several different states as a part of the connection event: MCU wake-up - upon waking up, the current level drops slightly Pre-processing - the BLE protocol stack prepares the radio for sending and receiving data Pre-Rx - the CC2541 radio turns on in preparation of Rx and Tx Rx - the radio receiver listens for a packet from the master Rx-to-Tx transition - the receiver stops, and the radio prepares to transmit a packet to the master

Tx - the radio transmits a packet to the master

Application Note AN092

SWRA347a Page 9 of 23

Post-processing - the BLE protocol stack processes the received packet and sets up the sleep timer in preparation for the next connection event. Pre-Sleep - the BLE protocol stack prepares to go into sleep mode. A similar waveform can be captured during every connection event; however the amount of time for each state will vary depending on the circumstances (the size of the PDUs being transmitted / received, the amount of processing time required by the stack, etc.). In addition, if more than one packet is transmitted or received, there will be additional Rx, Tx, and transition states. While the capture in Figure 7 appears like it can be used to start performing measurements, it does not tell us the entire story. In Figure 8 below, the voltage waveform is captured again using a rising-edge trigger, set to trigger each time that the CC2541 wakes for a connection event. This time, the oscilloscope"s "persistence" feature is used, in which many captures are overlaid on top of one another. Figure 8- Oscilloscope Capture with Persistence On

From the

Figure 8, you can deduce a few interesting facts about the current consumption during connection events. The first point is that the total processing time for each connection event is not always exactly the same. This means that a single scope capture is not sufficient to perform power measurements. The next point to notice is that even though there is variance in the processing time from event-to-event, the total processing time is not completely random, but rather falls into "slots". Figure 9 below shows a closer view of these slots in which the device completes processing.

Application Note AN092

SWRA347a Page 10 of 23

Figure 9- Processing Time "Slots"

Events that fall into the shortest slot take less time to process, and therefore less power is consumed. In this case, you can see using the oscilloscope's cursors that the CC2541 is awake for approximately 2.6 ms. Events that fall into the longest slot ta ke more time to process, and therefore more power is consumed. In this case, the CC2541 is awake for approximately 2.7 ms. In order to get an accurate calculation of the power being consumed; you must take into account the fact that the processing time for connection events is not always the same. A little bit of statistical analysis will be required to get accurate values.

Another point of note from

Figure 8 is that the amount of time for receiving and transmitting data during the connection event appears to vary. This in fact is not the case, though it may appear so from the image. The amount of time taken to receive and transmit data is very stable from event to event. This can be seen by changing from a rising -edge trigger to a positive-pulse trigger, and triggering based on the Rx pulse. Set the criteria such that the Rx pulse will cause the triggering, and not the voltage regula tor spike. Also be sure to raise the trigger level to a value where it will catch the Rx pulse, and not the pre -processing. A good value to use is 150 mV (which corresponds to 15.0 mA).

Application Note AN092

SWRA347a Page 11 of 23

Figure 10- Trigger on Start of Rx

By triggering at this point and watching several connection events over time, it can be seen that the pulses during Rx and Tx are very stable in both their level (voltage) and their width (time). The only exception to this may be that on occasion, a long Rx pulse may appear as in Figure

11. These long pulses mean that for that connection event, the slave device was not able to

receive th e packet from the master. Figure 11- Long Rx Pulse due to Missed Connection Event You will not see any Tx pulse in this case, because the slave will not respond if it does not receive from the master. These missed events should only occur for a small percentage of packets. If you are seeing many of these, it might mean that there is significant RF interference, or the slave and Keyfob devices are far apart from each other.

Application Note AN092

SWRA347a Page 12 of 23

5.2 Determining Variance in the Length of Connection Events As mentioned in the previous section, the CC2541 is awake variously for approximately 2.6 ms to 2.7 ms during each connection event. To improve the power consumption estimate, you must determine the percentage of the time that each of these cases occurs, or use the shortest and longest of these slots to calculate an average. Some oscilloscopes contain embedded software for statistical analysis, while others have PC applications that can be used to interface with a scope and perform analysis. If these tools are ava ilable this task can be done fairly easily; however even if these options are not available there is a way to estimate this percentage. By simply randomly triggering (be sure to use the rising -edge trigger upon wake-up from sleep) connection events and keeping a count of events in each slot, a good estimate can be made. In the case of our example, the connection interval is long enough (one second) that you can just leave the trigger running on auto, and keep a tally of each event that falls into each slot. The more events that are watched, the more accurate the calculation will be. By doing this type of analysis, you will find that the average of the shortest and longest slot, 2.65ms, will be accurate enough. For a better overview we will use the longest a nd shortest slot time and state that they occur equal amount of times, that is, 50% each. Now we need to look closer on these two slots. 5.3

Performing Measurements for Connection Events

You are now ready to perform the actual measurements. In the previous section, it was determined that separate measurements are required for the two cases of 2.6 ms long wake up and 2.7 ms long wake -up. We will first measure using a 2.6 ms long wake-up. This capture can be made either by using special triggering functions on the oscilloscope, or simply by repeatedly performing single-trigger captures on the scope until 2.6 ms wake-up waveform is caught. Figure 12- Typical Connection Event with CC2541 Awake for 2.6 ms To perform measurements, the sections of the waveform must be divided up, with current and timing measured for each state. Figure 13 shows this division of sections for each state.

Application Note AN092

SWRA347a Page 13 of 23

Figure 13- Current Waveform Split into Sections

The oscilloscope cursors can be used to get accurate timing and current measurements for each state. For some states, such as state 1 in Figure 13, the current draw is not steady. For very accurate measurements, the section could be split up into smaller sections; however using the divisions shown and guessing an average current value should provide fairly accurate estimates. Table 1 below shows the measurements from Figure 13:

ȝ Current [mA]

State 1 (wake-up) 400 6.0

State 2 (pre-processing) 340 7.4

State 3 (pre-Rx) 80 11.0

State 4 (Rx) 190 17.5

State 5 (Rx-to-Tx) 105 7.4

State 6 (Tx) 115 17.5

State 7 (post-processing) 1280 7.4

State 8 (pre-Sleep) 160 4.1

Table 1- Measurements from Capture in Figure 13

Note that the exact timings of the pre

-processing and post-processing may differ; however the sum of the two values will always be the same. Since the current draw is the same during pre processing and post-processing, these differences will not affect the average current. Next, similar measurements need to be made using a capture in which the CC2541 is awake for the longest slot, which measures 2.775 ms. Once you have the capture, use the same process as before to take measurements. Doing so will result in the following values:

ȝ Current [mA]

State 1 (wake-up) 400 6.0

State 2 (pre-processing) 315 7.4

State 3 (pre-Rx) 80 11.0

State 4 (Rx) 275 17.5

State 5 (Rx-to-Tx) 105 7.4

State 6 (Tx) 115 17.5

Application Note AN092

SWRA347a Page 14 of 23

BLE Peripheral

Device Under

Test DMM

Ammeter /

Power Supply

State 7 (post-processing) 1325 7.4

State 8 (pre-Sleep) 160 4.1

Table 2- Measurements from Capture with Longest Awake Time 5.4

Performing Measurements of Sleep Current

In addition to the active current, a very important metric for calculating the battery life is the sleep current. This is important for battery life, because in most use -cases the CC2541 will spend the majority of the time in PM2 while connected, waiting for the next connection event. The easiest way to measure the PM2 current is to use an ammeter or a digital multimeter (DMM), with the setup shown in Figure 14. Figure 14- Test Setup using Ammeter for Sleep Current Measurement It is important not only that your test equipment is capable of making measurements in the ȝ-range, but it also must be capable of handling current in the mA-range as well while the device powers-up and initializes with the MCU active. Certain ammeters will have separatequotesdbs_dbs26.pdfusesText_32
[PDF] BCA Expertise - Lean management dans les Services - Gestion De Projet

[PDF] BCA Expertise : 110 experts au service de la protection juridique - Anciens Et Réunions

[PDF] BCA123 - Microbiologie alimentaire

[PDF] BCAE les bandes tampons - Chambre Régionale d`agriculture - Anciens Et Réunions

[PDF] BCBH, association Bretagne coopération, Bretagne Humanitaire

[PDF] BCBS Konsultation zum IRB-Ansatz – Einschränkungen

[PDF] BCCP

[PDF] Bcd cheque cinema

[PDF] bcd cine acces - Les Cinémas Gaumont Pathé

[PDF] BCD FP 400 BK

[PDF] BCD – Décimal codé binaire - Anciens Et Réunions

[PDF] BCD!Travel!remporte!le!Trophée! - Gestion De Projet

[PDF] BCDI Fonctions avancées - Documentation dans l`académie de - Shareware Et Freeware

[PDF] BCDI3 / CONTENU DU DOSSIER « PROG »

[PDF] BCDI: mode d`emploi La recherche par critères La recherche