Skip to content

Add Power Consumption Article #1731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,23 @@ The profiler we used is the [Power Profiler Kit II](https://www.nordicsemi.com/P

![Connect the power profiler to the board.](./assets/circuit.png)

**_Important note! In the software setup, you enable the "Power Output" of the power profiler. Make sure that the voltage (3.3 V or 5 V) matches the voltage on the power pin of the board. Applying 5 V to a 3.3 V pin will damage your board._**
***Important note! In the software setup, you enable the "Power Output" of the power profiler. Make sure that the voltage (3.3 V or 5 V) matches the voltage on the power pin of the board. Applying 5 V to a 3.3 V pin will damage your board.***

## Power Consumption Test

With the hardware and software set up, let's take a look at how to record the power consumption of your device.

1. Open the **nRF Desktop App**
2. instructions for setting up the PP
3. Enable the power output, by clicking the "Enable Power Output" option.
1. Open the **nRF Desktop App**.
2. Enable the power output, by clicking the "Enable Power Output" option.

![Enable power output.](./assets/powerOutput.png)

4. Select sample period (60 seconds) and number of samples (100k).
5. Click on "Begin Sampling" to start the power consumption test.
3. Select sample period (60 seconds) and number of samples (100k).
4. Click on "Begin Sampling" to start the power consumption test.

![Start sampling.](./assets/startSampling.png)

6. During the test, you can see the power consumption in real-time. After 60 seconds (or when the specified sample period ends), you will have the data, which includes the **max** and **avg** consumption. You can also zoom in to view the data.
5. During the test, you can see the power consumption in real-time. After 60 seconds (or when the specified sample period ends), you will have the data, which includes the **max** and **avg** consumption. You can also zoom in to view the data.

![Power consumption data.](./assets/consumption.png)

Expand Down Expand Up @@ -125,20 +124,6 @@ In the table below, you can see the results of each board tested with the sketch
The **Arduino Cloud Basic** sketch sends sensor data to the Arduino Cloud and turns on the built-in LED whenever activated from a dashboard.

```arduino
/*
Sketch generated by the Arduino IoT Cloud Thing "Cloud Blink"

Arduino IoT Cloud Variables description

The following variables are automatically generated and updated when changes are made to the Thing

bool led;

Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
which are called when their values are changed from the Dashboard.
These functions are generated with the Thing and added at the end of this sketch.
*/

#include "thingProperties.h"

void setup() {
Expand All @@ -153,13 +138,6 @@ void setup() {
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);

/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
pinMode(LED_BUILTIN, OUTPUT);
Expand Down Expand Up @@ -191,4 +169,4 @@ In the table below, you can see the results of each board tested with the sketch

## Summary

In this guide, we have learned how to use a power profiler to record power consumption data. This is an incredibly good utility, as it helps you identify the power needs of your application, which can aid your decision in selecting the right power source.
In this guide, we have learned how to use a power profiler to record power consumption data from an Arduino board. This is an great utility, as it can help you identify the power requirements of your application, helping your decision in selecting the right power source.