Git Product home page Git Product logo

psu-firmware's Introduction

GitHub release license

Ownership and License

The contributors are listed in CONTRIB.TXT. This project uses the GPL v3 license, see LICENSE.TXT. EEZ psu-firmware uses the C4.1 (Collective Code Construction Contract) process for contributions. To report an issue, use the EEZ psu-firmware issue tracker.

If you consider to join us in software development please check first if anything from this list you found interesting.

Introduction

This project has Arduino/Genuino sketch for Mega2560 (8-bit, AVR) (not supported in M3 and newer releases!) and Due (32-bit, ARM) boards and accompanying libraries for the open hardware EEZ H24005 power supply firmware.

The unique feature of this project is a fully featured software simulator that can be used to evaluate all firmware features without having physical power supply on disposal. The simulator can be complied to run on major platforms such as Windows, Linux or Mac. It shares all the code with the Arduino Sketch plus emulation layer for the Arduino API, Ethernet library and digital controls used for programming and monitoring power supply.

Main page

Firmware key features:

  • SCPI 1999.0 command set for remote control over Serial (via USB) and TCP
  • Multiple Power channels profiles
  • Voltage, current and power settings and continous monitoring
  • Voltage and current calibration
  • Tracking and coupling (series, parallel) mode
  • Programming lists of voltage, current and dwell time
  • Incremental encoder
  • Multiple input modes using touchscreen (keypad, step, slider)
  • Multiple presentation modes (numeric, bar graphs, YT view)
  • Various protection mechanisms: OVP (Over Voltage Protection), OCP (Over Current Protection), OPP (Over Power Protection) and OTP (Over Temperature Protection)
  • System date and time (RTC, NTP)
  • EEPROM based storage for device configuration, calibration parameters and 10 user profiles
  • Local GUI control using TFT touch display
  • SD card support

Installation

Arduino Sketch

We recommend Arduino IDE version 1.6.x or newer to compile and deploy Arduino sketch to the EEZ bench power supply.

  1. Download zip archive from the github repository.
  2. Copy folders eez_psu_sketch and libraries from the zip archive into Arduino folder on your computer. Arduino folder is e.g. My Documents\Arduino on Windows or Documents/Arduino on Linux and Mac.
  3. Download Ethernet2 library from here and copy it to the libraries folder.
  4. Download SdFat library from here and copy it to the libraries folder.
  5. Open eez_psu_sketch.ino in Arduino IDE.
  6. Go to Tools->Board and select Arduino Due (Native USB Port). If Arduino Due (Native USB Port) is not present in the list of boards then go to Tools->Board->Boards Manager and click on Arduino SAM Boards then click on the Install button. When install is done close the Board Manager then go to Tools->Board and select Arduino Due (Native USB Port).
  7. Plug a USB cable between the PSU and your PC then go to Tools->Port and select the COM port for your PSU.
  8. Check if everything is correct with Verify button.
  9. Make sure that Verify after code upload option is not set (more details here) in File... Preferences and upload the sketch using Upload button.
  10. Remote control can be accessed via Telnet client such as putty (connection type: raw, port: 5025) or serial client that comes with Arduino IDE or any other you like.

Simulator

Simulator GUI Front Panel

Here we will explain how to build simulator from source code on Windows, Linux and Mac.

If you are on Windows, there is a pre-build version:

Download Simulator for Windows

After you build and run simulator, a mouse is used as simulation of finger on the TFT touchscreen display.

Console window can be used to enter SCPI commands SCPI reference manual. SCPI commands can be also send by starting a telnet session to the port 5025:

telnet localhost 5025

Windows

To build simulator from the source code you need Visual Studio 2015. You can use Community Edition which is a free version of Visual Studio 2015. Visual Studio solution for the simulator is in simulator\\platform\\Win32\\eez_psu_sim.sln. Open solution then build and execute simulator with F5.

Linux

Here are the steps to build simulator on Linux:

sudo apt-get install -y git libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev
git clone https://github.com/eez-open/psu-firmware
cd psu-firmware/simulator/platform/linux/
make

