Difference between revisions of "Programmable power supply"

From sigrok
Jump to navigation Jump to search
(Removed ...LIMIT config keys again, not required currently.)
(Update all keys)
Line 6: Line 6:
** A boolean key _FIXED, per channel
** 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
** 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.
* 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 ==
== 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.
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.
After setting SR_CONF_CHANNEL_CONFIG, the limits of these channels may change, and the limits should be queried again.


== Config keys ==
== Config keys ==
Line 20: Line 22:
Denotes a device that provides power output via one or more output channels, typically with voltage and current set via the sigrok driver.
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 ===
=== SR_CONF_VOLTAGE ===


* double, representing voltage.
* double, representing voltage.
Line 27: Line 29:
* list: NA
* list: NA


=== SR_CONF_OUTPUT_VOLTAGE_MAX ===
=== SR_CONF_VOLTAGE_TARGET ===


* double, representing voltage.
* double, representing voltage.
* get: The previously set maximum output voltage, or device default.
* get: The previously set target output voltage, or device default.
* set: Maximum output voltage.
* set: Set the target output voltage.
* list: Supported voltage range as (low, high, step).
* list: Supported voltage range as (low, high, step).


=== SR_CONF_OUTPUT_CURRENT ===
=== SR_CONF_CURRENT ===


* double, representing current.
* double, representing current.
Line 41: Line 43:
* list: NA
* list: NA


=== SR_CONF_OUTPUT_CURRENT_MAX ===
=== SR_CONF_CURRENT_LIMIT  ===


* double, representing current.
* double, representing current.
* get: The previously set maximum output current, or device default.
* get: The previously set output current limit, or device default.
* set: Maximum output current.
* set: Set the output current limit.
* list: Supported current range as (low, high, step).
* list: Supported current range as (low, high, step).


=== SR_CONF_OUTPUT_ENABLED ===
=== 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
* boolean
* get: actual state of output
* get: Actual state of output
* set: turn output on or off
* 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.
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 ===
=== 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!)


If available, this key is used to set the channel output to independent (the default), series, or parallel.
=== SR_CONF_OVER_CURRENT_PROTECTION_ENABLED ===


TODO enumeration
* boolean
* get: TRUE, when the over current protection is enabled.
* set: Enable/disable over current protection.
* list: NA


=== SR_CONF_OVER_VOLTAGE_PROTECTION ===
=== SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE ===


* boolean
* boolean
* get: current state of OVP
* get: TRUE, when the over current protection threshold was reached.
* set: turn OVP on or off
* 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_CURRENT_PROTECTION ===
=== SR_CONF_OVER_TEMPERATURE_PROTECTION ===


* boolean
* boolean
* get: current state of OCP
* get: TRUE, when the over temperature protection is enabled.
* set: turn OCP on or off
* set: Enable/disable over temperature protection.
* list: NA


[[Category:Power supply]]
[[Category:Power supply]]
[[Category:Developer documentation]]
[[Category:Developer documentation]]
[[Category:Configuration keys]]
[[Category:Configuration keys]]

Revision as of 16:14, 18 October 2017

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