Hello, 3D Printing Friends! Today on the BV3D Channel, we're going to calibrate
the extruder on our Anet A8 3D printer, running the Klipper firmware.
Stick around and we'll get into it, right after this. I'm Bryan, and you...
are watching BV3D.
Hi, welcome back. In a previous video we installed the Klipper
firmware on our Anet A8 3D printer and its associated Raspberry Pi. And when we
did that, we used Klipper's included Anet A8 configuration file. Now, this was
enough to be able to start printing with Klipper, but as with many 3D printers,
there are always variations in hardware, requiring us to make adjustments to the
config files so we can get the printer dialed in. At the end of the Klipper
firmware installation video, I printed a 3DBenchy, and the result was a bit rough,
with some apparent extrusion issues. Now, we covered a lot of ground in that video,
so I thought it would be a good idea to break the Klipper tuning process down
into smaller, bite size chunks. And so today, we're going to focus on extruder
calibration. Now in the Marlin firmware, stepper motor movement is expressed in
terms of steps per millimeter. In other words, how many steps of the extruder's
motor are required in order to extrude one millimeter of filament.
Klipper is different. It wants you to specify the number of millimeters of filament
extruded per step. And since stepper motors move a very tiny amount with each
step this is usually a very very small value. In other words, for each step on
the extruder's motor, only a tiny fraction of a millimeter of filament is extruded.
In another recent video, we installed the OctoKlipper plug-in for OctoPrint, to
make it easier to edit Klipper's configuration file. Now, if you haven't
installed the plug-in yet, go click right up there, to go to that video, and go get
that plug-in installed. And then come back here, and we'll continue. It's OK, we'll wait.
Are you back yet? Yes? OK, good. So, calibrating the extruder on a 3D
printer is simply a matter of telling the printer to extrude a certain amount
of the filament, and finding out where it lands on the Goldilocks scale. Did it
extrude too much, not enough, or is it just right? OK, I'm sort of kidding about
the Goldilocks thing. What you want to do is find the number of
millimeters difference between what you told the printer to extrude, and what it
actually did. And typically you do this by making a mark on the filament 120
millimeters up from where it enters the extruder. Then you extrude 100
millimeters of filament. THEN, you measure the distance between the mark and where
the filament enters the extruder, and THEN!... Math happens! And to do this math,
you need to get the current step_distance value out of the [extruder]
section of Klipper's config file. But we'll get to that in a minute. Because
right now it's time for… The Secret Formula. The formula for finding the
correct step distance value for Klipper looks like this: (120 - m) / 100 * c
where m is the amount of filament measured above the extruder
after extruding 100 millimeters, and c is the current step_distance value in the
config file. The value 120 is the distance above the extruder where we put
our mark, and the value 100 is the amount of filament we told the printer to
extrude. So now that we know what we're gonna do, let's get on the computer and
do it. OK, let's open a browser and connect to our OctoPi instance. Now we
set ours up using OctoPi, and since we haven't changed its network name, it's
still at the default address, http://octopi.local OK, now that
we're connected, we need to get into Klipper's configuration file for two
reasons. One, we need the current step_distance value from the [extruder] section
of the configuration, but we also need to add a line in there as well. See, by
default, Klipper doesn't want to make too much of an accidental mess, so it won't
extrude more than 50 millimeters of filament at one time. But because we want
to calibrate the extruder, we need to tell Klipper that it's ok to extrude 100
millimeters of filament at once. So first, let's click on the wrench icon. That'll
get us into OctoPrint's settings panel. And then we'll scroll down on the left side
and go into OctoKlipper. Now we can click on the Klipper Configuration tab
to view the configuration file. Scroll down to the [extruder] section of the file,
and we want to look for the step_distance line. And the value that is set
there is .0105. Write that down because, we're going to use that
later when we're calculating the new step_distance value. Now we need to add a
line at the end of the [extruder] section, and this is the line that tells Klipper
that it's OK to extrude up to 100 millimeters of filament at a time.
And it looks like this: max_extrude_only_distance: 100
And with that done, click the
Save button this will save the configuration and restart Klipper.
And now Klipper will allow us to perform that 100 millimeter extrusion. Let's go
over to the printer. It's time we took a stand, and made our mark.
So grab a ruler.
We'll make a mark at 120 millimeters up from the top of the extruder, right here.
Let's go ahead and get a marker, and put a little mark right at that point.
then we need to tell Klipper to extrude 100 millimeters of filament.
Before we can extrude any filament, we need to heat the nozzle. The printer can't extrude
filament through a cold nozzle, no matter how hard it tries. So, in the temperature
tab, let's set the nozzle temperature to about 200˚ C.
Now once that's up to temperature, click on the terminal tab. Because to extrude the filament we're
gonna be manually sending G-code to the printer. Check the box to Suppress
Temperature Messages. Because we really don't need to see that information right
now. But we DO need to make sure that the extruder is set to relative mode. So in
the entry field, we're going to type M83, and then press return to send that command.
Then, to extrude 100 millimeters of filament, we will type G1 E100 F100,
and press return to send that command.
This tells Klipper to extrude 100 millimeters of filament over the course
of one minute. When it's done, we need to measure where the mark is, so we can use
that value in our calculation. Looks like it landed at 23 millimeters, so we're
under extruding just a little bit.
It's Math Time!
The step_distance value in the configuration file is 0.0105,
and the mark on the filament stopped at 23 millimeters above the extruder.
So in the formula,
where the new step_distance is (120 - m) / 100 * c
m is 23, and c is 0.0105.
Written out, it'll look like this:
(120 - 23) / 100 * 0.0105
Working it out a little further, we get 97 / 100 * 0.0105
And so that works out to 0.97 * 0.0105
which, finally, works out to 0.010185
And that's our new step_distance value, so let's go put that in the Klipper configuration file.
Let's click the wrench icon again to get
into OctoPrint's Settings panel. Then, we'll get back into OctoKlipper.
In the Klipper Configuration tab, scroll down again to the [extruder] section, and
find the step_distance line. We are going to replace that .0105 value
with the new value, which is .010185
Once you've got that keyed in, click the Save button. That'll save the configuration
and restart the Klipper firmware. And because the firmware restarted, we need
to set the nozzle temperature back to 200˚ again, so let's set that and
then we can repeat the process of marking and extruding filament.
So, once more, measure 120 millimeters from where the filament enters the extruder.
Then, make a mark.
Then, in OctoPrint's Terminal tab, we're going to put the extruder in relative
mode again. Remember, we just reset the firmware. So we'll type M83, and send that.
And then, as before, we will type G1 E100 F100 and send that command
to extrude 100 millimeters of filament.
And so once that finishes extruding, we will measure where the mark is, to see if
we need to make any further adjustments. And it's right at 20 millimeters, which
is exactly where we need to be. Perfect!
OK, well now we have a perfectly
calibrated extruder and that's important for a couple of reasons. One, it's always
good to know that your printer is extruding properly, and two, we need to
have the extruder calibrated to move on to the next step: Calibrating the
Pressure Advance feature. But that's a subject for another video. So with the
extruder calibrated, we've reached the end of the episode.
Thanks for making it all the way to the end, and a big thanks to all of you
who subscribe to the channel. And if you haven't subscribed yet, I'd love it if you would click that
Subscribe button down there and maybe click the little bell to be notified
when I release new videos.
Speaking of videos, I do hope you enjoyed this one.
If you did, please give it a thumbs up. If not, give it a thumbs down, but either way
leave your thoughts in the comments. If you like the content I'm producing,
please consider supporting the channel with a one-time micro payment. You could
buy me a coffee or leave a little something in the PayPal tip jar.
Links for both are in the description. Well, now that we've got the extruder calibrated,
I'm gonna go print something cool. You do the same, and I'll see you next time!