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. 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 assume that a keyboard will be available. 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 12V 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


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

      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 a 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.
      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.

;minimal value of the frequency scale
;maximal value of the frequency slider 
;resolution of the frequency slider 

;resolution of the voltage slider for the different voltage ratings

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

;whether the voltage reading graph y scale should be fixed or autoscale
autoscale = 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) will autoscale its y axes and adapt 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.

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.


From the graphic user interface, press button (11) to display the options dialog.

The option dialog box enables to define the behaviour of the on-board button S2 (refer to the hardware page). The button configuration is part of the hvps-x settings. Therefore, if you want the settings to be kept the next time the hvps-x initialises, use the save button (10) after modifying the parameters in the options dialog.

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.

Keyboard shortcuts

Keyboard shortcuts of the graphic user interface
Keyboard shortcuts of the graphic user interface

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

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