Skip to the content
2 layers17.8 × 30.5 mmSTM32L422KB LiPo, the printed circuit board in 3D

Simple lithium battery-powered STM32 board using an MCP73831 for charging.

Size
17.8 × 30.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
29
Nets
37
Pads
124
Tracks, vias
319, 28
Pours
2
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
16 Dec 2019
Updated
21 Dec 2019

Overview

STM32L422KB LiPo is an open-source printed circuit board by WRansohoff, from the WRansohoff/STM32_LiPo_Example repository on GitHub, published under the MIT licence. It is a 2-layer board of 17.8 × 30.5 mm with 29 parts on 37 nets, routed with 319 tracks and 28 vias.

It is built around the STM32L422KBT6 and MCP73831. Its parts include 11 capacitors, 5 resistors, 4 connectors, 3 ICs and 2 diodes. It belongs with the power boards and the STM32 boards of this library.

Main components

2

README

README.md

LiPo Battery-Powered STM32 Board

This is a small board which incorporates an MCP73831 Lithium battery charger. It has a maximum charge rate of 500mA, but it is simple and easy to use. A JST PH-2 connector is used for the battery; it seems like small lithium batteries have more or less standardized on this type of connector, but double-check the polarity before you plug anything in.

A micro-USB plug is used as a 5V supply to charge the battery, and a small slide switch is used to turn the board's power on or off. Two 100KΩ resistors also form a voltage divider for the microcontroller to read the battery voltage through pin A0's ADC channel, and I'm planning to add an example firmware which reads and prints the battery voltage over UART in the near future.

This board will not work with the almost-identical MCP73832 chip - the difference is that the 'status' pin has a tri-state output on the MCP73831 and an open-drain output on the MCP73832. So with the former, you can have separate 'charging in progress' and 'done charging' LEDS. But with the latter, you can only have one 'done charging' LED directly connected to the pin. I dunno, maybe that saves you $.005 per unit when you order 10 million at a time or something.

Board Renders

As seen through OSHPark's purple-colored glasses:

Top Bottom

Safety

Before assembling this board or trying to incorporate elements into your design, spend some time ressearching lithium battery safety precautions. Always independently verify lithium battery circuits before assembling them. Never leave lithium batteries unattended when they are charging or in use.

Here's a link to the datasheet for the battery-charging chip. Double-check your designs against its recommendations:

http://ww1.microchip.com/downloads/en/DeviceDoc/20001984g.pdf

I'm not even going to try to make a comprehensive list of safety precautions to take when handling lithium batteries, and working with circuitry that interacts with them is even more dangerous. Do your own research on how to work with them safely, start out with small batteries in the 100s of milliAmp-hours, and most importantly, don't blame me if anything goes wrong. The MIT license is very permissive, but it also says there's no warranty :)

Future Work

  • I should use a voltage regulator with a 'power good' pin and connect it to the reset line, to reduce problems with power supply glitches when the battery gets low.

  • I haven't tested the USB data lines, and if they do work, there isn't much space to add the optional-but-recommended TVS diodes such as an SP0503BAHT. It might be better to use a cheaper microcontroller and only use the USB port for power.

  • There's no "heartbeat" LED, and it's nice to have at least one user-controlled LED on a board for all kinds of reasons. For one thing, there's no way for the board to indicate that it has a low battery.

  • I need to polish a simple test firmware which reads the battery voltage and prints it out over UART every few seconds.

  • It's usually silly to use a linear voltage regulator in a simple battery-powered application, because you waste a bunch of power. Using a buck converter would be a better choice here.

  • Per #1, I should connect the MCP73831 ground pin to a larger ground plane to help it dissipate heat and maybe reach its maximum charge current of 500mA.

  • It might be a good idea to move the 'Ground' and '+Battery' breadboard pins farther apart, to make accidental shorts less likely.

Parts

