Additional Features
These features require at least ARDI v0.3.4
System States
At any point in time the power supply is in one of 5 states which govern it’s behavior. To read the current state of the device, we can use the command:
psu.state()
This function will return a string indicating the current state of the system. The possible states are:
STANDBY
: The high voltage rail is off.AUTOCAL
: The system is in the process of calibrating. This state should only last a fraction of a second.ARMED
: The high voltage rail is on, but the outputs are disabled and the system is waiting for a trigger.ACTIVE
: The high voltage rail is on, the outputs are enabled, and the system is playing waveforms.PANIC
: The system has detected a fault and has disabled the high voltage rail and all outputs.
NEVER CONNECT LOADS WHILE HV IS ON.
The only state in which it is safe to connect or disconnect loads is STANDBY
.
This means that the HV switch is shut off and only the green HV OFF indicator is illuminated.
Normal Operation
The power supply starts in the STANDBY
state on startup. Upon enabling the HV switch, the power supply briefly enters the AUTOCAL
state to calibrate controllers for each channel. The default behavior of the power supply is then to immediately enter the ACTIVE
state upon completing the autocalibration process.
It is possible to configure and use an external trigger to control the power supply. This behavior makes use of the ARMED
state and is disabled by default. For more information, please see below.
Turning off the HV switch always disables the HV rail, returns the power supply to the STANDBY
state, and clears all waveforms from memory, regardless of whether or not a trigger is configured or used. Turning off the HV switch also clears panic mode, which is represented by the PANIC
state.
External Trigger
Trigger Configuration
All of our power supplies support control via a software trigger. To enable the software trigger, run the following command:
psu.set_trigger('sw')
Furthermore, some of our power supplies come with an optional trigger port, enabling control of the power suppply from an external 3.3V digital signal. To enable the external hardware trigger, run the following command:
psu.set_trigger('hw')
Please note that only one trigger mode can be enabled at a time. Enabling the hardware trigger will disable the software trigger, and vice versa.
Armed State
Once a trigger has been configured, after turning on the high voltage switch, the power supply will not go into the regular ACTIVE
state. Instead, the power supply will enter an ARMED
state, and then defer to the external trigger for control. The ARMED
state is indicated with the green LED off, and the red HV ON LED pulsing. In this state, the HV rail is active, but all outputs are disabled.
DO NOT CONNECT LOADS WHILE IN THE ARMED
STATE.
The HV rail remains active when ARMED
.
Turn off the HV switch before changing any connections.
Trigger Operation
Upon activating the trigger, the power supply will enter the ACTIVE
state and start running all programmed waveforms. As always, this state is indicated by a solid red HV ON LED. A hardware trigger is activated by a 3.3V digital HIGH signal. A software trigger is activated by the command:
psu.start()
The power supply will remain in the ACTIVE
state and continue playing waveforms in a loop as long as the trigger remains active. To disable a hardware trigger, pull the trigger signal LOW. To disable a software trigger, run the following command:
psu.stop()
Deactivating the trigger will disable all outputs and return the power supply to the ‘ARMED’ state. Unlike switching off the HV, this will not clear any waveforms from memory. Subsequently reactivating the trigger will restart all programmed waveforms from the beginning.
One-Shot Waveforms
Please note that programmed waveforms repeat indefinitely. For some applications, we may wish to play a waveform exactly once and then disable the output. To facilitate this, we would suggest padding the end of any programmed waveform with several milliseconds of zero to give time for the trigger to be deactivated before the waveform repeats.
Disabling the Trigger
The trigger functionality and ARMED
state are disabled on power-up, and must be re-configured after each power cycle. Once configured, the trigger will persist until the next power cycle. The trigger may also be disabled with the following command:
psu.set_trigger('none')
Test Automation
For test automation, the following code snippet may prove useful:
import ardi
# 1. connect device
psu = ardi.autoconnect()
# 2. define channels
n_chnls = 8
chnls = [psu.channels[f'ch{i+1}'] for i in range(n_chnls)]
# 3. set device settings
psu.use_trigger('sw') # enable software trigger
# 4. enable HV and autocal
print('Please connect actuators and turn on HV...')
while psu.state() != 'ARMED':
sleep(0.1) # wait for user to turn on HV
print('Autocal complete. Device is ready.')
# 5. program waveforms here
# ...
# 6. start the device via command
print('HV is on, starting test')
psu.start()
# 7. wait for test to complete
# ...
# 8. stop the device via command
psu.stop()
# repeat 5-8 as needed
# disable HV switch when done
Lifetime Testing
Panic mode is normally triggered when any output is shorted. When testing multiple actuators for lifetime (until failure), it may be useful to continue running the other outputs when one faults. It is therefore possible to disable channel faults causing panic mode. Such faults are still detected, but the faulted channel will simply be disabled and the power supply will continue to operate.
Unless disabled, this setting will persist until the next power cycle. Please use it with caution.
This functionality is enabled using the command:
psu.panic_on_fault(False)
and can be disabled (returning the device to normal behavior) with:
psu.panic_on_fault(True)
The state of a particular channel can be read with the following command:
ch1.ask('hasel_ok')