Klipper 3D Printer Firmware Install - How To - Chris's Basement

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
and now we install clipper firmware most of the time in the basement we run Marlin firmware on our printers main board essentially Marlin is what allows us to take G code commands and turn it into printing movement Marlon and clipper at the end of the day pretty much achieved the same goal although clipper doesn't quite a bit differently clipper takes your printers mainboard and pairs it with a Raspberry Pi running octo print so that you can offload that processing to the PI - that much faster processor so you can process data faster and the ultimate goal being printing faster now clipper is quite a bit different to get set up essentially you're flashing some firmware to your printers mainboard and then you're doing the configuration in Linux on the PI so today I'm going to show you how to get everything set up on log log is running an 80 mega and ramps combo main board you're gonna need a Raspberry Pi with octoprint installed as always with the Raspberry Pi please be sure you have the correct adapter for the PI so you have enough power if you need to know how to get out to print installed you can check out this video up here but with all that said let's head over to the computer and get everything configured now before we get started with the install of clipper I highly recommend you connect up to your printer with some sort of terminal interface I use pronterface will connect up and run an EM 503 command if you're running Marlin this is going to give you a lot of the settings that you'll need when you're setting up clipper so I'm just going to copy all these values and paste them in a word doc so I can use them as I go through the config now onto the Clipper install so we're going to start by heading out to the Clipper github we're going to take a look at the quick install guide that kevin has provided these are essentially all the steps that we're going to take to get everything installed so you can come in and copy and paste the commands that I use from here link in the description to everything I use today so we do have a brand new octo print instance installed on that raspberry pi so the first thing we're gonna do is use putty to get into it SSH will login to octo print username PI password raspberry so back to our guide first thing we need to clone clipper from github so we'll use this command here so now we've pulled in clipper down from github now we're going to run the install octopi script to install it and your sudo password default is raspberry this part takes a few minutes that part took about 10 minutes now we can change directory into home slash clipper and we can run a make on menu config to compile it here in this menu is where you can select on what processor and board you're using I'm gonna go with defaults because I'm using an AVR 80 mega board I'm using that 25 60 processor it is 16 megahertz and uh NART 0 is my serial port I'm gonna leave it at 250,000 baud rate so for me I can just hit save but you might want to select something else if you're using a different board and I'm just gonna use dot config from a configuration so I'm gonna hit OK configuration has been written now we can hit enter to exit and then for the main screen we just hit exit again and after the menu config is complete we can just type make the compile is complete now the next thing you want to do is plug in your printer and your raspberry pi and I'll show you why so the printers plugged in and turned on now let's do an LS /dev sometimes you're going to have TTY USB values sometimes you're going to have a cm values this printer is an ACM 0 this value right here and that's important for our next couple of commands so back to the install dock we're gonna stop the Clipper service and we're going to use this command to flash our firmware to our printers mainboard again sometimes this won't always be a CM 0 it could be a USB value so make sure you check that LS Dev so we'll go ahead and flash now it's uploading to the mainboard and now we can start the clipper service with this generic configuration just to make sure everything went well no errors so we're looking good so far now we need to configure octo print via the GUI to use clipper so we'll go to our octo print instance and after we've logged in we'll go to settings and the first screen serial connection under additional serial ports we need to add a tip port so /tmp slash printer and we'll go ahead and hit save so back into settings again serial connection click on the behavior tab up here on top you want to make sure the radio button that says cancel any outgoing prints but stay connected to the printer is checked we can hit save again now here for the main page we'll go ahead and hit refresh f5 and in the serial port we'll set it to temp slash printer the one we just created our baud rate was 250,000 we just set that in the config file we can go ahead and save auto connect and hit connect now octo print is connected to clipper you can see it from the terminal right here and from the terminal you can just do a status and it's giving you an error because our printer config file isn't configured yet but we do know that clipper is communicating with the Raspberry Pi and the main board so here's where all the work gets done first thing we're going to do is copy the example config over to a printer dot config file and start from scratch so we'll run this command and then we can edit that printer config file but before we do that I want to show you that there are some default config that you can use for your printer so if you do a CD config and then you do an LS these are all the printers that are already configured for clipper so if you have one of these printers and you just want to use one of these configs go ahead and use this as your printer dot CFG but I'm gonna walk you through setting it up step-by-step from scratch so you know what's going on so back to our install we'll do a nano home directory printer dot CFG and we're just going to step through this section by section and get this printer configured now at the top of this config file there's some good information but we start with configuring stepper drivers but this information right here is very handy to have so if you're configuring an arduino base board like we are you're going to use a prefix of a are and then the arduino pin number and what that pin number is it's the same pin out as a ramps so just for example this n stop pin right here is listed as a r3 if you take a look at a ramps pin out your x minimum in stop pin is right here and it's the d3 pin so it's pretty much 1 for 1 on arduino baseboards other than having that a are prefixed there's a couple of other things you need to worry about and those are listed right here so if the pin needs to be inverted you need to put an exclamation point in front of it so if the end stops going the wrong direction or the motor spinning the wrong direction you can invert it this exclamation mark you'll see that as we go and then also you have this carrot that you can add to the pin the carrot enables the on-board pull-up resistor and you do need that for certain types of switches and encoders so you'll see that as we go through but that's what those two things mean so we'll start with stepper X here at the top since we selected the 2560 mainboard this example configuration is going to be mostly correct for what we need we have to add a few things and change a few things but for example step pen 54 that is the correct step pin 4 stepper X now step distance is one of the things in clipper that's going to take some getting used to this is the value of the distance in millimeters that each step causes the printer to move and Marlin is the other way around we would list how many steps it takes to move one millimeter this is pretty easy to figure out if you already know your marlin value steps per millimeter but you can also use the prusik calculator to figure this out so here for example I'm using a 1.8 degree motor 200 steps per revolution a 2 millimeter pitch belt I'm using a 16 mm so that calculation comes out to a hundred steps per millimeter so you can just reverse engineer that number so we're looking for the distance in millimeters that each step causes the printer to move so really all you need to do is divide one by this number that you got out of the calc so 1 divided by 100 that gives us 0.01 millimeters per step and again if you've saved your 503 information all of those values are right here so for the rest of this config file I'll just be pulling on the values I already have so I don't have to go figure them out again so back to the config we'll just use the value of point 0 1 the next thing I needed to change was how the x end stop gets triggered by default you have a pull-up resistor which I kept but I also needed the logic inverted so I just add an exclamation point right there then we come down to max position 4x minus 250 and then homing speed 5 is really slow so I'm going to set mine to 40 and now we'll head down to the Y stepper it's pretty much all the same information without the explanation so you can treat it just like you did the X again step distance is point zero one my end stop needs to be inverted and a pull-up resistor my position axé is 210 and I also want to set the homing speed to 40 so you can just add that right in here homing underscore speed : 40 now on to the Zee motor first thing we needed to change is the step distance I'm using TR 8 by 2 lead screws on this printer so to move 1 millimeter it takes 1600 steps so that calculates out to 0 0 0 625 I'm also going to comment out the in stop pin value for Z because we use a probe you'll see that down below here in a moment position in stop can also be commented out because we're using a probe and we need to add an in stop pin for a virtual in stop that's just how clipper treats the probe I'll show you about that in the probe section but we're just going to do in stop underscore pin : probe : Z underscore virtual underscore n stop my Z max position is around 200 and I'm going to add a position minimum so position underscore min : and I'm gonna make it negative 1 I'm adding this because we're gonna do auto bed leveling Auto bed leveling can sometimes sense a value that's less than 0 because it's trying to take a level map of the bed and things might be lower or higher for some reason if Clippers sense that it's going to a negative movement during its first print line it's going to throw an error and fail the print so you need to tell it that it's okay for it to go a certain amount past 0 and the negative that's what this value is going to do so onto the extruder so it's probably a good idea to go ahead and calibrate your extruder before you do this but I'm just gonna pull my value out of my 503 command and it's 135 so my step distance turns out to be 7 407 my nozzle diameter is 0.4 my filament diameter is 1.75 and then we can continue on down the file until we get to max and min temp PID calibration can be done later I'm just gonna go with the default for this tutorial main temp should be 0 I'm gonna set max temp to around 250 because I have a Teflon line hot in now by default this is using 100 K thermistors that's going to work for pretty much every situation but you might want to change that up something that's a little closer to what you actually use but for this test it works just fine max bed temp I'm going to leave that at 110 the fan pens my default for rams should be set correctly no issues there you do need to pay close attention to this serial setting so whatever you use to flash that ACM 0 whatever was in your LS dev command it needs to be the same here or you're gonna have some problems by default it is a CM 0 and that's what I am using so I'll leave it also the default baud rate is 250,000 that's what I am using and if there is a default value if it says it right here this is the default value you don't need to uncomment it it's just gonna be baked in so we should be good here with the default we don't have to change anything and then we come down to Max's eva lhasa t this is something i had an issue with during the install clipper was spinning my z rods way too fast I have a really fine threaded lead screw that I use on this printer if you spin them too fast it's gonna stall out the motor so I changed max D velocity from 25 to 5 and this seemed to clear up that issue it does turn them quite a bit slower but that's about where my printer is happy with it so just be aware of that and then when you scroll on down and you'll notice we're at the bottom of the file we didn't set up mesh bed leveling probing LCD screens anything like that but it does give you this comment that you can find extra stuff in the examples extra dot CFG and that's exactly what we're going to do so we'll control X hit Y and enter to save and we'll change directory over to config and this is the example extras config that we want to take a look at so let's just cat that file so that we can scroll back and take a look while we're editing our other file that's good for now let's jump back in directory and go back into our config file we'll go all the way to the bottom and then we can scroll up and take a look at that extra config so we'll just start at the top of that if you can't scroll back this far on your terminal window you can go up to settings and add a few more lines if you like so in the example extra config the first thing you see is 0 so we're just going to take this whole section with us right there and if you hit your up arrow that'll take you back to your Nano where you're editing this file you can right click just to paste it in so these are all the options you need to use as EEPROM instead of as en stop and there's a few things we need to change so for our probe we use the minimum and stop pin so we're going to remove this comment we're gonna change this to 18 our probe also requires a pull-up resistor so we're gonna add the carrot and the logic is flip-flopped so we're going to add an exclamation point and then we're going to remove the comment for Z offset now I'm taking what my current Z offset is in Marlin and that seemed to work correctly and that is a 0.9 now you're probably going to play with this after a first couple of prints so run a print see how high it is and then maybe come back in here and change it if you need to but I'm sticking with the Marlin that I have right now so that'll work everything else should stay default for probe now let's scroll back up and take a look at a few more options so again we're looking at the example extras oxy FG we already did the probe there's options for BL touch there's options for bed tilt and then we come down to mesh bed leveling is what we want now note you can't use like skew correction the tilts creature with mesh bed leveling you have to pick one or the other we're gonna go with mesh bed leveling we're gonna select this whole area right down to here and then up arrow to get back to our nano file we'll leave a space and then right click to paste let's scroll back up to the top of that I forgot to show you in the probing section about that virtual probe let me scroll back just a second so in the information for probing this is what tells you how to set up that probe Zee virtual end stop that we did before we've already done this but I just wanted to show you where the information was in case you wanted to know more about it so back to mesh bed leveling so here's some information on it they typically want you to home in the center of your bed but with this mark 42 bed we actually need to hit some certain spots so we have to do a few more things differently so speed of 50 is fine horizontal movement of 5 is fine samples 1 is fine you can do multiple touches if you'd like men point does need to be set there's no default for that and if there's no default it's going to tell you this parameter must be provided our first spot we actually hit 0 comma 0 that's 0 X 0 Y it starts in the very corner of the bed and our max probe point this is what took a little bit of playing around with and it's only because I hit very specific spots 9 points on the bed to probe I have to be on target and for the mark 42 bed what I wert was 200 for the X and do a comma and then 195 for the Y that gets me dead on each spot when I probe probe count by default is 3 that gives you a 9 square that's good fades start fade and most of the stuff we're just gonna leave it default and that should get all the mesh bed leveling stuff set up so we'll scroll back up and take another look at that example file now we need to set up an LCD screen of some kind so we've got bed leveling let's keep scrolling there's stuff for multiple Z's stepper tilt adjustment moving gantry leveling multiple extruders there's some heating temperature verification idle time out settings for your motors so as we go through the file before we get to LCD this is definitely something I wanted to add and this is how you can assign a pin to kick on your hot end fan when the extruders on and when it goes off and it comes down to a certain temperature the fan will go off I really like this feature and I want to add it so let's copy this block of code up arrow to go back to our file we'll just paste it in right here so my hot end fan is controlled by pin 6 so let's put that there a our six max power can stay default it's gonna be maximum anyway shutdown speed doesn't matter to us cycle time hardware peter being in kick-start time doesn't matter to us by default it's going to be controlled by the extruders thermistor and that's exactly what we want and the haunting fan is gonna kick on the second the extruder starts and then it's gonna kick off when it gets down to under 50 degrees Celsius and that's default and that's just fine with me fan speed is expressed at 1 and that's full power so you have 0 is off and 1 is full power and that's fine as well so let's scroll back up to the extra configs and grab some more so we left off a heated fan there's another temperature triggered fan setting right here that you can use for enclosures or your hot end if you'd like definitions to use additional microcontrollers we don't need to check that out for now servos if you like if you use one for a bread probe or something like that you can configure statistic output to gain a little more information runtime configure in here's where you can configure TMC 2130 stepper drivers I'm not gonna configure that today I'm just using a 4 988 you don't need to do anything with those but the feature is here if you want to use it settings for 22:08 settings 426 60s here's example g-code commands that you can use to override homing if you need to do something a little bit different when your printer Holmes I'll show you a little bit more about this here in a second Virtual SD card by default you're gonna use octo print since you're already hooked up to active print with this clipper install anyway but you can use a virtual SD card but it's going to let you use a file on your octo print server to do that so as far as I know there really isn't any onboard SD card support you're already tied to octo print and then we come down to the LCD section where we need to configure LCD screen we're using a 2004 LCD to screen and the chip on those is an hd44780 so we're just gonna copy this whole LCD block although we don't need most of it we'll up arrow back to our config file leave a space and we'll paste it in so will uncomment display because we're gonna use one will uncomment LCD type and we're gonna put in hd44780 you'll notice none of the pans that support the LCD screen are set they don't even have default values and I found the easiest way to configure this is just to go take a look at Marlin so if you pop open Marlin it doesn't even have to be configured for your printer any Marlin can pickle do go to the pull down over here and go down to pens underscore rampage if you scroll down through this file you're gonna get to the LCD section now this can be a little bit hard to decipher but what we need are the RS pens and the d 4 5 and 6 pin values so if you comb through these if and else statements what we need are these pins right here so back to our config our RS pin let's take the comment off that's going to be a our 16 our enable pin take that comment off that's going to be a our 17 D 4 that's going to be on a our 23 D 5 it's going to be a our 25 D 6 it's going to be a our 27 and then D 7 is a our 29 and for this display we shouldn't have to setup our check pen or a clock pen but just take another look at Marlin right here that's exactly what we just set up here's the d7 pin right here and if we go down a little ways the only other thing we really need to set up for the display is the encoder pin and the click pin this is what you go left and right with your encoder wheel and the click button so will uncomment encoder pin and click pin if you go back into Marlin and you come down to the section where it does riprap discount smart controller that's this 2004 display with the knob ignore the CR 10 stock display this is your button encoder left and right 31 and 33 and this is your click encoder 35 and both the encoder pins left and right need a pull-up resistor so we'll do a carrot a R 31 comma and then a carrot a R 33 and then the click pin we need a pulp resistor but it also needs to be inverted so we'll do the caret exclamation point AR 35 and that should be it for the LCD screen I did try to configure the kill pin but it was doing some kind of crazy things so I just left it off for now so the last thing we need to talk about our g-code macros in clipper there's no g29 command and clipper and that's how we usually start our bed mesh leveling before every print so like duet we we need to build a macro to enable that bed mesh leveling and you can do that in clipper right in this config file so I'm just gonna paste my snippet in here now the placement of these lines is very important you need to put your g-code command over here g code colon and then do a tab for each one of these lines that you add so basically what this tells clipper is you're gonna have a G code macro every time you enter a G 29 you're gonna run this G code so it's gonna home G 28 it's gonna do a G 1 it's gonna jump Z up 10 millimeters and then it's gonna run the bed mesh calibrate command that's gonna do all the points on the bed the 9 points that you usually see and then after that G code command is done based on how you set up your start G code then your print should start printing a lot of this might be confusing but again you can go use those example configs that Clippers offers or you can use this config and take a look at it link in the description to all the stuff that I did today so that's pretty much it we can do control X hit Y and hit enter to save now we can run a command to stop the Clipper service sudo service clippers stop and if we do a start that'll start clipper with our new config most you're just making minor changes to the printer config you can just do a sudo service clipper restart and that will work the same so let's pull up our clipper octo print instance we can go ahead and connect the temp printer again an octave rent will start running at M 105 to check the temperature if the temperature is zero that's usually a really bad sign if you enter any kind of command in it's going to tell you what air and hit on the config file so for instance just do a G 28 so we messed up something in the config it doesn't know what probe is so we've got something askew so let's go back to the config will stop clipper go back into the config and we'll go down to where we set the probe and I forgot to remove the comment off the probe line so I didn't actually tell it that probe was active so that should be all the fix that we need let's go ahead and save again control X Y and inner and then we can start clipping back up and we'll go back to octal print we'll connect up again still something not quite right because the temperature doesn't register let's do a head G 28 again so it doesn't like the min point so let's go check the config again do a stop printer config go back down to probe and it's the same error that I made before I need to remove the comment off this bed mesh line it thinks that this min point setting is in probe now with that comment off it'll register correctly so again we'll exit hit Y hit enter save will start up clipper again back to October print will connect up still something not quite right G 28 doesn't like something about pan and bed mesh same issue I need to remove this comment so now we should be good so we'll save startup clipper connect when you see clipper state ready that's a good sign and now we see the temperatures correctly so if you get an error while you're setting up clipper that you can't get around here's the sequence of events that you need to do to get off of that error so the first thing I would do would be come in here and stop clipper then you want to turn your printer off you want to unplug the USB cable from the Raspberry Pi turn your printer back on plug your Raspberry Pi cable back in and then start clipper that should get rid of any of the errors that you see that you might not be able to get around with just a stop and start so now that the config looks good we can come in here and do a test now you can't move motors until you home with so let's just home the axis one at a time so let's do G 28 X X home just fine it did home just fine but really slowly I forgot to remove the comment from homing speed so we'll do that nice thing about clipper you can just save this file and hit restart and it'll pull your changes back in so back doctor print let's do G 28 X again much faster let's do G 28 Y and G 28 Z so it looks good everything's moving in the right direction now if you need to switch these around you can flip the motor cable or you can go in and use the exclamation point or remove the exclamation point from those pins now let's go ahead and heat up the fan kicks on the minute you start that extruder heating up we'll set the bed and before we start a print let's go ahead and test that g29 macro so let's do G 29 it should home lift it 10 millimeters and then run the mesh bed leveling and the mesh bed leveling looks good now when it got done with a probing you'll notice this information so if you have a printer you don't want to run mesh bed leveling on every time you print you can run this save underscore config command and it will put all these values in your printer CFG file you don't want to ever edit those values but they will be there for every print until you run your next bed mesh leveling I run G 29 every time I print so it really doesn't have any value to me so it looks like everything is heating up correctly everything's moving correctly so let's slice a file so there's a couple things I'm gonna do differently for my start G code for clipper and one is I'm not going to run a G 28 I'm just going to run the G 29 because G 28 is baked in to that macro that we built in the config file in that G code macro so there's no need to run it twice so G 29 is fine and if you run a prime line before every print like I do on the front of the bed a lot of times those will do a lot of extrusion just to get that nozzle prime clipper doesn't like that so much so I've actually lowered these extrusion values to three and eight I had them set to five and twelve and that through a clipper air over extrusion so bring those down a little bit if you use something like that everything else should be fine I've got slic3r set up to export files directly to the octopi that runs clipper so we'll send a printer and we can go ahead and start the print after the upload is complete the file is over in the octo print instance it's heating up the hot end to 215 and the print will start momentarily so we're up to Tim our macro runs our D 28 command it brings Z up 10 and then starts the bed mesh leveling well head to the corner to do our prime line and the print starts just like we expect it to and that's it now we've got clipper set up and we're running our first print a big thanks to Kevin O'Connor and all the work that he's done on clipper there's a lot of great stuff in there and there's more being added all the time now I really can't tell you if clipper is better than Marlin yet it does have a lot of potential because of its ability to offload processing to that ARM processor so we'll continue to test I'm not going to lie to you setting up a clipper wasn't easy it's like a lot of time and a lot of trial and error to go through all the different settings and make sure everything was correct I hope you found this video helpful if you did please consider giving it a thumbs up or subscribing to my channel if not leave your thoughts in the comments below and as always thanks for watching
Info
Channel: Chris Riley
Views: 87,971
Rating: undefined out of 5
Keywords: 3D, printer, Printing, 3D Printing, 3D Printer, ChrisBasement, ChrissBasement, Chris'sBasement, Chris Basement, Chriss Basement, Chris's Basement, ChrisRiley, Chris Riley, klipper, firmware, kilpper firmware, install, install klipper, Klipper 3D Printer Firmware Install - How To - Chris's Basement, printer firmware, 3d printer firmware
Id: i_541iD5Bj0
Channel Id: undefined
Length: 28min 0sec (1680 seconds)
Published: Wed Jan 02 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.