Graphic User Interface manual

This page acts as the graphic user interface manual and describes how to set up and use the Peta-pico-Voltron hvps-x GUI.

Downloading the graphic user interface & prerequisites

The download page provides the Python source code and a windows executable in separate zip archives. The Python source code can be used on a broad range of platform. We developed the code on a Windows machine, and also tested on OSX 11.7.10. A few hooks were added to iron out a few weird things on OSX, but there might still be some issues. The interface hasn’t been tested on Linux yet. In any case, if you spot a bug, get in touch with us.

The interface is currently not optimised for touch screens and assumes that a keyboard will be available for numerical input (voltage/frequency). If you’d like to use the interface with a touch screen, get in touch and we’ll restore the numerical input keypad (It’s somewhere on the roadmap, but can be pushed forward if there is a need).

Make sure the HV Enable switch (S1) is on position ‘0’. Power the hvps-x with a 13.5V DC power supply and connect the USB cable.

If running the GUI on a Windows  machine, unzip the executable archive and launch the file mainx.exe

For other platforms, install Python 3 (we have tested the GUI with Python 3.9), and then extract the source archive. Open a terminal window in the interface folder and type

python mainx.py

If you have both Python 2 and Python 3 on your machine, you may have to use the command ‘python3’.

Launching the graphic user interface

Once you have launched the executable the program window should open.

  • If you are running from the source code and you are missing some dependencies, a message indicating you don’t have all the required packages appears. The easiest way to install all required packages is to use the command ‘pip install -r requirements.txt’
  • The first time the interface starts, there will be a delay before the windows shows up due to the need to cache some fonts.
  • If the GUI doesn’t detect a hvps-x, an error dialog will appear with a message indicating that the GUI cannot connect to a hvps-x. If a hvps-x is connected and this message appears, it is most likely because you did not configure the hvps-x. Refer to this page to perform the initial configuration.
  • If  the GUI detects more than 1 configured hvps-x, a dialog box with a drop-down list appears with the name of the connected hvps-x select the one you want to use and press OK.
graphic user interface manual: GUI state when HV enable switch is on position 0
Graphic user interface state when HV enable switch is on position 0

When the GUI opens, most of the controls will be greyed out. This is because the high-voltage enable switch (s1) on the board is on position ‘0’. This is a safe position and there cannot be high-voltage at the hvps-x output while the HV enable switch is in that position (refer to the hardware page). The HV enable switch should always be placed on position ‘0’ when the hvps-x is not actively used. They greyed out buttons are a visual indication of the button state and attract the attention of the user that parameter cannot be changed, as the unit is disabled. Switching the onboard HV enable button to position ‘1’ activates the interface.

Using the graphic user interface

graphic user interface: function location
graphic user interface: function location

To take full advantage of the graphic user interface, a good understanding of the hvps-x hardware and related terminology is recommended. Refer to the hardware page for more information.

    1. The switching mode parameter of the hvps-x is split into 2 buttons: a on/off button on the left, and a button on the right that cycles between the other modes. This enables to quickly switch between any active mode and ‘Off’ by toggling the on/off button, rather than having to cycle through every modes. The table below shows what is the effective switching mode as a function of the two button state:
      Left buttonRight buttonEffective switching mode
      OffLowOff
      OffHighOff
      OffSwitchingOff
      OnLowLow
      OnHighHigh
      OnSwitchingSwitching

      In other words, if the left button is ‘Off’, the switching mode is ‘Off”. If it is ‘On’, then the switching mode is whatever is shown on the second button.
    2. The voltage set point can be set using the slider, or by typing a value in the entry box. To validate a new value typed in the entry box, you need to either click outside of the box or press enter.
    3. The frequency of the pulses (only effective when the switching mode is set to ‘switching’) can be set with the slider or via the entry box. By default, the slider enables to set frequency values between 0.1 Hz and 10 Hz, but the entry box accepts the whole frequency range (0.001 Hz to 100 Hz). To validate a new value typed in the entry box, you need to either click outside of the box or press enter.
    4. The duty cycle of the pulses (only only effective when the switching mode is set to ‘switching’) can be set with the slider or via the entry box. When typing values in the entry box, the slider will change as you type (unlike voltage or frequency). Still, to validate a new value typed in the entry box, you need to either click outside of the box or press enter.
    5. This little graph inset shows the profile the output voltage once the output stage is enabled. The separation of the switching mode button in two buttons (see 1 above), makes it possible to prepare the output state of the hvps-x and visualise it before turning the output on. To attract the user’s attention to the fact that the settings from this graphical window are not applied to the output, the string ‘off’ is displayed at the centre of the graph when the switching mode (1) is set to off.
      graphic user interface: visualisation of settings

      The figure above shows a 2000V square signal at 2 Hz with a 10% duty cycle. On the left, the switching mode is ‘off’. The waveform is ready to be generated, but not yet applied to the output, as also shown by the “Off” text at the centre of the graph. On the right, the switching mode is ‘switching’ and the waveform is now applied to the output. The keyword ‘Off’ doesn’t appear on the graph.

    6. Selection of the switching source. Is is important to remember that if this is set to button, the selected switching mode in (1) will only be applied to the output when the on-board button is activated.
    7. Selects whether the high voltage DC-DC converter works in open loop or in closed loop (i.e. regulated). In open loop, the voltage set point doesn’t necessarily correspond to the the output voltage. When the load is small, it will be ~10% higher. Refer to the hardware page for more information.
    8. This is a graph of the hvps-x output. It is is updated every 500ms and the resolution is 10 pts/s (*). Two traces are shown: blue is the output of the DC-DC converter. In regulated mode, it should be equal (minus regulation error) to the voltage set point set in (2). Red is the output of the hvps-x, after the high-voltage switch. (*): see also the Options section for explanations on the trace mode option.
      hvps-x in switching mode
      hvps-x in switching mode

      The image above shows the hvps-x in switching mode with a 3000 V square wave with a 33% duty cycle. The measured output of the DC-DC converter is stable at 3000 V, and the measured output of the hvps-x shows the expected waveform.
      Due to the refresh speed of the display, only square waveforms slower than 0.5 Hz can be captured. Future interface version will provide a trace option to download rapidly sampled voltage values and display them on the graph.

    9. This button enables to check the value of some of the current setting’s parameters and to perform memory operation. Refer to the section below for more information.
    10. This button saves the active settings in memory.
    11. This buttons enables so set some GUI parameters Refer to the options section below for more information.
    12. This buttons disconnect the hvps-x and closes the interface.

GUI configuration

Some of the GUI parameters can be set by editing the file config.ini located in the root folder of the interface. The relevant section for the GUI configuration is the [GUI] section. It is necessary to relaunch the interface after you edit the file.

[GUI]
;minimal value of the frequency scale
fmin=0.1
;maximal value of the frequency slider 
fmax=10
;resolution of the frequency slider 
fres=0.1

;resolution of the voltage slider for the different voltage ratings
vres_6000=50
vres_5000=25
vres_4000=20
vres_3000=10
vres_2000=10
vres_1200=5
vres_500=2

;whether the voltage is set to 0 when leaving the interface. If 0 hvpsx left in current state.
zero=1

;whether the voltage reading graph y scale should be fixed or autoscale
autoscale = 0

;whether to turn trace mode on
trace = 0
;time between trace points in ms
trace_rate = 20
;whether the trace rate is automatically calculated to get 5 waveform period on screen (if 1, the trace_rate parameter is ignored)
auto_trace_rate = 0
  • The first 3 parameters define the bounds of the frequency slider and its incrementation value. You can change it to include the range of frequencies you usually work with.
  • vres_XXXX defines the incrementation of the voltage slider depending on the voltage rating of the hvps-x connected to the interface.
  • zero(*): zero=1: the interface will force the voltage set point to 0 and the switching mode to off when it is launched and closed. If zero=0, the interface will not change the voltage setpoint and switching mode when it is launched.  We recommend to leave zero=1 for increase safety (avoid voltage being present at the output unless manually done through the interface).
  • autoscale(*): if set to 1, the voltage reading graph (8) autoscales its y axis and adapts it to the range of voltage it needs to display. If set to 0, the graph will have a y scale between 0V and the maximal voltage of the hvps-x.
  • trace(*): trace=0 is the normal logging mode of the voltage reading graph (8) with 1 point every 500 ms. trace=1 turns on trace mode, with a used-defined sampling time (see trace mode section below)
  • trace_rate(*): sampling period in ms (only used when trace=1) (and yes, the name of the parameter says rate, but the value is in ms, go figure!)
  • auto_trace_rate(*): if auto_trace_rate=1, the trace_rate_parameter is ignored and automatically calculated based on the switching frequency to display 4 periods of the signal on the screen.

(*) These parameters can be changed in the GUI in the Options dialog box. The values used in the config.ini files are the GUI’s default values at start-up.

Memory operations

We recommend reading the memory & settings page to gain a good understanding on the different types of settings and the different ways to transfer settings from the memory to the RAM to be used by the firmware.

From the graphic user interface, the memory operations are available by pressing the memory button (9)

high voltage power supplies - Memory dialog box
Memory dialog box

