# diebieengineering/diebiems architecture

> Architecture diagram of the GitHub repository diebieengineering/diebiems, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/diebieengineering/diebiems
- Repository: https://github.com/diebieengineering/diebiems

## Overview

DieBieMS is an all-in-one battery-management hardware design for lithium vehicle packs. Its documented workflow monitors cell and pack conditions, then controls charging and load power while exposing status and configuration interfaces. The tree identifies schematics for the major hardware subsystems, but no source excerpts were provided; edges below are limited to relationships explicitly described in the README, so they do not imply unverified circuit-level wiring or control ownership.

Main entry points: [`DB10005_Controller.SchDoc`](https://github.com/diebieengineering/diebiems/blob/master/DB10005_Controller.SchDoc) (Main controller), [`DB10005_PowerSwitch.SchDoc`](https://github.com/diebieengineering/diebiems/blob/master/DB10005_PowerSwitch.SchDoc) (Power switching), [`DB10005_BatteryStackMonitor.SchDoc`](https://github.com/diebieengineering/diebiems/blob/master/DB10005_BatteryStackMonitor.SchDoc) (Cell monitoring), [`DB10005_CAN.SchDoc`](https://github.com/diebieengineering/diebiems/blob/master/DB10005_CAN.SchDoc) (CAN interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Battery sensing"]
  node_stack["Cell monitoring"]
  node_cellnode["Cell node"]
end

subgraph group_control["Power control"]
  node_controller["Main controller"]
  node_powermgmt["Power management"]
  node_powerswitch["Power switching"]
end

subgraph group_interfaces["External interfaces"]
  node_can["CAN interface<br/>[DB10005_CAN.SchDoc]"]
  node_usb["USB serial"]
  node_software["Firmware interface"]
end

subgraph group_design["Hardware design"]
  node_top["System schematic"]
  node_pcb["BMS PCB<br/>[DB10005_BMS.PcbDoc]"]
end

node_pack(("Battery pack"))
node_charger(("Charger"))
node_load(("Motor load"))
node_user(("Operator"))
node_external(("External device"))

node_pack -->|"provides cell voltages"| node_stack
node_pack -->|"provides pack current"| node_controller
node_stack -->|"reports cell voltages"| node_controller
node_controller -->|"controls switching"| node_powerswitch
node_charger -->|"supplies charge input"| node_powerswitch
node_powerswitch -->|"switches charge path"| node_pack
node_pack -->|"supplies discharge path"| node_powerswitch
node_powerswitch -->|"switches load path"| node_load
node_user -->|"requests power"| node_controller
node_external -->|"communicates status"| node_can
node_can -->|"supports monitoring"| node_controller
node_external -->|"connects for updates"| node_usb
node_usb -->|"supports bootloader updates"| node_controller

click node_stack "https://github.com/diebieengineering/diebiems/blob/master/DB10005_BatteryStackMonitor.SchDoc"
click node_cellnode "https://github.com/diebieengineering/diebiems/blob/master/DB10005_CellNode.SchDoc"
click node_controller "https://github.com/diebieengineering/diebiems/blob/master/DB10005_Controller.SchDoc"
click node_powermgmt "https://github.com/diebieengineering/diebiems/blob/master/DB10005_PowerManagement.SchDoc"
click node_powerswitch "https://github.com/diebieengineering/diebiems/blob/master/DB10005_PowerSwitch.SchDoc"
click node_can "https://github.com/diebieengineering/diebiems/blob/master/DB10005_CAN.SchDoc"
click node_usb "https://github.com/diebieengineering/diebiems/blob/master/DB10005_USBSerial.SchDoc"
click node_software "https://github.com/diebieengineering/diebiems/blob/master/DB10005_Software.SchDoc"
click node_top "https://github.com/diebieengineering/diebiems/blob/master/DB10005_TopLevel.SchDoc"
click node_pcb "https://github.com/diebieengineering/diebiems/blob/master/DB10005_BMS.PcbDoc"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_stack,node_cellnode toneBlue
class node_controller,node_powermgmt,node_powerswitch toneAmber
class node_can,node_usb,node_software toneMint
class node_top,node_pcb toneRose
class node_pack,node_charger,node_load,node_user,node_external toneIndigo
```

## Components

### Battery sensing

- [Cell monitoring](https://github.com/diebieengineering/diebiems/blob/master/DB10005_BatteryStackMonitor.SchDoc): `DB10005_BatteryStackMonitor.SchDoc`
- [Cell node](https://github.com/diebieengineering/diebiems/blob/master/DB10005_CellNode.SchDoc): `DB10005_CellNode.SchDoc`

### Power control

- [Main controller](https://github.com/diebieengineering/diebiems/blob/master/DB10005_Controller.SchDoc): `DB10005_Controller.SchDoc`
- [Power management](https://github.com/diebieengineering/diebiems/blob/master/DB10005_PowerManagement.SchDoc): `DB10005_PowerManagement.SchDoc`
- [Power switching](https://github.com/diebieengineering/diebiems/blob/master/DB10005_PowerSwitch.SchDoc): `DB10005_PowerSwitch.SchDoc`

### External interfaces

- [CAN interface](https://github.com/diebieengineering/diebiems/blob/master/DB10005_CAN.SchDoc): `DB10005_CAN.SchDoc`
- [USB serial](https://github.com/diebieengineering/diebiems/blob/master/DB10005_USBSerial.SchDoc): `DB10005_USBSerial.SchDoc`
- [Firmware interface](https://github.com/diebieengineering/diebiems/blob/master/DB10005_Software.SchDoc): `DB10005_Software.SchDoc`

### Hardware design

- [System schematic](https://github.com/diebieengineering/diebiems/blob/master/DB10005_TopLevel.SchDoc): `DB10005_TopLevel.SchDoc`
- [BMS PCB](https://github.com/diebieengineering/diebiems/blob/master/DB10005_BMS.PcbDoc): `DB10005_BMS.PcbDoc`

### Other components

- **Battery pack**
- **Charger**
- **Motor load**
- **Operator**
- **External device**

## Connections

- Battery pack → Cell monitoring: provides cell voltages (evidence: `README.md`)
- Battery pack → Main controller: provides pack current (evidence: `README.md`)
- Cell monitoring → Main controller: reports cell voltages (evidence: `README.md`)
- Main controller → Power switching: controls switching (evidence: `README.md`)
- Charger → Power switching: supplies charge input (evidence: `README.md`)
- Power switching → Battery pack: switches charge path (evidence: `README.md`)
- Battery pack → Power switching: supplies discharge path (evidence: `README.md`)
- Power switching → Motor load: switches load path (evidence: `README.md`)
- Operator → Main controller: requests power (evidence: `README.md`)
- External device → CAN interface: communicates status (evidence: `README.md`)
- CAN interface → Main controller: supports monitoring (evidence: `README.md`)
- External device → USB serial: connects for updates (evidence: `README.md`)
- USB serial → Main controller: supports bootloader updates (evidence: `README.md`)
