Automatic 3D Print Removal using G-Code

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey friends in the past I showed you how you can manipulate G code to make really cool time lapses and even make your 3d printer sing and dance [Music] well today I'm back with another handy g-code hack today we're gonna take this ordinary 3d printer and make it fully automated stick around and I'll show you how cool g-code it's the mysterious language of 3d printers the code that the slicer on your computer creates that tells your printer exactly how to behave in order to print a perfect model well it can be pretty intimidating for people like myself who aren't programmers by any means learning just a little bit of g code is definitely an awesome skill that can help you unlock a lot of power from your 3d printer without the need for expensive upgrades or anything crazy 3d printing is awesome because you can just give a printer that g code and leave it to do its work and print a fantastic model but what if you wanted to print a whole bunch of something like more than you could fit on one print bed well then you have to come back to your print when it's finished remove the print and start the next print and if you need to do that over and over and over again well it might be in your best interest to automate that in today's video I'm going to show you how I did just a little bit of G code manipulation and a bit of a clever way in order to make this any cubic I three mega fully-automated that is removing a print after it's finished and starting the next one over and over and over again I think it's a fun little trick it can definitely be handy for some of you and if anything it might give you some cool ideas for how you might modify G code to make your 3d printer do crazy things here's the model we're gonna be working with it's my version of Professor sugihara's ambiguous cylinder illusion I think it's the perfect test model for this experiment because it's nice and small and is very simple and the idea here is actually very simple as well once the print is finished we're just gonna have the print head move behind the model and then come forward and knock it off of the print bed easy enough right well not entirely that easy for example here well that would have caused a problem so my first quick fix is gonna be to tape this piece of paper to the front of the build plate so that the model doesn't get in the way and hopefully it'll fall straight into this open drawer in front of the printer so here's a temp number 2 and it went pretty well also the hot end of the print ended up melting my model after the fact so I'm gonna have to do a few more changes but let's go ahead and jump into my slicer so I can show you exactly how I'm doing this I'm doing this in simplified 3d but you should be able to do this just as well using cura or another free slicer let's go ahead and take a look at these process settings overall I'm not doing too much these are just my standard print settings for this ambiguous cylinder so we've got a point one six millimeter layer height we do want to have a brim which is basically a skirt with no offset from the model that way when the print gets ejected it takes the brim with it the real magic is going to happen with our scripts so at the start of the print it's very simple we just have a g28 command which homes the printer that's pretty standard and I would usually have a wipe command here to kind of start purging filament but for this technique we're not gonna have that and that's why I have the brim for the model that's going to act as our purge but for actually ejecting the part we're gonna edit our ending script here you can see what I've typed up so each line is a separate command starting with this g1 which is a move command so this first line is saying move to the coordinates X 105 millimetres y1 95 millimeters and Z 50 millimeters the F stands for the speed in millimeters per minute after that I added some M 300 commands which is just a beep I'm gonna have a few beep noises just to let me know when the print is finished and then we're gonna have a few more movement commands here if we look at this line all the coordinates are the same except for the Z which I've set to 1 which means the print head will lower down to one millimeter above the print bed the next line moves Y to 1 which makes the printbed move backwards then I added a few quick back and forth movements between Y 30 and y1 with a feed rate of 8,000 which will basically just move it really quickly and try to shake the print off to make sure it's not in the way after that we've got these standard commands which normally turned the fan off as well as the extruder in the bed but I added this semicolon in front of them which basically disables those commands but I do want to keep them in the end script and you'll see why in a bit anyways that's gonna be our basic end script and now if we go ahead and prepare the print we can see that the print itself looks fine and in simplify 3d we can also visualize the travel moves which is gonna be really helpful here you can see that actual motion of the printhead moving to the back of the plate and then up to the front that's what's gonna kick our print off of the bed everything looks good so let's go ahead and export that to our SD card I'll name it MB one and then we'll exit that preview now I'm gonna move this print a little bit further back leaving it centered in the x-axis but just moving it back in the Y a bit and I'll leave everything else the same and we'll export that as an v2 then I'll do that one more time moving it a little bit further back but making sure there's still a room behind it for the printhead to lower down behind the model and I'll name that AM b3 so now we have three separate pieces of G code for these three prints that are doing the same thing but just with the cylinder in a different location and the next thing I'll do is open each of those D codes in my text editor since I'm on a Mac I'm using TextEdit on Windows you can use notepad or anything similar and just make sure you're not using rich text you want to use plain text to make sure that it still behaves as a g-code file when you save it so in this text document we have all the g-code this includes every single movement command for the printer and will also open up and be - and AM b3 then I'm gonna go ahead and copy one of these or you could just start a new document but basically I want a new g-code file that's going to be the combination of all of these so I'll name that MB Otto and we'll open that as well great so with this new G code I'm just gonna delete it for now and then I'll go to am b1 I'm gonna copy everything and paste it then I'll copy everything from our second file and paste that at the end and then copy everything from the third file and paste that on the end of that one as well so now we have all three G codes pasted into this one g code file so now this file will already run all three of those prints back-to-back but if we want to do more than those three we can select everything in this file copy it and paste it as many times as we want to make several copies of this print once we have as many copies in this file as we want to print I'll go down to the very bottom find that last end script and I'll delete those semicolons in front of those final commands so that it does turn off the fan extruder bed and stepper motors once all of these prints have been run through and I'll also just stick a few more of those beeps at the end so that it gives me some kind of alert when it's done printing all of these you could actually manually type in any G code directly into this text file so even if your slicer doesn't have an option to add an ending G code script you could just add it in right here yourself great now I'll just save this once again make sure you're saving it as plain text and that'll do it for our new updated g-code file and you'll see that the size of the file goes up dramatically because we have a lot of prints in this one g code all right it's on our SD card ready to go but let's go ahead and first drag this G code file in to simplify 3d and that'll let us preview the print just to make sure that nothing crazy is happening so here's our preview and you can see it shows all three of those locations and it's each one of the models printing back-to-back and we only see three because the rest of the models are printing in the exact same location as those first three but it looks like everything's working the way it should so let's go ahead and inject our SD card stick it in our printer and see what happens all right we're off the printer is now reading our G code and if we did everything right it should start by simply printing the first model just like any other prints once that first model is finished we have our moment of truth here we go it's reading that G code moving to the back lowering down and then moving the bed backwards to knock off the print and our little shake command which didn't do much but it didn't hurt either so that's the completion of our first print but it's gonna continue reading that G code which leads straight into the next model so once again it's running that starting home command and then it's gonna go ahead and start printing our second cylinder you'll notice it takes a while before filament starts extruding again and that's why we have that brim because we want to make sure that the filament is flowing once it starts printing the actual model a few moments later while it's printing fine except there was this blob of plastic that got dropped onto the print and that's no good that's gonna ruin this model so let's go ahead and stop this print yeah see that blob that's no good one option might be to simply add a retraction to the end script but I just happened to have this wire brush which I snapped and saved for a moment just like this I'm gonna go ahead and use a binder clip to stick this wire brush on the corner of my build plate here and I'm gonna see if I can code the printer to use that brush as a little nozzle cleaner so to do that I need to figure out the exact location relative to the printer and from the printer interface I will manually move the printhead and just keep track of how far I'm moving it so I'm moving 10 millimeters at a time here I went up 20 millimeters in the Z direction and then it looks like if I go over 210 mm I end up right above the brush then I have about thirty millimeters to move forward and backward in the Y direction to wipe the nozzle maybe I can move down a little bit at the same time yeah I think that could work so let's go back into our slicer and add that movement into our G code once again I'll go into the script section but I'm going to add this command to the starting script because we want it to wipe right before it starts printing the model so after homing I'm gonna type in a g1 command again and I'm gonna have it move to X 210 which brings it all the way to the right side we're gonna have Y go to 5 and Z go up to 20 so it ends up just above that wire brush after that semicolon you can write whatever you want it's kind of just a way to keep track of what your Chi code is doing once it's over the wire brush I'm gonna add another g1 command and we'll have the X remain the same but we're gonna move the Y to 25 and we'll have the Z move down one millimeter to 19 so it's kind of moving backwards and slightly down to start brushing the nozzle then I'll set the Y back to 5 and the Z down one more millimeter to 18 to have it continue brushing and then we'll do one more brush for good measure after the nozzle is done brushing I want to move the printhead out of the way so I'll do another g1 command and I'll have it move to the left to 200 and we can have the Y move to five and we'll just keep the Z at 17 millimeters all right that looks good for the start of the print and I am gonna go back and add a few more outlines to the brim just to make sure it does a better job of purging the nozzle at the beginning of the print and let's preview this now and see what it looks like once again I'll turn on those travel movements and we can see it moving over to that brush and doing that little back-and-forth wipe and then moving over and down although that's not moving over very far so let's go back and we're gonna go to the start script and make it move to X 150 instead and there we go now you can see after wiping the nozzle it moves over a bit further before starting the print so that it won't hit that brush all right so we've made our changes and from here we're gonna do the exact same thing I'm gonna save out three different versions one two and three just so that it doesn't print in the exact same spot every time that's gonna help us with bed adhesion but otherwise it's exactly the same I'll paste all three of those into one file and I'm gonna make four more copies of that so that we have 15 prints total in this one g-code file all right let's save it and try it out I'm gonna swap out my filament I was using a really cheap PLA which was stringier than it should have been so we're gonna use some filament um extra fill instead for this one plus I really like this light blue color all right off it goes moving to the brush looking good all right there we go a nice little brush command and then just like we programmed it moves over and starts our print once again the film it doesn't start coming right away but we have five skirts now so it's more than enough time for the filament to start flowing more smoothly and let me just clean up this one string but from here on out I'm just gonna leave the printer and let it do its thing so here's print number one finishing off let's see what it does all right it ejecta the print just fine and then after a few moments it'll move over and start the second print this time with our new wipe command does its quick brush and starts print number two slightly farther back awesome so it is still a bit stringy it's not the most clean environment but cylinder number two does seem to be printing out quite nicely so here it is finishing up and let's see if it keeps going once again runs that wipe and then it's gonna go back and start our third cylinder it caught a straggler there once again not super 100% clean but again that's kind of the purpose of the brim here as you can see it kind of caught that string of filament and it's just gonna kind of smush it down and out of the way before it starts printing the actual model great on to print number four and beyond it's working I can't believe it's actually working from here on out I left it printing overnight and sure enough one print after the next 15 Silver's in a row it just printed them and pop them off the plate surprisingly despite the nozzle leaking a bit between prints every single cylinder came out absolutely fantastic there is some stringing but that has nothing to do with our actual modifications that's just my general print settings I probably should have had the nozzle temperature a bit lower and maybe a bit more retraction as well but nevertheless we got our cylinders I was able to clean up those strings a bit and I was left with 15 absolutely fantastic prints all right friends we did it with just a little bit of g-code hackery we were able to take this normal printer and make it spit out one print after another to get these 15 beautiful cylinders and you know what that 15 could have been 30 could have been 90 it could have been a thousand if we had an SD card that's big enough now this worked especially well for this model because it has very little surface area on the build plate so it was very easy for the printhead to just knock it off if I was doing a different model I might have to take a different approach maybe having some code in there that waits for the build surface to cool down before knocking a print off so that it's not sticking as well or I might attach a little scraper to the front of the printer to pop off very shallow parts like a lot of poly panels for example anyways I hope you guys found that as cool as I did I just think it's really fun that you can type in a few extra pieces of code and make your printer do all kinds of stuff I'm interested in hearing if you guys have any ideas of what else I can make a 3d printer do with cheat code and maybe a few specialty 3d printed parts but anyways that's it for today's video so I'll see you in the next one until then I'm Devin this is make anything and of course stay inspired I had to do something [Music] you
Info
Channel: Make Anything
Views: 914,337
Rating: undefined out of 5
Keywords: 3D printed, 3d printing, 3D print, 3d printer, make anything, gcode, g code, automatic 3D print removal, automatic 3D printer, 3d printer automatic part removal, automatic print removal, automatic part removal, 3d printer automatic print removal, gcode tutorial, remove 3d prints from build platform, remove 3d print from bed, editing gcode, simplify3D, cura, slicer, modify g code, wire nozzle cleaner, nozzle cleaning, automatic nozzle cleaning, easy 3D print removal, g-code
Id: avlengYsJdw
Channel Id: undefined
Length: 19min 46sec (1186 seconds)
Published: Thu Aug 08 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.