The GUI interfaces with the firmware through the communications interface for control and monitoring of the system.
main dialogue window shows the temperature and the estimated State of
Charge (SoC) of each of the batteries. Underneath each display is a set
of battery status indicators described later. Note that the SoC
measures are estimated from current flows and open circuit voltages of
the batteries, and will lack accuracy.
currents and voltages are shown for batteries, loads and the solar
panel. Checkboxes can be used to turn off the display for each of these
(which will also disconnect the loads and panel). A 3x3 matrix shows
the connections between the batteries, loads and panel.
user is able to set the loads and panel manually to connect to any
selected battery. Alternatively the settings can be made automatically
according to the battery monitoring algorithm.
Battery status indicators from left to right are:
If the battery SoC is less than 100% when the battery enters float
charge state, then the indicator is set to signal a possible battery
failure. This setting also indicates if a battery has been detected as
- Charge fill state. Green means more than 60% SoC, orange is less than 60% and red if the battery falls to critical, below 40%.
- Charging state. This is orange for bulk phase, yellow for absorption phase and green for float phase.
- Operational state. This shows I for isolated, L for loaded and C for charging. This is only valid for automated tracking.
pink buttons labelled 'R' are used to reset manually the State of
Charge from the current battery voltage. This will only be accurate if
the battery has been idle over a day or so.
each interface there is a button for overload and an indicator for low
voltage. The button can be used to reset the overload signal.
The buttons provide the following features:
- Monitor. This calls up a secondary window in which a graphical plot of evolving voltages and currents are shown.
- Record. Control and display of data recording on the system hardware.
- Open File. Initiation of recording of all messages received locally at the GUI.
- Close File.
This allows the use of communications via USB or TCP/IP where this is
available at the system hardware. The program should be able to detect
which serial ports are available. This may vary if there is more than
one Serial-USB adapter present. TCP/IP is at present only available after changing a compile option in power-management.h and recompiling.
monitor window uses the QWT library to generate real-time plots in
which the evolution of currents and voltages may be observed. Slider
controls are provided to offset and magnify the plots. Data is
collected for all variables so the history of any variable may be
observed starting at the time the window was opened.
recording window allows the user to create and close a file for
recording, start and stop recording, and delete files. Space available
on the medium and a directory loisting is also shown. The remount
button allows the medium to be mounted in the event that it is not
recognised by the system, usually after a new medium has been inserted.
of controls for opening a local file and downloading to the PC from the
system is available but has not yet been implemented (although the
commands needed are available in the firmware). The files tend to be
large and the process can take a long time over a serial link.
are four tabs for configuration. The first tab shows the current time
and provides a button for setting this from the PC. The checkboxes turn
on messaging for normal operation and debug messages. These are
obviously for debug purposes only. Similarly the echo test causes a
simple message to be sent for verifying the communications link.
second tab provides for configuration of the batteries. The top row
shows the estimated incremental battery resistance which ideally should
be in the range shown. If it is much higher than this then the battery
may be faulty or have very low charge state. This normally is queried
when the window is opened, but can be queried using the button. The
second row shows the battery capacity and the battery type. These are
set by the user. The set button will cause these to be written to FLASH
on the system so that they are preserved through a reset. Under that
are the various (temperature dependent) charge parameters and limits that are being used.
current limit is the maximum current allowed in bulk charge phase. This
is used to ensure charging efficiency is not too low.
voltage limit is the voltage above which overcharge occurs and is used
to enter absorption phase and start reducing the current.
- Float voltage is the voltage limit in float phase.
- Float current trigger is the current below which float phase is entered.
three buttons at the bottom allow the battery to be marked as missing
or present. A missing battery is not detected by the system if the
loads are connected, nor is a newly inserted battery detected.
The third tab is a calibration of the zero point for currents.
This requires the loads to be disconnected and the solar panel to be
producing power but not linked to a battery. The term quiescent current
is not strictly correct. It is the average of the zero points of all
the interfaces and will include circuit element errors as well as the
quiescent current. The main window should then show all interfaces have
a current very close to zero with (usually) one battery having a
current for the electronics, typically 0.15A. Sometimes this is shared
by two batteries whose terminal voltages are very close.
The fourth tab contains several advanced options for charging and monitoring, as explained on the tab.
Finally the fifth tab has options for the charging algorithm.
- The rest phase for this algorithm is given a minimum time to allow batteries to recover between bulk charge phases.
all batteries are in rest phase, one is passed to absorption phase to
maintain the charging efficiency. This remains for a minimum time
before changing to another battery waiting to be charged.
- Minimum duty cycle ensures that the charging duty cycle doesn't collapse to zero.
- If a battery doesn't enter float phase after the preset "Time to Float" time, it is forced into float phase.
- A battery remains in float phase until the SoC has dropped below a preset value.
To install the GUI, unzip the source code from GitHub into a directory. Make
sure that the QT5 tools are installed (from the Ubuntu repository: qt5-default, libqt5serialport5,
libqt5serialport5-dev, libqt5svg5, libqt5svg5-dev, qt5-qmake), and also g++. These should
be readily available for most distros. Also
needed is qwt-6.3.1 or later which may need to be downloaded and compiled
according to instructions on the Qwt site. This requires (for Ubuntu) libqt5designer5 and qttools5-dev. Some configuration files may need to be changed to reflect the user's installation.
Go into the power-management-gui directory and execute:
will build the application.
Copy the binary to a suitable place and test with:
Note that it should
not require root privileges. If it fails to run and gives an error
message, check that the serial link is working and is configured with the user added to the dialout group.