Skip to the content
PCBKitNew board
2 layers225.7 × 100.8 mmLevel shifter, the printed circuit board in 3D

Level shifter

atopile/cell-sim25

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

Size
225.7 × 100.8 mm
Copper layers
2
Thickness
1.6 mm
Parts
3
Nets
4
Pads
7
Tracks, vias
6, 0
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
25 Jul 2024
Updated
10 Apr 2026

Overview

Level shifter 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 of 225.7 × 100.8 mm with 3 parts on 4 nets, routed with 6 tracks and 0 vias.

Its parts include 2 resistors and 1 IC. It belongs with the power and interfaces and adapters boards of this library.

README

README.md

Cell Simulator

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

  • 16 channels
  • Open-Source hardware design, you can embed onto your own HIL setup
  • ⚡️ 0-4.5V and 0-500mA per channel
  • DMM muxed to each channel for arbitarily precise measurment
  • Open-circuit simulation on each channel
  • 📏 16bit ADC feedback for voltage and current
  • 🔌 USB w/ Python software interface (+ 100MBit Ethernet + WiFi waiting for firmware support)

IMG_0374 3

Design overview

Cell Diagram

Board Render

Getting Started

  1. Install python if you don't have it already
  2. Install the requirements pip install -r requirements.txt
  3. Connect the board via USB Port
  4. Power the board with the 12V input (supply: 1A minimum, 3A recommended)
  5. Run the example python script python example_set_voltages.py
  6. Voltages should be set to 3.5V, then rainbow from 1V to 4V across the 16 channels and current should be close to 0A.

Test Output

You should see something like this: Rainbow

Notes

  1. To get best low noise performance, use a quality power supply for the input supply.

Manufacturing

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:

Screenshot 2026-02-26 at 3 23 36 PM

Firmware

Update Firmware

We use PlatformIO to build and upload the firmware via USB.

  1. Install PlatformIO: https://platformio.org/install
  2. Connect the board via USB (might need to accept connection popup on Mac)
  3. Run pio run -t upload or install the PlatformIO VSCode extension and use the upload button.

API Docs

Connecting to cellsim

python
from lib.cellsim import CellSim
cellsim = CellSim(port)

Enable outputs

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.

python
# 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)

Setting voltages

Each output voltage can be specified between 0.5V and 4.4V

python
# 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)

Measuring voltages (onboard)

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.

python
voltages = cellsim.getAllVoltages()
print(f"Voltages: {[f'{v:.3f}' for v in voltages]}")

Measuring voltages externally

To take a precision measurement, each channel has a multiplexed output that connects to the DMM connector via a relay.

python
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()

Load switch

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.

python
cellsim.enableLoadSwitchAll()
time.sleep(1)

cellsim.disableLoadSwitchAll()
time.sleep(1)

Disconnecting session

Once your test is finished, you can use the following to close the serial session:

python
  cellsim.close()

Parts

3
QtyValueFootprintReferences
2Chip Resistor - Surface Mount 10KOhms ±5% 1/16W 0402 RoHSlib:R0402R1, R2
1lib:SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BRU1

Questions

How big is the Level shifter PCB?

It measures 225.7 × 100.8 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Level shifter use?

3 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.

Where can I download the Level shifter KiCad files?

From the atopile/cell-sim repository on GitHub, at the commit this page was made from: the board is elec/src/components/level-shifter/elec/layout/default/level-shifter.kicad_pcb and its schematic elec/layout/cell/cell.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Level shifter 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).

More from atopile/cell-sim

5
  • 4 layers220 × 110 mmCell sim, the printed circuit board in 3D

    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.

    1,152 parts25MIT
  • 4 layersCell, the printed circuit board in 3D

    Cell

    atopile/cell-sim

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

    63 parts25MIT
  • 2 layersEthernet, the printed circuit board in 3D

    Ethernet

    atopile/cell-sim

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

    32 parts25MIT
  • 2 layersTca9548apwr, the printed circuit board in 3D

    Tca9548apwr

    atopile/cell-sim

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

    20 parts25MIT
  • 2 layers225.7 × 100.8 mmLv2842xlvddcr, the printed circuit board in 3D

    Lv2842xlvddcr

    atopile/cell-sim

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

    8 parts25MIT

Similar boards

  • 2 layers40 × 30 mmBlinky, the printed circuit board in 3D

    Blinky

    earthtojake/text-to-cad

    Design physical products with AI

    3 parts26kMIT
  • 2 layers51.9 × 16 mmPassive2-rpi non standard adapter, the printed circuit board in 3D

    Passive2-rpi non standard adapter

    hzeller/rpi-rgb-led-matrix

    Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO

    3 parts4.4kGPL-2.0
  • 2 layers16.3 × 16.3 mmSensor, the printed circuit board in 3D

    Sensor

    scottbez1/splitflap

    DIY split-flap display

    3 parts4.2k
  • 2 layersSub, the printed circuit board in 3D

    Sub

    atopile/atopile

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

    3 parts4kMIT
  • 2 layers85 × 30 mmDual stomp, the printed circuit board in 3D

    Dual stomp

    torvalds/GuitarPedal

    Linus learns analog circuits

    3 parts2.5kGPL-2.0
  • 2 layers124.5 × 33.7 mm172319-1 connector, the printed circuit board in 3D

    172319-1 connector

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    3 parts1.2k
  • 2 layers10.5 × 83 mmProgrammingAdapter, the printed circuit board in 3D

    ProgrammingAdapter

    stuartpittaway/diyBMSv4

    Version 4 of the diyBMS

    3 parts1.1k
  • 2 layers21.2 × 51.3 mmPico reset, the printed circuit board in 3D

    Pico reset

    hackclub/sprig

    🍃 Learn to code by making games in a JavaScript web-based game editor.

    3 parts1.1kMIT