How nradulovic/hw_compact works
What this project is (type + purpose)
From the README + tree:
• Two physical PCBs:
1) Amplifier board (mono channel) with short-circuit protection + input/output filtering.
2) Power supply board with speaker protection, mute, and LED indication; feeds the amplifier(s).
• Design artifacts in:
• KiCad: PCB layout + schematic for the amplifier board.
• LTspice: simulation schematics/models for amplifier variants/blocks.
How the file structure maps to architecture (what to represent)
Top-level directories:
• kicad/pamp/…
• compact.sch (schematic) → your authoritative source of component-level design intent.
• compact.kicad_pcb (PCB layout) → placement/routing + connectors and nets.
• compact.pro, caches → project metadata.
• ltspice/pamp/…
• Multiple .asc schematics: likely subcircuits/variants (ops, vbe, compact module, protection slope, etc.).
• .asy symbol(s) for modules.
• .plt plot settings (expected waveforms/measurements).
• ltspice/spice_root suggests a library root or shared simulation dependencies.
Implication for diagramming:
• KiCad side = “what will be built” (boards, connectors, power domains).
• LTspice side = “how it was validated” (simulation models/variants), useful for documenting design rationale but not part of runtime system.
What the README adds that must appear
Key architectural commitments:
• Single-ended input.
• No volume control (so input path goes straight to amplifier input conditioning).
• Short-circuit protection (explicit block).
• Input/output filtering (explicit blocks).
• Two-board system:
• Amplifier board = mono channel.
• Power supply board = mains → DC rails + speaker protection/mute + LED status.
Primary pass-through/output (Live/Neutral/Earth) (if used in chassis wiring)
4. Transformer / Secondary AC input (AC1/GND/AC2) (even if transformer is off-board, represent it as an external component feeding the board)
DC Rails Output: Vcc, GND, Vee
7. Speaker protection / relay / fault detection (the README implies speaker protection & failure/overload indication)
LED indicator driver (Anode/Cathode; states POWER/FAILURE/OVERLOAD)
Amplifier Board (Mono)
Power input: Vcc, GND, Vee
External / System-level
• Audio Source (line-level single-ended)
• Speakers
• Chassis Earth bonding (Earth wire, safety ground)
• Optionally: Transformer as an external block between mains and secondary AC input, depending on whether it’s on the PSU board (README implies secondary comes in, so transformer is likely external).
• Energy flow: Mains → transformer → PSU rectification → DC rails → amplifier → speaker.
• Signal flow: Audio in → input filter → amplifier core → output filter → speaker protection → speaker.
• Control/fault flow:
• Short-circuit detection in amplifier influences output limiting (local loop).
• PSU board fault/overload detection influences:
• Speaker relay open (disconnect)
• LED state (POWER/FAILURE/OVERLOAD)
• Mute (if mute drives relay or amplifier mute)
• Mute key (K1/K2) → speaker protection/mute control logic.
Critically, label inter-board wiring using the README connector names:
• PSU DC out: Vcc/GND/Vee → Amplifier power in Vcc/GND/Vee
• Amp output: Out/GND (Amp board) → PSU “Amplifier input/Amplifier output” terminals (README lists both; represent as “from amp” and “to speaker terminal block” through protection relay).
If the PSU board takes both left and right:
• Amp L Out/GND → PSU OutL/GND path
• Amp R Out/GND → PSU OutR/GND path
Architectural patterns / design principles
For this project, the main “architecture patterns” are hardware-centric:
• Separation of concerns by PCB:
• PSU board handles hazardous mains domain + protection/UX (LED/mute).
• Amplifier board handles low-level audio + power amplification.
• Protection layers:
• Local fast protection: amplifier short-circuit protection.
• System-level protection: speaker relay/protection on PSU board.
• Grounding domains:
Relevant technologies/tools as part of the “architecture documentation”
This repo’s “tech stack” is:
• KiCad (schematic + PCB)
• LTspice (simulation)
• LTspice .asc blocks → validate amplifier topology / protection behavior / operating points
• KiCad schematic (compact.sch) → captures final circuit
• KiCad PCB (compact.kicad_pcb) → physical realization
This helps explain why both directories exist and how they relate.
• External: Mains, transformer, audio source, speakers, chassis earth, user mute key.
• Boards: PSU board, two mono amplifier boards.
• Connectors and cable harnesses.
• PSU board internal blocks (rectifier, smoothing, relay, detection, LED driver).
• Amplifier board internal blocks (input filter, amplifier, current limit, output network).
• SGND vs GND vs Earth and where they connect.
• Very useful for audio products (hum/noise issues).
(Optional) Design Toolcha
• LTspice ↔ KiCad relationship (simulation informs schematic choices).
Because the goal is “as many components as possible,” split at these natural boundaries:
• On PSU board:
• EMI/line filtering (if present) vs rectification vs bulk caps vs regulation vs relay driver vs fault detector vs LED driver.
• On amplifier board:
• Input RF filter vs input coupling/bias network vs voltage gain stage vs driver stage vs output stage vs current sense/protection vs output Zobel/inductor network.
Open kicad/pamp/compact.sch and list
• Power domains, net labels, connector reference designators.
• Protection circuits and where they sense (output current, emitter resistors, etc.).
Open kicad/pamp/compact.kicad_pcb to confirm
• Grounding/earth tie points (if any).
Skim LTspice ltspice/pamp/*.asc to confirm
• Which protection mechanisms are modeled and should be called out (e.g., “2slope” suggests a two-slope limiter).