ARTaylor.co.uk

Turnigy B4 / B6 LiPo Charger Upgrade

I use an iCharger 206b as my main charger but wanted a cheap throwaround for taking to the field. Looking at the spec of the Turnigy Charger, I was hopeful - it is cheap and on inspection seems reasonably accurate.

However... I charge at 1C not the 2C and upwards that this charger does out of the box. Queue a bit of reverse engineering and firmware hacking!

Firmware: https://github.com/art103/TurnigyB6

Turnigy B6 Charger
Small section of the schematic

Reverse Engineer the Schematic

This schematic is only approximate, but is enough to write new firmware. All pins to the uC are correct, but some of the balancing and charging sections may be incorrect / incomplete.

Turnigy B6 Schematic: charger_b6.pdf

Turnigy B4 Schematic: charger_b4.pdf

Development Time

The STM8S is a commonly available MCU with a very cheap development board.

I purchased the Development Kit and set about writing some firmware.

The Discovery kit contains a JLink debugger that can be connected to an external board with a small (documented) modification. Well worth the £6 investment!

Photo of the STM8S MCU
Image of the debug connection

Debug Connection

The flash tools work pretty well on Windows (not so much on Linux) so I used a VM for flashing.

Unfortunately the flash was locked so I couldn't recover the original firmware, but that was a likely risk when I set out on this project.

Adding an OLED Display

Adding the display was probably the hardest part of the project. It requires soldering some fine wires directly onto the MCU. You also have to cut the BATT_DIS line and tie it low so we can re-use the pin.

It is worth it IMHO, as you can see what's going on during the charge cycle :)

Photo of the LCD I2C Connections
Photo of the B6 running custom firmware

Up and Running

I used a very accurate Multimeter to calibrate the charger (Aim TTi 1604).

With this setup, I can charge at a fixed (pre programmed) rate nicely. Calculating the battery capacity during charge seems to be a very tricky task. I am not convinced that the original firmware did a good job and would advise that any batteries charged with it support at least 4C charge rates!

Custom Firmware

My custom firmware is available on GitHub and will work with or without the OLED display modification.

Firmware: https://github.com/art103/TurnigyB6

The B4 code is on the "turnigy_b4" branch

Photo of some source code