# Accordion – architecture

> Accordion's concept: a modular build system for test and measurement interfaces. Module types, AGENT Q2 build-up, the channel concept and the C#/Python API.

_Source: E-Sharp (esharp.se) · Accordion Plattform_


Accordion™ is a modular build system for a test- and measurement interface, developed by E# to maximize reuse and flexibility for virtually any measurement need.

## Introduction to Accordion™

Every piece of electronics requires some kind of test interface in order to be tested and verified. A test interface typically needs to:

- Provide power
- Connect to one or several communication buses
- Generate appropriate stimuli (analog or digital signals)
- Measure analog or digital signals

In addition to the DUT interface, it might also provide test fixture control — from a simple jig to a complex automated machine.

The challenge is that the products a test interface connects to are vastly different, even within one company. There is no "one size fits all" solution, so test interfaces are often designed in-house — time-consuming work that locks up skilled R&D engineers for months or years, with versions that become increasingly hard to maintain. A test interface is not only hardware: someone must also write software and firmware drivers, and often a complete GUI for troubleshooting.

With Accordion™, **everything is a module**: DUT connections, communication buses, fixture control, measurement, stimuli, subsystem control — even the software. The strength of the concept lies in the build system and the subsystem that connects all parts together. Common requirements (I2C, UART, USB, JTAG; power and analog measurement) are met with standard modules, and because modularity is at the heart of Accordion™, it can be adapted to virtually any functionality.

## Architectural overview

At its core there is a bus system with defined functionality and power that allows for vastly different applications.

### Module types

There are currently four module types in the Accordion™ build system:

| Module Type | Features | Comment |
| --- | --- | --- |
| SO-DIMM | 260-pin, 100 user signals, several form factors | Most E# measurement modules are of this type |
| M-SLOT | Robust, high current | Power-hungry modules such as the PoE module and PSU module |
| N-slot | 100 user signals, very high density | Expands the AGENT™ top with new functionality |
| EXPAND | 24 V, differential I2C over M8 industrial connector, up to 30 m cable, cascadable | Functions suited to be placed outside the main unit (e.g. relays or PSUs in test fixtures) |

- **SO-DIMM** — four form factors (Type A–D); two can be stacked.
- **N-SLOT** — the N-TOP slots (four) on AGENT™ are primarily used for connector adaptation for measurement modules.
- **EXpand™** — a hardware concept allowing versatile expansion outside the AGENT™ box, using the rugged M8 cable standard. Example EXpand™ devices: DMM Relay (isolated 32-channel mux), PSU Module (2-ch 24 V/5 A), Fixture Comm, Active Load (4-ch 0–24 V/0–1 A), PCIe Carrier, SO-DIMM Carrier. The EXpand™ frontend is based on LTC4331 (differential I2C, up to 60 m cable); in AGENT™ the I2C-LR module connects up to four downstream devices.

## AGENT Q2™

The mechanical outline of AGENT Q2 is based on an extruded aluminium enclosure (1455Q2201 from Hammond), coloured blue with custom sides and lid. It can be installed inside or outside a test fixture; E# offers fixation methods, desktop stands and 19" rack mounts.

### Build system & top board

Under the top cover, the board has many board-to-board connectors for customized N-slot modules. The N1–N4 slots break out the signals from the SO-DIMM slots; N5 is not connected to a SO-DIMM slot and provides communication buses (I2C, SPI, UART, JTAG) or fixture functions (fan control, light indications). On the other side, the T1–T3 SO-DIMM modules provide measurement capability to the N-slots (T1→N1, T2→N2, T3→N3; T4 on the base board). Two additional slots (M1/M2) provide power-related functionality (programmable PSUs, active loads, PoE).

### Base board

The base board hosts subsystem functionality — control module, power generation and cooling — and connects to the top board via two PCIe riser boards. The BASE has four SO-DIMM4 slots; A1 holds the Control Module with the Raspberry Pi 4 (CM32, "32" = number of unique addressable I2C channels). System-internal buses (SPI/UART/JTAG) are distributed in a daisy-chain from the CM32, through the base slots, up to the AGENT top. AGENT BASE also provides power supplies, clocks, fan control, overcurrent limiting and the on/off button.

## Software architecture

The software is divided into two parts: one runs on the AGENT's on-board computer, the other communicates with the AGENT through a proprietary TCP protocol. On the application layer, a .NET wrapper provides an API for use with NI TestStand or LabVIEW, and a Python wrapper wraps the same .NET API.

### The 'Channel' concept

All functions in an Accordion system are abstracted as a **channel** — a digital or analog input or output, a temperature input, a register, or a communications channel. When the system boots, a discovery process finds all attached hardware modules, and each module reports the channels it supports. A channel's value is always represented as a string: booleans as `"true"`/`"false"`, floating-point numbers with a dot decimal separator (`"1.234"`). Values are always in SI units where applicable (volts, °C, etc.).

### Channel types

| Channel Type | Direction | Options |
| --- | --- | --- |
| Analog | IN / OUT | Gain, Offset, RSE/DIFF |
| Digital | OUT | PushType, IOVoltage |
| Digital | IN | PullType |
| Pseudo-Digital | IN / OUT | VLOW, VHIGH |
| Temperature | IN | SensorType, Cold-junction destination, parameter |
| Multiplexer | — | |
| Resistance | IN | ClampVoltage |
| Counter | IN | |
| Frequency | IN | |
| Actuator | OUT | ToggleEnabled, ToggleTimeMilliSeconds |
| Powersupply | OUT | CurrentLimit, OvercurrentResponse |
| Register | IN / OUT | |
| Ratiometric | IN / OUT | Gain, Offset |
| UART | IN / OUT | Baudrate, BusType, TerminationByte |
| SPI | IN / OUT | ClockSpeed, SpiMode, ChipEnableHigh |
| I2C | IN / OUT | ClockSpeed |
| NumericResult | IN | |

Highlights:

- **Analog** — Gain/Offset convert the value as y = kx + m (k = Gain, m = Offset). For outputs the reverse calculation is applied (model an external amplifier or attenuator).
- **Digital** — configurable PushType (OpenDrain, PushPull) for outputs and PullType (None, Up, Down) for inputs, with an IO voltage for push-pull.
- **Pseudo-Digital** — a digital channel backed by an ADC/DAC, with VLOW/VHIGH thresholds.
- **Temperature** — returns °C; the Thermocouple module can be configured for many sensor types (TC types J/K/E/N/R/S/T/B, RTD PT-10…1000, thermistors). Thermocouples need a cold-junction reference channel.
- **Power Supply** — enabling/disabling turns the output on/off; the value sets the output voltage; CurrentLimit and OverCurrentResponse (Off or Limit/constant-current) govern protection.
- **Actuator, Resistance, Counter, Frequency, Register, Ratiometric, Multiplexer, NumericResult** — each covers a specific abstraction (see the channel concept above).

### Software modularity

Just like the hardware, the software and firmware are modular. Each hardware module has an EEPROM storing its type; on boot the subsystem scans all locations, loads the associated drivers and exposes their channels. **Accordion Extension Modules (AEM)** are software-only modules a user can load/unload at any time — E# has implemented AEMs for PMBus automation, MODBUS/CAN/custom buses, SCPI instruments, LED analysers (e.g. FEASA) and temperature chambers.

### APIs

AGENT™ manages the connection as a TCP server accepting many simultaneous clients, so interactive debugging works even while TestStand is attached. The C# API ships for both .NET 4.8 (TestStand/legacy) and .NET 8, with four main categories: value get/set (`GetValues`/`SetValues`, string-based), channel configuration (`ConfigureChannels`), module management (`LoadModule`), and bus transactions (`PerformBusTransaction`, with specific interfaces such as `II2cTransaction`). The Python API is auto-generated from the C# API for consistency.

## Contact

This document and the products described are developed by E-Sharp AB — support@esharp.se.