Start simulator with:

./eez_psu_sim

Just as in case of Arduino sketch mentioned above that runs on real hardware you can access simulator using telnet client (use localhost or 127.0.0.1 for connection).

Mac

Mac users will require Brew for building. If you don't have it you can download and install it from here.

Here are the steps to build simulator on Mac:

brew install sdl2 sdl2_image sdl2_ttf
git clone https://github.com/eez-open/psu-firmware
cd psu-firmware/simulator/platform/linux/
make

Start simulator with:

./eez_psu_sim

Just as in case of Arduino sketch mentioned above that runs on real hardware you can access simulator using telnet client (use localhost or 127.0.0.1 for connection).

Guide to the source code

Architecture

EEZ bench power supply sketch source code can be divided into following layers:

  • Board

    Talks directly to the hardware, i.e. Arduino Shield +BP module (EEPROM, RTC, Ethernet, TLC5925) and post-regulators (ADC, DAC, IO Expander). Part of this layer is eez_psu_lib, a small Arduino library with definition of all pins used by EEZ bench power supply. This layer depends on Arduino platform API and third party UIPEthernet library.

  • Core

    Implementation of EEZ bench power supply firmware functionality, for example Channel abstraction. It doesn't work directly with the hardware but uses the board layer, so it doesn't depends on Arduino platform API.

  • Control

    This layer is using Core layer to implement local and remote control.

    Local control is GUI based using TFT touch display. Special tool was developed to assist creation of GUI interface. This layer depends on third party library (UTFT_Pro derived from Rinky-Dink Electronics UTFT) that we use to draw graphical primitives.

    Remote control is based on SCPI protocol. Check SCPI reference manual for available commands. This layer depends on third party scpi-parser library.

Additionally, simulator introduces two additional layers:

  • Simulator Emulation Layer

    This layer is simulator's replacement for the Arduino platform and consists of:

    • Arduino platform API emulation.
    • SPI peripherals emulation.
    • UIPEthernet library emulation.
  • GUI Front Panel

Communication between layers is unidirectional with some exceptions:

  • Ethernet and Serial to SCPI.

    This is used to feed SCPI with the input received on serial and TCP port.

  • IO Expander to Core.

    IO Expander interrupt handler sends GPIO register and ADC snapshot to the Core layer.

Architecture

Board Layer

Here are the components of the board layer (all the files are in eez_psu_sketch folder):

  • Arduino shield
    • Board (board.cpp and board.h)
      • Post-regulator (power channel) power up and down
      • LED's: CV and CC
    • BP (bp.cpp and bp.h)
      • LED's: standby, output and sense
    • Buzzer (buzzer.cpp and buzzer.h)
      • sound tone(frequency, duration) function
    • EEPROM (eeprom.cpp and eeprom.h)
      • read and write
    • Ethernet (ethernet.cpp and ethernet.h)
    • RTC (rtc.cpp and rtc.h)
      • system date and time
    • Serial (serial_psu.cpp and serial_psu.h)
      • SCPI over Serial
      • Debug output
    • Temp. sensors (temp_sensor.cpp and temp_sensor.h)
      • MAIN temp. sensor read over analog pin
    • FAN control
  • Post-regulator (power supply channel)
    • ADC (adc.cpp and adc.h)
      • Channel's ADC
    • DAC (dac.cpp and dac.h)
      • Channel's DAC
    • IOExp (ioexp.cpp and ioexp.h)
      • ADC interrupt
      • DP (down-programmer) disable
      • CC (Constant current) and CV (Constant voltage)
      • PWRGOOD
      • OE (output enable)

Arduino library eez_psu_lib is also a part of the board layer and it is located in libraries\eez_psu_lib folder.

Core Layer

