Measuring PSM Sleep Current on the nRF9160-DK

Author's Note:  8June2020 - Changed PSM Tau to 4 hours to meet Verizon Wireless 190 minute minimum

Overview

For these nRF9160 current measurements, the Qoitech Otii Arc and its accompanying software will be used. If you are familiar with the Nordic Power Profiler Kit (PPK), the operation of this device will look very similar.

NOTE: When running the asset tracker example for the first time, you must add your device to the nRF Cloud and activate your SIM card as described in the instructions. Otherwise, the DK will not connect to the cloud, even if it attaches to LTE network

Download this file to your desktop … we’ll use it later. You’ll also need to have nRF Connect for Desktop installed along with the Programmer and LTE Link Monitor apps. Make sure that you have the NCS toolchain and SDK installation completed as covered in the nRF Connect for Desktop. 

 

Update the nRF9160 Modem Firmware

If you already have the latest modem firmware installed, you can skip to the next section. Otherwise, download the latest modem firmware version compatible with your carrier from here to your desktop and do not unzip it.

Make sure that your nRF9160-DK is plugged into your PC with a micro-USB cable and that the DK power switch is on. Run nRF Connect for Desktop and then open the Programmer applet.

Click Select device in the upper-left of the Programmer app and select your PCA10090 (the three serial ports shown are a single selection). The indicator to the right will go green.

 

Click Update modem in the lower-right. Browse to your desktop and select the mfw_nrf9160_1.x.x.zip file. 
 

Click Write.

When the process completes, press the reset button on your DK to restart the asset tracker application. 
LED3 will start blinking, indicating that the nRF9160 is scanning for a network connection. 
When LED4 lights, the connection to nRF Cloud has been made. 
Close the nRF Connect Programmer.

 

Setting up the Otii Hardware (Power analyzer set up)

On the nRF9160-DK, it’s easy to directly power the nRF9160 SiP (“VDD_nRF” pin on the DK) and isolate it from rest of the board. This allows current measurements to be performed with a power analyzer on the nRF9160 alone.

Remove and save the jumper on P24 of the nRF9160-DK. Carefully connect the Otti Arc and nRF9160-DK as shown below. The Otii Arc supply will power the nRF9160 while the USB connection will power the remainder of the board. Connect the Otii and nRF9160-DK to your PC with a micro-USB cable and plug in the Otii power supply. Assure that your DK’s power switch is turned on. 
You will see the LED near the large Segger debugger device light indicating that it is powered, but the nRF9160 itself is not powered at this time.

 

Setting up the Otii Software

Run the Otii software. When the Welcome screen appears, click New Project and then click Arc.

Make the settings shown below and click Ok.

Calibrate your Otii by clicking Device  Calibrate.. on the menu bar. Click the Calibrate button, and when the process completes, click Close.

Click the switch to turn Arc power to the DK on. LED3 will start blinking, indicating that the nRF9160 is now powered and scanning for a connection.

 

Power Measurement Application with Logging

Now that the Otii and the DK are ready to go, we can test the current measurement example.

Unzip the Current_Measurement.zip file on your desktop and copy the unzipped folder to the location shown below. Your ncs folder location may vary from the one shown.

Start your Nordic version of Segger Embedded Studio (SES). 
On the menu bar, click File -> Open nRF SDK Project… and make the selections shown below. Your exact path may vary.

Click OK.

 In the Project Explorer pane on the left side of SES, expand 
Solution ‘build’, then Project ‘app/libapp.a’, then C_COMPILER_app and double-click on main.c to open it in the editor pane.

The project is fairly simple and all the real work occurs here. The code runs some AT commands … the same as if you typed AT commands into the LTE Link monitor terminal. The nRF9160 connects to the cellular network and requests PSM mode from the carrier. The code then sends the nRF9160 to sleep (see the last while loop). This is one thing you can’t do with the AT Client application or by sending commands from the LTE Link Monitor. Beside this, with AT client it is not possible to disable the UART, which is needed to perform the PSM current measurement.

