

Sunlu S1-Board
Drop-in replacement controller board for the Sunlu S1 filament dryer.
- Size
- 48.2 × 57 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 58
- Nets
- 42
- Pads
- 176
- Tracks, vias
- 308, 76
- Pours
- 6
- Routed
- Yes
- KiCad
- KiCad 9.0 (file 20241229)
- Created
- 7 Dec 2025
- Updated
- 8 Feb 2026
Overview
Sunlu S1-Board is an open-source printed circuit board by Pegoku, from the Pegoku/Sunlu-S1-Board repository on GitHub. It is a 2-layer board of 48.2 × 57 mm with 58 parts on 42 nets, routed with 308 tracks and 76 vias.
It is built around the TPS54240DGQ, AO3400A and CS1213AGF260, with the SS34 and B360 among its other parts. Its parts include 19 resistors, 18 capacitors, 7 connectors, 5 diodes and 3 transistors. It belongs with the STM32 boards of this library.
Main components
5TPS54240DGQ
MSOP-10-EP-40℃~+150℃@(TJ) 1 138uA 2.5A 2.5MHz 3.5V~42V 800mV~39V Adjustable Buck Buck Built-in No MSOP-10-EP DC-DC Converters ROHSTexas InstrumentsDC-DC ConvertersAO3400A
SOT-23-55℃~+150℃ 1 N-channel 1.45V 1.4W 30V 48mΩ@2.5V 5.7A 50pF 630pF 75pF 7nC@10V N-Channel SOT-23 MOSFETs ROHSAlpha & Omega SemiconductorMOSFETsCS1213AGF260
SMD,3.9x2.9mm-40℃~+85℃ 2.6N 2.9mm 2mm 3.9mm 50V 50mA Round Button SMD(SMT) Tab SPST-NO Surface Mount,Vertical SMD,3.9x2.9mm Tactile Switches ROHSCIT Relay and SwitchTactile SwitchesSS34
SMA(DO-214AC)-55℃~+125℃ 3A 40V 500uA@40V 550mV@3A Independent SMA(DO-214AC) Schottky Diodes ROHSMDDSchottky DiodesB360
SMC(DO-214AB)-55℃~+150℃ 1 Independent 100A 3A 500uA@60V 60V 700mV@3A SMC(DO-214AB) Schottky Diodes ROHSDiodes IncorporatedSchottky Diodes
README
README.mdSunlu S1 Filament Dryer Controller
Drop-in replacement controller board for the Sunlu S1 filament dryer. Features an STM32C011F4P6 microcontroller, 1.8" ST7735 TFT display, dual NTC temperature sensing, and precise PWM heater control; all optimized to fit in just 16 KB of flash.
Table of Contents
Overview
Complete replacement for the stock Sunlu S1 control board, maintaining compatibility with the original heating element, chamber, and power connections. Adds a color TFT display in landscape mode and two-button navigation for precise temperature and time control (30–70°C configurable range, exceeding the stock 35–55°C limit).
The firmware uses integer-only math, dirty-check rendering, and batched SPI transfers to fit in the STM32C011's tiny 16 KB flash with room to spare.
Gallery
Final build

PCB


Features
Display & Control
- 1.8" ST7735 TFT: 160×128 px landscape, 16-bit RGB565 color
- Two-button interface: short-press (select/increment), long-press (toggle/cancel)
- Three screens: Main Status, Set Temperature, Set Time
- Smart rendering: dirty-check updates (only changed fields), instant button response
Temperature & Heater Regulation
- Dual NTC thermistors: air temp (displayed) + heater element (safety)
- Proportional PWM control (~488 Hz): ramps heater power based on error from target
- Dual safety cutoffs: absolute (85°C) and dynamic (target + 5°C margin)
- Integer-only lookup: 11-point table with linear interpolation, no floating-point library
- Fan control: full speed during drying and overheat emergency
Firmware Design
- ~600 lines: single-loop, no RTOS/filesystem
- ~13 KB flash / ~2 KB RAM: 80% flash usage, 33% RAM usage
- Batched SPI: 128-byte buffer (~100× faster than byte-by-byte)
- Minimal font: 5×7 bitmap, 29 glyphs only
- No soft-float: integer NTC lookup saves ~4 KB
Quick Start
Build
Requires arm-none-eabi-gcc, cmake, and cube-cmake installed.
cd Code
cmake --preset Debug
cmake --build build/Debug --target CodeFlash
Using st-flash:
st-flash write build/Debug/Code.bin 0x08000000Or use the VS Code task "Build and Flash" if configured.
User Guide
Main Screen (Status & Control)
- Top: Air temperature, Countdown timer (HH:MM)
- Middle: Current state (IDLE/RUN/PAUSE), target temperature setting
- Bottom: Action hints: BTN1=set, BTN2=start/pause/resume, hold BTN2=stop/reset
Example Main Screen
.jpg)
Set Temperature Screen
- Value: Current target in °C
- Controls:
- Short BTN1: increment (or decrement if toggled)
- Long BTN1: toggle UP/DOWN mode, hints show current direction
- Short BTN2: confirm & advance to Set Time
- Long BTN2: cancel & return to Main
Example Set Temp Screen

Set Time Screen
- Value: Target drying time in HH:MM format
- Controls: Same as Set Temp (BTN1 for ±, long BTN1 to toggle, BTN2 to confirm/cancel)
Example Set Time Screen
.jpg)
Operation
- Press BTN1 on Main Screen → Set Temperature
- Adjust with BTN1 (short = increment, long = toggle direction, watch hints)
- Press BTN2 → Set Time
- Adjust similarly, then press BTN2 → firmware returns to Main and starts drying
- Monitor progress on Main Screen; press BTN2 to pause/resume
- Hold BTN2 to stop and reset (returns to IDLE)
Hardware
Pinout & Connections
| Function | Pin | Module | Notes |
|---|---|---|---|
| Display CS | PB7 | SPI1 | ST7735 chip select |
| Display DC | PA3 | SPI1 | Data/Command |
| Display RES | PC14 | GPIO | Reset |
| Display BL | PA8 | GPIO | Backlight (always ON) |
| Display SPI | PA5, PA6, PA7 | SPI1 | CLK, MISO, MOSI |
| Button 1 | PA4 | GPIO | Up/Set (active LOW, pull-up) |
| Button 2 | PA5 | GPIO | Select/Confirm (active LOW, pull-up) |
| Heater PWM | PA0 | TIM1_CH1 | 16-bit PWM (0–65535 = 0–100%) |
| Fan PWM | PA1 | TIM17_CH1 | 16-bit PWM (0–65535 = 0–100%) |
| Air NTC | PA11 | ADC_CH11 | 100k thermistor, 3.3 V divider |
| Heater NTC | PA12 | ADC_CH12 | 100k thermistor, 3.3 V divider |
| LED | PA2 | GPIO | Status indicator (on during RUN/PAUSE) |
See Code/Core/Inc/main.h for full pin configuration.
Technical Specs
MCU & Peripherals
- MCU: STM32C011F4P6 (Cortex-M0+, 32 MHz, 16 KB flash, 6 KB RAM)
- Display: ST7735 1.8" TFT, 160×128 px, 16-bit RGB565, SPI @ 16 MHz
- PWM: TIM1 (heater) + TIM17 (fan), ~488 Hz, 16-bit resolution
- ADC: 12-bit, dual-channel NTC reading @ 500 ms
Temperature & Timing
- Range: 30–70°C (configurable
TMIN/TMAX) - NTC: 100 K, B=3950, ~1°C resolution
- Button poll: 20 ms (30 ms debounce, 1 s long-press)
- Display refresh: 250 ms idle on Main screen, instant on changes
- Countdown: 1 s ticks
Power
- Input: 24 V DC
- Heater: ≤48 W (PWM-controlled)
- Fan: ≤2 W (PWM-controlled)
- MCU + Display: ≤100 mA @ 3.3 V
Development
Structure
├── CMakeLists.txt # Build config
├── Core/
│ ├── Inc/
│ │ ├── main.h # Pin definitions, HAL config
│ │ ├── dryer.h # Public firmware API
│ │ └── ...
│ └── Src/
│ ├── main.c # Entry point, HAL init
│ ├── dryer.c # Firmware (600 lines): display driver, UI, control
│ └── ...
├── Drivers/
│ ├── CMSIS/
│ ├── STM32C0xx_HAL_Driver/ # ST HAL
│ └── ...
└── cmake/ # Toolchain filesModifying the Firmware
- Temperature limits: edit
TMIN,TMAX,TDEFin Code/Core/Src/dryer.c - Time limits: edit
MMIN,MMAX,MDEF - Safety margin: change
stmp + 5inRegulate()function - NTC calibration: update
ntc[]lookup table in Code/Core/Src/dryer.c
Bill of Materials
See BOM.csv for the complete component list and part numbers.
License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
Parts
58| Qty | Value | Footprint | References |
|---|---|---|---|
| 9 | 100nF | Capacitor_SMD:C_0603_1608Metric | C1, C2, C3, C5, C9, C11, C12, C14, C17 |
| 5 | 100 | Resistor_SMD:R_0603_1608Metric | R1, R2, R6, R10, R11 |
| 5 | 100k | Resistor_SMD:R_0603_1608Metric | R3, R5, R7, R8, R9 |
| 3 | 1uF | Capacitor_SMD:C_0805_2012Metric | C4, C10, C13 |
| 2 | 10k | Resistor_SMD:R_0603_1608Metric | R12, R15 |
| 2 | 22uF | Capacitor_SMD:C_0805_2012Metric | C18, C19 |
| 2 | AO3400A | Package_TO_SOT_SMD:SOT-23 | Q2, Q3 |
| 2 | CS1213AGF260 | easyeda2kicad:SW-SMD_L3.9-W3.0-P4.45 | SW1, SW2 |
| 2 | SS34 | Diode_SMD:D_SMA | D4, D5 |
| 1 | 10nF | Capacitor_SMD:C_0603_1608Metric | C21 |
| 1 | 10uF | Capacitor_SMD:C_1210_3225Metric | C20 |
| 1 | 10uH | Inductor_SMD:L_APV_ANR4020 | L1 |
| 1 | 124k | Resistor_SMD:R_0603_1608Metric | R16 |
| 1 | 20k | Resistor_SMD:R_0603_1608Metric | R19 |
| 1 | 22 | Resistor_SMD:R_0603_1608Metric | R13 |
| 1 | 30.1k | Resistor_SMD:R_0603_1608Metric | R17 |
| 1 | 31.6k | Resistor_SMD:R_0603_1608Metric | R14 |
| 1 | 4.7nF | Capacitor_SMD:C_0603_1608Metric | C22 |
| 1 | 412k | Resistor_SMD:R_0603_1608Metric | R18 |
| 1 | 470 | Resistor_SMD:R_0603_1608Metric | R4 |
| 1 | 47uF | easyeda2kicad:CAP-SMD_BD6.3-L6.6-W6.6-FD | C6 |
| 1 | B360 | Diode_SMD:D_SMB | D3 |
| 1 | Conn_01x14 | Extra:STP0177A-128160 | J1 |
| 1 | Conn_02x03_Odd_Even | Connector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_Vertical_SMD | J7 |
| 1 | Fan | easyeda2kicad:CONN-TH_2P-P2.54_AXH-2AW-11 | J4 |
| 1 | Fuse | Fuse:Fuse_1206_3216Metric | F1 |
| 1 | HT | easyeda2kicad:CONN-TH_2P-P2.54_AXH-2AW-11 | J5 |
| 1 | LED | LED_SMD:LED_0603_1608Metric | D1 |
| 1 | NSI45030AT1G | Diode_SMD:D_SOD-123 | D2 |
| 1 | Power | easyeda2kicad:CONN-TH_2P-P2.54_AXH-2AW-11 | J6 |
| 1 | SIA440DJ-T1-GE3 | easyeda2kicad:SC-70-6L_L2.0-W2.0-P0.65-BL | Q1 |
| 1 | STM32C011F4Px | Package_SO:TSSOP-20_4.4x6.5mm_P0.65mm | U1 |
| 1 | TPS54240DGQ | Package_SO:HVSSOP-10-1EP_3x3mm_P0.5mm_EP1.83x1.89mm_ThermalVias | U3 |
| 1 | aNTC | Connector_Molex:Molex_PicoBlade_53048-0210_1x02_P1.25mm_Horizontal | J2 |
| 1 | hNTC | Connector_Molex:Molex_PicoBlade_53048-0210_1x02_P1.25mm_Horizontal | J3 |
Similar boards
- 2 layers49 × 49 mm

