Programmable power supply

From sigrok
Revision as of 23:22, 4 January 2014 by Bert (talk | contribs)
Jump to navigation Jump to search

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_VOLTAGE_OUTPUT

  • double representing voltage
  • get: actual 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: target output voltage
  • list: voltage range as (low, high, step)

SR_CONF_CURRENT_OUTPUT

  • double representing current
  • get: 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: target output current
  • list: voltage 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_CHANNEL_OUTPUT

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

TODO

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