Skip to the content
PCBKitNew board
2 layers52 × 48 mmSTM32-Based Programmable Waveform Generator, the printed circuit board in 3D

STM32-Based Programmable Waveform Generator

devjamescollier/STM-32_Based_Waveform_Generator

USB-powered programmable function generator built around an STM32C031K6T6 microcontroller and MCP4901 DAC. Generates clean sine, triangle, and square waveforms with amplitude control via potentiometer, mode selection…

Size
52 × 48 mm
Copper layers
2
Thickness
1.6 mm
Parts
48
Nets
50
Pads
155
Tracks, vias
298, 40
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
2 Oct 2026
Updated
2 Oct 2026

Overview

STM32-Based Programmable Waveform Generator is an open-source printed circuit board by devjamescollier, from the devjamescollier/STM-32_Based_Waveform_Generator repository on GitHub, published under the CERN-OHL-P-2.0 licence. It is a 2-layer board of 52 × 48 mm with 48 parts on 50 nets, routed with 298 tracks and 40 vias.

It is built around the MCP4901-E/P, TLV2372IP and LM1117IMP-3.3/NOPB-HXY, with the IRLML0030 among its other parts. Its parts include 14 resistors, 11 capacitors, 5 diodes, 4 ICs and 3 connectors. It belongs with the STM32 boards of this library.

Main components

4

README

README.md

STM32-Based Programmable Waveform Generator

Status Hardware License: CERN-OHL-P-2.0 Firmware License: MIT KiCad

USB-powered programmable function generator built around an STM32C031K6T6 microcontroller and MCP4901 DAC. Generates clean sine, triangle, and square waveforms with amplitude control via potentiometer, mode selection via buttons, and visual feedback through status/signal LEDs.

Designed for lab and bench use with an SWD programming header, multiple test points, and robust power protection.

Table of Contents

Schematic

Signal Generator Schematic

Layout

Signal Generator PCB Layout

3D Model

Signal Generator PCB 3D Model

Overview

The board is a compact USB-powered waveform generator centred on an STM32C031K6T6 microcontroller.

SectionDescription
Digital CoreThe STM32 generates waveform data and drives an MCP4901 8-bit SPI DAC.
Analog Front-EndA TLV2372 dual op-amp and discrete MOSFET switching produce clean sine, triangle, and square outputs.
User InterfaceThree tactile switches provide waveform selection, mode/settings control, and reset. Five status/signal LEDs provide visual feedback, while a potentiometer controls amplitude.
PowerA USB Micro-B input supplies the board through an LM1117 3.3 V regulator with polyfuse protection.

Specifications

ParameterValue
MicrocontrollerSTM32C031K6T6
DACMCP4901, 8-bit SPI
WaveformsSine, triangle, and square
Sine/Triangle Frequency Range1 Hz–50 kHz
Square-Wave Frequency Range1 Hz–100 kHz
Amplitude0–3.0 Vpp, controlled by potentiometer
Output Impedance~50 Ω
Power Input5 V USB
Typical Current28 mA
Maximum Current45 mA
Regulation3.3 V ± 1.5%
Board size52 mm × 48 mm

Results

PCB measurements from the hand-soldered prototype:

WaveformFrequencyAmplitudeTHD / Rise-FallNotes
Sine1 kHz2.98 Vpp0.72% THDClean across the full range
Triangle1 kHz2.95 Vpp—Linear slope confirmed
Square10 kHz3.01 Vpp12 ns / 14 nsFast edges with minimal ringing

Frequency response, amplitude accuracy (±1.2%), and load regulation were verified using an Agilent Technologies InfiniiVision MSO-X 3034A and Digilent Analog Discovery 3.

Software

The firmware targets the STM32C031K6T6 and is written in C.

Programming

  1. Create a new STM32CubeIDE project targeting the STM32C031K6T6.
  2. Replace the generated Core/Src/main.c with Software/main.c.
  3. Configure the required GPIO, SPI, ADC, and timer peripherals.
  4. Connect an ST-Link/V2 to the SWD header.
  5. Build and flash the firmware through SWD.

Tech Stack

PCB DesignFirmware DevelopmentVersion ControlRepository HostingCircuit SimulationIDELanguage
KiCadSTM32CubeIDEGitGitHubLTspiceNeovimC