The first part of the window shows most (some look-up values are not displayed) parameters from the current settings, which are loaded into RAM when the hvps-x is initialised. It includes functional parameters such as switching mode, voltage set point, and configuration parameters (such as name, maximal voltage, calibration coefficient, etc.).

The second part of the window enable operation on the settings. Choose the operation you want to perform with the checkboxes, and the parameter for each operation using the radio button:

  • Load settings loads either sets of settings (current or backup) from memory to the RAM to be used immediately by the hvps-x
  • Copy memory settings copies one set of settings to the other, overwriting the target. You can copy the current settings to the back-up settings and vice-versa.
  • Dump to file writes either set of settings (or both) into a JSON file. The file will be created in the root directory of the interface and will include the name of the hvps-x, the type of settings, and a time stamp. Loading a file to memory is not yet available via the GUI, but can be done by running the Python library. This provides a few useful scripts, such as loading a file to memory.

Press OK to perform the action selected in the checkbox(es) or cancel to close the Dialog without taking action.

Options

From the graphic user interface, press button (11) to display the options dialog. Closing the dialog box with Ok applies the selecting settings, while closing it with Cancel or the X discards any modification.

Button Configuration section

Defines the behaviour of the on-board button S2 (refer to the hardware page for a detailed explanation of the Latching mode and the Off state). The button configuration is part of the hvps-x settings. Therefore, if you want the button settings to be remembered the next time the hvps-x initialises, use the save button (10) after modifying the parameters in the options dialog.

Graph Configuration section

Graph autoscale defines the scaling behaviour of the the voltage reading graph (8), as described in the GUI configuration section above. If you want this change to be permanent when you close and restart the graphic user interface, edit the config.ini file. Changing the autoscale setting in the dialogue box is active until the interface is closed.

When trace mode is not ticked, the output voltage graph is updated twice per second and displays 10 points/s. This works well to monitor the output when a constant voltage is applied, or for square waves, if the frequency is very slow (<0.5 Hz). However, the refresh rate is not fast enough to display meaningful information for square waves of higher frequencies. This is well visible on the graph below with a 0.5 Hz square waveform correctly displayed on the live graph, but a 5 Hz waveform appearing to be erratic. This is of course not how the output of the hvps-x looks like at 5 Hz, but at this frequency, the refresh rate of the sampling rate of the graph is not fast enough to correctly display the output waveform.

Square waves with a frequency of 0.5Hz (left) and 5Hz (right) displayed on the graph in normal mode (trace option not ticked)
Square waves with a frequency of 0.5Hz (left) and 5Hz (right) displayed on the graph in normal mode (trace option not ticked)

When trace mode is ticked, this activates trace mode. In this mode, the hvps-x records the output voltage in an internal 100-point buffer with a sampling period defined by the user and once the buffer is full (but a most twice per second), the buffer is transmitted to the GUI and displayed at once on the graph. The minimum sampling period is 2 ms (sampling frequency of 500 Hz), which is much faster than the normal logging mode and hence makes it possible to capture faster changing signals. The disadvantage is that instead of having a graph that is continuously updated, with the older data disappearing on the left and the new data appearing on the right, the graph is updated by burst once the 100-buffer is full. The image below shows the same 5Hz signal as in the previous figure, but displayed in burst mode:

5Hz signal displayed in burst mode
5Hz signal displayed in burst mode

When trace mode is ticked, two other options are available (they are ignored when trace mode is not ticked):

  • sampling period: the time between sampling points in ms (integer values). The minimum is 2. As the buffer contains 100 points the graph refreshes every 100 x sampling period (i.e. if sampling period is 20 ms, the graph will refresh every 2 s). There is a minimum refresh time of 500 ms, which means that for sampling periods between 2 and 5, the refresh rate is 500 ms.
  • Auto period: If this is ticked, the sampling period parameter above is ignored and is calculated by the hvps-x automatically based on the frequency of the signal to display 4 periods of the signals on screen. Two things worth noting:
    • If auto period is used with a very slow frequency signal, it will take a very long time to fill the buffer and refresh the graph. Trace mode is more useful for faster signal >1Hz.
    • If the hvps-x is producing a DC voltage (e.g. output is HIGH), there is still a value in the box frequency, and this value is used to calculate the refresh rate.

Keyboard shortcuts

keyboard shortcuts for the hvps-x GUI
keyboard shortcuts for the hvps-x GUI

The image above shows the keyboard shortcuts of the graphic user interface. Additional shortcuts will be added in a future version.

  • <shift>: toggle the switching mode on/off.
  • o: open the options/settings dialogue box
  • q: quit
  • s: change the switching mode
Scroll to top