# sidharthmohannair/openesc architecture

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

- Interactive diagram: https://gitdiagram.com/sidharthmohannair/openesc
- Repository: https://github.com/sidharthmohannair/openesc

## Overview

OpenESC is an Arduino-based, open-loop ESC for BLDC motors. The documented workflow is to upload the sketch to a microcontroller, where open-loop commutation drives the MOSFET switching stage and motor; the hardware directory supplies schematics, board files, and a bill of materials. The sketch itself was not available as an excerpt, so this map relies on README statements and does not infer internal code structure. BEMF feedback and other roadmap items are planned, not implemented in the visible tree.

Main entry points: [`hardware/schematic_diagram_v1.1.pdf`](https://github.com/sidharthmohannair/openesc/blob/main/hardware/schematic_diagram_v1.1.pdf) (MOSFET power stage), [`src/open_loop_esc/open_loop_esc.ino`](https://github.com/sidharthmohannair/openesc/blob/main/src/open_loop_esc/open_loop_esc.ino) (Open-loop firmware), [`hardware/gerbers`](https://github.com/sidharthmohannair/openesc/tree/main/hardware/gerbers) (PCB design files), [`hardware/BOM.md`](https://github.com/sidharthmohannair/openesc/blob/main/hardware/BOM.md) (Bill of materials)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_firmware["Firmware control"]
  node_controller["Arduino controller"]
  node_sketch["Open-loop firmware<br/>[open_loop_esc.ino]"]
end

subgraph group_hardware["ESC hardware"]
  node_powerstage["MOSFET power stage"]
  node_boardfiles["PCB design files"]
  node_bom["Bill of materials<br/>[BOM.md]"]
end

node_operator(("Builder"))
node_ide["Arduino IDE"]
node_motor["BLDC motor"]

node_operator -->|"opens sketch"| node_ide
node_ide -->|"uploads firmware"| node_controller
node_sketch -->|"runs on"| node_controller
node_sketch -->|"controls switching"| node_powerstage
node_powerstage -->|"drives phases"| node_motor
node_boardfiles -->|"documents design"| node_powerstage
node_bom -->|"lists components"| node_powerstage

click node_sketch "https://github.com/sidharthmohannair/openesc/blob/main/src/open_loop_esc/open_loop_esc.ino"
click node_powerstage "https://github.com/sidharthmohannair/openesc/blob/main/hardware/schematic_diagram_v1.1.pdf"
click node_boardfiles "https://github.com/sidharthmohannair/openesc/tree/main/hardware/gerbers"
click node_bom "https://github.com/sidharthmohannair/openesc/blob/main/hardware/BOM.md"

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_controller,node_sketch toneBlue
class node_powerstage,node_boardfiles,node_bom toneAmber
class node_operator,node_ide,node_motor toneIndigo
```

## Components

### Firmware control

- **Arduino controller**
- [Open-loop firmware](https://github.com/sidharthmohannair/openesc/blob/main/src/open_loop_esc/open_loop_esc.ino): `src/open_loop_esc/open_loop_esc.ino`

### ESC hardware

- [MOSFET power stage](https://github.com/sidharthmohannair/openesc/blob/main/hardware/schematic_diagram_v1.1.pdf): `hardware/schematic_diagram_v1.1.pdf`
- [PCB design files](https://github.com/sidharthmohannair/openesc/tree/main/hardware/gerbers): `hardware/gerbers`
- [Bill of materials](https://github.com/sidharthmohannair/openesc/blob/main/hardware/BOM.md): `hardware/BOM.md`

### Other components

- **Builder**
- **Arduino IDE**
- **BLDC motor**

## Connections

- Builder → Arduino IDE: opens sketch (evidence: `README.md`)
- Arduino IDE → Arduino controller: uploads firmware (evidence: `README.md`)
- Open-loop firmware → Arduino controller: runs on (evidence: `README.md`)
- Open-loop firmware → MOSFET power stage: controls switching (evidence: `README.md`)
- MOSFET power stage → BLDC motor: drives phases (evidence: `README.md`)
- PCB design files → MOSFET power stage: documents design (evidence: `README.md`)
- Bill of materials → MOSFET power stage: lists components (evidence: `README.md`)
