You can support me by reading this article on Medium

The problem

A 3D printer is the most versatile tool any maker can have, but it has possible pitfalls and one of the more insidious ones is damp filament.

What happens: You have the printer dialled-in perfectly, everything works perfectly, a couple of weeks pass and then you try to print something again. It comes out looking terrible: blobs, stringing, ugly surfaces.

This is due to humidity absorbed by the filament. Once the filament enters the hot extruder, humidity expands into steam and plays havoc with the flow of molten material in the nozzle. In really bad cases you can actually hear the pops from the tiny steam bubbles during printing.

Some materials are more sensitive than others—you will be able to leave ABS or PLA out longer than, say Nylon, the worst of them. But one month outside in summer heat will make any filament unusable.

You can delay these problems a lot by storing filaments in an enclosed container and adding some desiccant helps even more. But eventually, any filament will get humid enough to need drying.

The Most Common Solution

Sunlu Filadryer
SUNLU S2 Filament Dryer, credit: Sunlu

On the surface, this looks like a solved problem: e.g. Sunlu dryer boxes work well and are not that expensive. But this kind of dryer box is not without problems:

  • They are not cheap, a two-roll box will cost you about ~90€. If you are serious about printing, you will need at least two of those.
  • They have 150-200W heaters. If you are paying German electricity prices, each day you use one will cost ~1-2€. And each year has 365 days…

So is there a different way?

How Does Drying Even Work?

The Usual Dryer Boxes

The dryer boxes I mention above work by heating up the air. Hotter air can carry more moisture (relative humidity is reduced) and this “sucks” moisture from the filament due to osmosis (which happens faster due do higher temperature as well). The hot and humid air is then blown out of the enclosure automatically or you need to do it manually after the end of each cycle. Some will take advantage of moisture condensing on the cooler walls, which you must then wipe down.

See this explanation for extra info.

The Proper Way To Dry Things

If you look at industrial dryers or modern clothes dryers, these work differently.

The first step of the process is the same: Blow hot air into the chamber to capture the humidity. The next step is very different, though: The hot humid air is cooled, which causes the excess moisture to condense away, leaving you with dry cool air that you can then heat up again to dry the filament, in an endless circle.

At first glance, this seems like a very wasteful process: instead of simply heating the air, you need to cool it too. But here comes the magic part: You can use a heat-pump to transfer the heat from cooling to the heating part of the cycle. A modern heat-pump is extremely efficient and will only consume about 25% of energy it is able to transfer. So if you need 200W of heating power, you will only need about 40W of electricity for the same effect. What is more, because you are cooling the return air, the return air is very dry and the drying effect is even stronger.

Heat-pump dryer schematic
A schematic of a heat-pump clothes-dryer, credit Massachusets Clean Energy Center

My Solution

The parameters

I wanted a solution that does the following:

  • There should be enough space for at least 10 rolls of filament.
  • It should be able to work continuously, no wiping down etc.
  • It should consume no more than 50W of electricity (a quarter of the consumption of a normal dryer)
  • Some monitoring would be nice

The hardware

There are many possibilities:

I could possibly build a really big dryer out of a second-hand clothes-dryer. My neighbor and I actually converted one into a big fruit dryer so his apples and plums don’t spoil after the harvest. But while this is a good way to dry out large amounts of moisture, filaments only contain a few grams of moisture each at most and the dryer will consume 700W of electricity. So this would be a really wasteful way of doing it and it would take up a lot of space.

Maybe a mini fridge? I could use an air duct to heat up the air at the rear heat-exchanger, blow it into a box, and then return it to the cold side of the mini fridge. But this would take extra space and I’m not sure how to cool the air effectively.

In the end I decided to buy a very simple and very cheap room air-dryer on Aliexpress. These small units will consume about 15W and dry out a couple of tens of grams of moisture a day from the surrounding air.

The Little Air-Dryer
It Looks Like This

They use a Peltier element instead of a proper heat-pump, but since we need so little drying capacity, this is good enough. The Peltier element, the two heat-sinks and the fan are combined into one compact unit like this:

The Peltier Block
Connect it to 12 V and it freezes in a minute or two

There is also a power-supply, so you only need some more fans, a control board and a new housing.

The Box

I decided to use a simple plastic storage box I kept the filaments in already. IKEA is a good place to find one that is large enough for your needs. Mine is about 40 x 50 x 60 cm, enough for about 12 rolls.

The Housing

My idea was to put the entire Peltier block along with two temperature sensors (DS1820, hot and cold side), a humidity sensor (AHT20, for monitoring) and two fans (hot and cold side) inside the box as a drying unit.

A small hole in the side of the box connects this drying unt with the control box outside. The control box contains the power supply, an ESP8266 controller and a couple of relays for control.

