> ## Documentation Index
> Fetch the complete documentation index at: https://instro.nominal.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Power Supply (PSU)

> Using InstroPSU for SCPI-based programmable power supplies

`InstroPSU` provides a unified interface for programmable power supplies. This class is initialized with a vendor-specific driver (`BK9115`, `KeysightE36100`, `RigolDP800`, …), and provides the vendor-agnostic API (`set_voltage`, `get_voltage`, `output_enable`, …).

## Creating an InstroPSU

```python theme={null}
from instro.psu.drivers import SiglentSPD3303
from instro.psu import InstroPSU

psu = InstroPSU(
    name="myPSU",
    driver=SiglentSPD3303(visa_resource="USB0::0xF4EC::0x1430::SPD3XJGQ806726::INSTR"),
    num_channels=2,
)
```

## Supported Vendors

<Columns cols={2}>
  <Card title="B&K Precision 9115" horizontal href="/psu/BK9115">
    <img src="https://mintcdn.com/nominal/vd1fIohbHX0IE-nH/snippets/drivers/psu/bk-precision-9115/image.png?fit=max&auto=format&n=vd1fIohbHX0IE-nH&q=85&s=df21c2ca89040eb101a2c9a1dbd17942" style={{ width: "100%", height: "100px", objectFit: "contain" }} noZoom alt="B&K Precision 9115" width="987" height="108" data-path="snippets/drivers/psu/bk-precision-9115/image.png" />
  </Card>

  <Card title="B&K Precision 914x" horizontal href="/psu/BK914X">
    <img src="https://mintcdn.com/nominal/vd1fIohbHX0IE-nH/snippets/drivers/psu/bk-precision-914x/image.png?fit=max&auto=format&n=vd1fIohbHX0IE-nH&q=85&s=dde6f073b6fc2f2d4ba75b3d8ae9b236" style={{ width: "100%", height: "100px", objectFit: "contain" }} noZoom alt="B&K Precision 914x" width="500" height="235" data-path="snippets/drivers/psu/bk-precision-914x/image.png" />
  </Card>

  <Card title="Keysight E36100" horizontal href="/psu/KeysightE36100">
    <img src="https://mintcdn.com/nominal/vd1fIohbHX0IE-nH/snippets/drivers/psu/keysight-e36100/image.png?fit=max&auto=format&n=vd1fIohbHX0IE-nH&q=85&s=f6a46b7cde84f663a03b4ae936197efc" style={{ width: "100%", height: "100px", objectFit: "contain" }} noZoom alt="Keysight E36100" width="992" height="896" data-path="snippets/drivers/psu/keysight-e36100/image.png" />
  </Card>

  <Card title="Rigol DP800" horizontal href="/psu/RigolDP800">
    <img src="https://mintcdn.com/nominal/vd1fIohbHX0IE-nH/snippets/drivers/psu/rigol-dp800/image.png?fit=max&auto=format&n=vd1fIohbHX0IE-nH&q=85&s=fe866f8806b11ca71cd095948e64404e" style={{ width: "100%", height: "100px", objectFit: "contain" }} noZoom alt="Rigol DP800" width="500" height="328" data-path="snippets/drivers/psu/rigol-dp800/image.png" />
  </Card>

  <Card title="Siglent SPD3303" horizontal href="/psu/SiglentSPD3303">
    <img src="https://mintcdn.com/nominal/vd1fIohbHX0IE-nH/snippets/drivers/psu/siglent-spd3303/image.png?fit=max&auto=format&n=vd1fIohbHX0IE-nH&q=85&s=6b6dadc9b293973cf9f34f8d73ed75bd" style={{ width: "100%", height: "100px", objectFit: "contain" }} noZoom alt="Siglent SPD3303" width="472" height="300" data-path="snippets/drivers/psu/siglent-spd3303/image.png" />
  </Card>

  <Card title="TDK Lambda Genesys" horizontal href="/psu/TDKLambdaGenesys">
    <img src="https://mintcdn.com/nominal/vd1fIohbHX0IE-nH/snippets/drivers/psu/tdk-lambda-genesys/image.png?fit=max&auto=format&n=vd1fIohbHX0IE-nH&q=85&s=d36dcf467bf1b555341bf53ce84d0004" style={{ width: "100%", height: "100px", objectFit: "contain" }} noZoom alt="TDK Lambda Genesys" width="500" height="374" data-path="snippets/drivers/psu/tdk-lambda-genesys/image.png" />
  </Card>
</Columns>

The following vendor is available as a community-contributed driver in `instro-contrib` (install with `instro[contrib]`; see [Contrib drivers](/library/contrib)):

* **Matrix**: WPS300S-series single-channel via SCPI/RS-232 (`MatrixWPS300S`)

If your vendor or model is not listed, see [Custom Driver Development](/library/custom-instruments#power-supply-psu), or open a [Driver Request](https://github.com/nominal-io/instro/issues) issue on GitHub.

## Example

More examples found in [Examples](examples/psu/index)

## Details

The following presents details about the `InstroPSU`. Specific driver details can be found on [their pages](#supported-vendors).

### Driver Composition

An `InstroPSU` is built from a concrete driver:

```
InstroPSU("name", driver=BK9115(visa_resource="USB0::..."), num_channels=1)
```

* The **vendor driver** (e.g. `BK9115`) owns the connection setup and vendor-specific command mapping.
* **`InstroPSU`** owns the category-level workflow: measurements, commands, publishers, the background daemon.

### Lifecycle

The typical InstroPSU workflow:

1. **Construct**: instantiate the vendor driver and pass it to `InstroPSU`.
2. **`open()`**: establishes the VISA connection.
3. **Configure and measure**: set voltage/current limits, enable outputs, read measurements.
4. **`start()`**: begins a periodic background daemon. (Optional)
5. **`stop()`**: ends the background daemon (if started).
6. **`close()`**: disconnects from hardware.

### Init from a Config File

`InstroPSU` can also be constructed directly from a JSON config file, which removes the need to write any Python setup code:

```python theme={null}
from instro.psu import InstroPSU

psu = InstroPSU(config="bench_psu.json")
```

Where `bench_psu.json` contains:

```json theme={null}
{
  "version": 1,
  "instrument": "InstroPSU",
  "device": {
    "name": "bench_psu",
    "description": "Bench channel 1 supply",
    "manufacturer": "B&K Precision",
    "model": "9115"
  },
  "driver": {
    "name": "BK9115",
    "num_channels": 1,
    "connection_type": "visa",
    "visa": {
      "visa_resource": "USB0::0x2A8D::0x0101::MY12345::INSTR"
    }
  },
  "timing": {
    "poll_interval": 1.0
  },
  "publishers": [
    {
      "type": "NominalCorePublisher",
      "dataset_rid": "<dataset_rid>"
    }
  ]
}
```

See [Config Files](/library/config-files) for the full field reference.

### Simulated Power Supply

For development and testing without physical hardware, Nominal Instrumentation includes a local SCPI power-supply simulator. See [PSU simulator](/library/simulated-instruments#psu-simulator) for the quickstart, usage notes, and supported command set.

## Custom Driver Development

For more information on writing a custom driver, see [Custom Driver Development](/library/custom-instruments#power-supply-psu).
