Close
0%
0%

LiPow - The USB C LiPo Battery Charger

USB Power Delivery based lithium polymer battery charger

Public Chat
Similar projects worth following
This project uses USB Type C with Power Delivery to charge Lithium Polymer batteries. It supports charging 1s-4s batteries and supports balancing for 2s-4s packs. The device supports charging up to 100W (16.8V at 6A).

Input is a USB Type C Port. Charging is done through an XT60 connector and has JST connectors for balancing 2s-4s packs.

The device will be pre-programmed with a fixed max current limit of 6A. Everything runs automatically and will charge up to the max capability of the connected USB PD power supply if the max current output limit exceeds the input power supply. Lower current limits can be programmed as well.

The only user feedback is through an RGB LED.

I got the idea for this project while on a vacation where I only took a single 65W USB C power supply from my Thinkpad to charge the laptop, Nintendo Switch, and cell phone. Having worked with hobby style lithium polymer batteries and bulky chargers, I thought it would be nice to have a small device that could charge LiPo batteries from a USB C power supply.

Input is a USB Type C Port. Charging is done through an XT60 connector and has JST connectors for balancing 2s-4s packs.

The device will be pre-programmed with a fixed max current limit up to 6A. Everything runs automatically and will charge up to the max capability of the connected USB PD power supply if the max current output limit exceeds the input power supply.

The only user feedback is through an RGB LED.

A STM32F0 microcontroller controls runs the system. It uses a FUSB302B from On Semi for the USB power delivery communication. TI makes the perfect programmable buck boost regulator for this project with the BQ25703A. It accepts input voltage from 3.5V to 24V and the output is meant to charge lithium batteries up to 4s with a current limit of 6.35A. It is programmed through I2C.

A 3.3V linear regulator was needed to provide power for the electronics. The hardest part is that it needs to accept up to 20V on the input due to the power delivery specifications. The IFX25001 from Infineon accepts up to 45V and is a good fit for the project.

I chose to have balance ports for 2s-4s packs for balancing with charging done through an XT60 connector. Originally I was going to support charging through the balance ports, but the typical gauge of wire used for those connections would severely limit the charging current. I also had to design a circuit to automatically route the output from the regulator to the top cell depending on what type of pack was connected. I designed the circuit and thought it was pretty clever, but ultimately, made the decision to reduce complexity and support higher charging current by going with an XT60 connector.

Balancing is controlled by the STM32F0. It monitors the cell voltages using its ADC through voltage dividers to scale the voltage to safe levels. Open drain level shifters were needed to control the PFETs used for discharging. Because of this, it create a large VGS on the PFETs, up to the max of a 4s pack ~16.8V. I needed to find PFETs that could handle 20V VGS.

step - 5.65 MB - 12/02/2018 at 02:15

Download

Adobe Portable Document Format - 878.21 kB - 11/14/2018 at 23:08

Preview
Download

  • Layout finished! Sending out for Prototypes

    Alex Klimaj12/02/2018 at 02:12 0 comments

    I have finished the layout for the charger. I initially started the layout realizing that I needed to change the placement of the programmable regulator. Overall, I am happy with the overall placement and layout. The high power path is very short and clean from the USB C connector, through the fuse, to the regulator, then from the regulator to the output FET and XT60 connector.

    The overall size ended up being 59mm x 47mm. Eventually I will need to design and 3d print a case.

    I have sent the outputs to a few different places for prototypes. Next step will be ordering PCBAs and writing firmware. I purchased a couple of STM32F0 dev boards to get going before the boards show up.

  • V1.0 Schematic Uploaded

    Alex Klimaj11/09/2018 at 05:52 0 comments

    I have uploaded a "finalized" V1.0 of the schematic and done most of the placement. It is looking like it will fit in 60mm x 55mm of board. Possibly smaller.


    I decided to remove the 1s connector and replaced it with a right angle XT60 connector to support higher current charging. Not charging through the balance ports allowed me to get rid of the circuitry that automatically routed the power to the top cell.

    I discovered that I had overlooked the high Vgs on the mosfets of the balance circuit. The original part I specced had a max Vgs of +-8V. Well below the 16.8V max that it will see with the open drain driver to ground and a pullup to the cell voltage. I have swapped the mosfet for one with a +-30V max Vgs rating.

    I've also added a cover sheet with a block diagram of the system.

  • Schematic Almost Done

    Alex Klimaj11/04/2018 at 04:52 0 comments

    I have uploaded V0.2 of the schematic. Here is everything that has changed from V0.1.

    • Added ESD diodes on USB C CC nets.
    • Added single use fuse on VBUS. I wanted to use a re-settable fuse, but finding one that works up to 20V 5A that is small and cheap is tough. So I went with a one time fuse.
    • Added balancing circuity.
    • Switched to a slightly larger version of the STM32 to support all the IO needed. I initially underestimated the amount of GPIO's needed for the project.
    • Added voltage divider networks for the ADC inputs to the STM32 for reading individual cell voltages.
    • Added RGB LED for debugging and user feedback.
    • Added UART from the STM32 for debugging. I may still add a UART to USB bridge for programming through the USB C port.
    • Added 3.3V linear regulator. Needed to support up to 20V from Vbus and be a low drop out when VBUS is 5V.
    • Added circuit to automatically steer the output of the adjustable regulator depending on what type of battery is connected (1s-4s).

    I still need to add the supporting components around the adjustable regulator.

  • Very early schematic uploaded

    Alex Klimaj10/25/2018 at 04:19 0 comments

    I have uploaded a very early schematic. All the major building blocks are there but a lot of little things still need to be added.

    I have gone with JST XH connectors for the Lipo Balance connections. I will need to decide how the output of the regulator gets used for charging the highest cell in each balance connection. If I assume users will never try and plug in more than one battery at a time, everything should be okay. Some protection mechanism might be worth designing.

    I will also need to add a some mosfets and resistors to use for discharging and balancing the cells.

  • Charger Power Supply

    Alex Klimaj10/17/2018 at 04:45 0 comments

    While searching for a programmable supply to use for the LiPo charger, I discovered the BQ25703A from Texas Instruments. It is a very feature rich part that can charge 1-4s LiPo's from a USB PD based input (5-20V). Which means it is a programmable buck-boost regulator. It also has a max output of 6.35A which is also programmable. The programming interface is I2C.

    For supporting components, it will need a 3 MOSFETS that can handle 6.35A, a couple of smaller FETs, an inductor, some capacitors, and a couple of shunt resistors for current measurement.


  • Microcontroller Selection

    Alex Klimaj10/17/2018 at 04:29 0 comments

    I have selected the STM32F030F4P6 as the microcontroller for this project. My main search criteria were ARM M0 based, at least one I2C peripheral, ADC with at least 4 channels, availability, and price.

    The STM32F030F4P6 fit all the criteria and the price is right. I ruled out the Cypress parts for not having enough IO. Between the Zilog part and the two ST parts, I would rather use ST since I have experience with them. Between the two ST parts, I chose the one with a larger available quantity.


View all 6 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

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