# richardmcmanusjr/laserguidancesystem architecture

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

- Interactive diagram: https://gitdiagram.com/richardmcmanusjr/laserguidancesystem
- Repository: https://github.com/richardmcmanusjr/laserguidancesystem

## Overview

LaserGuidanceSystem is a two-axis laser-tracking device: quadrant-photodiode signals are used to estimate where incident light falls, and two servos orient the assembly toward the laser. The repository also includes Arduino firmware, a Processing GUI, circuit designs, and mechanical models. The sampled sensor code shows analog sampling, zeroing, smoothing, and x/y calculations; the README documents the overall tracking behavior. Firmware, GUI, circuit, and mechanical integration details are not shown in the excerpts, so those links are marked unverified.

Main entry points: [`Arduino Code/LaserGuidance_Mk_1/opr5925.cpp`](https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/Arduino%20Code/LaserGuidance_Mk_1/opr5925.cpp) (Quadrant sensor), [`Arduino Code/LaserGuidance_Mk_1/LaserGuidance_Mk_1.ino`](https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/Arduino%20Code/LaserGuidance_Mk_1/LaserGuidance_Mk_1.ino) (Arduino controller), [`EDA Files/Overall_Circuit/Overall_Circuit.sch`](https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/EDA%20Files/Overall_Circuit/Overall_Circuit.sch) (Amplification circuit), [`Processing Code/ProcessingLaserGuidanceGUI/ProcessingLaserGuidanceGUI.pde`](https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/Processing%20Code/ProcessingLaserGuidanceGUI/ProcessingLaserGuidanceGUI.pde) (Processing GUI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Optical sensing"]
  node_sensor["Quadrant sensor<br/>[opr5925.cpp]"]
  node_sensor_config["Sampling config<br/>[config.h]"]
end

subgraph group_control["Control software"]
  node_firmware["Arduino controller"]
  node_gui["Processing GUI"]
end

subgraph group_electronics["Circuit design"]
  node_amplification["Amplification circuit"]
  node_sensor_breakout["Sensor breakout"]
  node_assembly_circuit["System circuit"]
end

subgraph group_mechanics["Mechanical design"]
  node_servo_mounts["Servo mounts"]
  node_servos["Two servos"]
end

node_laser(("Laser source"))

node_laser -->|"illuminates"| node_sensor
node_sensor -->|"uses amplification"| node_amplification
node_sensor -.->|"reports position"| node_firmware
node_firmware -->|"orients toward laser"| node_servos
node_sensor -->|"uses settings"| node_sensor_config
node_gui -.->|"communicates with"| node_firmware
node_assembly_circuit -.->|"includes circuitry"| node_amplification
node_sensor_breakout -.->|"interfaces sensor"| node_sensor
node_servo_mounts -.->|"mounts"| node_servos

click node_sensor "https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/Arduino%20Code/LaserGuidance_Mk_1/opr5925.cpp"
click node_sensor_config "https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/Arduino%20Code/LaserGuidance_Mk_1/config.h"
click node_firmware "https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/Arduino%20Code/LaserGuidance_Mk_1/LaserGuidance_Mk_1.ino"
click node_gui "https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/Processing%20Code/ProcessingLaserGuidanceGUI/ProcessingLaserGuidanceGUI.pde"
click node_amplification "https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/EDA%20Files/Overall_Circuit/Overall_Circuit.sch"
click node_sensor_breakout "https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/EDA%20Files/OPR5925Breakout/OPR5925Breakout.sch"
click node_assembly_circuit "https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/EDA%20Files/LaserGuidanceSystem.fzz"
click node_servo_mounts "https://github.com/richardmcmanusjr/laserguidancesystem/tree/main/3D%20Models"

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_sensor,node_sensor_config toneBlue
class node_firmware,node_gui toneAmber
class node_amplification,node_sensor_breakout,node_assembly_circuit toneMint
class node_servo_mounts,node_servos toneRose
class node_laser toneIndigo
```

## Components

### Optical sensing

- [Quadrant sensor](https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/Arduino%20Code/LaserGuidance_Mk_1/opr5925.cpp): `Arduino Code/LaserGuidance_Mk_1/opr5925.cpp`
- [Sampling config](https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/Arduino%20Code/LaserGuidance_Mk_1/config.h): `Arduino Code/LaserGuidance_Mk_1/config.h`

### Control software

- [Arduino controller](https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/Arduino%20Code/LaserGuidance_Mk_1/LaserGuidance_Mk_1.ino): `Arduino Code/LaserGuidance_Mk_1/LaserGuidance_Mk_1.ino`
- [Processing GUI](https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/Processing%20Code/ProcessingLaserGuidanceGUI/ProcessingLaserGuidanceGUI.pde): `Processing Code/ProcessingLaserGuidanceGUI/ProcessingLaserGuidanceGUI.pde`

### Circuit design

- [Amplification circuit](https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/EDA%20Files/Overall_Circuit/Overall_Circuit.sch): `EDA Files/Overall_Circuit/Overall_Circuit.sch`
- [Sensor breakout](https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/EDA%20Files/OPR5925Breakout/OPR5925Breakout.sch): `EDA Files/OPR5925Breakout/OPR5925Breakout.sch`
- [System circuit](https://github.com/richardmcmanusjr/laserguidancesystem/blob/main/EDA%20Files/LaserGuidanceSystem.fzz): `EDA Files/LaserGuidanceSystem.fzz`

### Mechanical design

- [Servo mounts](https://github.com/richardmcmanusjr/laserguidancesystem/tree/main/3D%20Models): `3D Models`
- **Two servos**

### Other components

- **Laser source**

## Connections

- Laser source → Quadrant sensor: illuminates (evidence: `README.md`)
- Quadrant sensor → Amplification circuit: uses amplification (evidence: `README.md`)
- Quadrant sensor → Arduino controller: reports position
- Arduino controller → Two servos: orients toward laser (evidence: `README.md`)
- Quadrant sensor → Sampling config: uses settings
- Processing GUI → Arduino controller: communicates with
- System circuit → Amplification circuit: includes circuitry
- Sensor breakout → Quadrant sensor: interfaces sensor
- Servo mounts → Two servos: mounts
