# openvvvf/hardware architecture

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

- Interactive diagram: https://gitdiagram.com/openvvvf/hardware
- Repository: https://github.com/openvvvf/hardware

## Overview

OpenVVVF Hardware is an open-source high-power three-phase inverter platform; this repository also includes a BOM-management application and embedded hardware-interface modules. The user-facing workflow represented here is maintaining hardware BOMs, resolving parts and pricing, and producing build/fabrication outputs. The README documents the inverter’s power-stage, safety, sensing, and scalability capabilities, while the tree identifies supporting BOM and firmware code. Source excerpts are limited, so links between unsampled subsystems are omitted rather than inferred.

Main entry points: [`Hardware/BOMManager/bom_manager/context.py`](https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/context.py) (Shared context), [`STM32CubeMX/Src/App/fault_manager.c`](https://github.com/openvvvf/hardware/blob/main/STM32CubeMX/Src/App/fault_manager.c) (Fault manager), [`Hardware/BOMManager/bom.py`](https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom.py) (BOM CLI), [`Hardware/BOMManager/bom_manager/cli.py`](https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/cli.py) (Command routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bom["BOM management"]
  node_entry["BOM CLI<br/>[bom.py]"]
  node_cli["Command routing<br/>[cli.py]"]
  node_context["Shared context<br/>[context.py]"]
  node_parser["BOM parsers<br/>[parsers.py]"]
  node_discovery["BOM discovery<br/>[discover.py]"]
end

subgraph group_sourcing["Parts and sourcing"]
  node_partsdb[("Part database<br/>[db.py]")]
  node_pricing["Pricing and cache<br/>[pricing.py]"]
  node_vendorclients["Vendor clients"]
  node_orderimports["Order imports"]
end

subgraph group_outputs["Build outputs"]
  node_variant["Build variants<br/>[variants.py]"]
  node_fab["Fabrication data<br/>[fab.py]"]
  node_generation["BOM generation<br/>[generate.py]"]
  node_reports["Reports and docs<br/>[pdfreport.py]"]
  node_release["Release packaging<br/>[release.py]"]
end

subgraph group_firmware["Embedded interfaces"]
  node_sensor["Sensor measurement"]
  node_adc["Isolated ADC driver<br/>[max22530_driver.c]"]
  node_faults["Fault manager<br/>[fault_manager.c]"]
  node_pwm["PWM driver<br/>[pwm_driver.c]"]
end

node_engineer(("Hardware engineer"))
node_hardware["Inverter hardware"]
node_mouser["Mouser"]
node_digikey["DigiKey"]
node_mcmaster["McMaster-Carr"]

node_engineer -->|"runs commands"| node_entry
node_entry -->|"dispatches to"| node_cli
node_cli -->|"builds shared state"| node_context
node_context -->|"opens database"| node_partsdb
node_context -->|"opens cache"| node_pricing
node_context -->|"creates clients"| node_vendorclients
node_context -->|"configures client"| node_mouser
node_context -->|"configures client"| node_digikey
node_context -->|"configures client"| node_mcmaster
node_engineer -->|"designs and assembles"| node_hardware
node_sensor -->|"reads ADC measurements"| node_adc
node_faults -->|"checks gate safety"| node_hardware
node_faults -->|"asserts reset"| node_hardware
node_pwm -->|"sets phase PWM"| node_hardware

click node_entry "https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom.py"
click node_cli "https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/cli.py"
click node_context "https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/context.py"
click node_parser "https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/parsers.py"
click node_discovery "https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/discover.py"
click node_partsdb "https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/db.py"
click node_pricing "https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/pricing.py"
click node_vendorclients "https://github.com/openvvvf/hardware/tree/main/Hardware/BOMManager/bom_manager/vendors"
click node_orderimports "https://github.com/openvvvf/hardware/tree/main/Hardware/BOMManager/bom_manager/importers"
click node_variant "https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/variants.py"
click node_fab "https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/fab.py"
click node_generation "https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/generate.py"
click node_reports "https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/pdfreport.py"
click node_release "https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/release.py"
click node_sensor "https://github.com/openvvvf/hardware/blob/main/STM32CubeMX/Src/Sensors/measurement_system.c"
click node_adc "https://github.com/openvvvf/hardware/blob/main/STM32CubeMX/Src/Drivers/max22530_driver.c"
click node_faults "https://github.com/openvvvf/hardware/blob/main/STM32CubeMX/Src/App/fault_manager.c"
click node_pwm "https://github.com/openvvvf/hardware/blob/main/STM32CubeMX/Src/HWInterface/pwm_driver.c"

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_entry,node_cli,node_context,node_parser,node_discovery,node_mouser toneBlue
class node_partsdb,node_pricing,node_vendorclients,node_orderimports toneAmber
class node_variant,node_fab,node_generation,node_reports,node_release toneMint
class node_sensor,node_adc,node_faults,node_pwm toneRose
class node_engineer,node_hardware,node_digikey,node_mcmaster toneIndigo
```

## Components

### BOM management

- [BOM CLI](https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom.py): `Hardware/BOMManager/bom.py`
- [Command routing](https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/cli.py): `Hardware/BOMManager/bom_manager/cli.py`
- [Shared context](https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/context.py): `Hardware/BOMManager/bom_manager/context.py`
- [BOM parsers](https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/parsers.py): `Hardware/BOMManager/bom_manager/parsers.py`
- [BOM discovery](https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/discover.py): `Hardware/BOMManager/bom_manager/discover.py`

### Parts and sourcing

- [Part database](https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/db.py): `Hardware/BOMManager/bom_manager/db.py`
- [Pricing and cache](https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/pricing.py): `Hardware/BOMManager/bom_manager/pricing.py`
- [Vendor clients](https://github.com/openvvvf/hardware/tree/main/Hardware/BOMManager/bom_manager/vendors): `Hardware/BOMManager/bom_manager/vendors`
- [Order imports](https://github.com/openvvvf/hardware/tree/main/Hardware/BOMManager/bom_manager/importers): `Hardware/BOMManager/bom_manager/importers`

### Build outputs

- [Build variants](https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/variants.py): `Hardware/BOMManager/bom_manager/variants.py`
- [Fabrication data](https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/fab.py): `Hardware/BOMManager/bom_manager/fab.py`
- [BOM generation](https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/generate.py): `Hardware/BOMManager/bom_manager/generate.py`
- [Reports and docs](https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/pdfreport.py): `Hardware/BOMManager/bom_manager/pdfreport.py`
- [Release packaging](https://github.com/openvvvf/hardware/blob/main/Hardware/BOMManager/bom_manager/release.py): `Hardware/BOMManager/bom_manager/release.py`

### Embedded interfaces

- [Sensor measurement](https://github.com/openvvvf/hardware/blob/main/STM32CubeMX/Src/Sensors/measurement_system.c): `STM32CubeMX/Src/Sensors/measurement_system.c`
- [Isolated ADC driver](https://github.com/openvvvf/hardware/blob/main/STM32CubeMX/Src/Drivers/max22530_driver.c): `STM32CubeMX/Src/Drivers/max22530_driver.c`
- [Fault manager](https://github.com/openvvvf/hardware/blob/main/STM32CubeMX/Src/App/fault_manager.c): `STM32CubeMX/Src/App/fault_manager.c`
- [PWM driver](https://github.com/openvvvf/hardware/blob/main/STM32CubeMX/Src/HWInterface/pwm_driver.c): `STM32CubeMX/Src/HWInterface/pwm_driver.c`

### Other components

- **Hardware engineer**
- **Inverter hardware**
- **Mouser**
- **DigiKey**
- **McMaster-Carr**

## Connections

- Hardware engineer → BOM CLI: runs commands
- BOM CLI → Command routing: dispatches to
- Command routing → Shared context: builds shared state
- Shared context → Part database: opens database
- Shared context → Pricing and cache: opens cache
- Shared context → Vendor clients: creates clients
- Shared context → Mouser: configures client
- Shared context → DigiKey: configures client
- Shared context → McMaster-Carr: configures client
- Hardware engineer → Inverter hardware: designs and assembles
- Sensor measurement → Isolated ADC driver: reads ADC measurements
- Fault manager → Inverter hardware: checks gate safety
- Fault manager → Inverter hardware: asserts reset
- PWM driver → Inverter hardware: sets phase PWM
