Skip to main content

Debug power measurements with UART debug logs

Debug power measurements with UART debug logs

Unlocking the energy-saving potential in IoT and embedded devices greatly relies on a thorough understanding of the factors draining their power. This use case enables you to directly correlate unwanted current peaks and elevated energy consumption with UART output, pinpointing specific areas for optimization.

Embedded power debugging

The device under test (DUT) is connected to Otii Arc/Ace at the battery connectors as well as the UART pins. Otii Arc/Ace will supply the power to the DUT as set in the Otii app. Otii Arc/Ace will simultaneously measure current, voltage, power, and collect the logs sent via UART. The UART log data is presented below the measurements graphs and is automatically correlated to the ongoing power measurements. Marking selection of the measurements will automatically mark the relevant part of the UART log data and vice versa.

Products needed

How to connect

  1. Connect Arc/Ace to your computer by USB. If needed add a power supply via power outlet.
  2. Connect Arc/Ace’s banana connector + to DUT positive battery connector / power connector.
  3. Connect Arc/Ace’s banana connector – to DUT negative battery connector / power connector GND.
  4. Connect Ground GND from your DUT to Arc/Ace’s DGND. This is only necessary for Otii Ace since expansion port and banana connector are isolated.
  5. Connect UART TX from your DUT to RX on Arc/Ace.

Get started in the Otii app

  1. Under ‘Channels’ choose what kind of measurements you want to record, for example main current, main voltage and main power. These will show as graphs.
  2. Under ‘UART’ enable UART log.
  3. Set the correct baud rate for your device.
  4. Start a recording
  5. Power the DUT by setting the voltage for Ace/Arc and turn on the supply (On button).
Compare power measurements in real-time with Otii Arc/Ace Pro.

Analyze measurements

  1. Analyze the UART prints. The UART prints will be shown in the UART log window in real-time, wall time or no time, depending on preference.
  2. Mark an area in the current graph and all the UART messages that occurred in this time-frame are marked in the UART log. You can also do the opposite and mark one or several messages in the UART log. If you select one message, 1 ms will be highlighted on the graph. At the same time, the current graph for that time-frame is marked. It is possible to do a multi-selection of messages with Shift + click or Shift + arrow up/down.
  3. Copy the UART records. The UART records can be copied by selecting one or multiple messages and using combinations Ctrl-C/Cmd-C or right-clicking and selecting Copy log.

    Tips & tricks

    • Remember to disable the UART messages in the firmware when your device is ready for production to avoid wasting unnecessary energy.

    Watch the demo