Skip to content
BasilSaeedBari-bb09892Public

About

An open-source, ultra-low-cost, closed-loop active convection desiccant chamber. Designed to rescue hydrated 3D printing filament using advanced fluid dynamics and PID thermal control — all built from cheap, locally available, or repurposed scrap components.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

H.A.R.S — Hygroscopic Aerodynamic Restoration System

An open-source, ultra-low-cost, closed-loop active convection desiccant chamber.
Designed to rescue hydrated 3D printing filament using advanced fluid dynamics and PID thermal control — all built from cheap, locally available, or repurposed scrap components.

Lead: Basil Saeed Bari · bb09892@st.habib.edu.pk · Habib University, CE Year 3
License: CERN-OHL-S v2 (Hardware) · MIT (Firmware)
Status: Pre-production — Design & Simulation Phase


Table of Contents


The Problem

Karachi sits at an average relative humidity of 70–90% for large parts of the year. For anyone running a 3D printer in this environment, filament hydration is not a hypothetical failure mode — it is an inevitability. Polymers like PLA, PETG, and Nylon are hygroscopic: their molecular structure actively absorbs water from the ambient air. Once absorbed, this moisture vaporises explosively inside the extruder nozzle at printing temperatures, causing stringing, bubbling, poor layer adhesion, and structurally compromised parts.

The solutions available to Pakistani hobbyists are both inadequate:

Solution What It Does Why It Fails
Commercial Active Dryers Applies bulk heat to a sealed box Heavily taxed on import; risks warping bottom spool layers; expensive (₨8,000–15,000+)
Passive DIY Dry Boxes Seals filament with silica gel Only prevents future absorption; cannot strip existing moisture in a reasonable timeframe; stagnant air means near-zero vapor pressure deficit

H.A.R.S is built to fill this gap: a system that actively pulls water out of already-wet filament using a combination of forced convection, phase-change condensation, chemical adsorption, and PID-controlled thermal regulation — for a total BOM under ₨5,000.


The Engineering Challenge

This project is a deliberate exercise in multidisciplinary engineering. It cannot be built by a purely mechanical approach or a purely software approach. It requires both disciplines to work in tight integration.

Mechanical Engineering — Fluid Dynamics & Thermodynamics

Unlike a basic "hot box," H.A.R.S actively manipulates the Vapor Pressure Deficit (VPD) — the difference between how much moisture the filament holds and how much the surrounding air can absorb. Three physical mechanisms drive this:

1. Forced Convection via Venturi Acceleration
Standard axial fans produce bulk airflow, but the filament surface develops a thin "boundary layer" of already-saturated air that insulates the plastic from the dry air beyond it. H.A.R.S uses a custom-designed 3D-printed Venturi nozzle: by narrowing the air channel before it contacts the filament spool, Bernoulli's Principle dictates that air velocity increases significantly while static pressure drops. This high-velocity air physically shears the boundary layer away, constantly exposing fresh filament surface to bone-dry air. This is the primary mechanism for rapid drying and does not require elevated temperature.

2. Phase-Change Condensation (Cold Coil Stage)
The exhaust air leaving the drying chamber is warm and heavily laden with the moisture it has just stripped from the filament. Before this air returns to the silica bed, it passes over a copper cold coil. The coil chills the air below its dew point, forcing the bulk water vapor to condense into liquid droplets that drain out of the system entirely. This "pre-treatment" stage protects the silica gel bed from rapidly saturating, dramatically extending the operational cycle before maintenance is needed.

3. Chemical Adsorption (Desiccant Battery)
The condensed, partially-dry air then passes through a bed of indicating silica gel. Silica gel is a highly porous form of silicon dioxide; its surface chemistry has a strong affinity for water molecules at low partial pressures. At this stage in the loop, the air has already had its bulk moisture removed by the cold coil, allowing the silica to efficiently strip the remaining trace humidity and return the air to near-0% relative humidity. A dual-chamber design allows one bed to operate while the other is regenerated by a small heating element.

4. Passive Thermal Buoyancy (Solar Chimney)
A secondary black-painted vertical exhaust pipe creates a passive draft via the solar chimney effect. Solar radiation heats the air column inside the pipe, causing it to rise and creating a constant negative pressure at the system's outlet. This ensures the loop never stagnates even when the fans are offline, maintaining a minimum air exchange rate at zero energy cost.

Computer Engineering — Embedded Control Systems

The mechanical loop alone is not sufficient. Without active control, the ceramic heating element could overshoot the thermal ceiling of the filament polymer, causing the spool to warp and jam irreversibly. The entire thermal regime is orchestrated by real-time embedded logic.

PID Control Loop
The ESP32 runs a software PID (Proportional-Integral-Derivative) controller. It continuously samples resistance from the 104K NTC thermistor, applies a standard Steinhart-Hart conversion to derive the actual temperature in °C, and calculates the error against the 45°C setpoint. The PID algorithm computes a corrective output — a PWM duty cycle — sent to the gate of a logic-level MOSFET. The MOSFET is the power bridge between the 3.3V ESP32 logic domain and the 12V ceramic heater circuit.

The three PID terms serve distinct roles:

  • Proportional (P): Responds instantly to present error. Too high, and the heater overshoots.
  • Integral (I): Accumulates past error to eliminate steady-state offset (the small persistent gap between setpoint and actual temperature under load).
  • Derivative (D): Predicts future error by measuring the rate of temperature change, damping overshoot before it occurs.

Safety Logic
A 10kΩ pull-down resistor on the MOSFET gate guarantees the heater remains OFF during ESP32 boot before the firmware initialises. The firmware implements a hard cutoff at 60°C: if the thermistor reads above this threshold (indicating a control loop failure, thermistor disconnection, or blocked airflow), the MOSFET is killed immediately and the fans are driven to maximum speed to dissipate residual heat. Fan RPM monitoring (via tachometer signal lines) detects fan stall and triggers the same emergency shutdown.


System Architecture — The Dry-Stream Loop

┌─────────────────────────────────────────────────────────────┐
│                      DRYING CHAMBER                         │
│   ┌──────────┐    High-Velocity    ┌────────────────────┐   │
│   │ Venturi  │◄────────────────────│ Ceramic Heater     │   │
│   │ Nozzle   │   Bone-Dry 45°C Air │ (PID Controlled)   │   │
│   └────┬─────┘                     └────────────────────┘   │
│        │ Fast Air Shears Boundary Layer Off Filament Spool   │
│        ▼                                                     │
│   ┌──────────┐   Warm, Moist Air   ┌────────────────────┐   │
│   │ Filament │────────────────────►│ Cold Coil          │   │
│   │  Spool   │                     │ (Bulk Condensation) │   │
│   └──────────┘                     └────────┬───────────┘   │
│                                             │ Chilled, Low-  │
│                                             │ Humidity Air   │
│                                             ▼               │
│                                    ┌────────────────────┐   │
│                                    │ Silica Gel Bed     │   │
│                                    │ (Trace Adsorption) │   │
│                                    └────────┬───────────┘   │
│                                             │ ~0% RH Air    │
│                                             └───────────────┘
│                                               (Loop repeats) │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
                    ┌──────────────────┐
                    │  Solar Chimney   │  ← Passive exhaust draft
                    │  (Black Pipe)    │
                    └──────────────────┘
Stage Component Principle Result
1. Acceleration Venturi Nozzle (3D Printed) Bernoulli Effect Boundary layer shear; rapid surface evaporation
2. Bulk Stripping Copper Cold Coil Dew Point Condensation Heavy moisture liquefied and drained
3. Trace Stripping Indicating Silica Gel Bed Adsorption Air returned to ~0% RH
4. Thermal Regulation Ceramic Heater + PID VPD Maximisation Safe 45°C drying without polymer warp
5. Passive Draft Solar Chimney Thermal Buoyancy Continuous air exchange at zero energy cost

Electronics Stack

Prototype 1 — ESP32 Dev Board (Current Phase)

Component Specification Function
Microcontroller ESP32 Dev Board PID computation, PWM generation, safety logic
Power Supply 12V 5A (repurposed/used) Raw power for fans and heater
Buck Converter 12V → 5V, ≥1A Logic power for ESP32
Switching Element Logic-Level MOSFET (e.g., IRLZ44N) Bridges 3.3V ESP32 to 12V heater circuit
Heating Element PTC Ceramic Heater, 12V Controlled heat source
Temperature Sensor 104K NTC Thermistor Real-time chamber temperature feedback
Safety Resistor 10kΩ Pull-Down on MOSFET Gate Guarantees heater-off during boot
Airflow 16k RPM Server Fans (×2, repurposed) Forced convection through the drying loop

Firmware: Custom C++ on the Arduino-ESP32 framework. PID library used for initial tuning; target for Prototype 2 is a hand-tuned bare-metal implementation.


Roadmap: The Path to Ultra-Low Cost

The ESP32 is the right tool for Prototype 1. It has a built-in serial debugger, plenty of GPIO, and is universally available in Pakistani markets. However, an ESP32 dev board is significant over-engineering for a PID loop reading one thermistor and toggling one MOSFET. The end goal of this project is to produce a controller that costs under ₨200.

Phase Controller Rationale Target BOM
Phase 1 (Current) ESP32 Dev Board Rapid prototyping; serial debug; easy PID tuning ~₨5,000 total
Phase 2 ATmega328P / ATmega2560 (bare IC) Removes WiFi/Bluetooth radio overhead; cheaper; lower power ~₨3,500 total
Phase 3 ATtiny85 or 555-timer PWM Minimal silicon; no dev board; PID reduced to bang-bang or analogue circuit ~₨2,500 total
Phase 4 (Goal) Discrete analogue control (op-amp PID) Entirely passive control; zero firmware; no programmable IC at all ~₨2,000 total

Each phase will be validated against the same success metrics defined in Phase 1, so that performance degradation, if any, is fully quantified.


Local Sourcing & Fabrication Philosophy

H.A.R.S is built on a "scavenger-first" sourcing philosophy. Every design decision is filtered through the question: can a student in Karachi find this at Shershah, Saddar, or Daraz?

  • Fans: 16k RPM server fans are abundant in Shershah and local scrap markets at ₨200–400 per unit.
  • Enclosure: Standard large plastic storage tubs (Kenwood, National, or similar). No custom injection moulding.
  • Structural Parts: Venturi nozzle, spool tray, and silica bed housing are all 3D-printable. STL files are in /hardware/stls/.
  • Electronics: All ICs and passives available at the local electronics market (Saddar electronics district). No LCSC or Digikey order required for Phase 1.
  • Cold Coil: Copper tubing coiled by hand. Available at any plumbing supply shop.

If you have a 3D printer, a soldering iron, and ₨5,000, you can build this.


Repository Structure

hars-filament-dryer/
├── firmware/
│   ├── esp32/
│   │   ├── hars_main/
│   │   │   ├── hars_main.ino       # Main sketch
│   │   │   ├── pid_controller.h    # PID implementation
│   │   │   └── safety.h            # Thermal cutoff & fan-stall logic
│   │   └── calibration/
│   │       └── ntc_calibration.ino # Thermistor Steinhart-Hart calibration
│   └── attiny/                     # Phase 3 target (future)
├── hardware/
│   ├── schematics/
│   │   ├── hars_proto1.kicad_sch
│   │   └── hars_proto1.pdf         # Exported for easy viewing
│   ├── stls/
│   │   ├── venturi_nozzle_v1.stl
│   │   ├── spool_tray.stl
│   │   ├── silica_bed_housing.stl
│   │   └── fan_bulkhead.stl
│   └── cad/
│       └── hars_assembly.f3d       # Fusion 360 master assembly
├── data/
│   ├── test_logs/                  # CSV logs: time, temp, humidity, mass
│   └── pid_tuning/                 # Step-response graphs
├── docs/
│   ├── photos/                     # Build progress photos
│   ├── bom_v1.csv                  # Full Bill of Materials
│   └── HARS_Technical_Report.pdf   # Final write-up
├── sim/
│   └── proteus/                    # Proteus circuit simulation files
├── project.md                      # HOIISP submission file
└── README.md

