# sswegy/ancaudiosystem architecture

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

- Interactive diagram: https://gitdiagram.com/sswegy/ancaudiosystem
- Repository: https://github.com/sswegy/ancaudiosystem

## Overview

ANCAudioSystem is an ESP32-based automotive audio system combining music playback interfaces, audio equalization, and active noise cancellation. The README documents Bluetooth and AUX connectivity, three-band equalization for audio and anti-noise, song metadata display, and playback controls. The tree includes firmware, two KiCad designs, and custom component libraries. The supplied source excerpt covers debug callbacks only; firmware implementation details and the exact signal/control wiring are therefore not shown.

Main entry points: [`Src/AudioSystemController/AudioSystemController.ino`](https://github.com/sswegy/ancaudiosystem/blob/main/Src/AudioSystemController/AudioSystemController.ino) (ESP32 controller), [`Electronics/AudioSystemNoiseCancellationPanel/AudioSystemNoiseCancellationPanel.kicad_pcb`](https://github.com/sswegy/ancaudiosystem/blob/main/Electronics/AudioSystemNoiseCancellationPanel/AudioSystemNoiseCancellationPanel.kicad_pcb) (Noise panel board), [`Electronics/KiCad_SnF_Library`](https://github.com/sswegy/ancaudiosystem/tree/main/Electronics/KiCad_SnF_Library) (KiCad component library), [`Electronics/AudioSystemFull/AudioSystemFull.kicad_pcb`](https://github.com/sswegy/ancaudiosystem/blob/main/Electronics/AudioSystemFull/AudioSystemFull.kicad_pcb) (Full system board)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Music interfaces"]
  node_controller["ESP32 controller"]
  node_bluetooth["Bluetooth audio"]
  node_aux["AUX input"]
  node_metadata["Song metadata"]
  node_playback["Playback controls"]
  node_debug["Audio debug callbacks<br/>[DebugTools.cpp]"]
end

subgraph group_processing["Audio processing"]
  node_audioeq["Audio 3-band EQ"]
  node_anc["Active noise cancellation"]
  node_noiseeq["Anti-noise 3-band EQ"]
end

subgraph group_electronics["Electronics"]
  node_fullpcb["Full system board"]
  node_ancpcb["Noise panel board"]
  node_components["KiCad component library"]
end

node_driver(("Driver"))

node_driver -->|"uses controls"| node_controller
node_controller -->|"controls playback"| node_playback
node_controller -->|"displays metadata"| node_metadata
node_bluetooth -->|"provides audio"| node_controller
node_aux -->|"provides audio"| node_controller
node_audioeq -->|"designed into"| node_fullpcb
node_anc -->|"designed into"| node_ancpcb
node_noiseeq -->|"designed into"| node_ancpcb
node_components -->|"supports design"| node_fullpcb
node_components -->|"supports design"| node_ancpcb

click node_controller "https://github.com/sswegy/ancaudiosystem/blob/main/Src/AudioSystemController/AudioSystemController.ino"
click node_bluetooth "https://github.com/sswegy/ancaudiosystem/tree/main/Src/AudioSystemController"
click node_aux "https://github.com/sswegy/ancaudiosystem/tree/main/Src/AudioSystemController"
click node_metadata "https://github.com/sswegy/ancaudiosystem/tree/main/Src/AudioSystemController"
click node_playback "https://github.com/sswegy/ancaudiosystem/tree/main/Src/AudioSystemController"
click node_audioeq "https://github.com/sswegy/ancaudiosystem/blob/main/Electronics/AudioSystemFull/AudioSystemFull.kicad_sch"
click node_anc "https://github.com/sswegy/ancaudiosystem/blob/main/Electronics/AudioSystemNoiseCancellationPanel/AudioSystemNoiseCancellationPanel.kicad_sch"
click node_noiseeq "https://github.com/sswegy/ancaudiosystem/blob/main/Electronics/AudioSystemNoiseCancellationPanel/AudioSystemNoiseCancellationPanel.kicad_sch"
click node_fullpcb "https://github.com/sswegy/ancaudiosystem/blob/main/Electronics/AudioSystemFull/AudioSystemFull.kicad_pcb"
click node_ancpcb "https://github.com/sswegy/ancaudiosystem/blob/main/Electronics/AudioSystemNoiseCancellationPanel/AudioSystemNoiseCancellationPanel.kicad_pcb"
click node_components "https://github.com/sswegy/ancaudiosystem/tree/main/Electronics/KiCad_SnF_Library"
click node_debug "https://github.com/sswegy/ancaudiosystem/blob/main/Src/AudioSystemController/DebugTools.cpp"

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_bluetooth,node_aux,node_metadata,node_playback,node_debug toneBlue
class node_audioeq,node_anc,node_noiseeq toneAmber
class node_fullpcb,node_ancpcb,node_components toneMint
class node_driver toneIndigo
```

## Components

### Music interfaces

- [ESP32 controller](https://github.com/sswegy/ancaudiosystem/blob/main/Src/AudioSystemController/AudioSystemController.ino): `Src/AudioSystemController/AudioSystemController.ino`
- [Bluetooth audio](https://github.com/sswegy/ancaudiosystem/tree/main/Src/AudioSystemController): `Src/AudioSystemController`
- [AUX input](https://github.com/sswegy/ancaudiosystem/tree/main/Src/AudioSystemController): `Src/AudioSystemController`
- [Song metadata](https://github.com/sswegy/ancaudiosystem/tree/main/Src/AudioSystemController): `Src/AudioSystemController`
- [Playback controls](https://github.com/sswegy/ancaudiosystem/tree/main/Src/AudioSystemController): `Src/AudioSystemController`
- [Audio debug callbacks](https://github.com/sswegy/ancaudiosystem/blob/main/Src/AudioSystemController/DebugTools.cpp): `Src/AudioSystemController/DebugTools.cpp`

### Audio processing

- [Audio 3-band EQ](https://github.com/sswegy/ancaudiosystem/blob/main/Electronics/AudioSystemFull/AudioSystemFull.kicad_sch): `Electronics/AudioSystemFull/AudioSystemFull.kicad_sch`
- [Active noise cancellation](https://github.com/sswegy/ancaudiosystem/blob/main/Electronics/AudioSystemNoiseCancellationPanel/AudioSystemNoiseCancellationPanel.kicad_sch): `Electronics/AudioSystemNoiseCancellationPanel/AudioSystemNoiseCancellationPanel.kicad_sch`
- [Anti-noise 3-band EQ](https://github.com/sswegy/ancaudiosystem/blob/main/Electronics/AudioSystemNoiseCancellationPanel/AudioSystemNoiseCancellationPanel.kicad_sch): `Electronics/AudioSystemNoiseCancellationPanel/AudioSystemNoiseCancellationPanel.kicad_sch`

### Electronics

- [Full system board](https://github.com/sswegy/ancaudiosystem/blob/main/Electronics/AudioSystemFull/AudioSystemFull.kicad_pcb): `Electronics/AudioSystemFull/AudioSystemFull.kicad_pcb`
- [Noise panel board](https://github.com/sswegy/ancaudiosystem/blob/main/Electronics/AudioSystemNoiseCancellationPanel/AudioSystemNoiseCancellationPanel.kicad_pcb): `Electronics/AudioSystemNoiseCancellationPanel/AudioSystemNoiseCancellationPanel.kicad_pcb`
- [KiCad component library](https://github.com/sswegy/ancaudiosystem/tree/main/Electronics/KiCad_SnF_Library): `Electronics/KiCad_SnF_Library`

### Other components

- **Driver**

## Connections

- Driver → ESP32 controller: uses controls
- ESP32 controller → Playback controls: controls playback
- ESP32 controller → Song metadata: displays metadata
- Bluetooth audio → ESP32 controller: provides audio
- AUX input → ESP32 controller: provides audio
- Audio 3-band EQ → Full system board: designed into
- Active noise cancellation → Noise panel board: designed into
- Anti-noise 3-band EQ → Noise panel board: designed into
- KiCad component library → Full system board: supports design
- KiCad component library → Noise panel board: supports design
