Skip to the content
4 layers71.1 × 100 mmSTM Module, the printed circuit board in 3D

Firmware for a small STM32F1-based audio board: either a LUT-driven oscillator into the onboard DAC, or a short effects chain on whatever comes in on the ADC.

Size
71.1 × 100 mm
Copper layers
4
Thickness
1.6 mm
Parts
113
Nets
125
Pads
379
Tracks, vias
564, 49
Pours
4
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
20 Mar 2026
Updated
20 Mar 2026

Overview

STM Module is an open-source printed circuit board by mark-mcnulty, from the mark-mcnulty/wiggle_stm32 repository on GitHub. It is a 4-layer board of 71.1 × 100 mm with 113 parts on 125 nets, routed with 564 tracks and 49 vias.

It is built around the CH340C, TL072 and H11L1, with the HDSM-441B, PESD3V3L1BA and IRLML6402 among its other parts. Its parts include 32 capacitors, 27 resistors, 9 ICs, 9 diodes and 5 connectors. It belongs with the audio and music boards and the STM32 boards of this library.

Main components

7

README

README.md

STM32_MOD_2

Firmware for a small STM32F1-based audio board: either a LUT-driven oscillator into the onboard DAC, or a short effects chain on whatever comes in on the ADC. The Cube/HAL setup is real; mixer, filter, ADSR, and sampler are mostly placeholders for now (see Code layout).

MCU: STM32F103RCT6
IDE: STM32CubeIDE (GCC).

Requirements

Build and flash

  1. Open STM32_MOD_2.ioc or import the project from this repo in CubeIDE.
  2. Build the Debug configuration (output under Debug/).
  3. Flash/debug with your ST-Link (or whatever probe you use in the launch config).

Regenerating code from the .ioc is fine; user sections in main.c and friends are preserved by Cube’s USER CODE blocks.

Audio modes

Flip these in Core/Src/main.c before you build:

  • ACTIVE_AUDIO_MODE — SYNTH or EFFECTS (passed into init_stm32()).
  • ACTIVE_EFFECT_MODE — EFFECT_BYPASS, EFFECT_MOVING_AVG, or EFFECT_BIT_CRUSHER (Core/Inc/effects.h).
  • ACTIVE_MOVING_AVG_TAPS — tap count for the moving average (capped in effects.c).

SYNTH: TIM8 triggers DAC channel 2 via DMA. Half- and full-transfer callbacks call render_audio_block(), which fills the DAC buffer from the oscillator (Core/Src/stm32_synth.c, Core/Src/oscillator.c). Waveforms are sine, square, triangle, saw, or noise (Core/Inc/oscillator.h). Right now the main loop runs marry_had_a_little_lamb() as a demo when in this mode; other tests (UART, frequency sweep, seven-seg) are commented out in the same file.

EFFECTS: ADC1 is also triggered off TIM8 TRGO, with DMA into audio_buffer_adc. ADC callbacks copy each half into audio_buffer_sig_path. DAC callbacks wait until the matching adc_half_ready[] flag is set, then run effects_process_sample() so output stays aligned with fresh input. Underrun/overrun counters on struct synth are there for debugging.

Sample rate: System clock is 24 MHz (HSI + PLL in SystemClock_Config). TIM8 is set in the IOC to prescaler 3 and period 124, which works out to about 48 kHz for the DAC/ADC trigger rate. Audio buffers are 256 samples (AUDIO_BUFFER_SIZE in Core/Inc/stm32_synth.h).

Front-panel I/O

Pin names live in Core/Inc/main.h: two buttons, a pot, an LED, SPI1 to a shift-register style display, plus digit select lines for a two-digit seven-segment display. Core/Src/seven_seg.c is refreshed from HAL_TIM_PeriodElapsedCallback() on TIM2 in main.c.

Code layout

AreaFiles
Entry, Cube init, DAC/ADC callbacksCore/Src/main.c
Mode init, render_audio_block, ADC stagingCore/Src/stm32_synth.c, Core/Inc/stm32_synth.h
Oscillator / LUTCore/Src/oscillator.c, Core/Inc/oscillator.h
EffectsCore/Src/effects.c, Core/Inc/effects.h
Note frequenciesCore/Inc/notes.h
Seven-segment + SPICore/Src/seven_seg.c, Core/Inc/seven_seg.h

Not wired into the synth audio path yet: struct synth already holds mixer, filter, and ADSR, and mixer.c implements a simple average of sources, but render_audio_block() only comments those stages—no calls. filter.c, adsr.c, and sampler.c are empty or stub implementations.

Hardware and diagrams

KiCad lives under Hardware/. The project file is Hardware/STM_Module.kicad_pro; schematics include e.g. Hardware/STM32.kicad_sch and Hardware/power.kicad_sch.

Block diagrams in the repo root: signal_path_diagram.drawio, stm32_structure.drawio.

License

ST’s HAL/CMSIS drop in with their usual LICENSE.txt under Drivers/—nothing special added here.

Parts

