Skip to the content
2 layers180 × 130 mmCell test bench, the printed circuit board in 3D

Single-cell characterization bench for 18650 and 21700 Li-ion cells (DMEGC INR45E, generic 3.5 Ah 18650). Part of the Solaris final-year project.

Size
180 × 130 mm
Copper layers
2
Thickness
1.6 mm
Parts
133
Nets
94
Pads
384
Tracks, vias
2,188, 922
Pours
7
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
13 Oct 2026
Updated
28 Oct 2026

Overview

Cell test bench is an open-source printed circuit board by 0hasant, from the 0hasant/Liion_Cell_Simulator repository on GitHub. It is a 2-layer board of 180 × 130 mm with 133 parts on 94 nets, routed with 2,188 tracks and 922 vias.

It is built around the OPA2188AID, LM339N and LM393N, with the TL431ACLPR, BS170 and BAT85 among its other parts. Its parts include 54 resistors, 22 connectors, 21 capacitors, 12 transistors and 8 ICs.

Main components

8

README

README.md

Cell Test Bench

Single-cell characterization bench for 18650 and 21700 Li-ion cells (DMEGC INR45E, generic 3.5 Ah 18650). Part of the Solaris final-year project.

  • 0–10 A linear electronic load (constant current), down to 2.0 V
  • Charging up to 5 A from a 30 V / 10 A bench PSU through an XL4016 CC/CV module, voltage set by a DAC
  • Bidirectional current measurement on one 10 mΩ 4-terminal shunt (Ohmite LVK25)
  • Cell held at about 10–45 °C in an insulated pocket cooled/heated by two TEC1-12706 Peltiers
  • STM32F103 Blue Pill, USB CDC to a Python UI
  • Hardware protection (OV, UV, OC, OT) that works without the firmware

Repository layout

PathContents
hardware/kicad/KiCad project: open cell_test_bench.kicad_pro
hardware/kicad/lib/Project footprint library (cell_bench.pretty) and 3D models (cell_bench.3dshapes)
hardware/bom.csvBOM with Özdisan links where available
hardware/tools/Python scripts that generated the schematic, placement and routing
mechanical/Enclosure + thermal cell pocket (CadQuery): STL parts, STEP assembly, renders
docs/Schematic PDF, PCB renders, DRC report
firmware/, ui/Not started yet

Status (v0.2)

ItemState
Schematic8 sheets, every part has a footprint, netlist checked against KiCad's export
PartsHand-solder friendly: THT where sensible, 1206 passives, SOIC-8 op-amp
PCB180 × 130 mm, 2 layers (order 2 oz copper), placed and routed, GND pours on both layers
DRCSee docs/drc_report.txt and the notes below
3DBoard STEP + enclosure assembly in mechanical/step/

Opening in KiCad 10

The files are saved in KiCad 7 format. KiCad 10 opens them and upgrades on save. The project's own fp-lib-table points to lib/cell_bench.pretty, so the footprints and 3D models travel with the repository.

After opening, run these once in KiCad 10:

  1. Schematic → Inspect → ERC. Expect pin-type warnings on the module headers, which are drawn as connectors.
  2. PCB → Edit → Fill All Zones (B), then Inspect → DRC.
  3. Tools → Update PCB from Schematic should report no changes.

Layout notes

  • Every connector sits on a board edge, with wire entry facing outward.
    • Left edge: PSU input, buck modules, XL4016 charger, thermostat.
    • Bottom edge: cell, series resistor, IRFP260N, NTCs. The MOSFET's back faces outward so the heatsink bolts on beyond the edge.
    • Top edge: Peltier driver, fans, Blue Pill USB.
  • High-current path: 3 mm tracks on both layers, plus pours. The 10 mΩ shunt pad necks down to 1.6 mm because the pad itself is only 1.4 mm wide.
  • Ground: the bottom layer is kept as clear as possible so its GND pour stays continuous. Each SMD GND pad has its own via to it, and stitching vias tie the two pours together.
  • Plug-in modules (Blue Pill, 2× ADS1115, 2× MCP4725) have keep-out areas where the module body overhangs the board.
  • The layout was autorouted by hardware/tools/router.py. It is electrically complete, but a hand pass in KiCad (or a run through Quilter) will make it tidier.

Sheets

