B3603
This project is about reverse engineering the B3603 control board and figuring out how it works, then it should be possible to create an alternative firmware. Either by driving it with another board on the same control points or by replacing the original firmware with one of my own.
Current state: Working, it is functioning and serially controllable.
Components needed:
- B3603 -- The unit being reprogrammed
- CP2102 -- 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 To compile you will need to install libgusb-dev. To build, run Make and after Make install.
Schematics
These were done by flex, the discussion can be seen in the EEVBlog forum (link at the bottom).
B3603 Board Schematics in PDF (top and bottom)
Bottom board schematics:
Top board schematics:
Regulator Board (bottom)
Control Board (top)
MCU
The MCU is an STM8S003F3. It is the TSSOP-20 package.
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
- Right connector -- 8 pins right side
- Serial connector -- 4 pins at left most side
- SWIM connector -- 4 pins at the bottom, just left of the buttons
- 74HC595 #1 -- The one closest to the MCU
- 74HC595 #2 -- The one furthest from the MCU
Pinout from MCU
![STM8S003F3 TSSOP20 pins](docs/STM8S003F3 pinout.png)
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 | Not connected |
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) |
The buttons are connected in a strange setup where all four are on two pins.
The CV/CC leds are in serial with a lead between them throuh a 10K resistor to pin PA3, by changing the pin between Output HIGH, Output LOW and Input it is possible to make one of them on or both off.
Bottom Board Interface
The below was decoded by bal00.
Right side:
- Top four (1-4) pins are GND
- Next two (5-6) are Vcc +5V (seems wrong)
- 7 is connected to MCU UART RX
- 8 is connected to MCU UART TX
Left side (Top to bottom):
- Pin 1: Iout sense, 970mV/A + 140mV
- Pin 2: Vout sense, 72mV/V + 42mV
- Pin 3: Vin sense, 62mV/V
- Pin 4: Iout control, 970mV/A + 140mV (PWM controlled, off when output off)
- Pin 5: Vout control, 72mV/V + 42mV (PWM controlled, off when output off)
- Pin 6: Enable control, 0V = output on, 5V = output off (Digitally controlled)
- Pin 7: CC/CV sense, CV = 0.47V, CC = 2.5V
- Pin 8: Connected to MCU pin 13 (PC3), unknown function
Pinouts of 74HC595 chips
There are two 74HC595 TSSOP16, these control the 4 digit 7 segment display, and possibly the leds as well. The 7 segment display has 12 pins and is controlled constantly to create a persistence-of-vision effect.
Links
Components needed: