Built a Klipper-Controlled Smart Filament Drybox from a Sunlu S1 + Repurposed Sunlu S9 Board (Closed-Loop RH + Temp Control)
I wanted something better than a normal “set temp and hope” filament dryer, so I built a closed-loop drybox system using Klipper, a BTT Pi, and repurposed hardware from a Sunlu S9 printer.
The goal was simple:
Actually control filament drying based on chamber conditions (temperature + relative humidity), not just heater temperature.
System architecture:
• Sunlu S1 dryer integrated into enclosure
• Original Sunlu S9 V1.0 board (ATmega2560) repurposed as dedicated dryer MCU
• BTT Pi v1.2 running Klipper + Moonraker + Mainsail
• Arduino Uno used as sensor bridge for RH/temp reporting
• Chamber heater + circulation fan controlled directly through Klipper
• Local display added for standalone status monitoring
Core functions:
• Material presets (PLA / PETG / Nylon, etc.)
• Target temperature + target RH profiles
• Closed-loop heater and fan control
• Auto transition from active drying → hold mode
• Resume logic if RH rebounds after hold
• Stall detection if humidity stops dropping
• Drying history logging to CSV
• ETA estimation based on actual RH drop rate
• Mainsail dashboard visibility + local screen status
Example operating targets:
PLA → 55C / 25% RH
PETG → 50C / 15% RH
Nylon → 60C / 10% RH
Why I built it:
Most consumer filament dryers are basically open-loop heaters with a timer. They don’t actually know if the filament is dry.
I wanted something closer to process control:
Measure chamber conditions, react to actual RH behavior, and maintain a stable hold state instead of just running heat blindly.
Biggest challenges:
• Getting reliable humidity data exposed inside Klipper
• Working around SHT3X / BME280 integration limitations
• Jinja macro limitations inside Klipper
• Avoiding false stall detection and bad resume loops
• Balancing useful automation without turning macros into a maintenance nightmare
Result:
For about $10 in extra hardware plus a lot of testing, it became a genuinely useful system—much closer to a controlled drybox than a typical consumer dryer.
At this point it feels less like a “mod” and more like a proper machine subsystem.
I’m documenting the full project and may clean it up into a public GitHub release for others running Klipper-based drybox builds.
Interested in feedback from others doing similar closed-loop environmental control projects on printers.