Building It Yourself

Full build instructions will be added during and after the Prototype 1 build phase (M3). Subscribe to this repository to be notified.

Prerequisites:

  • A 3D printer capable of printing PETG (for heat-resistant parts)
  • A soldering iron
  • A multimeter
  • Arduino IDE with ESP32 board support installed

Quick Start (Firmware):

# Clone the repository
git clone https://github.com/BasilSaeedBari-bb09892/H.A.R.S.git

# Open the firmware in Arduino IDE
# File → Open → firmware/esp32/hars_main/hars_main.ino

# Select Board: "ESP32 Dev Module"
# Upload

Tuning the PID:
The default gains (Kp, Ki, Kd) are a starting point. Run the system with a thermocouple or independent hygrometer and observe the step response. Increase Kp until you see oscillation, then back off. See /data/pid_tuning/ for logged tuning sessions.


Bill of Materials

# Item Source Est. Cost (PKR)
1 ESP32 Development Board Local Electronics Market (Saddar) 1,200
2 Used 16k RPM Server Fans (×2) Shershah / Scrap Market 800
3 Logic-Level MOSFET (IRLZ44N or equiv.) Local Electronics Market 150
4 104K NTC Thermistor Local Electronics Market 100
5 10kΩ Resistor (×5, assorted) Local Electronics Market 50
6 PTC Ceramic Heater (12V) Daraz / Local 750
7 12V 5A Power Supply (used/repurposed) Shershah / Used Market 600
8 Buck Converter Module (LM2596 or equiv.) Local / Daraz 200
9 Indicating Silica Gel (500g) Local Chemical Supplier 500
10 Copper Tubing (for cold coil, ~0.5m) Plumbing Supply 300
11 Plastic Storage Tub (airtight, large) Supermarket / Utility Store 500
12 Misc. (wire, connectors, zip ties, thermal paste) Local 200
Total Estimated ₨5,350

Target for Phase 1: under ₨5,500. Phase 3 target: under ₨2,500.


Contributing

This is an open-source project built for the Pakistani maker community. Contributions are welcome.

Good first contributions:

  • Testing and validating the Venturi nozzle geometry with CFD (OpenFOAM or SimScale)
  • Porting the PID firmware to AVR (ATmega328P) for Phase 2
  • Documenting sourcing alternatives for other Pakistani cities (Lahore, Islamabad)
  • Translating the build guide to Urdu

How to contribute:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-contribution
  3. Commit with a descriptive message
  4. Open a Pull Request with a clear description of what you changed and why

Please open an Issue before starting any large changes so we can discuss the approach first.


References

[1] H. K. Versteeg and W. Malalasekera, An Introduction to Computational Fluid Dynamics: The Finite Volume Method, 2nd ed. Pearson Education, 2007.
[2] K. Ogata, Modern Control Engineering, 5th ed. Prentice Hall, 2010.
[3] Espressif Systems, ESP32 Technical Reference Manual, v5.3, 2024. [Online]. Available: https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf
[4] Vishay BCComponents, NTC Thermistors, Radial Leaded, Datasheet, Rev. 1.3, 2020. [Online]. Available: https://www.vishay.com
[5] International Rectifier, IRLZ44N HEXFET Power MOSFET Datasheet, Rev. B. [Online]. Available: https://www.infineon.com
[6] J. G. Ziegler and N. B. Nichols, "Optimum settings for automatic controllers," Trans. ASME, vol. 64, pp. 759–768, 1942.


H.A.R.S is an independent open-source project by a Habib University student. It is not affiliated with or endorsed by Habib University.

About

An open-source, ultra-low-cost, closed-loop active convection desiccant chamber. Designed to rescue hydrated 3D printing filament using advanced fluid dynamics and PID thermal control — all built from cheap, locally available, or repurposed scrap components.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors