Programmable power supply
This page documents the config keys are various other info needed to write a libsigrok frontend for controlling programmable power supplies.
TODO
- Some way to specify fixed values for voltage and current, for devices that have one or more of these fixed in some channels. Two options:
- A boolean key _FIXED, per channel
- A _MIN corresponding to _MAX: When set to the same as _MAX, denotes a fixed setting for that channel. This would also allow negative values, for e.g. a range -5V - 5V
- Over temperature protection: need some examples of whether this is ever something that is gettable/settable, or is only ever a hardware feature.
Notes
It's not unusual for different channels on a device to have different voltage or current limits. Therefore, channels will generally be in a probe group which allows setting these limits.
After setting SR_CONF_CHANNEL_OUTPUT, the limits of these channels may change, and the limits should be queried again.
Config keys
A libsigrok driver for a programmable power supply implements all or some subset of the following config keys.
SR_CONF_POWER_SUPPLY
Denotes a device that provides power output via one or more output channels, typically with voltage and current set via the sigrok driver.
SR_CONF_OUTPUT_VOLTAGE
- double, representing voltage.
- get: The current output voltage. This may not be the same as what was set -- the output may be disabled, or can change depending on the load.
- set: NA
- list: NA
SR_CONF_OUTPUT_VOLTAGE_LIMIT
Controls an output voltage limit that prevents setting a higher output voltage (manually).
- double, representing voltage.
- get: The current maximum output voltage.
- set: The current maximum output voltage.
- list: NA
SR_CONF_OUTPUT_VOLTAGE_MAX
- double, representing voltage.
- get: The previously set maximum output voltage, or device default.
- set: Maximum output voltage.
- list: Supported voltage range as (low, high, step).
SR_CONF_OUTPUT_CURRENT
- double, representing current.
- get: The actual output current. This may not be the same as what was set -- the output may be disabled, or can change depending on the load.
- set: NA
- list: NA
SR_CONF_OUTPUT_CURRENT_LIMIT
Controls an output current limit that prevents setting a higher output current (manually).
- double, representing current.
- get: The current maximum output current.
- set: The current maximum output current.
- list: NA
SR_CONF_OUTPUT_CURRENT_MAX
- double, representing current.
- get: The previously set maximum output current, or device default.
- set: Maximum output current.
- list: Supported current range as (low, high, step).
SR_CONF_OUTPUT_ENABLED
- boolean
- get: actual state of output
- set: turn output on or off
If a channel/probe group cannot be enabled or disabled separately from other channels, setting this key will return SR_ERR_NO. The set should then instead be tried with a NULL probe group, for devices that have only a global setting for this.
SR_CONF_OUTPUT_CHANNEL
If available, this key is used to set the channel output to independent (the default), series, or parallel.
TODO enumeration
SR_CONF_OVER_VOLTAGE_PROTECTION
- boolean
- get: current state of OVP
- set: turn OVP on or off
SR_CONF_OVER_CURRENT_PROTECTION
- boolean
- get: current state of OCP
- set: turn OCP on or off