

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.
- 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
8OPA2188AID
SOIC-8-18V~-2V、2V~18V -40℃~+105℃ 0.8V/us 1.7nA 146dB 160pA 18mA 2 2MHz 30nV/℃ 475uA 4V~36V 6uV 8.8nV/√Hz@1kHz EMI filtering/RF suppression、Zero drift / auto-zero、Reverse-phase input protection Rail-to-rail output SOIC-8 Precision Op Amps ROHSTexas InstrumentsPrecision Op AmpsLM339N
DIP-14-16V~-1.5V、1.5V~16V 0℃~+70℃ 1.3us 25nA 2mV 36V 3V~32V 5nA 800uA Four channels TTL、CMOS DIP-14 Comparators ROHSHGSEMIComparatorsLM393N
DIP-80℃~+70℃ 2 2.5mA 250nA 2V~36V 36V 5mV 5nA Fail-safe function Open-drain ±16V DIP-8 Comparators ROHSHGSEMIComparatorsTL431ACLPR
TO-92-30℃~+70℃ 100mA 2.495V~36V 2.495V~36V 600uA Adjustable Parallel ±1% TO-92-3 Voltage Reference ROHSTexas InstrumentsVoltage ReferenceBS170
TO-92-55℃~+150℃ 1 N-channel 1.2Ω@10V 17pF 2.1V 24pF 500mA 60V 7pF 830mW N-Channel TO-92 MOSFETs ROHSonsemiMOSFETsBAT85
DO-341 Independent 200mA 2uA@25V 30V 5A 800mV@100mA DO-34 Schottky Diodes ROHSNexperiaSchottky DiodesIRFP260N
TO-247MOSFETsMinosIRLZ44N
TO-22055V 47A N-Channel HEXFET® Power MOSFETInfineon TechnologiesUncategorised
README
README.mdCell 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
| Path | Contents |
|---|---|
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.csv | BOM 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)
| Item | State |
|---|---|
| Schematic | 8 sheets, every part has a footprint, netlist checked against KiCad's export |
| Parts | Hand-solder friendly: THT where sensible, 1206 passives, SOIC-8 op-amp |
| PCB | 180 × 130 mm, 2 layers (order 2 oz copper), placed and routed, GND pours on both layers |
| DRC | See docs/drc_report.txt and the notes below |
| 3D | Board 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:
- Schematic → Inspect → ERC. Expect pin-type warnings on the module headers, which are drawn as connectors.
- PCB → Edit → Fill All Zones (B), then Inspect → DRC.
- 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
| Sheet | What it does |
|---|---|
| Power | PSU input, 10 A mini-blade fuse, TVS, 12 V (XL4016) and 5 V (MP1584) buck modules, thermostat cutting +12V_SW |
| Cell_Relays | Cell 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_Load | IRFP260N linear CC loop (OPA2188), MCP4725 setpoint, series 0.1 Ω 50 W resistor, kill transistors, bidirectional current monitor I_MON |
| Charger | XL4016 CC/CV module, second MCP4725 injecting current into FB to lower the output from a 4.25 V hardware ceiling |
| Measurement | ADS1115 #1 (shunt, cell voltage), ADS1115 #2 (four NTCs), V_FAST divider for the internal ADC |
| Protection | TL431 2.5 V reference, LM339N + LM393N comparators, FAULT_N wired-OR, FAULT inverter |
| Thermal | BTS7960 H-bridge for 2× TEC1-12706, fan PWM (IRLZ44N), pocket mixing fan |
| MCU | Blue Pill headers, USB back-feed diode, debug UART, I2C pull-ups |
Blue Pill pin map
| Pin | Signal | Function |
|---|---|---|
| PA0 | I_MON | Fast current (internal ADC), 1.65 V + 0.12 V/A |
| PA1 | V_FAST | Fast cell voltage / 2 (internal ADC) |
| PA8 | FAN_PWM | TIM1_CH1, both 12 V fans |
| PA9 / PA10 | DBG_TX / DBG_RX | Debug UART |
| PA11 / PA12 | USB | USB CDC to the PC (on the Blue Pill) |
| PB0 / PB1 | TEC_RPWM / TEC_LPWM | TIM3_CH3 / CH4, Peltier heat/cool |
| PB10 | TEC_EN | BTS7960 enable |
| PB6 / PB7 | SCL / SDA | I2C1: ADS1115 0x48, 0x49; MCP4725 0x60 (load), 0x61 (charger) |
| PB12 / PB13 | K1_EN / K2_EN | Charger relay / load relay |
| PB14 | LOAD_OFF | High = load off (pulled up, off at boot) |
| PB15 | FAULT_N | Read 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/:
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_pcbOnce you start editing in KiCad, those edits are the source of truth. Don't re-run the generators after that.
Parts
133| Qty | Value | Footprint | References |
|---|---|---|---|
| 11 | 10k | cell_bench:R_1206_3216Metric | R305, R306, R308, R510, R511, R602, R603, R609, R611, R614, R615 |
| 10 | 100nF | cell_bench:C_1206_3216Metric | C304, C501, C502, C503, C504, C505, C506, C601, C602, C603 |
| 10 | BS170 | cell_bench:TO-92_Inline_Wide | Q201, Q202, Q203, Q204, Q205, Q206, Q302, Q303, Q601, Q701 |
| 8 | 10k 0.1% | cell_bench:R_1206_3216Metric | R303, R304, R503, R504, R506, R507, R508, R509 |
| 7 | 100k | cell_bench:R_1206_3216Metric | R203, R204, R206, R207, R613, R702, R704 |
| 6 | 100R | cell_bench:R_1206_3216Metric | R307, R402, R501, R502, R505, R703 |
| 6 | 1k | cell_bench:R_1206_3216Metric | R202, R205, R312, R313, R601, R701 |
| 4 | M3 mounting hole | cell_bench:MountingHole_3.2mm_M3 | H101, H102, H103, H104 |
| 3 | 10nF | cell_bench:C_1206_3216Metric | C301, C303, C507 |
| 3 | BAT85 | cell_bench:D_DO-35_SOD27_P7.62mm_Horizontal | D301, D302, D401 |
| 2 | 10uF | cell_bench:C_1206_3216Metric | C305, C801 |
| 2 | 1N4007 | cell_bench:D_DO-41_SOD81_P10.16mm_Horizontal | D201, D202 |
| 2 | 1N5819 | cell_bench:D_DO-41_SOD81_P10.16mm_Horizontal | D701, D801 |
| 2 | 1k 0.1% | cell_bench:R_1206_3216Metric | R302, R309 |
| 2 | 220uF 25V | cell_bench:CP_Radial_D8.0mm_P3.50mm | C102, C104 |
| 2 | 4.7k DNP | cell_bench:R_1206_3216Metric | R801, R802 |
| 1 | 1.2k | cell_bench:R_1206_3216Metric | R401 |
| 1 | 100uF 16V | cell_bench:CP_Radial_D6.3mm_P2.50mm | C103 |
| 1 | 100uF 50V | cell_bench:CP_Radial_D10.0mm_P5.00mm | C101 |
| 1 | 10A mini blade | cell_bench:Fuseholder_Blade_Mini_Keystone_3568 | F101 |
| 1 | 10mR 1% 2W LVK25 | cell_bench:R_Shunt_Ohmite_LVK25 | R201 |
| 1 | 12V buck XL4016: IN+ IN- OUT+ OUT- | cell_bench:TerminalBlock_Phoenix_MKDS-1,5-4-5.08_1x04_P5.08mm_Horizontal | J102 |
| 1 | 12k 0.1% | cell_bench:R_1206_3216Metric | R310 |
| 1 | 15A mini blade (cell) | cell_bench:Fuseholder_Blade_Mini_Keystone_3568 | F202 |
| 1 | 15k | cell_bench:R_1206_3216Metric | R604 |
| 1 | 1nF | cell_bench:C_1206_3216Metric | C302 |
| 1 | 1uF | cell_bench:C_1206_3216Metric | C401 |
| 1 | 20k | cell_bench:R_1206_3216Metric | R612 |
| 1 | 24.9k | cell_bench:R_1206_3216Metric | R311 |
| 1 | 27k | cell_bench:R_1206_3216Metric | R606 |
| 1 | 29.4k 0.1% | cell_bench:R_1206_3216Metric | R301 |
| 1 | 5.6k | cell_bench:R_1206_3216Metric | R610 |
| 1 | 5V buck MP1584: IN+ IN- OUT+ OUT- | cell_bench:TerminalBlock_Phoenix_MKDS-1,5-4-5.08_1x04_P5.08mm_Horizontal | J103 |
| 1 | 7.15k | cell_bench:R_1206_3216Metric | R608 |
| 1 | 8.2k | cell_bench:R_1206_3216Metric | R605 |
| 1 | 9.1k | cell_bench:R_1206_3216Metric | R607 |
| 1 | ADS1115 module #1 (ADDR=GND): VDD GND SCL SDA ADDR ALRT A0 A1 A2 A3 | cell_bench:PinSocket_1x10_P2.54mm_Vertical | U501 |
| 1 | ADS1115 module #2 (ADDR=VDD): VDD GND SCL SDA ADDR ALRT A0 A1 A2 A3 | cell_bench:PinSocket_1x10_P2.54mm_Vertical | U502 |
| 1 | ALFG2PF121 (charge) | cell_bench:Relay_SPST_Panasonic_ALFG_FormA | K1 |
| 1 | ALFG2PF121 (load) | cell_bench:Relay_SPST_Panasonic_ALFG_FormA | K2 |
| 1 | BTS7960 IBT-2 logic: RPWM LPWM R_EN L_EN R_IS L_IS VCC GND | cell_bench:PinHeader_1x08_P2.54mm_Vertical | J701 |
| 1 | BTS7960 power: B+ B- M+ M- | cell_bench:TerminalBlock_Phoenix_MKDS-1,5-4-5.08_1x04_P5.08mm_Horizontal | J702 |
| 1 | Blue Pill header A: B12 B13 B14 B15 A8 A9 A10 A11 A12 A15 B3 B4 B5 B6 B7 B8 B9 5V GND 3V3 | cell_bench:PinSocket_1x20_P2.54mm_Vertical | J801 |
| 1 | Blue Pill header B: VB C13 C14 C15 A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B10 B11 RST 3V3 GND GND | cell_bench:PinSocket_1x20_P2.54mm_Vertical | J802 |
| 1 | Cell Kelvin sense (+, -) | cell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J206 |
| 1 | Cell power to pocket (+, -) | cell_bench:TerminalBlock_Phoenix_MKDS-3-2-5.08_1x02_P5.08mm_Horizontal | J205 |
| 1 | Debug UART: TX RX GND | cell_bench:PinHeader_1x03_P2.54mm_Vertical | J803 |
| 1 | Fan 12V Peltier hot side (+,-) | cell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J706 |
| 1 | Fan 12V heatsink (+,-) | cell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J704 |
| 1 | IRFP260N | cell_bench:TO-247-3_Vertical | Q301 |
| 1 | IRLZ44N | cell_bench:TO-220-3_Vertical | Q702 |
| 1 | LM339N | cell_bench:DIP-14_W7.62mm | U601 |
| 1 | LM393N | cell_bench:DIP-8_W7.62mm | U602 |
| 1 | MCP4725 module #1 (A0=GND, 0x60): VCC GND SCL SDA A0 OUT | cell_bench:PinSocket_1x06_P2.54mm_Vertical | U302 |
| 1 | MCP4725 module #2 (A0=VCC, 0x61): VCC GND SCL SDA A0 OUT | cell_bench:PinSocket_1x06_P2.54mm_Vertical | U401 |
| 1 | NTC 10k air | cell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J502 |
| 1 | NTC 10k cell | cell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J501 |
| 1 | NTC 10k hs | cell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J503 |
| 1 | NTC 10k tec | cell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J504 |
| 1 | OPA2188AID | cell_bench:SOIC-8_3.9x4.9mm_P1.27mm | U301 |
| 1 | P6KE33A (TVS) | cell_bench:D_DO-15_P10.16mm_Horizontal | D101 |
| 1 | PSU in 30V 10A (+, -) | cell_bench:TerminalBlock_Phoenix_MKDS-3-2-5.08_1x02_P5.08mm_Horizontal | J101 |
| 1 | Peltier 2x TEC1-12706 in series | cell_bench:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal | J703 |
| 1 | Pocket mixing fan 5V | cell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J705 |
| 1 | Series R 0.1R 50W alu (off-board) | cell_bench:TerminalBlock_Phoenix_MKDS-3-2-5.08_1x02_P5.08mm_Horizontal | J301 |
| 1 | TL431ACLPR | cell_bench:TO-92_Inline_Wide | U603 |
| 1 | Thermostat KSD9700 60C NC | cell_bench:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal | J104 |
| 1 | XL4016 CC/CV module: IN+ IN- OUT+ OUT- | cell_bench:TerminalBlock_Phoenix_MKDS-1,5-4-5.08_1x04_P5.08mm_Horizontal | J401 |
| 1 | XL4016 FB tap (wire to FB pin, GND) | cell_bench:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J402 |
Similar boards
- 2 layers174.2 × 124 mm

- 2 layers60 × 80 mm

- 4 layers110.6 × 52.5 mm

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 mm

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 layers

- 2 layers101.5 × 63 mm

- 2 layers99.1 × 99.1 mm

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 mm

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.