SheetWhat it does
PowerPSU input, 10 A mini-blade fuse, TVS, 12 V (XL4016) and 5 V (MP1584) buck modules, thermostat cutting +12V_SW
Cell_RelaysCell power and Kelvin-sense connectors, 15 A cell fuse, 10 mΩ shunt, relays K1 (charger) and K2 (load), Panasonic ALFG2PF121, with interlock and fault drop-out
Electronic_LoadIRFP260N linear CC loop (OPA2188), MCP4725 setpoint, series 0.1 Ω 50 W resistor, kill transistors, bidirectional current monitor I_MON
ChargerXL4016 CC/CV module, second MCP4725 injecting current into FB to lower the output from a 4.25 V hardware ceiling
MeasurementADS1115 #1 (shunt, cell voltage), ADS1115 #2 (four NTCs), V_FAST divider for the internal ADC
ProtectionTL431 2.5 V reference, LM339N + LM393N comparators, FAULT_N wired-OR, FAULT inverter
ThermalBTS7960 H-bridge for 2× TEC1-12706, fan PWM (IRLZ44N), pocket mixing fan
MCUBlue Pill headers, USB back-feed diode, debug UART, I2C pull-ups

Blue Pill pin map

PinSignalFunction
PA0I_MONFast current (internal ADC), 1.65 V + 0.12 V/A
PA1V_FASTFast cell voltage / 2 (internal ADC)
PA8FAN_PWMTIM1_CH1, both 12 V fans
PA9 / PA10DBG_TX / DBG_RXDebug UART
PA11 / PA12USBUSB CDC to the PC (on the Blue Pill)
PB0 / PB1TEC_RPWM / TEC_LPWMTIM3_CH3 / CH4, Peltier heat/cool
PB10TEC_ENBTS7960 enable
PB6 / PB7SCL / SDAI2C1: ADS1115 0x48, 0x49; MCP4725 0x60 (load), 0x61 (charger)
PB12 / PB13K1_EN / K2_ENCharger relay / load relay
PB14LOAD_OFFHigh = load off (pulled up, off at boot)
PB15FAULT_NRead hardware fault; open-drain output to force a stop

The Blue Pill plugs in with its USB end at the top board edge. The silkscreen marks the B12 and VB corners: check the orientation before soldering the headers.

Key design numbers

  • Load setpoint: DAC 0–3.3 V → divider 29.4 k / 1 k → 0–108 mV → 0–10.8 A.
  • Current monitor: I_MON = 1.65 V + 0.12 V/A.
  • Protection trips: OV > ~4.29 V, UV < ~1.95 V, discharge > ~11 A, charge > ~6.4 A, heatsink or cell NTC > ~62 °C.
  • Charger: set the XL4016 CV pot to 4.25 V before connecting the FB tap. The DAC can only lower the voltage from there.

Known limits

  • The XL4016 module's own current limit is bypassed, because its IN− and OUT− share system ground. Charge current is regulated by firmware and limited by the OC comparator.
  • UV protection also trips when no cell is inserted, and prevents charging a cell that is below ~1.95 V.
  • The comparators have no hysteresis yet. The firmware is expected to latch faults.
  • Check that the BTS7960 module accepts 3.3 V logic inputs.
  • Module pin orders (MCP4725, ADS1115, BTS7960) vary between sellers. Check them against the silkscreen before soldering the sockets.
  • Check the relay footprint against the Panasonic ALFG2PF121 datasheet. KiCad's footprint is drawn for the ALFG series.

Regenerating

The schematic, placement and routing are reproducible from hardware/tools/:

text
python3 design.py ../kicad                 # schematic (overwrites edits!)
python3 makelib.py ../kicad                # project footprint library + 3D models
kicad-cli sch export netlist --format kicadsexpr -o net.net ../kicad/cell_test_bench.kicad_sch
python3 pcbgen.py net.net ../kicad         # board outline + placement (overwrites the PCB!)
python3 router.py in.kicad_pcb out.kicad_pcb

Once you start editing in KiCad, those edits are the source of truth. Don't re-run the generators after that.

Parts