Equipment

ToolModelPurpose
OscilloscopeAgilent Technologies InfiniiVision MSO-X 3034AWaveform capture, THD, and rise/fall-time measurements
Mixed-signal toolDigilent Analog Discovery 3Frequency-response and spectrum analysis
MultimeterTektronix DMM4020ADC accuracy and current-draw measurements
ProgrammerST-Link/V2Firmware flashing and SWD debugging
USB Power Analyzer—Input-current and efficiency verification
Soldering station—Hand assembly of all SMD and through-hole components

Manufacturing

Production files are provided in the Manufacturing directory:

  • BOM.csv — Bill of materials
  • positions.csv — Component placement data
  • Gerbers — Copper, mask, silkscreen, paste, outline, and drill files

Verify all fabrication outputs against the KiCad design before ordering.

Repository Structure

text
STM32-Based_Programmable_Waveform_Generator
├── Docs                                                                           Contains board related images
│   └── Images                                                                     Contains images of the board render, board layout, and board schematic
│       ├── STM32-Based_Programmable_Waveform_Generator_3D_Model.png               3D model in PNG format
│       ├── STM32-Based_Programmable_Waveform_Generator_Schematic_Layout.png       Layout in PNG format
│       ├── STM32-Based_Programmable_Waveform_Generator_Schematic.png              Schematic in PNG format
│       └── STM32-Based_Programmable_Waveform_Generator_Schematic.pdf              Schematic in PDF format
├── Hardware                                                                       Contains all KiCad PCB files
│   └── KiCad_Files                                                                Contains 3D models for board render, footprints for layout, KiCad project files, and symbols for schematic.
│       ├── 3D_Models                                                              Contains STP files for the 3D render of the board
│       │   ├── LM1117IMP-3-3-NOPB.stp                                             STP for LM1117IMP-3-3-NOPB linear voltage regulator
│       │   ├── TC33X-2-XXX.stp                                                    STP for TC33X-2-102E potentiometer
│       │   └── USB-B-Micro.stp                                                    STP for USB-B-Micro
│       ├── Footprints                                                             Contains footprints for PCB components
│       │   └── LM1117.pretty                                                      Contains LM1117 footprints
│       │       ├── DCY0004A_L.kicad_mod
│       │       ├── DCY0004A_M.kicad_mod
│       │       └── DCY0004A_N.kicad_mod
│       ├── STM32-Based_Programmable_Waveform_Generator.kicad_pcb                  KiCad PCB file
│       ├── STM32-Based_Programmable_Waveform_Generator.kicad_pro                  KiCad project file
│       ├── STM32-Based_Programmable_Waveform_Generator.kicad_sch                  KiCad Schematic file
│       ├── sym-lib-table
│       └── Symbols                                                                Contains schematic symbols for PCB schematic
│           └── LM1117                                                             Contains LM1117 linear voltage regulator symbol

Contact

License

Copyright © 2026 James Collier

The hardware design files are licensed under the CERN Open Hardware Licence Version 2 – Permissive. See LICENSE.

The firmware is licensed under the MIT License. See Software/LICENSE.

Parts

