on today's banker mashup we're building a filament encoder runout sensor
so today we're going to be building a filament encoder runout sensor now that sounds complicated
but really all that it is is a filament runout sensor with an encoder in it now the difference
between a normal filament sensor is that if you run out of filament the filament is detected
as no longer existing and therefore your printer stops but what it doesn't do is detect jams so if
your 3d printer reel for some reason jams because your filament is looped underneath another piece
of filament or the spool doesn't move for any reason that jam is not normally detected by a
filament runout sensor which means your print could fail and the printer could keep running
because you actually never ran out of filament so an encoder goes ahead and solves that problem
and what i've got here is the encoder wheel out of the project we're going to build today
now these are not new you can go ahead and buy one off the shelf for about 15 to 20 dollars
however some of them are a little buggy and they don't work very well so what i wanted to go ahead
and do was build my own in something that i could build with parts that were already laying around
the shop here so i could put it together and actually make it work and i also want to give
a special shout out to dano who tested this and actually had it detect a filament failure
in his testing when he was running another 3d print so special shout out to dano who is in our
channel discord and i always encourage everyone to join our channel discord which is a a maker
space where you can get help with this project or any others so getting back to our project here the
filament encoder wheel what happens is this spins and then we're going to use a optical sensor
to go ahead and it will send light through here and as this turns because the filament is moving
it will send pulses to marlin and then marlin will go ahead and say yes there's still filament
there and keep on printing but when you run out of filament or the filament stops moving this wheel
what will happen is that it will pause your print and then prompt you to fix the problem and then
you can go ahead and resume your print so this project is really straightforward we're only going
to use a few parts here most of them are going to be 3d printed you're going to need a bearing
you're going to need some small magnets they're three millimeter by six millimeter magnets
you're going to need an optical end stop and you'll need a rubber band
that's really it for the entire project most people already have these parts
if you're a 3d printer enthusiast you already have these parts laying around and it's a really quick
way to add an encoder at a really really low cost so with all that said let's get to work
we're going to start off by printing out all three of the 3d printed parts that
we're going to need for this project you're going to have the case back that's printing
right now and then we'll also print the encoder wheel and we'll print the case cover
so the first step is to go ahead and make sure that once you get your 3d printed parts that
everything is smooth now i've cleaned up this bearing a little bit already but what you want
to do is just make sure that you use a little bit of sandpaper i'm using a 220 grit to just go ahead
and make sure that everything is smooth on this particular part this is the encoder wheel here
and the other part is the main body and in the main body you just want to make sure that you
use your sandpaper just go along the inside here and make sure the same thing that there's no burrs
if everything is smooth on the inside your bearing should fit inside and spin and you shouldn't feel
it catching on any burrs or anything like that the first step of this project is to go ahead
and we're going to insert the 608 bearing right here into the encoder wheel now this will just
press fit in here tightly and if you need to clean this up with a little bit of sandpaper to make
that a little bit smoother then i suggest you use that same 220 grit sandpaper you're just going to
go ahead and press the bearing into the encoder wheel just like that once we have the bearing on
we're going to add the rubber band this is just a standard rubber band you can buy these anywhere
you just want to make sure that it is tight fitting now the reason that we're using a
rubber band here is so that way the encoder wheel has a little bit of a better grip on the filament
itself so you just want to make sure that you put this into place and it rests within the groove of
the encoder bearing once the encoder bearing is done we're just going to simply insert this
into the 3d printer part and you can see that it spins freely now we're going to go ahead and take
our optical end stop and if you look right in here you'll see there's a little pin that's for
this hole here and you're just going to go ahead and slide this in and have it stick on that hole
and then you'll go ahead and use your m three six millimeter screw it's a little bit shorter
but the six millimeter make sure that it will attach here and not push through the other side
now to make the filament transition pretty smooth here what we're going to do
is we're going to use these m10 and we'll just screw these in here and
then we'll just go ahead and use a wrench to tighten everything up
okay so with the final assembly here we're going to just press this through and do a test fit and
you can see it grabs perfectly with that rubber band in there and then that as the filament moves
through it turns the encoder wheel so the cover is pretty straightforward to assemble now i went
with magnets because i wanted to go ahead and make sure that you could have easy access to it
so ultimately this will be our finished product so what we're going to go ahead and do now is we're
going to use these three by six magnets and we're going to insert them into this and then attach it
to here now there is a little bit of a trick here to these magnets don't just put them in
here because what you'll find out is if you have the orientation wrong they'll actually repel so
what you want to do is to go ahead and i push them in and then i peel off the second magnet
so that way there's an extra magnet sticking up here and then i do this all the way across and
it makes sure that i have all of the magnets and they're pointing in the proper polarity
once we have the magnets aligned on this one then we're just going to go ahead
and push it into here and push it into there if you find that some of the 3d printed parts don't
fit the magnets and the magnets don't stick in there just by pressure fit
you can go ahead and take a glue gun and you can just drop a little bit of glue in there and
on both of them and then you can just press fit that and that should hold everything together
okay so we've cleaned up the inside here and our glue is now removed and as you can see here
you've got quick easy access to the inside if you needed to replace the rubber band i've been using
one for a while now and haven't needed to replace it but it's easy access if you want to get at it
now to mount this there are two holes on the back here and they work pretty simple uh the
first one here you can see with the light just showing through here your screwdriver will fit
just through there and then the other one is in the center the last part here
is really just the wire for connecting everything that we're going to connect this to our main board
and you're going to want to go ahead and connect the other end to one of the open pins on your main
board i'm not going to go into detail on how to install that all you have to do is plug it into
one of those pins and then we'll talk about the firmware now there are some grooves that are right
here so that way the wire feeds and if you don't want it on the right you can go ahead and feed it
on the left side as well so it works on both sides and then when you're all done you just
throw the cover on there and we're ready to go so now we're going to go ahead and do the firmware
all right so we've got marlin open here and in configuration.h we've gone to the filament runout
sensor so the first thing that we're going to do is enable the filament runout sensor
now i'm using an skr version 1.4 so it has a pin that you can plug directly into the main
board which is the e0dt or e0 detection so that is the one that i used for my filament runout sensor
however you'll really need to do this for whatever your main board is and the type of main board that
you're using and if you're using an older version of marlin you'll also have to navigate that as
well so what we're going to do is uh enable the filament run out sensor and then we have these
other options that are enabled here so you're going to leave most of these options alone uh
we'll leave true the runout sensors we have just one we want to change the run out state to high
and then you also want to leave the pull up enabled and keep the pull down disabled
the m600 command we're gonna leave there that nothing to change there the
one thing that we do want to enable here is the run out distance now you can configure this but
20 millimeters is a pretty good number to use if you go too short it will be over sensitive
and if you go too high it will be under sensitive and then after that we're just going to go ahead
and uncomment the motion sensor portion right here at the bottom and this goes ahead and
activates the portion of the code here that uses the encoder disk that we just created so
this way marlin understands that it's going to be receiving pulses instead of just an on off switch
for a traditional run out sensor and then once we're done with this we're just going to go ahead
and compile and put the firmware on our main board and then after that we'll be ready to go ahead and
test so you can see here we have the filament run out encoder and it is running and i have a
print running right now on the printer now you can notice that the green light on the sensor itself
lights up and shuts off that's where it's sending the different pulses to marlin letting
it know that the filament is moving through the encoder and we don't have a filament jam or a run
out condition so what i'm going to do now is clip the filament and we're going to watch it
stop moving the encoder it's going to take just a minute here for it to go through
so now the wheel is stopped you can see it stopped with it lit
up it really doesn't matter if it's lit up or not lit up uh the main key here is that
marlin is no longer receiving those pulses so let's take a look at our print
so you can see marlin went ahead and paused my print
so you can see that my print has now been paused and it's going to unload the filament
so we're going to reload the filament and restart everything okay so i've changed the
filament now and i'm going to hit continue on the display and it will resume the print
so as you can see this project is really pretty simple to put together
most of it is 3d printed parts and if you have the rest of the parts laying around your shop then you
should easily be able to put this together in roughly an hour once those prints are finished
recompiling the firmware goes really really quick so you're up and running with your own
encoder runout sensor in no time at all so that is going to be the end of today's video
if you liked it make sure you mash that like button and don't forget to share and subscribe
so you don't miss any of our upcoming videos here in 2021 i'd also love to hear your comments on
this project are you going to build your own runout encoder or are you going to just buy
one of the pre-purchased ones let me know down in the comments below i love to hear from all of the
viewers so with all that said i want to say thanks again for watching and we'll see you all next time
oh