Skip to the content
2 layers75 × 53 mmAnalog PWM, the printed circuit board in 3D

Analog PWM generator with 20–100 kHz complementary outputs, adjustable dead time, LTspice simulation and a stackable KiCad PCB linked to a 58 W buck converter.

Size
75 × 53 mm
Copper layers
2
Thickness
1.6 mm
Parts
42
Nets
60
Pads
169
Tracks, vias
537, 11
Pours
2
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
13 Oct 2026
Updated
5 Nov 2026

Overview

Analog PWM is an open-source printed circuit board by MouaadO, from the MouaadO/analog-pwm-generator repository on GitHub. It is a 2-layer board of 75 × 53 mm with 42 parts on 60 nets, routed with 537 tracks and 11 vias.

It is built around the SN74ACT240N, TLC072CP and LF50ABV, with the PTV09A-2020F-B102, BAT85S-TR and PPTC031LFBN-RC among its other parts. Its parts include 16 resistors, 7 capacitors, 7 connectors, 5 ICs and 1 diode. It belongs with the power boards of this library.

Main components

6

README

README.md

Analog PWM Generator with Adjustable Dead Time

20–100 kHz · Complementary 5 V outputs · Stackable control PCB

An analog PWM generator with adjustable frequency, duty cycle and dead time. The circuit uses a shared triangular carrier, comparison thresholds and output buffers. Its stackable PCB supplies the switching commands for the 58 W synchronous buck converter, the second project in the electric-scooter auxiliary-power system.

Project team: Amani Mouaad and Cheiffou Melissa.
IFP SCHOOL · Powertrain · 2026/2027

Project workflow

The control half of a two-board system

Analog PWM generator assembled PCB — 3D render

The PWM board handles the low-level timing commands. The buck power board receives those commands through the Uno Rev3-compatible headers and drives its two power MOSFETs. Keeping the boards separate makes the timing circuit easy to adjust and the power stage easy to inspect.

FunctionDesign target
OutputsTwo complementary PWM signals
Switching frequency20–100 kHz
Duty command0–100%, selected from a potentiometer or external SMA input
Dead-time adjustmentUp to 10% of the switching period
Logic levelsNominal 0 V / 5 V
Drive currentMore than 20 mA source and sink per output
Supply7–10 V DC, centre-positive barrel jack

How the signal becomes PWM

  1. Carrier generation: An integrator produces a rising/falling triangular voltage. A comparator with hysteresis reverses the clock at the carrier limits.
  2. Command selection: The selector chooses the duty potentiometer or the external SMA command.
  3. Threshold generation: A resistor network combines the command with the dead-time setting to establish two comparison levels.
  4. Comparison: The triangle crosses those levels at different instants, creating the two complementary pulse allocations and their non-overlap intervals.
  5. Output drive: The buffer stages drive OUT1 and OUT2. Endpoint detectors establish constant states for external commands outside the operating interval.

Oscillator and timing equations

For timing resistance $R_t$ and integrator capacitor $C_{INT}$:

$$I=\frac{CLOCK-V_m}{R_t},\qquad \frac{dV_{TRI}}{dt}=-\frac{I}{C_{INT}}$$

The comparator limits and the integrator slope determine the period. For the chosen resistor ratio, the nominal frequency relation is:

$$f\simeq\frac{3}{R_tC_{INT}}$$

The shared carrier keeps the frequency, command and dead-time comparison tied to one switching period. Detailed threshold and frequency calculations are in the design notes.

Current stackable PCB

The current board is 75 × 53 mm, with a 7 mm extension on the potentiometer side. The extension places the outward-facing controls, regulator and input connectors in the exposed area of the two-board assembly. The 32 mating contacts retain the official Uno Rev3 pattern.

Top 3D view

Top view of the PWM board

Header connections to the buck board

SignalPWM-board padUno contact
OUT1 / PWM1J4 pin 9D9
OUT2 / PWM2J4 pin 8D10
Common groundJ4 pin 4; J6 pins 6–7GND

Two-board PWM and buck assembly

The upper board is the synchronous buck converter. Its battery input and 12 V gate-driver supply use separate power terminals.

Front and back layers

Front copperBack copper
PWM front copper layoutPWM back copper layout

Signal tracks use 0.25 mm widths, PWM output routes 0.40 mm, and supply/ground routes 0.50 mm. The front copper fill distributes 5 V; the back fill provides ground. Local footprints and bundled models define the potentiometers, connectors and IC packages.

Complete schematic

Complete PWM generator schematic

Recorded LTspice results

The existing simulation uses the 7805 supply model. The PCB assembly uses the selected LF50ABV regulator. The following values are the recorded LTspice results for the supplied simulation settings:

QuantityResult
Frequency endpoints19.99 kHz / 99.69 kHz
Output LOW / HIGH0.082 V / 4.916 V
Source/sink currentApproximately 26.86 mA per output
Fast-setting non-overlap gaps0.980 µs / 0.984 µs

Calculated and simulated switching-frequency endpoints

Open and run

For the hardware, open pcb/Analog_PWM.kicad_pro in KiCad 8 or newer. In PCB Editor, press Alt+3 for the 3D viewer. Keep the local symbol library, footprint library, tables and 3dmodels folder beside the project.