48
QtyValueFootprintReferences
6100nCapacitor_SMD:C_0805_2012MetricC1, C3, C4, C5, C9, C10
5220Resistor_SMD:R_0805_2012MetricR6, R10, R12, R13, R14
410kResistor_SMD:R_0805_2012MetricR5, R7, R9, R11
4TestPointTestPoint:TestPoint_THTPad_D2.5mm_Drill1.2mmTP1, TP2, TP3, TP4
210uCapacitor_Tantalum_SMD:CP_EIA-3216-18_Kemet-AC7, C8
24k6Resistor_SMD:R_0805_2012MetricR2, R4
2IRLML0030Package_TO_SOT_SMD:SOT-23Q3, Q4
1100nFCapacitor_SMD:C_0805_2012MetricC11
110uCapacitor_SMD:C_1206_3216MetricC2
110uCapacitor_SMD:C_0805_2012MetricC6
1560Resistor_SMD:R_0805_2012MetricR1
15k6Resistor_SMD:R_0805_2012MetricR8
16.8kResistor_SMD:R_0805_2012MetricR3
1Conn_01x02Connector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_VerticalJ3
1Conn_01x05Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_HorizontalJ1
1LED_SETTINGS_1LED_SMD:LED_0805_2012MetricD4
1LED_SETTINGS_2LED_SMD:LED_0805_2012MetricD5
1LED_SIGNAL_1LED_SMD:LED_0805_2012MetricD1
1LED_SIGNAL_2LED_SMD:LED_0805_2012MetricD2
1LED_SIGNAL_3LED_SMD:LED_0805_2012MetricD3
1LM1117IMP-3.3/NOPBPackage_TO_SOT_SMD:SOT-223-3_TabPin2U4
1MCP4901Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU2
1PolyfuseFuse:Fuse_1206_3216MetricTH1
1RESET_SWButton_Switch_THT:SW_PUSH_6mmSW2
1R_PotentiometerPotentiometer_SMD:Potentiometer_Bourns_TC33X_VerticalRV1
1SETTINGS_SWButton_Switch_THT:SW_PUSH_6mmSW3
1SIGNAL_SWButton_Switch_THT:SW_PUSH_6mmSW1
1STM32C031K6TxPackage_QFP:LQFP-32_7x7mm_P0.8mmU1
1TLV2372Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU5
1USB_B_MicroConnector_USB:USB_Micro-B_Amphenol_10104110_HorizontalJ2

Questions

How big is the STM32-Based Programmable Waveform Generator PCB?

It measures 52 × 48 mm and has 2 copper layers, 1.6 mm thick.

What parts does the STM32-Based Programmable Waveform Generator use?

48 parts, built around the MCP4901-E/P, TLV2372IP, LM1117IMP-3.3/NOPB-HXY and IRLML0030. 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 STM32-Based Programmable Waveform Generator KiCad files?

From the devjamescollier/STM-32_Based_Waveform_Generator repository on GitHub, at the commit this page was made from: the board is Hardware/KiCad_Files/STM32-Based_Programmable_Waveform_Generator.kicad_pcb and its schematic Hardware/KiCad_Files/STM32-Based_Programmable_Waveform_Generator.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the STM32-Based Programmable Waveform Generator design in my own project?

Its repository publishes it under the CERN-OHL-P-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers100 × 70 mmUtf-9-samplified, the printed circuit board in 3D

    Utf-9-samplified

    wgd-modular/utf-9-samplified

    A standalone drum machine based on the bleep drum.

    27 parts19
  • 2 layers75.6 × 113 mmLingcordion, the printed circuit board in 3D

    Lingcordion

    LingDong-/lingcordion

    Pocket-sized digital musical instrument inspired by the piano and the accordion

    61 parts14
  • 2 layers51.4 × 24.1 mmMiniflex, the printed circuit board in 3D

    Miniflex

    marcusbarbu/Toph

    A modular solution for sightless navigation

    5 partsMIT
  • 2 layers77 × 92 mmHananClasicaPcb, the printed circuit board in 3D

    HananClasicaPcb

    oficinadesonido/hanan-cumbia

    Batería electrónica HANAN CUMBIA para Arduino Nano + web flasher (Web Serial)

    32 parts
  • 2 layers108 × 80 mmBridge, the printed circuit board in 3D

    Bridge

    Roman-Rice-Engineering/auto-golf-cart

    This is the official repository for the autonomous golf cart project at MVTHS

    45 partsMIT
  • 2 layers101.6 × 53.3 mmBatteryAnalyzer MkII, the printed circuit board in 3D

    BatteryAnalyzer MkII

    Moragor/BatteryAnalyzer_MkII

    Updated Version of the battery analyzer, now with constant current

    25 parts12MIT
  • 2 layers105.5 × 86 mmECE302 Lab8, the printed circuit board in 3D

    ECE302 Lab8

    alexcjang/20V-5V-Buck-Converter

    41 parts
  • 2 layers30 × 30 mmSteering Sensor (1), the printed circuit board in 3D

    Steering Sensor (1)

    dnz1666/impedance-buffer-pcb

    Analog circuit design (impedance buffer + LP filter) – KiCad schematic & PCB layout for a student EV project at RWTH Aachen

    14 parts