# Powering and measuring embedded device energy consumption with Otii

**URL:** <https://forum.qoitech.com/t/powering-and-measuring-embedded-device-energy-consumption-with-otii/516>\
**Category:** Tips & tricks\
**Created:** [October 25, 2024, 3:02pm UTC](https://forum.qoitech.com/t/powering-and-measuring-embedded-device-energy-consumption-with-otii/516 "2024-10-25T15:02:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mariahernandez](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.qoitech.com/mariahernandez/32/491_2.png) [@mariahernandez](https://forum.qoitech.com/u/mariahernandez)\
**Post date:** [October 25, 2024, 3:02pm UTC](https://forum.qoitech.com/t/powering-and-measuring-embedded-device-energy-consumption-with-otii/516/1 "2024-10-25T15:02:09Z")

</div>

If you’re like me and constantly seeking ways to optimize power consumption in low-power embedded systems, you must got yourself an [Otii instrument](https://www.qoitech.com/wp-content/uploads/2024/10/Otii-Product-Suite_Qoitech_2024.pdf) to power, monitor, and energy optimize any hardware project you’re working on!

This week I got a [XIAO nRF52840](https://wiki.seeedstudio.com/XIAO_BLE/), and my first goal was to measure it’s energy consumption while this tiny board executed a simple operation: wake-up, run a blink sequence, and go back sleep. Here’s how I set it up using the [Otii Ace Pro](https://docs.qoitech.com/user-manual/otii/hardware/otii-ace-pro#datasheet).

1. Connected the Otii Ace Pro to my computer via USB, and wired up my device under test (DUT) with banana connectors—positive and negative terminals connected to the battery leads of the node.

 ![XIAO nRF52840 stand alone connected to Otii Ace Pro](https://europe1.discourse-cdn.com/flex017/uploads/qoitech/original/1X/d6b9041828d1f058f9f3f38fbaf1079c82e2f16e.jpeg)

1. Opened the Otii Desktop App, added the Otii Ace Pro under the Control panel, and set the supply voltage. In my case, I set 3.3 V.
2. Choose the channel I was looking to measure (current, voltage, power) so I could view everything in real time as the board went through its cycle.

Once everything was wired up and setup on the app, as shown above, I hit the recording button, turn on the power supply and boom! Here’s what I quickly found:

- **Active Mode** : 1.33 mA (not bad for an active sensor)

 ![XIAO nRF52840 stand alone | Active mode](https://europe1.discourse-cdn.com/flex017/uploads/qoitech/original/1X/1fcd5aa04169a99eea989f2c56a2e29abb6c7562.png)

- **Deep Sleep Mode** : 2.14 µA (even better than expected!)

 ![XIAO nRF52840 stand alone | Sleep mode](https://europe1.discourse-cdn.com/flex017/uploads/qoitech/original/1X/8f184a8a1cc5aa8cac0e110c600ca0e194989a76.png)

Nevertheless, it is never the same to power and measure the device by itself, versus powering and measuring with the [expansion board](https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/).

 ![XIAO nRF52840 + Expansion board connected to Otii Ace Pro](https://europe1.discourse-cdn.com/flex017/uploads/qoitech/original/1X/2f11ea0b4cb2fc58066892d16454aa1fa418f04e.jpeg)

So, since Otii allows me to compare all the results side by side, why not look at this difference? After syncing the measurements and analyze them I found the following:

 ![Yellow graph = with expansion board | Orange graph = without expansion board.](https://europe1.discourse-cdn.com/flex017/uploads/qoitech/original/1X/b35865dc8e688c3ca657006eda82235941798b27.png)

Getting as result:

- **Active Mode** : 2.33 mA
- **Deep Sleep Mode:** 968 µA

While the difference in power consumption might seem small at first, it becomes significant when we [calculate the device’s battery life](https://youtu.be/RBXQrnpl-Eo) using a 220mAh battery with a 1-hour sleep cycle. The XIAO nRF52840 on its own would last **3.1 years** on that battery. However, when powered up using the expansion module, the battery life drops dramatically to just **9.4 days**. Now that’s a huge difference!

If you’d like to dive deeper into these measurements, you can [download the project here](https://github.com/qoitech/otii-example-projects/tree/master/XIAO_nRF52840_ExpansionBoard) and open it in the **Otii Desktop App**. The app is completely free, and you can [download it right here](https://www.qoitech.com/download/).
