Skip to the content
2 layers48.2 × 57 mmSunlu S1-Board, the printed circuit board in 3D

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

5

README

README.md

Sunlu 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.

sh
cd Code
cmake --preset Debug
cmake --build build/Debug --target Code

Flash

Using st-flash:

sh
st-flash write build/Debug/Code.bin 0x08000000

Or 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

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

Operation

  1. Press BTN1 on Main Screen → Set Temperature
  2. Adjust with BTN1 (short = increment, long = toggle direction, watch hints)
  3. Press BTN2 → Set Time
  4. Adjust similarly, then press BTN2 → firmware returns to Main and starts drying
  5. Monitor progress on Main Screen; press BTN2 to pause/resume
  6. Hold BTN2 to stop and reset (returns to IDLE)

Hardware

Pinout & Connections

FunctionPinModuleNotes
Display CSPB7SPI1ST7735 chip select
Display DCPA3SPI1Data/Command
Display RESPC14GPIOReset
Display BLPA8GPIOBacklight (always ON)
Display SPIPA5, PA6, PA7SPI1CLK, MISO, MOSI
Button 1PA4GPIOUp/Set (active LOW, pull-up)
Button 2PA5GPIOSelect/Confirm (active LOW, pull-up)
Heater PWMPA0TIM1_CH116-bit PWM (0–65535 = 0–100%)
Fan PWMPA1TIM17_CH116-bit PWM (0–65535 = 0–100%)
Air NTCPA11ADC_CH11100k thermistor, 3.3 V divider
Heater NTCPA12ADC_CH12100k thermistor, 3.3 V divider
LEDPA2GPIOStatus 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

text
├── 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 files

Modifying the Firmware

  • Temperature limits: edit TMIN, TMAX, TDEF in Code/Core/Src/dryer.c
  • Time limits: edit MMIN, MMAX, MDEF
  • Safety margin: change stmp + 5 in Regulate() 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.

CC BY-NC 4.0

Parts

58
QtyValueFootprintReferences
9100nFCapacitor_SMD:C_0603_1608MetricC1, C2, C3, C5, C9, C11, C12, C14, C17
5100Resistor_SMD:R_0603_1608MetricR1, R2, R6, R10, R11
5100kResistor_SMD:R_0603_1608MetricR3, R5, R7, R8, R9
31uFCapacitor_SMD:C_0805_2012MetricC4, C10, C13
210kResistor_SMD:R_0603_1608MetricR12, R15
222uFCapacitor_SMD:C_0805_2012MetricC18, C19
2AO3400APackage_TO_SOT_SMD:SOT-23Q2, Q3
2CS1213AGF260easyeda2kicad:SW-SMD_L3.9-W3.0-P4.45SW1, SW2
2SS34Diode_SMD:D_SMAD4, D5
110nFCapacitor_SMD:C_0603_1608MetricC21
110uFCapacitor_SMD:C_1210_3225MetricC20
110uHInductor_SMD:L_APV_ANR4020L1
1124kResistor_SMD:R_0603_1608MetricR16
120kResistor_SMD:R_0603_1608MetricR19
122Resistor_SMD:R_0603_1608MetricR13
130.1kResistor_SMD:R_0603_1608MetricR17
131.6kResistor_SMD:R_0603_1608MetricR14
14.7nFCapacitor_SMD:C_0603_1608MetricC22
1412kResistor_SMD:R_0603_1608MetricR18
1470Resistor_SMD:R_0603_1608MetricR4
147uFeasyeda2kicad:CAP-SMD_BD6.3-L6.6-W6.6-FDC6
1B360Diode_SMD:D_SMBD3
1Conn_01x14Extra:STP0177A-128160J1
1Conn_02x03_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_Vertical_SMDJ7
1Faneasyeda2kicad:CONN-TH_2P-P2.54_AXH-2AW-11J4
1FuseFuse:Fuse_1206_3216MetricF1
1HTeasyeda2kicad:CONN-TH_2P-P2.54_AXH-2AW-11J5
1LEDLED_SMD:LED_0603_1608MetricD1
1NSI45030AT1GDiode_SMD:D_SOD-123D2
1Powereasyeda2kicad:CONN-TH_2P-P2.54_AXH-2AW-11J6
1SIA440DJ-T1-GE3easyeda2kicad:SC-70-6L_L2.0-W2.0-P0.65-BLQ1
1STM32C011F4PxPackage_SO:TSSOP-20_4.4x6.5mm_P0.65mmU1
1TPS54240DGQPackage_SO:HVSSOP-10-1EP_3x3mm_P0.5mm_EP1.83x1.89mm_ThermalViasU3
1aNTCConnector_Molex:Molex_PicoBlade_53048-0210_1x02_P1.25mm_HorizontalJ2
1hNTCConnector_Molex:Molex_PicoBlade_53048-0210_1x02_P1.25mm_HorizontalJ3

Similar boards

  • 2 layers49 × 49 mmSPINE Cortex, the printed circuit board in 3D

    SPINE Cortex

    ManhTi3012/SPINE

    Stackable Power Integration & Network Electronics

    99 parts2
  • 4 layers27.9 × 63.5 mmPico2-ice, the printed circuit board in 3D

    Pico2-ice

    tinyvision-ai-inc/pico2-ice

    Doc | Hardware | SDK | Schematic | Assembly | Discord

    124 parts60MIT
  • 2 layers89 × 83 mmPico2-nx, the printed circuit board in 3D

    Pico2-nx

    tinyvision-ai-inc/pico2-nx

    RP2350+Lattice Crosslink NX FPGA board

    242 parts5MIT
  • 4 layersFluidNC board, the printed circuit board in 3D

    FluidNC board

    ephemeridis/FluidNC_board

    board for fluidnc

    404 parts6
  • 2 layers50 × 47.3 mmSR Aktor, the printed circuit board in 3D

    SR Aktor

    gerryvel/SR-Aktor

    Switch Relais Aktor N2k

    26 parts3GPL-3.0
  • 2 layers160 × 99.9 mmKiwiStim0.3, the printed circuit board in 3D

    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 mmGRBL board, the printed circuit board in 3D

    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 mmESP32 Motor Controller, the printed circuit board in 3D

    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.