- 4 layers27.9 × 63.5 mm

Pico2-ice
tinyvision-ai-inc/pico2-ice
Doc | Hardware | SDK | Schematic | Assembly | Discord
124 parts60MIT - 2 layers89 × 83 mm

- 4 layers

- 2 layers50 × 47.3 mm

- 2 layers160 × 99.9 mm

KiwiStim0.3
Neil427/KiwiSTIM
KiwiSTIM is a engine simulator used for testing engine management computers, it is variation of Ardustim and uses the Ardustim firmware.
144 parts3GPL-3.0 - 4 layers138.4 × 138.3 mm

GRBL board
ephemeridis/GRBL_board
This is a PCB designed to run GRBL, an open source CNC control software that is designed and optimised for Arduino.
287 parts2GPL-3.0 - 4 layers52.8 × 56.4 mm

ESP32 Motor Controller
Angelpele/Integrated_FOC_BLDC_Actuator
Design and development of a portable, self contained closed loop Field Oriented Controller (FOC) for Brushless DC (BLDC) motors built on the ESP32 S3 via a custom designed PCB.
154 partsMIT
Questions
How big is the Sunlu S1-Board PCB?
It measures 48.2 × 57 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Sunlu S1-Board use?
58 parts, built around the TPS54240DGQ, AO3400A, CS1213AGF260 and SS34. 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 Sunlu S1-Board KiCad files?
From the Pegoku/Sunlu-S1-Board repository on GitHub, at the commit this page was made from: the board is PCB/SunluS1Board/SunluS1Board.kicad_pcb and its schematic PCB/SunluS1Board/SunluS1Board.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Sunlu S1-Board design in my own project?
Its repository states no licence, so its author keeps all rights: ask Pegoku before reusing the design.