Here are some components of the core layer (all the files are in eez_psu_sketch folder):

  • PSU (psu.cpp and psu.h)
    • power up
    • power down (stand-by mode)
    • reset
    • test
    • Update device related SCPI registers
  • Channel (channel.cpp and channel.h)
    • set voltage and current
    • measure voltage and current
    • apply calibration parameters
    • output enable/disable
    • remote sensing enable/disable
    • DP enable/disable
    • OVP, OCP and OPP
    • Update channel related SCPI registers
  • Calibration (calibration.cpp and calibration.h)
    • Calibration procedure
  • Profile (profile.cpp and profile.h)
    • Save
    • Recall
  • Temperature (temperature.cpp and temperature.h)
    • OTP
    • Measurement
  • Date and time (datetime.cpp and datetime.h)
    • Set system datetime
    • Check the validity of datetime
    • Store datetime persistently in EEPROM
  • Debug (debug.cpp and debug.h)
    • Debugging helper functions
  • Util (util.cpp and util.h)
    • Miscellaneous functions
  • Sound (sound.cpp and sound.h)
    • Beep
    • Power up and power down (stand-by) tunes
  • Persistent configuration (persist_conf.cpp and persist_conf.h)
    • Store/restore persistent configuration

Control Layer

Local control: TFT touch GUI

Implementation of the GUI is based on MVC (Model View Controller) architecture.

In MVC architecture, Model is where all the data that is displayed on the screen comes from and our Model is implemented in the Core layer.

View defines how everything looks on the screen. In our case, View is defined declaratively and definitions are created with the special tool we call EEZ Studio (it is not public yet!).

EEZ Studio

This tool creates JSON based eez-project file which contains definitions of GUI pages, styles, bitmaps and fonts along with data and action definitions. JSON file is then compiled to C++ source code files (gui_document.cpp, gui_document.h, actions.cpp and actions.h) that are included as an integral part of the sketch.

Controller is the glue code between Model and View. It is implemented in the all the files that start with "gui_" prefix.

Also, there is some utility code that is used, for example, to interact with the hardware:

  • lcd.cpp, lcd.h and UTFT_Pro is used to draw graphical primitives on the screen.
  • touch.cpp and touch.h is used to get data from the touch hardware. Input from the touch hardware is filtered using touch_filter.cpp and touch_filter.h - check this and this video.
  • font.cpp and font.h is used to to access font definitions created with EEZ Studio.

Remote control: SCPI

We are using third party SCPI parser and have our own branch where command definitions could be in AVR PROGMEM that helps preserve some memory space when Arduino Mega board is used (check avr_progmem branch).

There are two entry points for the SCPI commands: serial port and TCP server. Check serial_psu.cpp and serial_psu.h to see how SCPI commands are received on serial port, and ethernet.cpp and ethernet.h for the TCP server.

Files scpi_psu.cpp and scpi_psu.h are about SCPI parser initialization and input handling. Also, here is defined the scpi_psu_t structure for storing SCPI parser context data specific to EEZ bench power supply.

Parameter types that are repeatedly used in multiple commands (like channel number) are handled in scpi_params.cpp and scpi_params.h.

Registers are set/get in scpi_params.cpp and scpi_params.h.

All other files that starts with scpi_ in eez_psu_sketch/ directory are about implementing various SCPI commands. Every SCPI subsystem (like APPLy, SOURce, MEASure, SYSTem, etc.) has its own pair of scpi_.cpp and scpi_.h files.

Simulator Emulation Layer

Arduino API Emulation

We emulate only what we use:

  • pinMode, digitalRead, digitalWrite, analogRead, analogWrite
  • digitalPinToInterrupt, attachInterrupt
  • tone
  • millis, micros, delay, delayMicroseconds
  • Serial
  • SPI

Check the files Arduino.h, arduino_impl.cpp, arduino_impl.h, SPI.h from the simulator\src\arduino folder.

For the tone function we have two different implementations:

  • for the Win32 platform in file simulator\platform\win32\eez_psu_sim\tone.cpp
  • and for the Linux and Mac platform in file simulator\platform\linux\src\tone.cpp

SPI peripherals

The following devices are controlled via SPI bus:

These peripherals are emulated in simulator, check the files chips.cpp and chips.h in simulator/src/chips.

UIPEthernet Emulation