There is also a small outlet for the condensed water on the bottom of the cold side housing. This is connected to a small tube and routed outside the box.

The Housing
A render of the housing design. The side with the fans is inside the box, the side with the grid is outside.

Here is the Fusion project, if you want to play with it.

The First Prototype

The whole thing
The whole thing. It's the first prototype and therefore ugly, but it works, so it may take a while before I work on it again. The small fan is for the power supply, but it's not really needed, I should have put that inside, near the hot side fan.

Control

I decided to use ESPHome and integrate it into my Home Assistant system to control the whole thing.

The first version was over-engineered, with PWM control of both fans and measurements on hot and cold side. It turns out you only need to monitor humidity and control two relays, one for the Peltier element and the hot side fan, the other for the cold side fan. You could even do without the cold side fan at the expense of a slightly lower drying power.

The Home Assistant dashboard
The peaks happen when I turn the whole thing off to save power

The Algorithm

The algorithm is simple:

  1. Turn on the Peltier and the hot side fan.
  2. Wait for a while for the water to condense on the cold side. (The hot side fan is strong enough to ensure the circulation on the cold side too.)
  3. Turn off the Peltier and turn on cold side fan to blow the water off the heat sink ribs down into the water outlet. A minute is enough. This is optional, water will drip down on it’s own until there is very little moisture left.
  4. Repeat.

It also needs a safety feature to turn off the whole thing if the hot side heats up above 45 °C (i.e. fan problems).

I also added an automation that only turns the dryer on when there is extra power available from the solar plant I have installed. This is optional, but it does keep the whole thing from taking energy from the grid.

Final Thoughts

The whole thing cost me about 70€ at most and it works. There is one drawback: It takes a few days to dry a moist filament roll, but it keeps everything nice and dry afterwards. It seems that putting in a moist roll does not affect the rest of the stored rolls at all.

The ESPHome Code and Planned Improvements

Planned improvements

The code is for the current over-engineered system. The next version will have no PWM, no cold side fan, and no cold side temperature sensor. The hot side fan power will be fixed using a resistor. There will be only one relay that controls both the Peltier and hot side fan. The power supply will be next to the hot side fan to use the wasted energy to heat the box.

The Code

esphome:
  name: susilnik
  friendly_name: susilnik

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "secret"

ota:
 —platform: esphome
    password: "secret"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  use_address: secret

one_wire:
 —platform: gpio
    pin: 13

sensor:
 —platform: aht10
    temperature:
      id: temperatura
      name: "Temperatura"
    humidity:
      id: vlaznost
      name: "Vlaznost"
    update_interval: 60s
 —platform: dallas_temp
    address: 0x090417b10b0cff28
    name: "Temperatura topla stran"
    id: temperatura_topla_stran
 —platform: dallas_temp
    address: 0x690517a0c505ff28
    name: "Temperatura hladna stran"
    id: temperatura_hladna_stran

i2c:
  sda: 4
  scl: 5
  frequency: 10kHz

switch:
 —platform: gpio
    pin: 16
    name: "Vklop 12V"
    id: vklop_12v
    restore_mode: ALWAYS_ON

output:
 —platform: esp8266_pwm
    pin: 12
    frequency: 10 Hz
    id: pwm_hladni_ventilator
 —platform: esp8266_pwm
    pin: 14
    frequency: 10 Hz
    id: pwm_hladilni_ventilator

fan:
 —platform: speed
    output: pwm_hladni_ventilator
    name: "Hladni ventilator"
    id: hladni_ventilator
 —platform: speed
    output: pwm_hladilni_ventilator
    name: "Hladilni ventilator"
    id: hladilni_ventilator

time:
 —platform: homeassistant
    id: homeassistant_time
    on_time:
      #Safety functions
     —minutes: /1
        seconds: 0
        then:
          if:
            condition:
              switch.is_on: vklop_12v
            then:
             —if:
                  condition:
                    or:
                     —sensor.in_range:
                          id: temperatura_topla_stran
                          above: 45
                     —sensor.in_range:
                          id: temperatura
                          above: 40
                  then:
                    switch.turn_off: vklop_12v
     —minutes: 55
        seconds: 0
        then:
          if:
            condition:
              switch.is_on: vklop_12v
            then:
              fan.turn_on:
                id: hladni_ventilator
                speed: 50
     —minutes: 57
        seconds: 0
        then:
          fan.turn_off: hladni_ventilator
      #Start cooling fan for PSU
     —minutes: /1
        seconds: 0
        then:
          if:
            condition:
              switch.is_on: vklop_12v
            then:
              fan.turn_on:
                id: hladilni_ventilator
                speed: 50
            else:
              fan.turn_off: hladilni_ventilator

If you found this article useful, you can buy me a beer here.