Automatic switching between a debugger and power measurements

January 12, 2021

If you are performing power consumption measurements with Otii Arc and Otii Automation Toolbox and using a debugger in your everyday work, you may want to disconnect the debugger for every power measurement performed. The debugger can affect the power consumption measurements significantly. Yes, the manual task of switching off/on the debugger is however very annoying. That is why we have a solution for you to automated this unavoidable task.

We have prototyped a switchboard that you can use in your automation set-up to enable switching off/on the debugger or USB connection to your device under test automatically. The GPOs of the Otii Arc enable this automatic connect/disconnect function. You can connect your computer to your device under test, flash it, and then disconnect the computer from it again, by means of a simple script.

Below you find detailed instructions on how to use this switchboard.

Overview of the switchboard

Figure 1 Overview of the Switchboard

The left side 14-pin connector is intended to insert in Otii Arcs expansion port. All signals are passed through to the right side 14-pin header. 

All power on the switchboard comes from Otii Arc +5V supply so this needs to be switched on to make it work. Switch it on, either via script or via UI. 

Figure 2 UI control of +5V

Programmer interface 

The programmer interface switches pin 1, 2, 4 and 10 of the 10-pin-header.

Figure 3 Programmer interface

Pin 3, 5 and 9 is connected to GND, pin 7 and 8 is not connected. The 10-pin header is both available as 2.54 pitch and 1.27 pitch (keyed). 

The reason for choosing 1, 2, 4 and 10 is due to the ARM Cortex debug connector where VCC, SWDIO, SWDCLK and nRESET needs to be switched.

Figure 4 ARM Cortex debug connector

First, choose if GPO1 or GPO2 of Otii Arc is going to switch the relays. This is done with a jumper being either on the GPO1 or GPO2 side of the 3-pin header. A LED is lit when the relays are active. 

USB interface

The USB interface switches D+, D-, VBUS and GND of the USB connector.

Figure 5 USB interface

It is a micro-B connector on one side and a type-A connector on the other. 

First, choose if GPO1 or GPO2 of Otii is going to switch the relays. This is done with a jumper being either on the GPO1 or GPO2 side of the 3-pin header. A LED is lit when the relays are active. 

Scripting

Use these commands to easily switch the relays: 

Switch on +5V source on expansion port 
device:enable_5v(enable) 

Toggle GPO port on expansion port 
device:set_gpo(port, enable) 

Simple script turning on GPO1 
local devices = otii.get_devices(“Arc”)
local box = otii.open_device(devices[1].id)
box:enable_5v(true)
box:set_gpo(1, true)
box:set_gpo(2, false) 

Do you want to use the board?

Contact us if you are interested in the board or build a similar one yourself following the instructions from our customer Irnas, presented in their GitHub. Read more about how Irnas automate power consumption measurements here.


Don’t want to miss any new tech content?
Subscribe to our monthly newsletter!


Products used in this article:

Otii Arc

Power Analyzer, Log Sync & Power Supply in one Product. Otii Arc comes with the featured-packed standard Otii software (perpetual license).

$699

Otii Automation Toolbox

monthly subscription

You save % ()

Otii Automation Toolbox is a subscription-based software that requires Otii Arc. More information here.

Qoitech Switchboard Prototype

Contact us if you are interested in the board.

Follow Us

Terms of Use      Privacy Policy

Newsletter

Copyright © 2021 Qoitech AB. All Rights Reserved.