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
- TODO: This is no longer a problem?
- Over temperature protection: need some examples of whether this is ever something that is gettable/settable, or is only ever a hardware feature.
- Seems like the Rigol DP800 driver implemented this as a gettable/settable 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_CONFIG, 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_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_VOLTAGE_TARGET
- double, representing voltage.
- get: The previously set target output voltage, or device default.
- set: Set the target output voltage.
- list: Supported voltage range as (low, high, step).
SR_CONF_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_CURRENT_LIMIT
- double, representing current.
- get: The previously set output current limit, or device default.
- set: Set the output current limit.
- list: Supported current range as (low, high, step).
SR_CONF_OUTPUT_FREQUENCY
- double, representing frequency.
- get: The actual output frequency for AC power supplies. 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_FREQUENCY_TARGET
- double, representing frequency.
- get: The previously set output frequency, or device default.
- set: Set the output frequency.
- list: Supported frequency range as (low, high, step).
SR_CONF_ENABLED
- boolean
- get: Actual state of output
- set: Turn output on or off
- list: NA
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_CHANNEL_CONFIG
- string (e.g. "Independent", "Series", "Parallel", "Track1", "Track2")
- get: The channel output mode (e.g. independent, series or parallel)
- set: Set the channel output to independent (the default), series, or parallel.
- list: Supported channel modes.
SR_CONF_REGULATION
- string ("CV", "CC", "UR")
- get: The actual output regulation, e.g. constant current or constant voltage
- set: NA
- list: NA
SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED
- boolean
- get: TRUE, when the over voltage protection is enabled.
- set: Enable/disable over voltage protection.
- list: NA
SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE
- boolean
- get: TRUE, when the over voltage protection threshold was reached.
- set: NA
- list: NA
SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD
- double, representing voltage.
- get: Actual over voltage protection threshold.
- set: Set over voltage protection threshold.
- list: Supported voltage threshold range as (low, high, step). (TODO: Implement!)
SR_CONF_OVER_CURRENT_PROTECTION_ENABLED
- boolean
- get: TRUE, when the over current protection is enabled.
- set: Enable/disable over current protection.
- list: NA
SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE
- boolean
- get: TRUE, when the over current protection threshold was reached.
- set: NA
- list: NA
SR_CONF_OVER_CURRENT_PROTECTION_THRESHOLD
- double, representing current.
- get: Actual over current protection threshold.
- set: Set over current protection threshold.
- list: Supported current threshold range as (low, high, step). (TODO: Implement!)
SR_CONF_OVER_TEMPERATURE_PROTECTION
- boolean
- get: TRUE, when the over temperature protection is enabled.
- set: Enable/disable over temperature protection.
- list: NA