Skip to the content
2 layers135 × 21 mmUsbc pd airsoft module, the printed circuit board in 3D

Usbc pd airsoft module

Fluffik214/airsoft-battery-module

This is a USB-C PD charger and cell monitor for a 3S LiPo that lives in an airsoft stock tube. It has one USB-C port.

Size
135 × 21 mm
Copper layers
2
Thickness
1.6 mm
Parts
98
Nets
67
Pads
283
Tracks, vias
413, 164
Pours
7
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
2 Oct 2026
Updated
3 Oct 2026

Overview

Usbc pd airsoft module is an open-source printed circuit board by Fluffik214, from the Fluffik214/airsoft-battery-module repository on GitHub. It is a 2-layer board of 135 × 21 mm with 98 parts on 67 nets, routed with 413 tracks and 164 vias.

It is built around the STM32F042F6P6, CH224K and BQ25798RQMR, with the TPD2E2U06DCK, BAT54C and DMP3099L among its other parts. Its parts include 35 capacitors, 26 resistors, 6 ICs, 4 diodes and 3 transistors. It belongs with the STM32 boards of this library.

Main components

7

README

README.md

Airsoft Battery Module

This is a USB-C PD charger and cell monitor for a 3S LiPo that lives in an airsoft stock tube. It has one USB-C port. A PD charger charges the pack through it, and a phone plugged into the same port shows each cell's voltage and charge % in the companion Android app.

Board135 × 21 mm, 2 layers, SMT only, no BGA
Pack3S LiPo (made for an iPower 1450 mAh stick). Deans main lead, JST-XH balance plug
ChargingUSB-C PD at 15 V (CH224K) → BQ25798 buck-boost charger
MonitoringBQ7692003 (per-cell voltage, NTC, balancing) → STM32F042 → USB CDC
Idle drainabout 1 µA when unplugged

