# ahmed-saad-fayed/power-supply-circuit architecture

> Architecture diagram of the GitHub repository ahmed-saad-fayed/power-supply-circuit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ahmed-saad-fayed/power-supply-circuit
- Repository: https://github.com/ahmed-saad-fayed/power-supply-circuit

## Overview

##### Project type and purpose
- This is a hardware/electronics project—a dual-output linear regulated power supply that provides +9 V and +5 V from a mains AC source.
- The README describes each circuit block and its purpose: step-down transformer, rectifier, smoothing capacitors, two 78xx regulators, decoupling caps, LEDs as indicators, and output loads.

##### File structure
- Layer.pdf: PCB layer details or schematic printout
- Power Supply.pdsprj: Proteus project file containing schematic and PCB layout
- README.md: Project description and component list
- No software “frontend/backend” structure—this is a single-purpose hardware design.

##### README for additional insights
- The README lists each major component (TR1, BR1, C1, U1, U2, C3, C4, D1, D2, R1, R2, output load).
- It mentions Proteus as the simulation tool.
- It highlights noise filtering, smoothing and visual status indicators as key features.

a. Main components (represented as blocks):
- AC Mains Input
- Step-Down Transformer (TR1)
- Bridge Rectifier (BR1)
- Filter Capacitor (C1)
- 7809 Voltage Regulator (U1) + Decoupling Caps (C3)
- 7805 Voltage Regulator (U2) + Decoupling Caps (C4)
- LED Indicator Circuits (D1+R1 for 9 V, D2+R2 for 5 V)
- Output Loads (Test points or connectors for +9 V and +5 V)
- Common Ground Reference

b. Relationships and interactions (data/current flow):
- Bifurcation after C1: one branch → U1 → 9 V output & LED indicator; another branch → U2 → 5 V output & LED indicator.
- Ground symbol at common reference throughout.

c. Architectural patterns or design principles:
- Linear regulation (78xx series) for simplicity and low noise.
- Passive filtering (C1) followed by active regulation with decoupling (C3, C4).
- Status indicators to provide visual confirmation of outputs.

d. Relevant technologies and tools:
- Proteus simulation—note in a corner or overlay that the schematic can be tested/validated there.
- Standard through-hole or PCB-mount components listed in README.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "AC Input Stage"
        AC["AC Mains Input"]:::ac
        TR1["TR1: Step-Down Transformer"]:::ac
        AC -->|"AC"| TR1
    end

    subgraph "Rectification & Filtering"
        BR1["BR1: Bridge Rectifier"]:::unreg
        C1["C1: Filter Capacitor (1000 µF)"]:::unreg
        TR1 -->|"AC"| BR1
        BR1 -->|"Unregulated DC (+Vbatt)"| C1
    end

    subgraph "Regulation Branches"
        subgraph "9V Branch"
            U1["U1: 7809 Voltage Regulator"]:::reg9
            C3["C3: Decoupling Caps"]:::reg9
            D1R1["D1 + R1: LED Indicator"]:::reg9
            TP9["+9V Output TP"]:::reg9
            C1 --> U1
            U1 --> C3
            C3 --> D1R1
            D1R1 --> TP9
            U1 -->|"GND"| GND
        end
        subgraph "5V Branch"
            U2["U2: 7805 Voltage Regulator"]:::reg5
            C4["C4: Decoupling Caps"]:::reg5
            D2R2["D2 + R2: LED Indicator"]:::reg5
            TP5["+5V Output TP"]:::reg5
            C1 --> U2
            U2 --> C4
            C4 --> D2R2
            D2R2 --> TP5
            U2 -->|"GND"| GND
        end
    end

    GND["GND: Common Ground"]:::gnd

    subgraph "Project Documentation & Simulation"
        README["Project Docs (README.md)"]:::docs
        Layer["PCB Layer Stack (Layer.pdf)"]:::docs
        Proteus["Proteus Simulation (Power Supply.pdsprj)"]:::docs
    end

    Proteus -.-> README
    Proteus -.-> Layer

    click README "https://github.com/ahmed-saad-fayed/power-supply-circuit/blob/main/README.md"
    click Layer "https://github.com/ahmed-saad-fayed/power-supply-circuit/blob/main/Layer.pdf"
    click Proteus "https://github.com/ahmed-saad-fayed/power-supply-circuit/blob/main/Power Supply.pdsprj"

    classDef ac fill:#cce5ff,stroke:#000,stroke-width:1px
    classDef unreg fill:#ffebcc,stroke:#000,stroke-width:1px
    classDef reg9 fill:#ffcccc,stroke:#000,stroke-width:1px
    classDef reg5 fill:#ccffcc,stroke:#000,stroke-width:1px
    classDef gnd fill:#ffffff,stroke:#000,stroke-width:1px,stroke-dasharray: 5 5
    classDef docs fill:#e0e0e0,stroke:#000,stroke-width:1px,stroke-dasharray: 2 2
```
