20th May 2017
Project

LiPo Charger with Reverse Polarity Protection

LiPo batteries are increasingly used in portable devices, due to their high storage density, light weight and long lifespan.

While devices containing LiPo batteries will usually contain charging circuitry, it is sometimes useful to have a way of charging them outside of a host device. Regularly working with PS3/PS4 controllers on a regular basis, made purchasing a LiPo charger very attractive.

There are countless examples of LiPo chargers available to buy, but none of them had all of the features I was looking for. Due to the reversed polarity used by PS3/4 controllers, compared to the standard configuration, it would be very easy to damage a charger or battery if there is no built-in reverse polarity protection. The change in connector type for the V2 PS4 controllers was also a consideration.

Struggling to find a suitable board, I set about designing one myself.

Design

The final product must have:

  • MicroUSB power input.
  • JST-PH output connector.
  • JST-PZ output connector.
  • Extra output pins/pads for an alternative connector type.
  • Reverse polarity protection.
  • Charging/Done status LEDs.
  • Small footprint.

The Adafruit Micro LiPo charger provides several of these features, including status LEDs, a compact design, and a JST-PH output.

Adafruit have made available the design files for this product, which was used as a starting point. Kudos to Adafruit for being awesome, and saving me some time designing the whole layout :)

If you want to grab these files for yourself, they are available here: https://learn.adafruit.com/adafruit-microlipo-and-minilipo-battery-chargers/downloads.

With the addition of two transistors, a resistor and a JST-PZ connector on the rear, the design meets all of the criteria set out above.

Like the Adafruit example, the circuit is powered by a Microchip MCP73831. This IC can provide over 1 amp of charging current (though 500mA will be the limit of this board), which can be adjusted by changing the size of the resistor used between the PROG and VSS pins.

Board design
3D rending of the board in KiCad.

To fit in the extra components, the LEDs have been moved, the charge current resistor rotated, and the breakout pins connected to the MicroUSB input have been removed.

Assembly

To build one of these for yourself, you will need:

Component:
Part Used:
Alternative Part(s):
1x LiPo Charger Board
Order from OSH Park
1x Micro USB connector
1x 2mm JST-PH connector
Farnell
1x JST-ZH connector (optional)
1x MCP73831/2 SOT23 Charging IC
Farnell
1x 0805 2.49kΩ Resistor
Farnell
2x 0805 10uF Capacitor
Farnell
2x 0805 470Ω Resistors
Farnell
1x 0805 1MΩ Resistor
Farnell
1x SOT23 BJT NPN Transistor
Farnell
CPCRS
1x 0805 100kΩ Resistor
Farnell
1x P Channel MOSFET transistor
Farnell
2x 0805 LEDs, colours optional
Farnell
1x 0805 10kΩ Resistor

The exact parts used, purchased mostly from Farnell, are linked above (where possible). If you are unable to find the exact part used, a similar spec alternative will suffice. Just make sure the component has the same footprint/pinout, so it will fit on the board.

Due to the use of SMD components, it is recommended to assemble the board using solder paste and a reflow oven (or similar). The compact board will likely pose problems if you try and solder it by hand.

The easiest way to apply solder paste is to use a solder mask, which covers areas of the board that should not be covered in paste. The paste can then be smoothly spread across the mask, which when removed, will leave the pads coated in a thin layer of paste.

A solder mask can add considerable cost to a project, so unless you can make one yourself, I recommend using a syringe, and squeezing a small blob of solder paste onto each pad.

With the paste added, carefully add the components, starting with the smaller components in the centre of the board. Leave the largest components until the end.

Board layout
Layout of the board. Components with unique footprints (such as the 5 pin charging IC), or with silkscreened labels (LEDs), are not labelled on this image.

Due to the small size of the board, the solder mask does not include labels to identify components. Use the image above to map out the correct location for each component. Components with unique footprints or board labels are not labelled on the image, but should be easy to work out.

There are a few option components, which you do not need to add for the board to function. The 0Ω resistor is used to connect the 2.49Ω resistor to the charging IC, and increase the charging rate to 500mA. This component should go on the pads labelled '500mA' if you want to use it. Without this, the charging rate is 100mA. This slower rate is recommended for small batteries. The smaller JST connector, if required, will be dealt with later.

Pasted board
Board with components placed, ready for reflowing.

With all components placed, your board should look similar to the image above. You will probably note the rather messy paste application on this board - I originally applied too much and bridged a few pads. My paste was also beginning to dry out, which has lead to it clumping in places. As long as there is not too much paste, a small amount of bridging should be fine - the paste will flow onto the pads when it melts.

I use a cheap hot plate to solder the board, which is ideal when dealing with single sided boards. As the solder melts, it will first become rather dull, before turning shiny and liquid.

Once all of the pads are shiny, the hot plate can be turned off and the board removed. I usually rest the board on a metal plate to allow it to cool. As the solder is liquid, be careful when first moving it to ensure the components do not move. The solder should cool enough to become solid very quickly.

Once the board is cool, check for any solder bridges between components, particularly the charging IC. If everything looks good, the board is ready for testing.

Testing
Testing the board. The charging light is illuminated, indicating the battery is being charged. A quick check with a multimeter confirms this.

If the board is working, the charging light will illuminate, as seen above. I also recommend checking the battery voltage using a multimeter, through the broken-out pins next to the LEDs. You should see the voltage slowly increase. If the board is not working, you will need to check continuity between components, checking for any shorts or solder bridges.

As I work with batteries that also use the smaller JST-ZH connector, I hand-soldered this connector onto the back of the board. The final result can be seen below.

Completed board
Finished board. Not the tidiest, but it works. Note to self - buy some fresh solder paste.

You could use these extra pads, or the breakout pins, to add alternative charging options. For example, one interesting idea is to use wires with magnets soldered to the ends, which can then be used to 'stick' to the battery which requires charging - this is especially useful for barrel-style LiPo batteries, provided they operate between 3.6V to 4.2V.

Case

In future, I plan to create a 3D printed case for this board. Watch this space!

Downloads

The KiCad files related to this project will be added here at a later date.

Share:  Twitter Facebook
Filed under: Project