How it works

  • One port, two jobs. On a PD charger the module charges. On a phone it only reports (5 V never charges, so the phone isn't drained). It never does both at once.
  • Charging rules:
    • It starts after USB has stayed between 12 and 17 V for 5 s, then charges to your preset: Full, a custom %, Storage (3.80 V/cell) or Off.
    • If USB goes above 17 V, charging is cut immediately.
  • Per-cell control, like a hobby balance charger. When a cell is full, it is held there and bled while the current is turned down, so the other cells can catch up. No cell goes more than 10 mV over the target.
  • JP2 solder jumper (back of the board). Open (default) = slow charge, 700 mA. Bridged = fast charge, 1.4 A. Both currents can be changed in the app.
  • Event log in flash. Faults (over-voltage, over-temperature, bad cell…) and a report for every charge are stored on the module. The app shows them the next time a phone is connected.

Repository layout

PathContents
usbc pd airsoft module.kicad_*KiCad 10 project: schematic, routed PCB, design rules
schematic.pdf, bom.csvSchematic printout and bill of materials
DESIGN_NOTES.mdHardware notes: power path, pinouts, checks before first power-up
layout_work/Python scripts that generated the schematic and placed/routed the PCB
firmware/STM32F042 firmware: bare-metal C plus TinyUSB. firmware/README.md is the full guide, covering protocol, settings, safety rules and how to customize
android/Android app: Kotlin, Jetpack Compose, Material 3
release/Prebuilt firmware (.bin / .hex) and app (.apk)
production/Gerber zip for the board house, drill files, pick-and-place, BOM, assembly drawings, and ORDERING.md (fab settings)

Quick start

  1. Flash the firmware. A blank chip starts in the USB DFU bootloader. You can also bridge JP1 while plugging in. Then:
    text
    dfu-util -a 0 -s 0x08000000:leave -D release/airsoft_charger.bin
    STM32CubeProgrammer works too.
  2. Install the app. Copy release/PDCharger-1.0.0.apk to the phone and install it.
  3. Check the pack. Plug the module into the phone with a USB-C cable and open the app.
  4. Charge it. Put the module on a USB-C PD charger that offers 15 V (or 12 V).

Building from source

  • Firmware: needs arm-none-eabi-gcc (tested with xPack 15.2.1). Run:
    text
    python firmware/build.py --gcc <path-to-toolchain-bin>
  • App: needs JDK 17 and the Android SDK. Run:
    text
    cd android && ./gradlew assembleRelease

Safety

LiPo batteries can catch fire. This is a hobby project with no warranty. Check DESIGN_NOTES.md before the first power-up. In particular, confirm that the balance plug's pin 1 is the pack's negative wire.

License

© Fluff. Licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 (CC BY-NC-SA 4.0):

  • You may copy, build and change this project for non-commercial use, if you credit the author and share your changes under the same license.
  • Commercial use, including selling boards, kits or devices built from this design, needs written permission from the author.

Third-party code in firmware/lib/ keeps its own license:

  • TinyUSB: MIT, see firmware/lib/tinyusb/LICENSE.
  • ARM CMSIS core headers: Apache-2.0 (SPDX header in each file).
  • ST device headers: Apache-2.0, see firmware/lib/cmsis/LICENSE-ST-cmsis-device-f0.md.

Parts

98
QtyValueFootprintReferences
810uF 25VCapacitor_SMD:C_0805_2012MetricC11, C12, C13, C14, C15, C17, C18, C21
81uF 10VCapacitor_SMD:C_0402_1005MetricC1, C23, C24, C25, C26, C27, C28, C33
510uF 35VCapacitor_SMD:C_0805_2012MetricC2, C3, C7, C8, C9
4100nFCapacitor_SMD:C_0402_1005MetricC31, C32, C34, C35
456RResistor_SMD:R_0603_1608MetricR13, R14, R15, R16
3100kResistor_SMD:R_0402_1005MetricR10, R11, R20
3100nF 50VCapacitor_SMD:C_0402_1005MetricC4, C10, C16
310kResistor_SMD:R_0402_1005MetricR3, R9, R21
210k B3435 (103AT)Resistor_SMD:R_0402_1005MetricTH1, TH2
21MResistor_SMD:R_0402_1005MetricR18, R19
21kResistor_SMD:R_0402_1005MetricR17, R26
22N7002Package_TO_SOT_SMD:SOT-23Q1, Q3
24.7kResistor_SMD:R_0402_1005MetricR24, R25
247nF 25VCapacitor_SMD:C_0402_1005MetricC5, C6
2M1.6airsoft_module:MountingHole_1.7mm_M1.6H1, H3
2M2MountingHole:MountingHole_2.2mm_M2H2, H4
110.5k 1%Resistor_SMD:R_0402_1005MetricR4
1100RResistor_SMD:R_0402_1005MetricR5
1100RResistor_SMD:R_0603_1608MetricR12
1100k 1%Resistor_SMD:R_0402_1005MetricR22
110k 1%Resistor_SMD:R_0402_1005MetricR23
11kResistor_SMD:R_1206_3216MetricR1
11nF 50VCapacitor_SMD:C_0402_1005MetricC20
11uF 25VCapacitor_SMD:C_0603_1608MetricC22
11uF 50VCapacitor_SMD:C_0805_2012MetricC29
11uHInductor_SMD:L_Coilcraft_XAL4020-XXXL1
12.2kResistor_SMD:R_0402_1005MetricR8
130.1k 1%Resistor_SMD:R_0402_1005MetricR7
13A 32V fastFuse:Fuse_1206_3216MetricF1
14.7uF 10VCapacitor_SMD:C_0603_1608MetricC30
14.7uF 16VCapacitor_SMD:C_0603_1608MetricC19
15.23k 1%Resistor_SMD:R_0402_1005MetricR6
156k 1%Resistor_SMD:R_0402_1005MetricR2
1AP7381-33SA-7Package_TO_SOT_SMD:SOT-23U5
1BALANCE 3S (JST-XH 4P)Connector_JST:JST_XH_S4B-XH-SM4-TB_1x04-1MP_P2.50mm_HorizontalJ2
1BAT54CPackage_TO_SOT_SMD:SOT-23D3
1BATT IN +Connector_Wire:SolderWirePad_1x01_SMD_3x6mmTP1
1BATT IN -Connector_Wire:SolderWirePad_1x01_SMD_3x6mmTP3
1BQ25798RQMRPackage_DFN_QFN:Texas_RQM0029A_VQFN-29_4x4mm_P0.4mmU3
1BQ7692003PWRPackage_SO:TSSOP-20_4.4x6.5mm_P0.65mmU4
1CH224KPackage_SO:SSOP-10-1EP_3.9x4.9mm_P1mm_EP2.1x3.3mmU1
1DFU (BOOT0)Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mmJP1
1DMP3099LPackage_TO_SOT_SMD:SOT-23Q2
1FAST CHARGEJumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mmJP2
1GREEN (status)LED_SMD:LED_0603_1608MetricD4
1GUN OUT +Connector_Wire:SolderWirePad_1x01_SMD_3x6mmTP2
1GUN OUT -Connector_Wire:SolderWirePad_1x01_SMD_3x6mmTP4
1RED (charging)LED_SMD:LED_0603_1608MetricD2
1SMF20ADiode_SMD:D_SMFD1
1STM32F042F6P6Package_SO:TSSOP-20_4.4x6.5mm_P0.65mmU6
1TP 3V3TestPoint:TestPoint_Pad_D1.0mmTP7
1TP BATTestPoint:TestPoint_Pad_D1.0mmTP10
1TP GNDTestPoint:TestPoint_Pad_D1.0mmTP8
1TP SCLTestPoint:TestPoint_Pad_D1.0mmTP12
1TP SDATestPoint:TestPoint_Pad_D1.0mmTP11
1TP SWCLKTestPoint:TestPoint_Pad_D1.0mmTP6
1TP SWDIOTestPoint:TestPoint_Pad_D1.0mmTP5
1TP VBUSTestPoint:TestPoint_Pad_D1.0mmTP9
1TPD2E2U06DCKPackage_TO_SOT_SMD:SOT-323_SC-70U2
1USB_C_Receptacle_USB2.0_16PConnector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12J1

Similar boards

  • 4 layers71 × 67 mmPower board, the printed circuit board in 3D

    Power board

    AndreiVladescu/Vector-UGV

    An 18-DOF hexapod research platform: a smart controller per leg on CAN, a Raspberry Pi CM5 carrier, camera and SDR payload, ELRS / Wi-Fi / 4G links. Built for the PCBWay 9th Project Design Contest.

    144 partsCERN-OHL-S-2.0
  • 4 layers100 × 80 mmOpen Beam Interface, the printed circuit board in 3D

    Open Beam Interface

    nanographs/Open-Beam-Interface

    Just what you need to control the beam and get an image.

    334 parts371
  • 4 layers115.5 × 96.2 mmClosed deck x4, the printed circuit board in 3D

    Closed deck x4

    OpenLogicEFI/Hardware

    Hardware is based off an open source project called Speeduino by Josh Stewart.

    245 parts19
  • 4 layers106.3 × 50 mmController, the printed circuit board in 3D

    Controller

    blonski3/ibm-modern-m-ssk

    Decyzje projektowe i ich uzasadnienia: docs/HARDWAREDECISIONS.md; historia zmian: docs/CHANGELOG.md.

    80 parts
  • 4 layers26.2 × 76.2 mmPower sink only, the printed circuit board in 3D

    Power sink only

    fulgidus/hardware

    Learning KiCad takes time, and pollutes with weird and incomplete projects. Here they are...

    179 parts
  • 4 layers102.5 × 62 mmSensor Cell with Comms, the printed circuit board in 3D

    Sensor Cell with Comms

    Molly-M-Laugh/Senior-Final

    A collection of documentation and files for our group's final senior design project

    93 parts
  • 2 layers35 × 75 mmIntUsbPwmFanController, the printed circuit board in 3D

    IntUsbPwmFanController

    penguineer/IntUsbPwmFanController

    Controller for PWM-based fans using the internal USB 2.0 header

    57 partsCC-BY-SA-4.0
  • 2 layers85.6 × 54 mmUsb pd card, the printed circuit board in 3D

    Usb pd card

    ulyssecrn/usb-pd-card

    PCB business card: USB-C PD charger tester + battery-free NFC tag.

    50 parts

Questions

How big is the Usbc pd airsoft module PCB?

It measures 135 × 21 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Usbc pd airsoft module use?

98 parts, built around the STM32F042F6P6, CH224K, BQ25798RQMR and TPD2E2U06DCK. 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 Usbc pd airsoft module KiCad files?

From the Fluffik214/airsoft-battery-module repository on GitHub, at the commit this page was made from: the board is usbc pd airsoft module.kicad_pcb and its schematic usbc pd airsoft module.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Usbc pd airsoft module design in my own project?

Its repository states no licence, so its author keeps all rights: ask Fluffik214 before reusing the design.