

STM Module
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
7CH340C
SOP-16-20℃~+70℃ 2Mbps 3.3V、5V 50uA 7mA Transceiver USB 2.0 SOP-16 USB Converters ROHSWCH (Nanjing Qinheng Microelectronics)USB ConvertersTL072
SOP-8-18V~18V 0℃~+70℃ 1.4mA 1.5nA 10V/us 10mV 2 2.5nA 3MHz 85dB SOP-8 Operational Amplifier ROHSGcoreOperational AmplifierH11L1
DIP-6-55℃~+100℃ 1 1.6mA 1Mbit/s 250mW 3V~15V 5kV DC DIP-6 Logic Output Optoisolators ROHSEverlight ElectronicsLogic Output OptoisolatorsHDSM-441B
SMD-10PLED Segment DisplaysBroadcom LimitedPESD3V3L1BA
--65℃~+150℃ 1 101pF 18A@8/20us 26V 3.3V 500W 6.9V 90nA Bidirectional ESD SOD-323 ESD and Surge Protection (TVS/ESD) ROHSNexperiaESD And Surge Protection (TVS/ESD)IRLML6402
SOT-23-55℃~+150℃ 1 P-Channel 1.3W 110pF 12nC 145pF 20V 3.7A 400mV 633pF 65mΩ@4.5V P-Channel SOT-23 MOSFETs ROHSGuangdong HottechMOSFETs1N4148W
SOD-123150mA 1A 1V@50mA 1uA@75V 400mW 4ns 75V Independent SOD-123 Switching Diodes ROHSSTMicroelectronicsSwitching Diodes
README
README.mdSTM32_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
- STM32CubeIDE (or IAR + pack for F1)
- ST firmware package STM32Cube FW_F1 V1.8.6 (matches
STM32_MOD_2.ioc)
Build and flash
- Open
STM32_MOD_2.iocor import the project from this repo in CubeIDE. - Build the Debug configuration (output under
Debug/). - 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—SYNTHorEFFECTS(passed intoinit_stm32()).ACTIVE_EFFECT_MODE—EFFECT_BYPASS,EFFECT_MOVING_AVG, orEFFECT_BIT_CRUSHER(Core/Inc/effects.h).ACTIVE_MOVING_AVG_TAPS— tap count for the moving average (capped ineffects.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
| Area | Files |
|---|---|
| Entry, Cube init, DAC/ADC callbacks | Core/Src/main.c |
Mode init, render_audio_block, ADC staging | Core/Src/stm32_synth.c, Core/Inc/stm32_synth.h |
| Oscillator / LUT | Core/Src/oscillator.c, Core/Inc/oscillator.h |
| Effects | Core/Src/effects.c, Core/Inc/effects.h |
| Note frequencies | Core/Inc/notes.h |
| Seven-segment + SPI | Core/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| Qty | Value | Footprint | References |
|---|---|---|---|
| 20 | 100nF | Capacitor_SMD:C_1206_3216Metric | C1, C3, C12, C13, C18, C19, C25, C26, C27, C28, C30, C31, C35, C36, C37, C38 +4 |
| 5 | 10k | Resistor_SMD:R_1206_3216Metric | R1, R24, R26, R27, R29 |
| 4 | MountingHole | MountingHole:MountingHole_2.2mm_M2 | H1, H2, H3, H4 |
| 3 | 100k | Resistor_SMD:R_1206_3216Metric | R12, R18, R19 |
| 3 | 4.7k | Resistor_SMD:R_1206_3216Metric | R22, R23, R55 |
| 3 | SW_MEC_5E | 1_Mark:Button PN C381039 | SW1, SW2, SW3 |
| 2 | 0 | Resistor_SMD:R_1206_3216Metric | R3, R4 |
| 2 | 10 | Resistor_SMD:R_1206_3216Metric | R25, R30 |
| 2 | 10pF | Capacitor_SMD:C_0603_1608Metric | C21, C22 |
| 2 | 10uF | Capacitor_SMD:C_1206_3216Metric | C2, C11 |
| 2 | 14k | Resistor_SMD:R_1206_3216Metric | R11, R17 |
| 2 | 150pF | Capacitor_SMD:C_1206_3216Metric | C10, C14 |
| 2 | 1N5819 | Diode_SMD:D_SOD-123 | D4, D7 |
| 2 | 1k5 | Resistor_SMD:R_1206_3216Metric | R2, R5 |
| 2 | 27k | Resistor_SMD:R_1206_3216Metric | R9, R20 |
| 2 | 47uF | Capacitor_SMD:CP_Elec_6.3x5.4_Nichicon | C4, C7 |
| 2 | 4pF | Capacitor_SMD:C_0603_1608Metric | C17, C20 |
| 2 | C51450 | Diode_SMD:D_SOD-323 | D3, D8 |
| 2 | IRLML6402 | Package_TO_SOT_SMD:SOT-23 | Q1, Q2 |
| 2 | LED | LED_SMD:LED_1206_3216Metric | D1, D2 |
| 2 | TL072 | 1_Mark:TL072_SOIC-8 | U6, U7 |
| 2 | ~ | 1_Mark:aux | J4, J5 |
| 1 | +12V | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP15 |
| 1 | -12V | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP16 |
| 1 | 10uF | Capacitor_SMD:CP_Elec_4x5.4 | C29 |
| 1 | 1M | 1_Mark:POT_mogaopi | RV1 |
| 1 | 1N4148W | Diode_SMD:D_SOD-123 | D9 |
| 1 | 1k | Resistor_SMD:R_1206_3216Metric | R10 |
| 1 | 1uF | Capacitor_SMD:CP_Elec_4x5.4 | C32 |
| 1 | 220 | Resistor_SMD:R_1206_3216Metric | R7 |
| 1 | 3.3V | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP17 |
| 1 | 32.768kHz | Crystal:Crystal_SMD_2012-2Pin_2.0x1.2mm | Y1 |
| 1 | 39k | Resistor_SMD:R_1206_3216Metric | R13 |
| 1 | 470 | Resistor_SMD:R_1206_3216Metric | R14 |
| 1 | 47k | Resistor_SMD:R_1206_3216Metric | R8 |
| 1 | 5 | Resistor_SMD:R_1206_3216Metric | R6 |
| 1 | 8 MHz | 1_Mark:12MHz Surface Mount Crystal 12pF ±10ppm ±20ppm SMD3225-4P Crystals ROHS | Y3 |
| 1 | Audio_IN_10v | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP2 |
| 1 | Audio_IN_3.3v | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP11 |
| 1 | Audio_OUT_10v | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP13 |
| 1 | Audio_OUT_3.3v | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP12 |
| 1 | BLANK | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP10 |
| 1 | CH340C | Package_SO:SOIC-16_3.9x9.9mm_P1.27mm | U9 |
| 1 | D+ | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP3 |
| 1 | D- | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP4 |
| 1 | DIN-5 | 1_Mark:Din5 | J3 |
| 1 | FerriteBead_Small | Resistor_SMD:R_1206_3216Metric | FB1 |
| 1 | GND | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP14 |
| 1 | H11L1 | 1_Mark:H11L1_SMD | U2 |
| 1 | HDSM-441B | 1_Mark:2x7 SEG LCSC C193139 | U5 |
| 1 | LAT | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP9 |
| 1 | LED_m12v | LED_SMD:LED_1206_3216Metric_Pad1.42x1.75mm_HandSolder | D6 |
| 1 | LED_p12v | LED_SMD:LED_1206_3216Metric_Pad1.42x1.75mm_HandSolder | D5 |
| 1 | MIDI | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP18 |
| 1 | MOSI | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP7 |
| 1 | POWER_JACK | 1_Mark:euro_rack_power | J1 |
| 1 | SCK | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP8 |
| 1 | STM32F103RCTx | Package_QFP:LQFP-64_10x10mm_P0.5mm | U1 |
| 1 | TLC5928_SSOP-24 | 1_Mark:TLC5928_SSOP-24 | U10 |
| 1 | TestPoint | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP1 |
| 1 | UART_RX | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP5 |
| 1 | UART_TX | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | TP6 |
| 1 | USB_B_Micro | 1_Mark:USB Mini-B MFN, U-M-M5DD-W-4 | J2 |
| 1 | ~ | Connector_PinHeader_2.54mm:PinHeader_2x05_P2.54mm_Vertical | U4 |
| 1 | ~ | 1_Mark:pwr_mez_3in_1out | U3 |
Similar boards
- 2 layers187.8 × 82 mm

- 2 layers75.1 × 49.2 mm

- 4 layers87.6 × 84 mm

Flashover
Cherry-Blossom-Development/GreywireStudio
GreywireStudio - a combined software/hardware product
95 parts - 4 layers106 × 63.5 mm

- 4 layers144 × 127 mm

Frothfet
hoeken/frothfet
Yarrboard load controller board with current sense, volt sense, fuses, and sender support.
394 parts14GPL-3.0 - 2 layers100 × 100 mm

- 2 layers13 × 1.4 mm

- 2 layers141 × 150 mm

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.