UIPEthernet library interface is defined in files UIPClient.h, UIPEthernet.h and UIPServer.h; this interface is is implemented in file uipethernet_impl.cpp and this implementation is based on platform interface defined in ethernet_platform.h. There are two implementations of this platform interface:

  • for the Win32 platform in file simulator\platform\win32\eez_psu_sim\ethernet_win32.cpp
  • and for the Linux and Mac platform in file simulator\platform\linux\src\ethernet_linux.cpp

Simulator GUI Front Panel

Implementation files are in simulator/src/front_panel.

Implementation is using eez_imgui dynamic library.

This library is dynamically loaded at runtime, so that simulator can run even if this library is missing (check the simulator/src/dll.h for platform independent dynamic library loading).

eez_imgui library is very simple immediate mode GUI library that supports top level window with following widgets:

  • Image
  • On/off image (displays different images depending on boolean flag)
  • Text
  • Button

It is based on SDL, SDL Image and SDL TTF.

psu-firmware's People

Contributors

mvladic avatar prasimix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

psu-firmware's Issues

Displaying mV and mA

In bar graphs view display mV and mA for smaller values (below 1 volt or ampere)

Calibration parameters usage

If channel is calibrated, its calibration parameters cannot be activated or deactivated without new restart. Both CAL:STAT? and local console option reflect changed state but that is not a real situation. An example:

cal:stat?
0
cal:stat 1
cal:stat?
1
meas?
15.74
volt?
16.00
syst:pow 0
// wait min. 5 sec
syst:pow 1  
meas?
16.00

UTFT/Utouch reuse

This is a reminder that in one moment we should reuse parts of UTFT and UTouch only for display that we are using. Regardless of that we have to add test and init procedure for both TFT display and Touch controllers.

Self test of MAIN temp sensor

Add self-test of MAIN temp sensor that will return error if value is below -10oC. That could be used as criteria for disconnected NTC since Due in that case returns ~13.8oC. Also during the operation if returned value is so low that has to generate immediately a warning error on the local console that will require operators intervention. If such intervention is not happened max. current per channel has to be limited to e.g. 2 A.

Add support for AUX sensor OTP on local console

A new option on sys_settings page is introduced (Set AUX sensor OTP) that has to be linked with sys_settings_aux_otp page. That page will be also used for clearing OTP tripping.
This protection currently shut down power supply, but we have to change that. It's enough to switch both outputs off.

Simplified simulator GUI

If possible, add new command (e.g. SIM:GUI:MIN and SIMU:GUI:DEF to restore) that will resize simulator front panel to TFT display area only. That should simplify taking screenshots that can be used for writing user manual.

Wrong inital value when channel balancing is activated

If channels are coupled and balancing is activated (i.e. initially set voltage or current is changed/decreased) when new value is set using step or slider edit, a balanced value will be used as a starting point instead of initally set value.
For example, if voltage was set to 60 V when coupled in series, and balancing corrected it to 30.68 V, later value will we offered as starting point instead of 60 V.

Display output value range with defined limit

There is no reason why we shouldn't display output value range with taking into account LIMit instead of MAXimum value. For example if CURR:LIM is 3 A on the channel 1 then we should display:

Set Ch1 current [0.00-3.00A]

instead of:

Set Ch1 current [0.00-5.00A]

Compile failed if CONF_SKIP_PWRGOOD_TEST set

Compiler report error if CONF_SKIP_PWRGOOD_TEST is set:

sketch/ioexp.cpp: In member function 'bool eez::psu::IOExpander::test()':
ioexp.cpp:124: error: 'struct eez::psu::Channel::Flags' has no member named 'power_ok'
   channel.flags.power_ok = 1;
                 ^
exit status 1
'struct eez::psu::Channel::Flags' has no member named 'power_ok'

Wrong channel's temp sensor values on *RST

The *RST command should set channel's temp sensors params to the following values:

SYST:TEMP:PROT CH1|CH2 75
SYST:TEMP:PROT:DEL CH1|CH2 30
SYST:TEMP:PROT:STAT CH1|CH2 ON

