eez-open / psu-firmware

Firmware for programmable bench power supply EEZ H24005
https://www.envox.eu/bench-power-supply/psu-firmware/
GNU General Public License v3.0
167 stars 60 forks source link

Initial task list for adding support for STM32F7 MCU board #211

Closed prasimix closed 5 years ago

prasimix commented 5 years ago

Initial list that include tasks and changes required for adding support for new modular PSU with STM32F7 MCU board instead of Arduino Due.

TFT LCD and touchscreen controller

TFT LCD is replaced with 4.3" (480x272, landscape). It comes with 24-bit RGB interface (only 18-bit is wired on the board). Firmware should support 16-bit, or 18-bit color space. Since new TFT LCD doesn't include touch screen controller, a AR1201-I/SS is selected (Note: Microchip recently changed its status to "not recommended for new design"). Used interface is I2C, configured for 4-wire sensor. Controller include 128 bytes of user EEPROM that should be used to store calibrations data.

EEPROM

New MCU board comes with EEPROM that share the same I2C bus as peripheral (power) modules and fan controller (on the new AUX PS board). Its address lines are hard-wired as 000. Therefore it can be accessed for read operations on address 0xA1 and for write operations on 0xA2. Note that power modules also can have on-board I2C EEPROM. Its address lines wiring reflect module connector number (i.e. 001 for slot No.1, etc.).

Binding posts IC (TLC5925)

This IC is completely removed due to new approach used for connecting power modules. Therefore we have to take into account the following:

Watchdog

No dedicated reset/supervisor IC is used anymore. STM32 has internal watchdog that has to be activated.

Module SPI devices

Each power module has dedicated SPI channel and two CS (chip select) lines to address up to 4 devices:

Address Device
00 I/O expander (MCP23S17)
01 DAC (DAC8552)
10 ADC (ADS1120)
11 Temp. sensor (TC77)

DC fan control

MCU doesn't control directly DC cooling fan anymore. Instead a dedicated fan controller AMC6821 is used (located on the AUX PS board). We'll use its internal temperature sensor to measure temperature inside chassis (previously directly measured as AUX sensor). Its I2C address is 0x18.

Power module temperature sensing

NTC for temperature sensing on the power module is replaced with the SPI TC77 temperature sensor.

RTC

Internal MCU's RTC functionality is used instead of dedicated IC used in previous design. Replaceable Lithium battery instead of supercap is used as power backup. RTC input/reference clock is derived from master clock (25 MHz) and scaled down to 1 MHz (not 32.768 kHz).

Ethernet

W5500 controller is replaced with built-in MCU Ethernet MAC resources and external PHY IC (DP83843) is used for interfacing with the network (via RJ45).

I/O Expander

As already stated, some Arduino shield functionalities (accomplished using the TLC5925) is now moved to power modules to improve overall modularity (i.e. peripheral module independence). New power module could also include some new functionalities as stated below.

Bit Function Direction
0 Remote sense polarity error Input
1 CC Input
2 CV Input
3 Power good Input
4 OVP fault (NEW, optional?) Input
5 OVP enable (NEW, optional?) Output
6 OE uncoupled LED (modified) Output
7 OE coupled LED (modified) Output
8 Down programmer (DP) disable Output
9 Output Enable Output
10 Remote sense (NEW) Output
11 Remote programming Output
12 Current range 5 A Output
13 Current range 500 mA Output
14 Current range 50 mA Output
15 Extra Cout (NEW, optional?) Output

Low ripple

Power module pre-regulator bypass functionality ([SOURce[]]:LRIPple) is not applicable since new module doesn't include on-board pre-regulator (it is powered from AC/DC power module which acts as pre-regulator, too).

OE control and sync

New power module require usage of OE_SYNC output in combination with OE output (I/O expander) to set output enable circuit. It allows simultaneous control of two or more power module's output state.

prasimix commented 5 years ago

Moved to new repository.