# adudeinasuit/ka3005p-control architecture

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

- Interactive diagram: https://gitdiagram.com/adudeinasuit/ka3005p-control
- Repository: https://github.com/adudeinasuit/ka3005p-control

## Overview

This is a small Visual Basic desktop controller for a KA3005P power supply. The user configures a COM port and baud rate, connects, sets voltage and current, and controls output; latch mode keeps Set engaged for variable adjustment. Presets can be saved and recalled. The tree contains one form, so the distinct UI responsibilities below share Form1.frm; no source excerpts were provided, so relationships rely on the README and implementation details such as preset storage are left unspecified.

Main entry points: [`Form1.frm`](https://github.com/adudeinasuit/ka3005p-control/blob/main/Form1.frm) (Voltage setting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_connection["Connection"]
  node_form["Controller window<br/>[Form1.frm]"]
  node_serial["Serial connection<br/>[Form1.frm]"]
end

subgraph group_controls["Supply controls"]
  node_voltage["Voltage setting<br/>[Form1.frm]"]
  node_current["Current setting<br/>[Form1.frm]"]
  node_latch["Latch Set<br/>[Form1.frm]"]
  node_output["Output on/off<br/>[Form1.frm]"]
end

subgraph group_presets["Presets"]
  node_preset["Preset save/recall<br/>[Form1.frm]"]
end

node_user(("User"))
node_supply["KA3005P supply"]

node_user -->|"opens and operates"| node_form
node_user -->|"sets port and baud"| node_serial
node_form -->|"connects"| node_serial
node_serial -->|"communicates with"| node_supply
node_user -->|"sets voltage"| node_voltage
node_user -->|"sets current"| node_current
node_voltage -->|"sets voltage"| node_supply
node_current -->|"sets current"| node_supply
node_user -->|"enables latch"| node_latch
node_latch -->|"keeps Set engaged"| node_voltage
node_user -->|"switches output"| node_output
node_output -->|"controls output"| node_supply
node_user -->|"saves or recalls"| node_preset
node_preset -->|"recalls setting"| node_voltage

click node_form "https://github.com/adudeinasuit/ka3005p-control/blob/main/Form1.frm"
click node_serial "https://github.com/adudeinasuit/ka3005p-control/blob/main/Form1.frm"
click node_voltage "https://github.com/adudeinasuit/ka3005p-control/blob/main/Form1.frm"
click node_current "https://github.com/adudeinasuit/ka3005p-control/blob/main/Form1.frm"
click node_latch "https://github.com/adudeinasuit/ka3005p-control/blob/main/Form1.frm"
click node_output "https://github.com/adudeinasuit/ka3005p-control/blob/main/Form1.frm"
click node_preset "https://github.com/adudeinasuit/ka3005p-control/blob/main/Form1.frm"

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_form,node_serial,node_user toneBlue
class node_voltage,node_current,node_latch,node_output toneAmber
class node_preset toneMint
class node_supply toneIndigo
```

## Components

### Connection

- [Controller window](https://github.com/adudeinasuit/ka3005p-control/blob/main/Form1.frm): `Form1.frm`
- [Serial connection](https://github.com/adudeinasuit/ka3005p-control/blob/main/Form1.frm): `Form1.frm`

### Supply controls

- [Voltage setting](https://github.com/adudeinasuit/ka3005p-control/blob/main/Form1.frm): `Form1.frm`
- [Current setting](https://github.com/adudeinasuit/ka3005p-control/blob/main/Form1.frm): `Form1.frm`
- [Latch Set](https://github.com/adudeinasuit/ka3005p-control/blob/main/Form1.frm): `Form1.frm`
- [Output on/off](https://github.com/adudeinasuit/ka3005p-control/blob/main/Form1.frm): `Form1.frm`

### Presets

- [Preset save/recall](https://github.com/adudeinasuit/ka3005p-control/blob/main/Form1.frm): `Form1.frm`

### Other components

- **User**
- **KA3005P supply**

## Connections

- User → Controller window: opens and operates (evidence: `README.md`)
- User → Serial connection: sets port and baud (evidence: `README.md`)
- Controller window → Serial connection: connects (evidence: `README.md`)
- Serial connection → KA3005P supply: communicates with (evidence: `README.md`)
- User → Voltage setting: sets voltage (evidence: `README.md`)
- User → Current setting: sets current (evidence: `README.md`)
- Voltage setting → KA3005P supply: sets voltage (evidence: `README.md`)
- Current setting → KA3005P supply: sets current (evidence: `README.md`)
- User → Latch Set: enables latch (evidence: `README.md`)
- Latch Set → Voltage setting: keeps Set engaged (evidence: `README.md`)
- User → Output on/off: switches output (evidence: `README.md`)
- Output on/off → KA3005P supply: controls output (evidence: `README.md`)
- User → Preset save/recall: saves or recalls (evidence: `README.md`)
- Preset save/recall → Voltage setting: recalls setting (evidence: `README.md`)