133
QtyValueFootprintReferences
1110kcell_bench:R_1206_3216MetricR305, R306, R308, R510, R511, R602, R603, R609, R611, R614, R615
10100nFcell_bench:C_1206_3216MetricC304, C501, C502, C503, C504, C505, C506, C601, C602, C603
10BS170cell_bench:TO-92_Inline_WideQ201, Q202, Q203, Q204, Q205, Q206, Q302, Q303, Q601, Q701
810k 0.1%cell_bench:R_1206_3216MetricR303, R304, R503, R504, R506, R507, R508, R509
7100kcell_bench:R_1206_3216MetricR203, R204, R206, R207, R613, R702, R704
6100Rcell_bench:R_1206_3216MetricR307, R402, R501, R502, R505, R703
61kcell_bench:R_1206_3216MetricR202, R205, R312, R313, R601, R701
4M3 mounting holecell_bench:MountingHole_3.2mm_M3H101, H102, H103, H104
310nFcell_bench:C_1206_3216MetricC301, C303, C507
3BAT85cell_bench:D_DO-35_SOD27_P7.62mm_HorizontalD301, D302, D401
210uFcell_bench:C_1206_3216MetricC305, C801
21N4007cell_bench:D_DO-41_SOD81_P10.16mm_HorizontalD201, D202
21N5819cell_bench:D_DO-41_SOD81_P10.16mm_HorizontalD701, D801
21k 0.1%cell_bench:R_1206_3216MetricR302, R309
2220uF 25Vcell_bench:CP_Radial_D8.0mm_P3.50mmC102, C104
24.7k DNPcell_bench:R_1206_3216MetricR801, R802
11.2kcell_bench:R_1206_3216MetricR401
1100uF 16Vcell_bench:CP_Radial_D6.3mm_P2.50mmC103
1100uF 50Vcell_bench:CP_Radial_D10.0mm_P5.00mmC101
110A mini bladecell_bench:Fuseholder_Blade_Mini_Keystone_3568F101
110mR 1% 2W LVK25cell_bench:R_Shunt_Ohmite_LVK25R201
112V buck XL4016: IN+ IN- OUT+ OUT-cell_bench:TerminalBlock_Phoenix_MKDS-1,5-4-5.08_1x04_P5.08mm_HorizontalJ102
112k 0.1%cell_bench:R_1206_3216MetricR310
115A mini blade (cell)cell_bench:Fuseholder_Blade_Mini_Keystone_3568F202
115kcell_bench:R_1206_3216MetricR604
11nFcell_bench:C_1206_3216MetricC302
11uFcell_bench:C_1206_3216MetricC401
120kcell_bench:R_1206_3216MetricR612
124.9kcell_bench:R_1206_3216MetricR311
127kcell_bench:R_1206_3216MetricR606
129.4k 0.1%cell_bench:R_1206_3216MetricR301
15.6kcell_bench:R_1206_3216MetricR610
15V buck MP1584: IN+ IN- OUT+ OUT-cell_bench:TerminalBlock_Phoenix_MKDS-1,5-4-5.08_1x04_P5.08mm_HorizontalJ103
17.15kcell_bench:R_1206_3216MetricR608
18.2kcell_bench:R_1206_3216MetricR605
19.1kcell_bench:R_1206_3216MetricR607
1ADS1115 module #1 (ADDR=GND): VDD GND SCL SDA ADDR ALRT A0 A1 A2 A3cell_bench:PinSocket_1x10_P2.54mm_VerticalU501
1ADS1115 module #2 (ADDR=VDD): VDD GND SCL SDA ADDR ALRT A0 A1 A2 A3cell_bench:PinSocket_1x10_P2.54mm_VerticalU502
1ALFG2PF121 (charge)cell_bench:Relay_SPST_Panasonic_ALFG_FormAK1
1ALFG2PF121 (load)cell_bench:Relay_SPST_Panasonic_ALFG_FormAK2
1BTS7960 IBT-2 logic: RPWM LPWM R_EN L_EN R_IS L_IS VCC GNDcell_bench:PinHeader_1x08_P2.54mm_VerticalJ701
1BTS7960 power: B+ B- M+ M-cell_bench:TerminalBlock_Phoenix_MKDS-1,5-4-5.08_1x04_P5.08mm_HorizontalJ702
1Blue Pill header A: B12 B13 B14 B15 A8 A9 A10 A11 A12 A15 B3 B4 B5 B6 B7 B8 B9 5V GND 3V3cell_bench:PinSocket_1x20_P2.54mm_VerticalJ801
1Blue Pill header B: VB C13 C14 C15 A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B10 B11 RST 3V3 GND GNDcell_bench:PinSocket_1x20_P2.54mm_VerticalJ802
1Cell Kelvin sense (+, -)cell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_VerticalJ206
1Cell power to pocket (+, -)cell_bench:TerminalBlock_Phoenix_MKDS-3-2-5.08_1x02_P5.08mm_HorizontalJ205
1Debug UART: TX RX GNDcell_bench:PinHeader_1x03_P2.54mm_VerticalJ803
1Fan 12V Peltier hot side (+,-)cell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_VerticalJ706
1Fan 12V heatsink (+,-)cell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_VerticalJ704
1IRFP260Ncell_bench:TO-247-3_VerticalQ301
1IRLZ44Ncell_bench:TO-220-3_VerticalQ702
1LM339Ncell_bench:DIP-14_W7.62mmU601
1LM393Ncell_bench:DIP-8_W7.62mmU602
1MCP4725 module #1 (A0=GND, 0x60): VCC GND SCL SDA A0 OUTcell_bench:PinSocket_1x06_P2.54mm_VerticalU302
1MCP4725 module #2 (A0=VCC, 0x61): VCC GND SCL SDA A0 OUTcell_bench:PinSocket_1x06_P2.54mm_VerticalU401
1NTC 10k aircell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_VerticalJ502
1NTC 10k cellcell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_VerticalJ501
1NTC 10k hscell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_VerticalJ503
1NTC 10k teccell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_VerticalJ504
1OPA2188AIDcell_bench:SOIC-8_3.9x4.9mm_P1.27mmU301
1P6KE33A (TVS)cell_bench:D_DO-15_P10.16mm_HorizontalD101
1PSU in 30V 10A (+, -)cell_bench:TerminalBlock_Phoenix_MKDS-3-2-5.08_1x02_P5.08mm_HorizontalJ101
1Peltier 2x TEC1-12706 in seriescell_bench:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_HorizontalJ703
1Pocket mixing fan 5Vcell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_VerticalJ705
1Series R 0.1R 50W alu (off-board)cell_bench:TerminalBlock_Phoenix_MKDS-3-2-5.08_1x02_P5.08mm_HorizontalJ301
1TL431ACLPRcell_bench:TO-92_Inline_WideU603
1Thermostat KSD9700 60C NCcell_bench:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_HorizontalJ104
1XL4016 CC/CV module: IN+ IN- OUT+ OUT-cell_bench:TerminalBlock_Phoenix_MKDS-1,5-4-5.08_1x04_P5.08mm_HorizontalJ401
1XL4016 FB tap (wire to FB pin, GND)cell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_VerticalJ402