UART logging is currently enabled in the code. We will disable it in prj.conf after looking at the output log in order to reduce the current.

On the SES menu bar, click Build -> Build Solution to build the project. The tools will create two output files; zephyr.hex and merged.hex. The second file is created by the tools merging zephyr.hex with the Secure Partition Manager (SPM) output file. If the SPM project has been changed, it will automatically be rebuilt.

Assure that your DK is completely powered (Otii Arc power too) and that LED3 is blinking or LED4 is lit.

If your DK is not already connected to the nRF Connect Programmer, click Select device in the upper-left of the Programmer app and select your PCA10090 (the three serial ports shown are a single selection). The indicator to the right will go green.

If all three serial ports do not appear, restart the Programmer app.

Click the Erase all button.

  

Click the Add Hex File button. Browse to …\ncs\nrf\samples\nrf9160\Current_Measurement\build_nrf9160_pca10090ns\zephyr and select merged.hex. Click Open.

Click the Erase and write button.


When the process completes, close the Programmer app to release the COM ports.

In nRF Connect for Desktop, open the LTE Link Monitor app and connect it as you did the Programmer app. 
Press/release the Reset button on the DK to see the SPM and Application boot sequence and the application log in the Terminal display.

The output log after the application starts should look like the log below:

...................................................................................................................................................................................................................................

AT send: AT%XDATAPRFL=0                                            Set data profile to ultra-low power

AT receive: OK

AT send: AT+CEREG=5                                                     Enable unsolicited result codes

AT receive: OK

AT send: AT%XSYSTEMMODE=1,0,0,0                            Set system mode to LTE Cat-M1

AT receive: OK

AT send: AT+CPSMS=1,"","","00100100","00001010"    Enable PSM mode with 4 hour TAU timer

AT receive: OK

AT send: AT+CEDRXS=2,4,"1010"                                     Enable use of eDRX & unsolicited result, WB-S1 mode, requested eDRX value

AT receive: OK

AT send: AT+CFUN=1                                                          Normal modem function on

AT receive: OK

connecting ...

AT receive: +CEREG: 2,"3407","0AB68811",7,0,0,"11100000","11100000"

AT receive: +CEREG: 5,"3407","0AB68811",7,,,"00000000","11100000"connected

AT send: AT+CEDRXRDP                                                 Read dynamic connection parameters

AT receive: +CEDRXP: 4,"1010","1010","0001"

AT receive: +CEDRXRDP: 4,"1010","1010","0001"OK

AT send: AT%XMONITOR                                                 Read modem parameters

AT receive: %XMONITOR:5,"AT&T","AT&T","310410","3407",7,17,"0AB68811",390,5780,46,33,"1010","00000000","11100000"

OK

.............................................................................................................................................................................................................................

 

This step is important to verify that the nRF9160 can connect to the LTE network, and that it can enter PSM mode.


Note:

  • Not all SIM cards support PSM
  • In this example, the modem is set to use LTE Cat-M1. So, an M1 enabled SIM is required. 
    Note: if you have a NB sim, you can modify the code in the main (the AT command used to set the mode is AT%XSYSTEMMODE)

 Close the LTE Link Monitor.

 

Turn off UART logging

 In order to measure the lowest possible current, logging in both the SPM and Current_Measurement projects must be disabled.

Browse to …\ncs\nrf\samples\nrf9160\Current_Measurement and open the prj.conf file in an editor like Windows Notepad.

Where you see CONFIG_SERIAL=y, change the “y” to an “n” so it reads CONFIG_SERIAL=n. Save the file and close the editor.

In the SPM project, logging is enabled by default, so add CONFIG_SERIAL=n to the end of the prj.conf file in …\ncs\nrf\samples\nrf9160\spm .

Make sure to save the file and close the editor.

 

Rebuild the Projects

