Filament Dryer banner

Filament Dryer

5 devlogs
35h 53m 12s

This is a DIY filament dryer made from cheap aliexpress parts, one ikea box and a bunch of electronic components older than me that I found at home. It is powered by a microcontroller (esp32/rp2040 zero (~2€)). There is a lot of (probably majority…

This is a DIY filament dryer made from cheap aliexpress parts, one ikea box and a bunch of electronic components older than me that I found at home. It is powered by a microcontroller (esp32/rp2040 zero (~2€)). There is a lot of (probably majority) of untracked time spent working because I had to think this through fully, find and order the components, figure out the circuitry and wiring and design and 3d print some parts (thanks hackclub for the a1 mini!)

Demo Repository

Loading README...

Staudy

Shipped this project!

The filament dryer is now in a usable state!! It was my first time making a real hardware project. I learned a lot about electronic components (for example how MOSFETs and transistors work) I got better at python as I had to make an entire app with UI and business logic (I had to refactor nearly the entire thing 2 times because I made bad design decisions D: ) I also learned soldering because of this project. I am really proud that in the end I managed to bring this to life and figure it all out :)

Staudy

It is now in a fully usable state!! I improved a lot of features and debugged.

It now features better error handling. If the software detects that a sensor or display is not responding correctly, it disables all sensors, heater and fan, turns on a red led (part of rp2040 board) and displays which component failed on the display (if the display is not the one that failed :D Thats what the red led is for!)

My refactoring changes were really useful as it is now trivial to add new settings to the UI. With this I was able to add every settings parameter to the advanced settings tab.

Funcionality-wise, my new humidity and temperature sensor (sht40) has arrived and since my code was built around having this sensor, it was fairly simple integrating it. Thanks to this, a new feature started working. When the sensor detects that humidity has dropped bellow a threshold and stayed there for x minutes, it automatically disables the heater (because the thing that was being dried is now dry.)

Since I also have 2 temperature sensors now, I configured the software to throw an error and emergency turn off, if the deviation between their readings is too high. This value will need some fine-tuning though, as one sensor heats up much faster and it is not that simple. I will probably incorporate some more advanced logic since temperature is vital to be stable and it is also the biggest safety risk.

I then put it all together and inside the box. For testing purposes, I just taped the sensors and the heater to the box. I will figure out better solutions later, but I just wanted to test it. It seems that the core funcions are working perfectly and the box managed to get to ~65C during my testing. It is possible that this is not the max temperature as I was not running it for a long time. But this should be plenty to dry basic filament types.

I consider this project very usable in this state even though it is nowhere near done. But I think it is fairly overengineered even now, so it is still probably better than some expensive filament dryers for a fraction of the price. My estimate is really rough, but I think it costs around 30-40€ to build.

For now there aren’t detailed instructions on how to build this thing, and I do not have time to do it all since Flavortown is ending soon. But I will be making the source code and the bracket stl file available for download for anyone to be able to build it. In the Github repo you can find more information. I will also be making a components list and a wiring diagram in the near future as well as other improvements.

Thanks for reading all this, I really hope you liked my project and I will be thankful for any good votes. I would also appreciate any feedback or ideas on what to change or add. If you by any chance decide to build this for yourself, feel free to contact me if you get stuck somewhere, or even if you don’t, I’d love to know if you get inspired by my project :)

Some plans for the future of this project:

  • Add a servo motor controling a vent on top of the box (for humidity to escape, dynamic based on current humidity readings)
  • More complex logic based on temperature readings
  • Design a case for all the wires, MCU, and components that will be mounted on the side of the box
  • Mount the heater+fan bracket on a plywood board that will then go inside the box (much easier and more practical than drilling holes and mounting it on the box itself)
  • Use some weather tape to seal the holes I had to drill for the cables (if the box is airtight, you can potentially store filament in it after drying)
  • Add overrides for the components in advanced settings
  • Maybe add some isolation to the box
  • Write a detailed build guide and documentation
Attachment
Attachment
0
Staudy

I now use a library for displaying text in my UI (https://github.com/peterhinch/micropython-font-to-py) This enables the use of custom fonts converted with a tool supplied by this library. I added 3 sizes of a monospaced open-source font to my project. This means that the UI is now much more readable and supports big text and numbers instead of the default 8x8px font.

I also masively refactored the codebase to make it more scalable because I was not happy with how painful implementing new UI elements was. It is now much better and beacuse of this I could easily implement some advanced options editing to the UI. I still have to implement the overrides though.

I also added a timeout so that when you are inactive for 10 seconds (changeable in UI!) the UI will return to the home screen (status display.)

I also made some code that I will easily (I hope) plug the humidity sensor to and I only will have to code the driver. Unfortunately I fried my original sensor so I had to order a new one which takes a lot of time to arrive from China. But I should have it shortly :)

I also… no that is everything… I should think of more synonyms to I also next time lmao.

Attachment
Attachment
0
Staudy

Designed these cool indicator icons that tell you whether the dryer is enabled, if the fan is running, and if the heater is running.

Attachment
0
Staudy

Worked on the software a lot. Improved the UI and created a Settings screen class (that is what is in the photo, yes you can scroll and the scrollbar is accurate. The options you can see however are not yet implemented, I just wanted to showcase the scrollbar :D) I also implemented basic logic, so that you can now select the target temperature and the dryer will automatically reach said temperature and maintain it. It is very much usable at this point :) I also added an option to force disable the fan and heater. It now boots up in a disabled state which is safer in my opinion.

Attachment
0
Staudy

TLDR: Connected all components together electrically, designed a bracket to mount the fan, heater and thermal fuse on, made a barebones software that allows simple control of fan and heater and shows data from humidity and temperature sensors.

First update after a lot more work than the coding time suggests. I mostly focused on the hardware part and only made a barebones software that allows me to toggle the fan and heater on and off, and displays humidity and temperature data from sensors. But let’s go back to the beggining. I came up with this idea and had to figure out what I need for such a project. I wanted to dry at least 1 roll of filament (at least PLA and PETG) at a time. For this I need a heater. I also need the air to circulate in the box so I need a fan. Oh yeah a box I also need that (I got a 10.6l airtight container from ikea) Then I need to somehow control the fan and heater appropriately. For this I need a microcontroller and a bunch of sensors. Then I also need a way to take user input so I need some kind of buttons or something.

So I opened aliexpress, chrome and a bunch of LLMs and started researching the parts I need. I ended up getting
-esp32 (overkill, I don’t need wifi nor bluetooth, switching to rp2040 zero)
-rotary encoder for user input
-ssd1306 OLED 64x128 display
-sht40 humidity and temperature sensor
-ds18b20 temperature sensor

  • 2 mosfet modules for controlling high voltage (20v) devices: fan and heater
    -100w heater
    -thermal fuse 100C (safety first am I right)
    -DC fan
    -Buck converter (converts 20v to 5v to power the microcontroller)
    I used an old laptop power supply to power this project which can supply 20V and 4.5A.

So then, after all I needed arrived, I began to connect it all together. It seemed to all work, until my mosfet started smoking and it was burning up. I then went down the rabbit hole of studying what the module even does, what is a mosfet, an optocoupler, how do transistors work, and I figured out that my module is absolute crap, because even though the manufacturer said 3.3V is enough to open it, it definitely was not. Do you know why? Because the indicator led consumed 1.7V and there was not enough voltage left for the mosfet (this is really oversimplified) So I fixed this problem by using a transistor from 1980s to power the module with 5v. Somewhere during this process I somehow managed to completely fry my sht40 humidity sensor and even my esp32 microcontroller. But nevertheless, the high power devices now work flawlessly.

Then I started designing the bracket to mount the fan, heater and thermal fuse onto. Fusion was giving me a lot of headaches but after a lot of suffering I managed to get it working and I am really happy with the result. I was so surprised I did everything correctly and that my measurements were accurate. Because it worked the first time! Right off the printer everything fit together perfectly.

So I think the hardware part is nearly done, and now Im going to work on the software. I imagine that I will select the target temperature, and the system will accurately maintain it. This is the most important part that seems simple but really can get quite complicated. I have some other features planned as well though…

On the pictures you can see the bracket, and the first time I connected everything together successfuly.

Attachment
Attachment
Attachment
0