For simulation, open simulation/analog_pwm_dead_time.asc in LTspice and run its transient analysis. Probe TRI, CMD, LOW, HIGH, OUT1 and OUT2. Parameters FP, DP, DTP, SOURCE and VD select the operating settings.

Files and tools

LocationContents
pcb/KiCad schematic, board, local libraries, assembly BOM and purchasing workbook
pcb/Manufacturing/Gerbers and plated/non-plated drill outputs
simulation/LTspice schematic, symbols and component libraries
Design notesOscillator, duty and threshold calculations
docs/images/PCB, schematic and stacked-system renders
docs/datasheets/Component datasheets

Tools: LTspice, KiCad, manufacturer package drawings and local 3D models.

Related projects

58 W Synchronous Buck Converter · Inverter Modulation and PWM

Parts

42
QtyValueFootprintReferences
4100nPWM_Footprints:Vishay_K15_P2.5mmC4, C5, C6, C7
41kPWM_Footprints:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR6, R10, R11, R13
31.8kPWM_Footprints:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR8, R15, R16
3M3.2PWM_Footprints:MountingHole_3.2mmH1, H2, H3
2105PWM_Footprints:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1, R4
260.4kPWM_Footprints:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR12, R14
29.76PWM_Footprints:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR2, R3
2LM319N/NOPBPWM_Footprints:DIP-14_W7.62mmU2, U3
112.3kPWM_Footprints:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR5
112kPWM_Footprints:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR7
11k DUTYPWM_Footprints:Bourns_PTV09A2_20mmRV1
12.4n C0G 1%PWM_Footprints:C317_5.08mmC3
122u/16VPWM_Footprints:CP_Radial_D5.0mm_P2.00mmC1
14.7u/50VPWM_Footprints:CP_Radial_D5.0mm_P2.50mmC2
150k FREQPWM_Footprints:Bourns_PTV09A2RV2
17-10V DC, CENTRE +PWM_Footprints:BarrelJack_CUI_PJ-102AH_HorizontalJ1
19.76kPWM_Footprints:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR9
1ANALOG 6PWM_Footprints:PinSocket_1x06_P2.54mm_VerticalJ7
1BAT85S-TRPWM_Footprints:D_DO-35_SOD27_P7.62mm_HorizontalD1
1DIGITAL 10 / OUTPWM_Footprints:PinSocket_1x10_P2.54mm_VerticalJ4
1DIGITAL 8PWM_Footprints:PinSocket_1x08_P2.54mm_VerticalJ5
1Dual 1k DEAD TIMEPWM_Footprints:SameSky_PTN16_A_DualRV3
1EXTERNAL DUTYPWM_Footprints:Mueller_BU1420701236J2
1LF50ABVPWM_Footprints:TO-220-3_VerticalU4
1MANUAL / EXTERNALPWM_Footprints:PinSocket_1x03_P2.54mm_VerticalJ3
1POWERPWM_Footprints:PinSocket_1x08_P2.54mm_VerticalJ6
1SN74ACT240NPWM_Footprints:DIP-20_W7.62mmU5
1TLC072CPPWM_Footprints:DIP-8_W7.62mmU1

Similar boards

  • 2 layers52 × 65 mmSensor, the printed circuit board in 3D

    Sensor

    Aidan-McNay/chimes-leds

    A system for controlling McGraw Tower's clock face LEDs

    21 parts
  • 2 layersJACart, the printed circuit board in 3D

    JACart

    JACart2/Hardware-Electronics

    This repository is copied from a deprecated repository, located at https://github.com/JACart/jacartelectronics.

    56 parts
  • 2 layers72 × 50 mmPlacement, the printed circuit board in 3D

    Placement

    balazsbencs/ardor

    This is a DIY multieffects project with a Raspberry Pi and and Codec Zero and a Raspberry Pi Display 2. With Full NAM A2 support.

    31 parts18MIT
  • 2 layers30 × 50 mmModuleV400, the printed circuit board in 3D

    ModuleV400

    stuartpittaway/diyBMSv4

    Version 4 of the diyBMS

    42 parts1.1k
  • 2 layers139.7 × 64.8 mmSprig console, the printed circuit board in 3D

    Sprig console

    hackclub/sprig

    🍃 Learn to code by making games in a JavaScript web-based game editor.

    42 parts1.1kMIT
  • 2 layers90.5 × 50 mmMain control board, the printed circuit board in 3D

    Main control board

    jamro/tiny-engineer

    A small desktop robot that brings an AI coding assistant to life, physically acting out when it reads files, thinks, writes code, and finishes work.

    42 parts1.1k
  • 2 layers67.6 × 30.5 mmRgb to hdmi, the printed circuit board in 3D

    Rgb to hdmi

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    42 parts1kGPL-3.0

Questions

How big is the Analog PWM PCB?

It measures 75 × 53 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Analog PWM use?

42 parts, built around the SN74ACT240N, TLC072CP, LF50ABV and PTV09A-2020F-B102. 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 Analog PWM KiCad files?

From the MouaadO/analog-pwm-generator repository on GitHub, at the commit this page was made from: the board is pcb/Analog_PWM.kicad_pcb and its schematic pcb/Analog_PWM.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Analog PWM design in my own project?

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