Close
0%
0%

Li-Ion Charger Automation

Automate cell information readout from a Liitokala Lii-500 charger by tapping into it's LCD interface

Similar projects worth following
The Liitokala Engineer Lii-500 is a universal chemistry 4-cell smart charger manufactured by the well-known Liitokala brand. It is very popular with people building battery packs out of second life 18650 Lithium-Ion cells because of its reasonable price and discharge capacity testing feature (NOR TEST mode). I own a number of those chargers and I use them as part of my cell assessment workflow. What I have found however is that entering cell capacity values reported by the charger manually into a computer is both a bit tedious as well as prone to mistakes. Therefore I have made attempts at automating the process by modding the charger.

Table of Contents

1 Overview

The Liitokala Engineer Lii-500 is a universal chemistry 4-cell smart charger manufactured by the well-known Liitokala brand. It is very popular with people building battery packs out of second life 18650 Lithium-Ion cells because of its reasonable price and discharge capacity testing feature (NOR TEST mode). I own a number of those chargers and I use them as part of my cell assessment workflow. What I have found however is that entering cell capacity values reported by the charger manually into a computer is both a bit tedious as well as prone to mistakes. Therefore I have made attempts at automating the process by modding the charger.

The overall idea was to reverse-engineer the charging and discharging circuits to the point that I would flash my own firmware into the microcontroller inside giving me the ability to automate the charging/discharging process and read out the measured cell parameters.

Please take note, that all of the content here relates to the Lii-500 charger not the Lii-500S charger. The Lii-500S is a newer version of the Lii-500, the outward appearance is very similar but the internal board microcontroller and LCD screen are entirely different.

2 The charger hardware

The popularity of the Lii-500 charger means, that there are multiple modifications and hacks already published, a quick search on youtube reveals a number of videos showcasing the internals or multiple hacks that are possible with this charger. In particular:

I first thought to investigate the MCU that was inside the charger but unfortunately the chip is unmarked. I could just get rid of it and wire in my own MCU but I figured that I don't want to modify the charger this heavily in case I would like to sell it some day. I have however figured out a different idea to get the cell information I wanted - sniffing the communications between the MCU and the LCD screen. Just a small drop-in pass-through board would be required and it would fit nicely in the existing case so this is the route I went on!

3 The LCD and its interface

3.1 Electrical

I have found that some of the LCD modules had unmarked controller chips on the back of the board:

thumb-lcd-module-back.jpg

However, by disassembling the next charger I discovered that it's LCD module contained a marked chip as the LCD controller:

thumb-lcd-module-holtek.jpg

The chip is Holtek 1621B the datasheet is easily found. As I have previously reverse engineered the protocol from scratch I was happy to find that everything matches with what the datasheet describes. The LCD driver chip has much more features than are used by the MCU (for example a watchdog timer). The one interesting tidbit is that the LCD driver chip contains no GPIO pins to drive a transistor controlling the backlight. What the designers choose instead is to reuse the buzzer outputs for the backlight driver. When the LCD backlight enable command is sent the buzzer output is configured to output a 4 kHz tone for the buzzer which I assume drives the backlight transistor.

For posterity I have left all of the reverse-engineering process description below.

By virtue of educated guessing (wide traces -> power ;) and connecting a logic analyzer I have figured out that the interface here is a rather slow one-directional SPI data flow, the pinout of the LCD module is the following:

Pin number Color Signal Notes
1 Red +5V power  
2 Black MOSI  
3 Yellow SCK Frequency is 62.5 kHz
4 Green /CS  
5 Blue GND  
6     Not present but marked on...
Read more »

  • Rev 2 board manufactured and assembled

    Enki08/05/2021 at 20:35 0 comments

    The REV 2 board has been manufactured and has been lying on my desk for a while now. Today I finally had time to solder connections, flash firmware and assemble everything:



    Unfortunately I found out that I have made two rather big mistakes with the board:

    1. The FPC connector for the USB cable should be 1mm pitch not 0.5 mm.
    2. I put the LCD and MCU connectors "backwards" :).

    The board was plugged into the LCD on the back and connected with a serial port instead of USB, the firmware now allows you to choose :).

  • The sidekick board

    Enki07/03/2021 at 22:53 0 comments

    In order to make the entire idea easier to use I have began developing a custom PCB with streamlined connectors and small footprint. The board is basically a STM32 Blue Pill remixed for this application. The Kicad project of the REV1 board can be downloaded here.

  • LCD Controller Identified

    Enki07/03/2021 at 11:26 0 comments

    By disassembling the next charger I discovered that it's LCD module contained a marked chip as the LCD controller:

    thumb-lcd-module-holtek.jpg

    The chip is Holtek 1621B the datasheet is easily found. As I have previously reverse engineered the protocol from scratch I was happy to find that everything matches with what the datasheet describes. The LCD driver chip has much more features than are used by the MCU (for example a watchdog timer). The one interesting tidbit is that the LCD driver chip contains no GPIO pins to drive a transistor controlling the backlight. What the designers choose instead is to reuse the buzzer outputs for the backlight driver. When the LCD backlight enable command is sent the buzzer output is configured to output a 4 kHz tone for the buzzer which I assume drives the backlight transistor.

    For posterity I have left all of the reverse-engineering process description in the project details.

  • USB now supported

    Enki06/27/2021 at 12:47 0 comments

    The code now supports sending the SPI data directly via USB with a CDC-ACM serial port profile.

View all 4 project logs

Enjoy this project?

Share

Discussions

Oleksii Zagorskyi wrote 11/07/2021 at 20:50 point

Is this correct when you wrote:
"as it can reliably handle"?

Maybe you actually meant:
"as it can NOT reliably handle"?

  Are you sure? yes | no

Enki wrote 11/11/2021 at 22:29 point

Correct. This is now fixed.

  Are you sure? yes | no

Mike Szczys wrote 07/02/2021 at 16:05 point

Cool reverse-engineering project. Sniffing those LCD lines is a perfect way to get at the data!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates