# DUT Rig
## Introduction
In the following, the process of developing and building a DUT environment will be illustrated. The intended usecase and underlying problem is based upon the comparison of commercial-grade hardware like Raspberry Pis and industrial computational plattforms. To make well-founded comparisons and assumptions about their key differences and their performce under different aspects, the following data shall be collected:
1. Power consumption
2. Overall system stability / system uptime
3. Synthetic benchmark performance
On top of that, the tests can be performed under the influence of being tested in an environmental chamber as well. Every DUT will be connected via additional hardware to a central Raspberry Pi, which controls the currently running tests and also logs the individual metrics that are being recorded. The data can also analyzed and processed simultaniously by the Raspberry Pi and accessed from a remote client.
## Additional hardware
Measuring the power consumption of each DUT is only possible by directly measuring the current consumption and bus voltage of each DUT. "Texas Instruments" offers several current-sense amplifiers suited for this application, coming with different interfaces and architectures.

The DUT hardware-board is built around 8x "INA219" ICs. Those offer an I<sup>2</sup>C (or SMBus) interface and have a dedicated register to read and measure overall power consumption without the need of any external calculations. This is especially helpful in scenarios where a lot of data and sensors are needed while keeping the simplicity.
A simplified flowchart of the hardware and components for determing the power consumption of each DUT is described in the figure below:
```mermaid
---
title: Simplified setup per DUT
---
flowchart LR
PSU --> |Power| Current-Sensor
subgraph INA-219
Current-Sensor -.-> |Bus Voltage| Voltage-Sensor
end
Current-Sensor --> |Power| DUT
Current-Sensor & Voltage-Sensor -.-> |Data over I<sup>2</sup>C| Raspberry-Pi
```
### I<sup>2</sup>C address range
The INA219 IC itself supports daisy-chaining of up to 16 ICs within one I<sup>2</sup>C bus. The utilized breakout boards were modified to make use of the 4-bit wide address-space provided by the IC itself, which is not fully routed on the PCB with jumpers. Per hardware-board, 8 sensors have been used.
#### Legend:
:black_circle: -> GND | :red_circle: -> VCC | :large_blue_circle: -> SDA | :white_circle: -> SCL
All addresses are written in hexadecimal.
#### Default address-space:
| A0 | A1 | Adress |
| -------------- | -------------- | ------ |
| :black_circle: | :black_circle: | 40 |
| :red_circle: | :black_circle: | 41 |
| :black_circle: | :red_circle: | 44 |
| :red_circle: | :red_circle: | 45 |
#### Extended address-space:
| A0 | A1 | Adress |
| ------------------- | -------------- | ------ |
| :large_blue_circle: | :black_circle: | 42 |
| :white_circle: | :black_circle: | 43 |
| :large_blue_circle: | :red_circle: | 46 |
| :white_circle: | :red_circle: | 47 |
The hardware-board features an additional pinheader for adding another hardware-board for up to 16 sensors in total on the bus, 8 per board. Therefore, the first board starts with address space of 0x40 --> 0x47.