Skip to the content
PCBKitNew board
2 layersClassDamp, the printed circuit board in 3D

Discrete Class-D amplifier using 555, LM358, IR2110, and MOSFET half-bridge—built in KiCad with ngspice simulation.

Copper layers
2
Thickness
1.6 mm
Parts
11
Nets
23
Pads
44
Tracks, vias
0, 0
Routed
Not yet
KiCad
KiCad 9.0 (file 20241229)
Created
4 Dec 2025
Updated
4 Dec 2025

Overview

ClassDamp is an open-source printed circuit board by technoas123, from the technoas123/classD_amplifier repository on GitHub. It is a 2-layer board with 11 parts on 23 nets.

It is built around the IR2110L4, 1N4148WT and IRF540N. Its parts include 5 diodes, 4 transistors and 2 ICs. It belongs with the audio and music and interfaces and adapters boards of this library.

Main components

3

README

readme.md

🔊 Discrete Class-D Amplifier – KiCad + ngspice Simulation

This repository contains the complete design of a fully discrete Class-D audio amplifier built using simple, commonly available analog components such as a 555 timer, LM393 comparator, MOSFET half-bridge, and an LC output filter. The entire design is created in KiCad, and simulated using ngspice. No dedicated Class-D ICs are used — this project demonstrates the fundamental principles behind PWM-based audio amplification.


Repository Structure

text
C:.
│   classDamp.kicad_pcb        → PCB layout (2-layer board)
│   classDamp.kicad_prl        → KiCad project local data
│   classDamp.kicad_pro        → KiCad project file
│   classDamp.kicad_sch        → Main KiCad schematic
│   fp-info-cache              → KiCad footprint cache
│   readme.md                  → Documentation (you are reading this)
│
├───classDamp-backups          → Automatic KiCad backups
│       *.zip                  → Time-stamped backup archives
│
├───footprints                 → Custom footprint library
│       LM393.kicad_sym
│       478CKS010M.kicad_sym
│       MFR-25FBF52-1K.kicad_sym
│
└───models                     → SPICE models for simulation
        555_timer.lib          → NE555/TLC555 model
        LM393.lib              → LM393 comparator model

🧩 Project Overview

This design implements a single-channel Class-D amplifier using:

555 Timer (triangle generator)

Produces ~100 kHz triangular carrier waveform for PWM.

LM393 Comparator

Compares audio input with triangle wave → produces PWM.

N-MOSFET Half-Bridge

Switches the supply voltage at high frequency based on PWM.

LC Output Filter

Reconstructs the audio from PWM.

KiCad Simulation (ngspice)

All active components (555, comparator, MOSFETs) use custom SPICE models stored in /models/.


📐 Design Steps

1. Triangle Wave Generator (555 Timer)

  • Configured in astable mode
  • RA, RB, and C chosen for ~100 kHz carrier
  • The node at pins 2/6 generates the triangular waveform used for PWM

2. PWM Generation (LM393 Comparator)

  • Audio input is compared against the triangle
  • Comparator output → PWM with duty cycle proportional to audio amplitude
  • Pull-up resistor on output ensures clean logic waveform

3. Power Switching Stage

  • Logic-level MOSFETs used in half-bridge configuration
  • Gate resistors + pulldown resistors included
  • Driver stage isolates comparator from MOSFET gates

4. Output Low-Pass Filter

  • LC filter chosen to remove switching frequency (100 kHz)
  • Designed with Fc ≈ 20 kHz using: [ F_c = \frac{1}{2\pi \sqrt{LC}} ]

5. Simulation Workflow

  • ngspice model files included:

    • models/555_timer.lib
    • models/LM393.lib
  • Simulation setup in KiCad:

    spice
    .include "./models/555_timer.lib"
    .include "./models/LM393.lib"
    .tran 50n 5m
  • Simulations validate:

    • Triangle waveform
    • PWM modulation
    • Switching node waveform
    • LC output reconstruction

🛠️ PCB Details

PCB File: classDamp.kicad_pcb

Key design rules followed:

  • 2-layer design
  • Bottom layer: solid ground plane
  • Top layer: power + signal routing
  • Short gate traces for MOSFETs
  • Wide copper for high-current paths
  • Decoupling capacitors close to supply pins
  • LC filter placed near MOSFET switching node

Footprints are stored in /footprints/ and referenced inside the KiCad project.


📦 Models

Stored in models/:

555_timer.lib

SPICE model for NE555 / TLC555 Used for generating triangle wave.

LM393.lib

Dual-comparator SPICE model Used for PWM modulation.

These models have been formatted to be ngspice-compatible and used directly inside KiCad simulations.


📊 Simulated Outputs

The simulation verifies the following:

Triangle Wave (~100 kHz)

From 555 timer pin 2/6.

PWM Output

Duty cycle changes based on audio input (sine wave).

Switching Node Waveform

High-frequency MOSFET switching.

Filtered Audio Output

LC filter reconstructs original analog audio.


🎧 How to Run Simulation

  1. Open the project in KiCad

  2. Open the schematic (classDamp.kicad_sch)

  3. Ensure the .lib files paths are correct

  4. Open Simulation → Run Simulation

  5. Use .tran 50n 5m or suitable transient analysis

  6. Plot:

    • V(triangle)
    • V(pwm)
    • V(switch_node)
    • V(output)

🔧 Features of This Project

  • Fully open-source toolchain
  • No dedicated Class-D amplifier ICs
  • From scratch design → PWM to H-bridge to LC
  • Custom SPICE models
  • Complete KiCad schematic + PCB
  • Modular and easy to expand (dual-channel, feedback, etc.)

🚀 Future Improvements

  • Add closed-loop feedback for distortion reduction
  • Add proper MOSFET driver (IR2110, IRS2092, etc.)
  • Improve LC filter for lower ripple
  • Add overload and thermal protection
  • Increase power by using 24–36 V supply

📄 License

This project can be released under MIT, GPL, or any open license you prefer. (You can let me know and I’ll insert an appropriate license section.)


🙌 Author Notes

This repository contains backups showing continuous progress, model files, and custom footprints for analog simulation and PCB layout exploration.

Parts

11
QtyValueFootprintReferences
31N4148WTDiode_SMD:D_SOD-523D3, D4, D5
21N4148Diode_THT:D_DO-35_SOD27_P7.62mm_HorizontalD1, D2
22N3905Package_TO_SOT_THT:TO-92_InlineQ1, Q2
2IRF540NPackage_TO_SOT_THT:TO-220-3_VerticalQ3, Q4
1IR2110Package_DIP:DIP-14_W7.62mmU3
1LMC555xNPackage_DIP:DIP-8_W7.62mmU1

Questions

What parts does the ClassDamp use?

11 parts, built around the IR2110L4, 1N4148WT and IRF540N. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the ClassDamp KiCad files?

From the technoas123/classD_amplifier repository on GitHub, at the commit this page was made from: the board is classDamp.kicad_pcb and its schematic classDamp.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the ClassDamp design in my own project?

Its repository states no licence, so its author keeps all rights: ask technoas123 before reusing the design.

Similar boards

  • 2 layersPCB Layout, the printed circuit board in 3D

    PCB Layout

    chgopireddy/Full-Bridge-Class-D-Audio-Amplifier

    LTspice Model for Full Bridge Class D, Voltage Mode Control, Peak Current Mode Control

    63 parts6
  • 2 layers123.5 × 132 mmBLDC, the printed circuit board in 3D

    BLDC

    AssaadMH/sensorless-bldc-control

    Spinning a brushless motor with no position sensor — commutating on the back-EMF zero crossings instead.

    28 parts1MIT
  • 4 layers102.1 × 118.9 mmEsc, the printed circuit board in 3D

    Esc

    prydin/esc

    113 parts1
  • 2 layers75 × 100 mmPath pilot pcb, the printed circuit board in 3D

    Path pilot pcb

    kj-49/path-pilot

    A self-navigating robot built on an AVR128DB28 microcontroller

    37 parts
  • 2 layers202.2 × 131 mmNew system, the printed circuit board in 3D

    New system

    MadsRudolph/62768-energy-system

    Team project for 62768 Electrical Energy Systems (DTU, June 2026, 3-week course). We design and build a complete electrical energy system per the course requirement spec (Kravspecifikation), from idea to a working…

    131 parts
  • 2 layers100 × 100 mmL298, puente h, the printed circuit board in 3D

    L298, puente h

    Aruzamen-Cristian/Lemurian-Clean

    El robot acuático recolector de basura, Lemurian-Clean, es una innovadora solución para la limpieza de cuerpos de agua.

    29 parts
  • 2 layers79 × 93 mmAula2, the printed circuit board in 3D

    Aula2

    diegomendes80/UFC

    Todas as matérias de programação da faculdade

    6 parts