Similar boards

  • 2 layers60 × 80 mmLED board PWM, the printed circuit board in 3D

    LED board PWM

    AndreasNosal/NatureCircuit-led-PWM

    temporary

    43 partsGPL-3.0
  • 4 layers110.6 × 52.5 mmSineWaveGenerator, the printed circuit board in 3D

    SineWaveGenerator

    CARSSCenter/OpenNerve-Implantable-Pulse-Generator

    Source files for the OpenNerve implantable pulse generator (IPG), including firmware and hardware for Gen1 and Gen2 PCBAs as well as enclosure CAD and documentation.

    101 parts26CC-BY-4.0
  • 4 layers175.3 × 76.1 mmMyProject, the printed circuit board in 3D

    MyProject

    Hakman482/fpga-power-quality-monitor

    A complete hardware–FPGA–software prototype for real-time single-phase power-quality measurement, developed as an MSc Electronic & Electrical Engineering project.

    118 parts
  • 4 layersFanCTRL, the printed circuit board in 3D

    FanCTRL

    MuffinKing-jpeg/FanCTRL

    Controlled board for PC fans, with mux capabilities. WIP

    272 parts
  • 2 layers101.5 × 63 mmN24 ACAmplifier, the printed circuit board in 3D

    N24 ACAmplifier

    deqit/PhilipsPM2528

    Hardware and software for the Philips PM2528

    114 parts3
  • 2 layers99.1 × 99.1 mmBLDC SensorlessWithLM339, the printed circuit board in 3D

    BLDC SensorlessWithLM339

    phpkadir/KiCad-Sensorless-BLDC-ESC

    I designed this pcb because I want to be able to try different microcontrollers as part of Electronic Speed Controller projects.

    55 parts2MIT
  • 2 layers135 × 215 mmTENG input circuitry and transmitter PCB, the printed circuit board in 3D

    TENG input circuitry and transmitter PCB

    LewisHall123/Drone-controller-sleeve-PCB

    A circuit designed to send commands to a drone that it controls. The inputs to the circuit that determine the commands sent come from six separate tribo-electric nanogenerators (TENG).

    99 parts1MIT

Questions

How big is the Cell test bench PCB?

It measures 180 × 130 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Cell test bench use?

133 parts, built around the OPA2188AID, LM339N, LM393N and TL431ACLPR. 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 Cell test bench KiCad files?

From the 0hasant/Liion_Cell_Simulator repository on GitHub, at the commit this page was made from: the board is hardware/kicad/cell_test_bench.kicad_pcb and its schematic hardware/kicad/cell_test_bench.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Cell test bench design in my own project?

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