Skip to content
forked from frmaioli/b3603

Alternative firmware for the BST900 boost converter for serial control

License

Notifications You must be signed in to change notification settings

delboy711/BST900

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BST900

NEW VERSION to MANAGE BST900 REMOTELY USING WiFi

NEW Firmware for ESP32 to manage a BST900 Converter remotely using MQTT over WiFi is now available

Control of Boost Converter over serial interface

This is a fork of B3603 originally by baruch and later forked by iafilius and frmaioli This fork extends the code to support the BST900 and BST400 boost converters from MingHe. The object of the BST900 alternative firmware is to allow control of the boost converter over a serial interface. In my case this is to control the charge current of my home battery system

The plugin top board of BST900 has a convenient unused serial socket (3.3V logic levels), which can be easily connected to a suitable controller. (In my case an ESP8266). BST900 and BST400 have a different architecture to the original B3603. They use a UCC3803 Current Mode PWM controller on their bottom boards, but they use the same STM8 based microcontroller top board albeit running slightly different firmware.

Status

The project is fully functional. A binary file can be found in the releases folder. It has been tested with BST900, but not with BST400. To compile for BST400 edit the #define in the main.h file.

BST900 with STM8 Development board The firmware may be loaded onto a BST900 top board, but because the stock firmware is read protected it is not possible to save the stock firmware and revert back to it later. However it is possible to load the firmware onto an STM8 development board, and by hooking up the appropriate pins to the connector, run the firmware without the seven segment display or push buttons. The firmware can thereby be evaluated without making any irreversible choices.

Alternative to this firmware

There is another way to control the current delivered by a BST900 without having to change the firmware. It is possible to set the constant current limit using either an analogue or digital potentiometer.

Looking at the BST900. The fourth pin down on the left hand row is the pin used to control the Constant Current limit of UCC38803. This pin carries a digital PWM signal from the top board. However the UCC3803 will work equally well with an analogue voltage on this pin.

Procedure
  • Put the top board on long pin header sockets to raise it up.
  • Bend Pin 4 of the left hand header out so this pin is open circuited.
  • Insert a wire into Pin 4 of the socket on the lower board and connect to the wiper of a 10k Potentiometer (or Digipot)
  • Connect one side of the potentiometer to GND which is found 2nd terminal on the left in the row of 4 immediately to the left of the buttons.
  • Connect the other side of the potentiometer to +3.3V via a resistor of 15-20k. 3.3V is found at the right hand terminal of the row of 4.

That's it. Hopefully it will not blow up! It is probably a good idea to feed the BST900 with a constant current source while testing it out.

BST900 Architecture

BST900 is based on the UCC3803 Current Mode PWM Controller from TI. It boosts voltages up to 120V and operates at currents up to 15A. The output voltage is controlled by a PWM signal on pin5 of the upper board in exactly the same way as B3603. Pin4 carries a PWM signal whose width determines the Constant Current limit.

BST900

BST900 Bottom View

ToDo

  • Implement control for the cooling fan. - Done (Default threshold is 2.5A)
  • Rework Constant Current control to suit BST900. - Done (Now uses closed loop feedback. Requires no PWM calibration)
  • Implement a start at power on feature to suit my application for charging a home battery system. - Done (added Command DEFAULT <0|1> )
  • Recalibrate all measurements and PWM to suit BST900 - Done
  • Rework code to use a 10mV voltage resolution to allow voltages above 65535mV - Done
  • Add command ECHO <0|1> to provide positive confirmation of commands - Done

Components needed:

  • BST900 -- The unit being reprogrammed
  • STM8 Development board -- Enables firmware to be tried without losing the stock firmware.
  • FT232RL -- A usb-to-serial TTL-level
  • STLink V2 -- programmer for the STM8S microcontroller

Software needed:

  • [SDCC v 3.7.0] sudo apt install sdcc
  • stm8flash -- STM8 flasher

Improved Cooling

While the manufacturer specifies the BST900 as operating at up to 15A looking at the size of the supplied heatsink I was not too hopeful about it actually working for long at that current. It is fairly easy to uprate the cooling by removing the MOSFET and diode pair and mounting them on the lower side of the PCB with a much larger heat sink (use spacers to ensure no short circuit between the heatsink and PCB traces, and make sure the Mosfet leads go to the correct places). BST900 also has an unused socket for a second diode pair. Adding a second diode will more than halve the heat dissipation of each diode since the lower current will mean the diode is operating at a lower forward voltage. If adding a diode make sure they are both of the same type.

BST900 Improved Cooling

Extracts from the Original project page.

Schematics

These were done by flex, the discussion can be seen in the EEVBlog forum (link at the bottom).

Top board schematics:

B3603 Top Board Schematics

Pinouts

Lets name the different pinout components, left and right are as seen looking at the top board with the 7-segment display up:

  • MCU
  • Left connector -- 8 pins left side, analogue and digital signals
  • Right connector -- 8 pins right side +5V power and analogue and digital Ground.
  • Serial connector -- 4 pins at left most side. 3.3V logic level
  • SWIM connector -- 4 pins at the bottom, just left of the buttons. Used to programme the STM8 chip

Pinout from MCU

MCU pin MCU Function Board Connector Board Connector Pin Board Connector Name
Pin 1 UART1_CK/TIM2_CH1/BEEP/(HS) PD4 74HC595 Pin 3 DS
Pin 2 UART1_TX Serial connector Pin 2 TX
Pin 3 UART1_RX Serial connector Pin 4 RX
Pin 4 NRST SWIM Pin 1 SWIM NRST
Pin 5 OSCIN/PA1 74HC595 Pin 11 SHCP
Pin 6 OSCOUT/PA2 74HC595 Pin 12 STCP
Pin 7 Vss (GND)
Pin 8 Vcap
Pin 9 Vdd
Pin 10 SPI_NSS / TIM2_CH3 / PA3 (HS) CV/CC leds CV/CC leds
Pin 11 PB5 (T) / I2C_SDA / TIM1_BKIN Left connector Pin 7 CV/CC status
Pin 12 PB4 (T) / I2C_SCL / ADC_ETR Left connector Pin 6 Enable Output + Red (ON) led
Pin 13 PC3 (HS) / TIM1_CH3 [TLI] [TIM1_CH1N] Left Connector Pin 8 Fan Control
Pin 14 PC4 (HS) / TIM1_CH4 / CLK_CCO / AIN2 / TIM1_CH2N Left connector Pin 1 Iout sense 16*(0.01V + Iout*0.05)
Pin 15 PC5 (HS) / SPI_SCK / TIM2_CH1 Left connector Pin 5 Vout set
Pin 16 PC6 (HS) / SPI_MOSI / TIM1_CH1 Left connector Pin 4 Iout set
Pin 17 PC7 (HS) / SPI_MISO / TIM1_CH2 Button Buttons
Pin 18 PD1 (HS) / SWIM SWIM Pin 3 SWIM & Buttons
Pin 19 PD2 (HS) / AIN3 / TIM2_CH3 Left connector Pin 2 Vout sense
Pin 20 PD3 (HS) / AIN4 / TIM2_CH2 / ADC_ETR Left connector Pin 3 Vin sense (Vin/16)

Links

About

Alternative firmware for the BST900 boost converter for serial control

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 81.3%
  • Python 17.2%
  • Makefile 1.5%