Since the SPM project is part of the Current_Measurement project, SPM will be built automatically when we build the Current_Measurement project.

Be aware that CMake is only run when a project is loaded in SES, so it’s necessary to re-load a project to properly incorporate the prj.conf changes.

Start your Nordic version of Segger Embedded Studio (SES).

On the menu bar, click File -> Open nRF SDK  Project… and make the selections shown below to open the Current_Measurement project. Your exact path may vary.

Click OK.

On the SES menu bar, click Build -> Build Solution to build the project.

Wait for the process to complete.

Close SES.

Program the Non-Logging Application

Assure that your DK is completely powered (Otii Arc power too) and plugged into the USB port of your PC.

Run nRF Connect for Desktop and open the Programmer applet.

If your DK is not already connected to the nRF Connect Programmer, click Select device in the upper-left of the Programmer app and select your PCA10090 (the three serial ports shown are a single selection). The indicator to the right will go green.

If all three serial ports do not appear, restart the Programmer app.

Click the Erase all button.

Click the Add Hex File button. Browse to …\ncs\nrf\samples\nrf9160\Current_Measurement\build_nrf9160_pca10090ns\zephyr and select the merged.hex file. Click Open.

Click the Erase and write button.


When the process completes, close the Programmer app to release the COM ports.

 

Measure the PSM Sleep Current without Logging

To observe and record the startup sequence and then the sleep current, press and hold the Reset button on your DK, click the + right of Recordings and quickly release the Reset button. You will see something like this:

Right-click on the graph and select Fit Width to see the entire capture.

When you want to stop recording, click here:


Drag a measurement range as shown during the sleep period after the startup sequence completes.

The average current is just under 7µA.  

The mins and maxes are due to the way the nRF9160 voltage regulator operates in refresh mode in idle.

The average current can be reduced further as there is a parasitic draw via the nRESET line on the version 0.9.0 and earlier versions of the DK.

Turn off the DK power switch and move the VDD_IO switch to the 3V position.

Move the DK power switch back to the on position.

Right-click on your first recording’s name in the Otii software and select Hide.

Press and hold the Reset button on your DK, click the + right of Recordings and quickly release the Reset button. Right-click on the graph and select Fit Width to see the entire capture.

When your previously set measurement range appears, stop the recording by clicking the white square as shown:

 

Without the parasitic draw, the current is now 4µA.

Right-click on each recording name to export it as a CSV to the location of your choice. You can then delete the recording in the Otii software if you wish.

When you want to turn off the DK, click the switch shown to turn the Arc power to the DK off.

 

You can close all open windows and disassemble the measurement setup.

Don’t forget to replace the P24 jumper and return the VDD_IO switch to the 1V8 position.

You may want to remove CONFIG_SERIAL=n from the prj.conf file in …\ncs\nrf\samples\nrf9160\spm  in order for logging to be enabled.

You may also want to reprogram your DK with the asset tracker file, merged.hex located in the …\ncs\nrf\applications\asset_tracker\build_nrf9160_pca10090ns\zephyr folder after you build the project.

Summary

PSM sleep current is easily measurable on the nRF9160-DK at 4µA. 

Note that the nRF9160 also powers the SIM card, and using this set-up, SIM current will be included in the measurement. However, in this case, because of the extended sleep time allowed by PSM mode (and in general for eDRX/PSM larger than a certain limit), the nRF9160 automatically shuts down the SIM card (the SIM must support this feature) . So, the current contribution of the SIM is zero and is not visible in the current measurement. 

This same setup can be used to measure nRF9160 current under many other conditions.

Anonymous
Parents
No Data
Comment
  • $core_v2_ui.GetResizedImageHtml($comment.User.AvatarUrl, 44, 44, "%{border='0px', alt=$comment.User.DisplayName, ResizeMethod='ZoomAndCrop'}")
    $core_v2_ui.UserPresence($comment.User.Id) $comment.User.DisplayName over 2019 years ago
Children
No Data