
Cell sim
atopile/cell-sim
This cell-sim is designed to mimic a LiPo battery pack for develpoment of the surrounding electronics, like a BMS.

This cell-sim is designed to mimic a LiPo battery pack for develpoment of the surrounding electronics, like a BMS.
Tca9548apwr is an open-source printed circuit board by atopile, from the atopile/cell-sim repository on GitHub, published under the MIT licence. It is a 2-layer board with 20 parts on 21 nets, routed with 58 tracks and 0 vias.
Its parts include 17 resistors, 2 capacitors and 1 IC. It belongs with the power boards of this library.
This cell-sim is designed to mimic a LiPo battery pack for develpoment of the surrounding electronics, like a BMS.


pip install -r requirements.txt
python example_set_voltages.py
You should see something like this:

Board is intended to be manufactured with JLC, files are in the main directory of the repository. Note, the highlighted isolated regulator needs to be depopulated:
We use PlatformIO to build and upload the firmware via USB.
pio run -t upload or install the PlatformIO VSCode extension and use the upload button.from lib.cellsim import CellSim
cellsim = CellSim(port)Each cell has a relay in series between the cell output and the connector, this can be used to simulate open-wire faults for example.
# Global enable/disable
cellsim.enableOutputAll()
time.sleep(1)
cellsim.disableOutputAll()
time.sleep(1)
# Enable/disable one at a time
# Turn relays on in a wave
for i in range(1, 17):
cellsim.enableOutput(i)
time.sleep(0.1)
time.sleep(1)
# Turn relays off in a wave
for i in range(1, 17):
cellsim.disableOutput(i)
time.sleep(0.1)Each output voltage can be specified between 0.5V and 4.4V
# Set all at once
cellsim.setAllVoltages(3.5)
time.sleep(1)
# Set one at a time
print("\nSetting rainbow voltage pattern...")
for i in range(16):
voltage = 1.0 + (3.0 * i / 15) # Spread 1V to 4V across 16 channels
cellsim.setVoltage(i + 1, voltage)Each channel has an onboard 16bit ADC that measures the cell output. Note this is not a kelvin connection to your DUT, the measurement will only be accurate when minimal current is being drawn by the DUT.
voltages = cellsim.getAllVoltages()
print(f"Voltages: {[f'{v:.3f}' for v in voltages]}")To take a precision measurement, each channel has a multiplexed output that connects to the DMM connector via a relay.
channel_to_measure = 3
# Enable DMM
cellsim.enableDMM(channel_to_measure)
# take measurment using external DMM
# that is connected to the DMM banana outputs
time.sleep(1)
cellsim.disableDMM()Each channel has a resistor + mosfet across its output, this can be used to speed up the discharge of the output capacitors. For example when transitioning from a high output voltage to a low output voltage, there will be an RC decay time before the voltage settles, typically in the ~100ms range. Turning on the load switch will make this much faster.
cellsim.enableLoadSwitchAll()
time.sleep(1)
cellsim.disableLoadSwitchAll()
time.sleep(1)Once your test is finished, you can use the following to close the serial session:
cellsim.close()| Qty | Value | Footprint | References |
|---|---|---|---|
| 17 | 62.5mW Thick Film Resistors 50V ±100ppm/℃ ±1% 10kΩ 0402 Chip Resistor - Surface Mount ROHS | lib:R0402 | R1, R2, R3, R4, R5, R6, R7, R8, R10, R11, R12, R13, R14, R15, R16, R17 +1 |
| 1 | lib:TSSOP-24_L7.8-W4.4-P0.65-LS6.4-BL | U1 | |
| 1 | 16V 100nF X7R ±10% 0402 Multilayer Ceramic Capacitors MLCC - SMD/SMT ROHS | lib:C0402 | C1 |
| 1 | 16V 2.2uF X5R ±10% 0603 Multilayer Ceramic Capacitors MLCC - SMD/SMT ROHS | lib:C0603 | C2 |

atopile/cell-sim
This cell-sim is designed to mimic a LiPo battery pack for develpoment of the surrounding electronics, like a BMS.

atopile/cell-sim
This cell-sim is designed to mimic a LiPo battery pack for develpoment of the surrounding electronics, like a BMS.

atopile/cell-sim
This cell-sim is designed to mimic a LiPo battery pack for develpoment of the surrounding electronics, like a BMS.

atopile/cell-sim
This cell-sim is designed to mimic a LiPo battery pack for develpoment of the surrounding electronics, like a BMS.

atopile/cell-sim
This cell-sim is designed to mimic a LiPo battery pack for develpoment of the surrounding electronics, like a BMS.



atopile/atopile
Design circuit boards with code! ✨ Get software-like design reuse 🚀, validation, version control and collaboration in hardware; starting with electronics ⚡️

davidphilipbarr/Sweep
Sweep - a small promicro based keyboard inspired by the Ferris.

rusefi/rusefi
rusefi - GPL internal combustion engine control unit

hoglet67/RGBtoHDMI
Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

FreeYourStream/freedeck-hardware
all the stuff you need to build your own FreeDeck
20 parts. 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.
From the atopile/cell-sim repository on GitHub, at the commit this page was made from: the board is elec/src/tca9548apwr/elec/layout/default/tca9548apwr.kicad_pcb and its schematic elec/layout/cell/cell.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
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).