Remembering selected page

Remember selected page on channel basis, e.g. channel settings page/tab or edit output value page/tab.

Channel coupling

Implement channel coupling in series and parallel using built in power relays. That require new SCPI commands INSTrument:COUPle:TRACking and introducting some sort of command dispatcher that more then one channel can be controlled as single entity. Also we need a new set of main pages where only one set of output programming and measured values will be displayed with new ranges (up to 80 V and up to 10 A). When channels are coupled in series, output voltage on each channel will be set to half of the programmed value. The same is true for setting current when channels are couple in parallel.
Defining coupling mode via local display we can make a wizard with the following steps:

  1. Coupling type (series or parallel)
  2. Display instruction that connected load has to be disconnected (We can test that by measuring current on both channel. When test passed set VOLT and CURR on both channel to zero, and disable both outputs)
  3. Display instruction which binding posts will be used when channels are coupled (CH1-, CH2+)
  4. Finished (power relay and SP_LED are activated, down-programmer on CH2 is unconditionally disabled when coupled in parallel and enable both outputs)

As indication when channels are coupled in series and output voltage is set over 40 V the SP_LED could flash. Additional indication could be warning sign on the local display in that mode.

Special case is entering CC mode when channels are couple in series. It's possible that output voltage on one of the channels become negative. To avoid such condition output voltage leveling is required.

First time installation wizard

to simplify setup we'll need a first time installation wizard for setting the following:

  • touch-screen calibration
  • date/time
  • Ethernet connection
  • calibration password and system password
  • channel calibrations
  • Load various default user profiles (e.g. +5V, +3.3V, +/-12V, Tracking, Paraller coupling, Series coupling, etc.)

We can also make visible "First time installation wizard" into system settings that user can run it any time. In that case we should take care about already set values (e.g. if we are going to load default user profiles that are different from what is stored into EEPROM).

Add support for SCPI control via Excel

Create DLL for communication over serial and TCP/IP that will enable Excel with VBA to be used for SCPI programming. Check for an example in the following document:

\BTSync\Manuals\Remote control\Other vendors programming guides\Agilent E364xA (E3646-90001).pdf

Infrastructure for LIST SCPI subsystem

LIST SCPI subsystems will require implementation of the triggering system. Therefore the following commands has to be implemented:

*TRG
*WAI
ABORt
INITiate[:IMMediate]
INITiate:CONTinuous
MEMory:LIST:LOAD
MEMory:LIST:STORe
[SOURce[<n>]]:CURRent:MODE
[SOURce[<n>]]:CURRent[:LEVel]:TRIGgered[:AMPLitude]
[SOURce[<n>]]:LIST:COUNt
[SOURce[<n>]]:LIST:CURRent[:LEVel]
[SOURce[<n>]]:LIST:DWELl
[SOURce[<n>]]:LIST:VOLTage[:LEVel]
[SOURce[<n>]]:VOLTage:MODE
[SOURce[<n>]]:VOLTage[:LEVel]:TRIGgered[:AMPLitude]
TRIGger[:SEQuence]:DELay
TRIGger[:SEQuence]:SOURce

EEZ PSU SCPI reference guide.zip

Store and retrieve lists from SD card. If SD card is not installed or not present/formatted we have to return an error. Allow only basic operation with SD card: saving and retrieving one LIST per user profile. More comprehensive support for SD card will be addressed in #88.

Add SPI devices software reset

Add software reset in initialization of SPI devices when applicable (for example set RESET register on ADS1120 for that).

Self-test option for TLC5925 driver

Existing power up self-test procedure does not include TLC5925 testing since its not possible to get feedback from that IC. Nevertheless we can add new option under system settings for turning on and off all it's outputs sequentially that user could visually test if all LEDs are working (here we can draw front panel and indicate which LED or relay is currently turned on).

When this procedure is started both channel's output must be disabled and output values set to zero!

Ethernet connection freeze on Mega