113
QtyValueFootprintReferences
20100nFCapacitor_SMD:C_1206_3216MetricC1, C3, C12, C13, C18, C19, C25, C26, C27, C28, C30, C31, C35, C36, C37, C38 +4
510kResistor_SMD:R_1206_3216MetricR1, R24, R26, R27, R29
4MountingHoleMountingHole:MountingHole_2.2mm_M2H1, H2, H3, H4
3100kResistor_SMD:R_1206_3216MetricR12, R18, R19
34.7kResistor_SMD:R_1206_3216MetricR22, R23, R55
3SW_MEC_5E1_Mark:Button PN C381039SW1, SW2, SW3
20Resistor_SMD:R_1206_3216MetricR3, R4
210Resistor_SMD:R_1206_3216MetricR25, R30
210pFCapacitor_SMD:C_0603_1608MetricC21, C22
210uFCapacitor_SMD:C_1206_3216MetricC2, C11
214kResistor_SMD:R_1206_3216MetricR11, R17
2150pFCapacitor_SMD:C_1206_3216MetricC10, C14
21N5819Diode_SMD:D_SOD-123D4, D7
21k5Resistor_SMD:R_1206_3216MetricR2, R5
227kResistor_SMD:R_1206_3216MetricR9, R20
247uFCapacitor_SMD:CP_Elec_6.3x5.4_NichiconC4, C7
24pFCapacitor_SMD:C_0603_1608MetricC17, C20
2C51450Diode_SMD:D_SOD-323D3, D8
2IRLML6402Package_TO_SOT_SMD:SOT-23Q1, Q2
2LEDLED_SMD:LED_1206_3216MetricD1, D2
2TL0721_Mark:TL072_SOIC-8U6, U7
2~1_Mark:auxJ4, J5
1+12VConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP15
1-12VConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP16
110uFCapacitor_SMD:CP_Elec_4x5.4C29
11M1_Mark:POT_mogaopiRV1
11N4148WDiode_SMD:D_SOD-123D9
11kResistor_SMD:R_1206_3216MetricR10
11uFCapacitor_SMD:CP_Elec_4x5.4C32
1220Resistor_SMD:R_1206_3216MetricR7
13.3VConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP17
132.768kHzCrystal:Crystal_SMD_2012-2Pin_2.0x1.2mmY1
139kResistor_SMD:R_1206_3216MetricR13
1470Resistor_SMD:R_1206_3216MetricR14
147kResistor_SMD:R_1206_3216MetricR8
15Resistor_SMD:R_1206_3216MetricR6
18 MHz1_Mark:12MHz Surface Mount Crystal 12pF ±10ppm ±20ppm SMD3225-4P Crystals ROHSY3
1Audio_IN_10vConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP2
1Audio_IN_3.3vConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP11
1Audio_OUT_10vConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP13
1Audio_OUT_3.3vConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP12
1BLANKConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP10
1CH340CPackage_SO:SOIC-16_3.9x9.9mm_P1.27mmU9
1D+Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP3
1D-Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP4
1DIN-51_Mark:Din5J3
1FerriteBead_SmallResistor_SMD:R_1206_3216MetricFB1
1GNDConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP14
1H11L11_Mark:H11L1_SMDU2
1HDSM-441B1_Mark:2x7 SEG LCSC C193139U5
1LATConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP9
1LED_m12vLED_SMD:LED_1206_3216Metric_Pad1.42x1.75mm_HandSolderD6
1LED_p12vLED_SMD:LED_1206_3216Metric_Pad1.42x1.75mm_HandSolderD5
1MIDIConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP18
1MOSIConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP7
1POWER_JACK1_Mark:euro_rack_powerJ1
1SCKConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP8
1STM32F103RCTxPackage_QFP:LQFP-64_10x10mm_P0.5mmU1
1TLC5928_SSOP-241_Mark:TLC5928_SSOP-24U10
1TestPointConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP1
1UART_RXConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP5
1UART_TXConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP6
1USB_B_Micro1_Mark:USB Mini-B MFN, U-M-M5DD-W-4J2
1~Connector_PinHeader_2.54mm:PinHeader_2x05_P2.54mm_VerticalU4
1~1_Mark:pwr_mez_3in_1outU3

Similar boards

  • 4 layers87.6 × 84 mmFlashover, the printed circuit board in 3D

    Flashover

    Cherry-Blossom-Development/GreywireStudio

    GreywireStudio - a combined software/hardware product

    95 parts
  • 4 layers106 × 63.5 mmBrineomatic, the printed circuit board in 3D

    Brineomatic

    hoeken/brineomatic

    Open Source Watermaker Controller.

    323 parts47LGPL-2.1
  • 4 layers144 × 127 mmFrothfet, the printed circuit board in 3D

    Frothfet

    hoeken/frothfet

    Yarrboard load controller board with current sense, volt sense, fuses, and sender support.

    394 parts14GPL-3.0
  • 2 layers100 × 100 mmYM2612 MIDI SMD, the printed circuit board in 3D

    YM2612 MIDI SMD

    superjoebob/genny

    YM2612/SN76489 Virtual Instrument

    112 parts96
  • 2 layers13 × 1.4 mmPicoX21H, the printed circuit board in 3D

    PicoX21H

    SloeComputers/PDK

    Portable Development Kit

    22 parts6MIT
  • 2 layers141 × 150 mmMidiori, the printed circuit board in 3D

    Midiori

    fabPlane/x68000-midi

    X68000 MIDI and 8 MB RAM expansion card: Gowin GW1NR-9, YM3802-compatible gateware in Amaranth, and a universal I/O slot breakout. CC0.

    92 partsCC0-1.0

Questions

How big is the STM Module PCB?

It measures 71.1 × 100 mm and has 4 copper layers, 1.6 mm thick.

What parts does the STM Module use?

113 parts, built around the CH340C, TL072, H11L1 and HDSM-441B. 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 STM Module KiCad files?

From the mark-mcnulty/wiggle_stm32 repository on GitHub, at the commit this page was made from: the board is Hardware/STM_Module.kicad_pcb and its schematic Hardware/Power_input.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the STM Module design in my own project?

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