Adding a Filament Sensor to my 3D Printer

Arunoda Susiripala
Arunoda Talks
Published in
4 min readFeb 6, 2018

The new Prusa i3 MK3 comes with a filament sensor and it’s super cool. Basically, it’ll pause the printing process if you run out of your filament, or if the filament is broken.

I have a Tevo Tornado, and I unfortunately don’t have that feature. When I was looking at the Marlin website, I discovered that there’s a configuration for a such a sensor.

Marlin is the firmware used in almost all Desktop 3D printers, especially for printers that are made in China.

This is my experience in adding a Filament Sensor to my Tevo Tornado. Even though this is specific to Tevo Tornado, you could use it with your own printer with some minor tweaks.

Actual Sensor

There are different types of sensors you can use, including optical sensors and endstops. I already had an unused endstop since I am using BLTouch.

So I just picked that endstop as my sensor. An optical sensor might be a better choice since it doesn’t need to touch the filament, but it’ll be hard to set it up and design a case for that.

Sensor Case

It really doesn’t matter where you keep your sensor. The filament should go through it, which is the only requirement. In my setup, the filament holder stays very close to the extruder. I then started a design where I can attach the sensor on top of the extruder.

I designed a few cases, but each of them having their own issues.
(I am a novice 3D designer, so that might be the reason.)

After a few more failed attempts, I gave up on that idea and designed this:

It’s a pretty basic case. You don’t need to attach it to any surface. You can basically let it move freely. Here’s how it works:

This is available on thingiverse if you want to use it. I’d also like to share my Fusion 360 source file, in case you want to modify it.

Wiring

By default, Marlin wanted me to attach the sensor to the fourth servo pin, but I couldn’t find that exact port. So I changed the firmware to use the Z-max pin. That’s simply because it’s very easy to find on the board and my printer doesn’t use it.

Then I plugged the wire into the Z-max and that’s it.

Firmware

This is where the magic lies. There are only a few changes to the original firmware, but I had to experiment with it for many hours before finally getting it right.

Here’s the updated firmware. However, it’ll be useless, unless your 3D printer is a Tevo Tornado with BLTouch enabled.

But you can easily apply these changes for your 3D printer’s firmware. First of all, download Marlin 1.1.8 (or the latest version) and configure it for your printer. You can follow this guide to do that.

Once you’ve got a properly working Marlin for your printer, apply these changes. I’ve added comments that go with each change, so you know what you are doing.

Then, you can upload it to your printer and you are ready to go.

Action Time

Now it’s time to test it out. Let’s cut the filament:

Our endstop will detect the end of the filament and triggers the firmware. Then, the printer will do a few things:

  • It pauses the printer and move the nozzle away from the print.
  • It notifies you with a set of beeping sounds.
  • It shows a message on the LCD screen.

Then, you can remove the old filament from the extruder and add a new one. After that, simply click the controlling knob.

Here’s what happens after that:

After I click on the knob, printer will do the following things:

  • It’ll heat up the nozzle.
  • Extrude the filament.
  • Ask you to resume the print.

Before you resume, you need to clean the nozzle in case for over-extruded filament.

Result

In my printed object, first layer of the print after resuming didn’t go well. You can see the issue with the following image:

However, this issue could be because of several reasons including:

  • Due to unclean printing surface.
  • Due to an over-extruded filament.
  • Due the size of the object being printed.
  • Due to the place where the print was paused.

Finally

I usually do small prints. I can guess when the filament will run out and change the roll before I start the print. However, if I’m printing a very large object , having this kind of sensor might be pretty useful.

At the end of the day, this is not as useful as a bed-leveling sensor, but it is something nice to have.

So, if you like (or have time) to experiment with your 3D printer, this is a really good project.
Otherwise, you’ll be fine without a filament sensor.

--

--