Ethernet connection seems to freeze after some time with Mega. That could be 15 minutes or half an hour. When that occurs, firmware is still responsive via serial. Lost Ethernet connection is not possible to establish even after hard reset. If reset is activated, firmware immediately reports the following error on serial console:

EEZ PSU serial com ready
**TRACE: EEPROM test failed at index: 1
**ERROR: 240,"External EEPROM test failed"

... and when Ethernet connection timeout is happened usually another failure on RTC is reported:

**TRACE: Ethernet initialization started...
**TRACE: Ethernet initialization failed!
**TRACE: RTC test failed Control 1: w=8, r=0
**ERROR: 250,"RTC test failed"

I never noticed similar problem with Due board. I have to find out where is a problem in Arduino shield or Ethernet library when working with Mega.
It's interesting that only complete power off of the power supply restore Ethernet connection.
DIAG:TEST? returns the following data:

"0, EEPROM, installed, failed",
"0, Ethernet, installed, failed",
"0, RTC, installed, failed",
"2, DateTime, installed, skipped","2, BP option, installed, skipped",
"1, CH1 IOEXP, installed, passed","1, CH1 DAC, installed, passed",
"1, CH1 ADC, installed, passed","1, CH2 IOEXP, installed, passed",
"1, CH2 DAC, installed, passed","1, CH2 ADC, installed, passed"

Invalid fan speed measurement

Fan speed measurement is frequently returns false value. Possible cause is short measurement time that is probably interrupted by other task.

Input data validation during touchscreen calibration

Currently, screen calibration data for three points are validated at the end of the calibration. We have to do that during the calibration process and inform user if data is not as expected (out of range or even equal that can be caused by some problem in communication with touchscreen controller).

A warning message can be displayed for few seconds on the screen if such thing is happened like: "Received data is invalid due to imprecise pointing or communication problem"

SYST:POW 1 with connected load generate failure

If SYST:POW 1 command is executed with load connected it will generate:

**ERROR [2016-10-27 11:05:11]: -242,"CH1 fault detected"
**TRACE [2016-10-27 11:05:12]: Ch1 PWRGOOD bit changed to 0

Going back from stand-by mode initiated from local console works fine.

New 312 error in SCPI

Use 312,"Cannot execute when the channels are coupled" error (instead of -200) when one of the following SCPI commands is send when channels are coupled:

  • CAL
  • LRIP (SERial only)
  • VOLT:PROG
  • VOLT:SENS (SERial only)
  • SIMU:RPOL
  • SIMU:VOLT:PROG:EXT

Add range check for time and date values

Few rare situations are detected when RTC read returns not allowed values (e.g. number of seconds greated then 59). Add into self-test procedure new test that will address such situations and report an error.

Compare output values when profile auto recall is used

We have a possible dangerous situation when for auto recall is selected user profile higher then 0. If e.g. that profile sets output to 12 V and after power on user decrease that voltage to 5 V in the next power on (that can be caused by AC blackout) voltage will be set back to 12 V. If output is enabled and load that require 5 V is still connected without proper OCP will be damaged. Therefore on the each power when auto recall is enabled output voltages and currents have to be compared (between profile 0 and selected auto recall profile) and if any difference is detected outputs must be disabled, and warning message like:

Auto-recall values mismatch

Switch off down-programmer to avoid overheating

We need to monitor output power and if its go below DP_NEG_LEV that is negative value in Watts (default -1 W), and that condition lasts more then DP_NEG_DELAY seconds (default 5 s), down-programmer circuit has to be switched off.
Also an error 500,"Down-programmer switched off" has to be generated and in Event view a new warning message has to be inserted: DProg is turned off
Turning channel output off and on will return down-programmer circuit into previous state.

Incorrect WATCHDOG generation on Power-On

Hi. I'm having problem with the EEZ using 120V AC main supply, and two SMPS 48V supplies instead of the toroidal transformer. Problem seems to be related with the SMPS to be slower to start under 120Vac, that slow the correct start of both PWR_PCB Pre-Regs and the three digital supplies (+/-5V, 9V). Then the Arduino is doing his startup checks, but doesn't get the replies from the IOEXP and ADC, and put the supply back in Standby, see the USB port trace:

**TRACE [2016-11-18 20:04:48]: PWR_DIRECT -> HIGH
**TRACE [2016-11-18 20:04:48]: Ch1 GPIO 0x0a
**TRACE [2016-11-18 20:04:48]: Ch2 GPIO 0x0a
**TRACE [2016-11-18 20:04:49]: Ch1 GPIO 0x0a
**TRACE [2016-11-18 20:04:49]: Ch2 GPIO 0x0a
**TRACE [2016-11-18 20:04:53]: Ch1 PWRGOOD bit changed to 0
**ERROR [2016-11-18 20:04:53]: -242,"CH1 fault detected"

**TRACE [2016-11-18 20:04:53]: PWR_DIRECT -> LOW
**TRACE [2016-11-18 20:05:04]: PWR_DIRECT -> HIGH
**TRACE [2016-11-18 20:05:04]: Ch1 GPIO 0x0a
**TRACE [2016-11-18 20:05:04]: Ch2 GPIO 0x0a
**TRACE [2016-11-18 20:05:05]: Ch1 GPIO 0x0a
**TRACE [2016-11-18 20:05:05]: Ch2 GPIO 0x0a
**TRACE [2016-11-18 20:05:09]: Ch1 PWRGOOD bit changed to 0
**ERROR [2016-11-18 20:05:09]: -242,"CH1 fault detected"

**TRACE [2016-11-18 20:05:09]: PWR_DIRECT -> LOW

If both PWR_PCB are supplied by an external 48V supply before the EEZ is taking out of standby, then the supply reports no fault, and it is working correctly. Maybe there is the need to add some delay into the code, before doing the selfchecks to let the time for the PWR_PCB supplies to stabilize at startup.

System protection settings

Two system-wide protection feature has to be added:

  1. Switch off all outputs when protection tripped (see OUTPut:PROTection:COUPle)
  2. Shutdown when protection tripped (see SYSTem:POWer:PROTection:TRIP)
  3. Force disabling of all outputs on power up (see SYSTem:PON:OUTPut:DISable)

Use sys_settings_protections page to access them on the local console

Channels output state on calibration page

When calibration page is selected we have to go back to main if no activity is detected for GUI_BACK_TO_MAIN_DELAY seconds. Other possibility is to switch off outputs on both channel when calibration wizard is started.

Channel tracking

We have to add channel tracking now when channel coupling infrastructure is added. For SCPI control we have to implement OUTPut:TRACk[:STATe]. For local control we can follow the layout for channel coupling and use different info text like "[Warning sign] Channels tracking active"

Rename MAIN sensor to AUX

The name of the MAIN sensor is misleading. People thinks of it as one that is in charge for fan speed control what is not the case. It's optional and can be used for monitoring e.g. main transformer or temperature inside enclosure. We need to change that in SCPI and GUI

Bar graphs full scale

Replace in bar graphs max. value with limited value. Red line used to indicate limit is no longer needed.

UTFT library usage

According to author of UTFT hosting of any variant of his library is a crime, and since UTFT_Pro is removed from the GitHub we have to remove UTFT_Pro from our distribution and forward users to download library from his site. That will also require the following changes in lcd.cpp:

#define TFT_320QVT_9341 CTE32_R2

Remove all other libraries from the project and do the following:

  • Open a new project for eez_psu_lib
  • Create fork within eez-open project for Ethernet2, scpi-parser and UIPEthernet
  • Write help file how to collect libraries for that firmware can be successfully compiled

When latest UTFT library is used, screen colors looks "weird" and vertical (scan?) lines are clearly visible on the background color that was not hte case with UTFT_Pro. Maybe some user will find that unattractive and would like to stick with UTFT_Pro. Therefore we should allow firmware compilation with both UTFT and UTFT_Pro. Other possibility is to invest some time and find out how UTFT_Pro works with display that colors looks more appealing.

Another path for ILI9314 based displays is to try to use Adafruit library that is completely open source (MIT license).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.