29
QtyValueFootprintReferences
44u7Capacitor_SMD:C_0603_1608MetricC1, C2, C3, C4
2100KResistor_SMD:R_0402_1005MetricR4, R5
2100nCapacitor_SMD:C_0402_1005MetricC7, C8
210nCapacitor_SMD:C_0402_1005MetricC9, C11
22K2Resistor_SMD:R_0603_1608MetricR2, R3
25pCapacitor_SMD:C_0402_1005MetricC5, C6
11uCapacitor_SMD:C_0603_1608MetricC10
1AP2210Package_TO_SOT_SMD:SOT-23U2
1BatteryConnector_JST:JST_PH_S2B-PH-K_1x02_P2.00mm_HorizontalJ5
1BeadResistor_SMD:R_0603_1608MetricFB1
1ChargingLED_SMD:LED_0603_1608MetricD2
1DoneLED_SMD:LED_0603_1608MetricD3
1GPIO1Connector_PinHeader_2.54mm:PinHeader_1x12_P2.54mm_VerticalJ2
1GPIO2Connector_PinHeader_2.54mm:PinHeader_1x12_P2.54mm_VerticalJ3
1LOGOSTM32L422KB_LiPo:oshw_logoG***
1LSECrystal:Crystal_SMD_3215-2Pin_3.2x1.5mmY1
1MCP73831Package_TO_SOT_SMD:SOT-23-5U3
1Off-OnSTM32L422KB_LiPo:mini_slide_switchSW1
1PROGResistor_SMD:R_0603_1608MetricR1
1STM32L422KBPackage_QFP:LQFP-32_7x7mm_P0.8mmU1
1uUSBSTM32L422KB_LiPo:MyMicroUSBJ1

Similar boards

  • 2 layers35 × 38.4 mmHandgelenk, the printed circuit board in 3D

    Handgelenk

    Jeija/esp8266-smartwatch

    ESP8266 DIY WiFi Smartwatch with MPU-9250, RTC, OLED, FT232, ...

    61 parts233
  • 2 layers109 × 71 mmGamma split, the printed circuit board in 3D

    Gamma split

    ahtn/keyboard_pcb

    156 parts96
  • 2 layers35 × 47 mmXling, the printed circuit board in 3D

    Xling

    mcusim/Xling

    Xling, a pocket demon

    77 parts67
  • 2 layers22.9 × 50.8 mmPenguino STM32WL LoRa E5, the printed circuit board in 3D

    Penguino STM32WL LoRa E5

    azerimaker/Penguino-STM32WL-LoRa-E5

    This repo contains all the necessary design and fabrication files for the Seeed Studio LoRa-E5 based Penguino Feather breakout board.

    58 parts42
  • 2 layers132 × 90.7 mmDao choc ble right, the printed circuit board in 3D

    Dao choc ble right

    Mposiblee/Zireael

    The keyboard is based on Dao Chok BLE. The locations of components on the board have been changed, space for the battery has been added, and the thumb cluster has also been changed.

    79 parts42CERN-OHL-P-2.0
  • 2 layers29.2 × 38.1 mmHD150-mod, the printed circuit board in 3D

    HD150-mod

    OpenEPaperLink/Hardware

    Hardware files for the OpenEpaperLink project

    30 parts42
  • 2 layers70 × 151 mmDm50, the printed circuit board in 3D

    Dm50

    xavierbasc/dm50

    DM50 is a cheap, powerful, easy to build, open source hardware, and high precision calculator.

    131 parts38GPL-3.0
  • 2 layers95.2 × 154.5 mmBadge2017, the printed circuit board in 3D

    Badge2017

    cryptovillage/badge2017

    The 2017 Crypto and Privacy Village Badge

    233 parts31

Questions

How big is the STM32L422KB LiPo PCB?

It measures 17.8 × 30.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the STM32L422KB LiPo use?

29 parts, built around the STM32L422KBT6 and MCP73831. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the STM32L422KB LiPo KiCad files?

From the WRansohoff/STM32_LiPo_Example repository on GitHub, at the commit this page was made from: the board is STM32L422KB_LiPo.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the STM32L422KB LiPo design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).