-->

DIY Cheap Arduino CNC Machine - Machine is Complete AND Accurate!

DIY Cheap Arduino CNC Machine - Machine is Complete AND Accurate!

    hi folks welcome to another episode of NYC CNC today we're going to continue on with the Arduino CNC project we're gonna work on this homemade DIY Arduino CNC driven by the gargoyle shield an awesome project and the focus on this one is really inexpensive parts the linear bearings. the ground linear rails incredibly inexpensive timing belts we're gonna walk through all that how to interface it with the garble get some code up and running and then hopefully at the end of this we'll be able to export g-code and use I think we'll try to fit a pen inside of that thing and do a drawing let's dive right in if you haven't seen the first video yet here's a screen shot and there's a link you click right on the video screen to pull up the first video that's where we walk through the setup of the garble shield me arduino and some of the very basic settings today what we're gonna do though is mix that in with the hardware actual measurements and get this thing really running let's take a quick look at the SolidWorks CAD model and I want to thank Craig Kelly he's a longtime viewer who was really instrumental in getting this CAD model put together and did a lot of work on it so Craig a big thanks for your help on this and what I love about Craig's work is that it's not always a great to work with. but he understands simplicity and that was the goal here let's make this thing as simple and cheap but for the sake of being cheap but for the for the sake of figuring out what can we do with a low cost machine and one that's hopefully easy for you folks to make because that's what I really want I want everyone watching this video to be able to do this if you need one that's more rigid you can do that and we're gonna do that actually pretty soon on a project involving proper linear rails but you're talking about hundreds of dollars just for some of the linear motion parts alone so as you can see here the idea for me is to be able to dispense parts into a hopper as this tube moves around we don't need to worry about the trays below right now you can see we've just got four pieces of angle bracket Craighead machined them down but if you take a look or in the in the SolidWorks have modeled them down if you take. a look on the actual thing I left I let them all is three inch aluminum angle quarter inch thick and that be fine you've got to get some holes drilled to hold your bearings I actually have just I thought I was gonna oversized drilled on my hair and then ream them but right now they're just press fit in there so again we're just trying to get it done quickly folks and then as you can see in the cat bottle there's not a split line shown but the idea is that a screw would hold the timing belt together because the best way to purchase timing belt material is the large spool and then you cut it so obviously you either need to splice it into one solid belt again or what's much easier is to leave it as a open-ended belt I did the same and you can see right here there's a steel bracket and inside of that bracket are the two ends of the belts I did the same thing on the x-axis I'll flip the camera around here so you can see the belt is secured by the piece from the screw right there and then this screw is threaded through the aluminum angle and it acts as a makeshift tensioner just to keep the right amount of tension on the belt so like I said I put it all together and I'm really happy with the results you can see you've got great motion on both directions you're gonna find that the X is way longer than it should be I didn't want to cut the bars down yet I will later because this machine only needs to be covering X distance of about 00 inches but for now I figured let's have some fun and it's it's great for those of you who don't know the way these work is these are linear bearing blocks and they actually have recirculating balls inside this black ring here and they allow to the a very low friction and accurate way for these to slide over these linear bearings I'm pretty happy with the Y the X as you'll see has some some play in it like that and that's totally unacceptable for any sort of 0d printing or cutting application this will be fine the way to prove and prove that easily would be to make a longer y axis support piece or the piece that travels along the X rather and then to use two of these on each one but I'm also not to worry about it because let's talk about cost folks I'm finding these bearing blocks for well * under five dollars the steppers for under ten dollars the rail is like six or seven bucks tiny belt is super cheap there are links to all this stuff in the video description right below so if you want to purchase this or just explore more please by all means click on those links to see sort of how I put this together but folks we're talking cheap all the linear motion parts including the steppers are like under seventy bucks the aluminum for me is really cheap and then you've just got to add your garble shield which is 00 bucks in an Arduino and I think that's about it we are planning to offer the aluminum brackets for sale on the Sanders Machine Works website just because we know there are some folks that don't have the ability to easily machine the stuff and it's easy for us so if you're interested in that you can check out by the way we have a brand new website but again the point here was how much fun can we have with a pretty darn inexpensive CNC setup if you will and then the other question is is it accurate well let's take a look so accuracy let's test it for those of you who aren't machinists we've got some basic machinist tools here that also fun fact are not expensive I'm using some two four six blocks these are a little bit less common they were actually something that I featured in my 0000 ten machinists Christmas gift ideas video and they were a big hit I had a number of folks who are like these are awesome it's a great price anyways on them is a very inexpensive magnetic indicator holder and then it's this thing which is called a dial indicator and it has a ram on it or shaft and as you push that shaft back it measures distance and each tick is one thousandth of an inch for those of you who aren't familiar with that a standard sheet of printer paper is about four thousand so it takes four ticks to measure the thickness of one piece of paper so in other words these things are pretty darn precise you can see that move right here so let's do this I've got it set up here with the plunger against this the one of the linear bearings on it's going to travel with our X motion and I've got this thing pre-loaded now the first thing we're going to do not measure accuracy but rather repeatability in other words I don't care how far it goes I care does it come back to the same point so we've got it set up here I'll just twist this so we're right on zero now let's type in a relatively arbitrary distance G 0 0 X negative 0.0 hit enter okay moves to some distance now we'll go back and type G 0 0 X 0 and the million-dollar question is how close to zero do we get mm that's pretty darn good I will take that any day remember folks we're using very inexpensive parts they're not rigid there's lots of types of looseness even wiggling the even wiggling the aluminum right there gives you play of quite a few thousand and again I'm okay with all that I still think this is just amazing now let's take it one step further got the needle lined up on 0 I'm going to click send this program goes further and it's pausing at the end of each stroke just so you can sort of see well go I think 0 times so maybe that's three and you can see it seems to be repeating within about well that was right on 0 0+0 thow plus 0000 a full thought maybe half a saw it back and forth about an inch seven times and you're holding tolerance again I'm not trying to say that this is a you know revolutionary CNC machine here I'm just trying to say with this inexpensive components in a relatively relatively flimsy construction we could do some really cool stuff so let's keep running with this and the introduction of the video I ran a bit intro decode let's take a quick look at that show you just how easy it is G 0 0 just means we're moving at the standard rate versus G 0 0 which is a rapid so we're just saying go G 0 0 go to Y 0 X negative 0 point 0 at a feed rate of 000 we'll get into what that means later then go back to y 0 X 0 and there's no reason for a space here other than my preference to see a break then go just over to the ex exactly here let's let's think to this so this should be the X moving at the same time and that should be as well now we're just going to go over the X then once we get to the x position of negative 0.0 we'll go up to in the Y and then it'll go over in the X and then we'll go back in the Y so this should draw a box versus this up here which is a diagonal then we go to a fixed position here of 0x of 0y if negative or seems to be X negative for y0 then we increment over and point to X's as you can see here four point two four point four or four point six and in between each one we have a pause g0 of pause 0.0 0.0 seconds so let's take a look at that now that you've seen the code and so we'll just go to browse sorter open and we'll run that code and you can see again we should have a diagonal first then it should draw a box and then from the home position it'll come somewhere here in the middle and index over a few times there's our box and then here's the indexing over pretty cool right folks so we know g-code works now we need to figure out how to make use of it so now we do need to get into some some math and it's not in any way hard but well there's just no choice about it so in the GUI and by the way folks I really appreciate a lot of folks recommended there are different and even better user interfaces for garble out there I need to check those out so let's talk about the map we need G code that makes sense in this in terms of how far the distance is to move so let's take a look at something we print dollar sign dollar sign enter we get the parameters that garble came with the most important ones are the first two and what that is is the distance per step you remember from the first video we had this little scratch excel file where we did some basic math and we sort we said that we knew it's 000 steps per revolution of the stepper and so if there's right now it's the garble set at 000 steps is 0 millimeter so to make the steppers go one revolution it would need to go G 0 0 X negative point-eight and that sure enough proved that the steppers went one full revolution which is great well now we've got a different factor we've got the factor that we're not driving directly from the stepper the stepper is driving a timing pulley the timing poise right here measure 0/0 of an inch on our dial calipers so math is pretty straightforward we just simply do pi times the diameter times the number of revolutions so 000 times one revolution times pi means one revolution of our stepper motor should move this one point one seven eight inches great let's see if that's true we've got the dial indicator back set up here got it on zero preloaded will go into garble and we'll just type 0 0 X negative point-eight enter and it goes past it goes to 0.00 so about 00,000 pass it here's the thing I'm actually not worried about that right now just to prove if we go back to 0 should be should be pretty accurate to 0 0 X 0 again will run right look at that folks right on 0 the reason it's
    going a little bit too far is that we're actually a little bit wider than 0/0 on our pulleys ok so we thought 000 revolute 000 steps which is we know is one revolution for sure would go one point one seven eight that's what I've got right here ends up that it actually went if we look back at the dial indicator about one point two five six so we'll put that in here so what that means in millimeters is thirty one point nine and so we want to know okay well if 000 steps is 00.0 then that means one millimeter is six point two six nine steps so when we go back to the garble setup file and we see this first line it's asking us how far should I turn a stepper to go one millimeter so we need to change that from 000 down to six point two six nine so we'll do that by just typing dollar sign zero equals it's here six point two six nine six point two six nine enter we get an okay we'll check our parameters by open





    them up again and boom there we go now if you're wondering wait a min here why do we go from 000 all the way down to six the answer is simple we're doing effectively a direct drive out put from the stepper to a timing pulley normally you'd be using a lead screw and a lead screw has a much finer pitch so you have to turn the motor a lot further to get the same motion but for us that was the same thing will hold true for the y-axis so we will do dollar sign one equals six point two six nine just quickly check that perfect but now we've got a problem if we say G 0 G 0 0 X negative point negative 0 millimeter and hit enter look it's got this nasty jerky motion to it it'll go a little further so you can see G 0 0 X negative 00 so we got to update a couple more settings real quick I went ahead and was playing around with this earlier so let's just look through what I came up with your default so we want to change we've already changed 0 & 0 obviously we want to go ahead and change 0 0 0 & 0 0 is one of the most important ones so we'll do 0 as 000 that's up from 000 and I think that was the big difference so dollar sign 0 equals 000 now we'll try G 0 0 X 0 my life 0 & 0 are big so 0 because 0000 dollar sign 0 equals 0000 okay now we need to type in the feed rate for the first time to force it to update and we want to go at 0000 F mm so G 0 0 X negative 00 F 0000 though look at that and then we'll go back to 0 I think you can now just type an x 0 no more need for the feed because it carries the feed forward and look at that were 0 mm shy we'll repeat that again still less than 0000 saw awesome now we're getting some water okay now our most important test yet in theory then if we go X negative 00 that's 00 millimeters it should go point 0 0 0 that's the inch equivalent which I have to use because my dial indicator is in inches so let's hop over here G 0 0 X negative 00 boom and let's take a look we are at 0 0 0 holy smokes volts for 0000 off nothing wrong with that that's sweet ok let's see if this thing we built worth anything I have got in SolidWorks a CAD model of my company's logo saunders machine works and for those of you that are watching this video but it may be new to my channel a lot of what I do is machining and CNC work so in fact we just started a series called choose your own CNC adventured where we had over 000 folks send in metal and plastic type of parts that they want to understand how they would be machined or manufactured so if you're interested in learning more about the process of machine chod would welcome you to either subscriber to check out some of those videos but what we're gonna do is we're gonna take this cad model and we're going to export it via this little button right here to sprutcam sprutcam is what creates the g code for the manufacturing process so again CAD is what you use to sort of build the house if you the architectural style cam is what you then do to say okay I need to cut here and drill here and nail here if you will so what we can do is we're gonna do what's called a 0d contouring operation which is going to just follow along 0d contours or curves or lines as you might think if for those of you had followed my solid or my spirit can videos you know I like to be sneaky and when how we select these lines and rather than mouse over each one and hold down control we can just turn off the surfaces view it from the front click alt or excuse me click and drag that now hold down alt and drag like so and now you've selected just the ones you wanted somehow we missed one hold down shift and you can finish that those few up and now you've got the geometry we need by just selecting curves I already did this in the operation right here look at some of the parameters tool won't matter because we have no z-axis or even a spindle here we want to run at 0000 millimeters per minute and again this doesn't matter only thing I did was I smooth out the arcs just so we didn't have as too much jerkiness so what this does is when you post-process it that's a process that involves sending creating g-code that's bespoke for certain types of machines that need different parameters to start and stop and so forth the generic code will work pretty much just fine so I'll click run and we get this g code right here now I need to delete this stuff in the beginning because garble it's just comments garble doesn't know what to do about that and then I needed to delete the this is a tool height position that's against custom to my machine not a big deal just I think there's one at the end I need to clean up and now this is a Cartesian basically Cartesian coordinate system that's called g-code that should let us use the garble to engrave or mark this logo so in Universal g-code sender we will browse we will open that file and then here's what's cool click visualize boom look at that that's pretty cool now hopping back to the machine itself what I did is I just cribbed up a piece of aluminum with a sheet of paper on top of it that gets me pretty close to the right height we'll see if give cut me some slack folks if this isn't 000% perfect because the point of this machine isn't to have a Z like this pen or an engraver we're gonna do one on that though here in a few weeks I'm so I'm hoping that this will come out okay but the idea is to use this sharpie to trace this logo on a piece of paper again folks we're talking about such an easy thing to build so inexpensive I think this is cool I've talked about at my channel before we live in a great era to have these tools at our disposal to be able to do this stuff I think is awesome so let's get this thing set up here so I'm gonna take the pin cap off what we're gonna see is it's going to be tracing though some lines around as it finds goes to a certain position so the logo isn't going to look perfect because we don't have a zero track again we could build one just not the point of this specific machine for me so let's see if this'll work here just come in from this side looks like my pens a little low pull up there we go okay so again bear with me folks because we've got some smudging I think I'm gonna have to just sort of put a little bit of tension on this so it doesn't move now let's see here I've got the file ready we're in the top-left corner which is where I want to start so I'm going to click send and then we can actually use the visualize box to watch along so without further ado send visualize here we go holy cow there we get a little bit of light pen it's okay here's the W oh this is actually working much better than I thought I thought the pen would be there I thought there would be more vibration or variants they were getting a little bit of a light line this is grateful holy cow this is a little jerky I got to work on that but that's it look at that folks in a few seconds it's like our little pimp water this has really been one of my favorite Wednesday widgets folks I was a kid I went to a museum in Columbus called kosai Sam's first Center of Science and Industry and they had a machine there was almost like a cuca type robotic arm and you could I think can't remember whether you could ask you to draw your neighbor it would just draw a pre-programmed name it was beautiful I mean a harmonic drive speed precision a lot more than this thing but nevertheless that made me as a kid know I want to build robots like that I want to be able to do that and in some respects I never got there because it's not what I do but look what we just did folks and you can do this too it's so easy it's but so inexpensive and it's awesome so I'm gonna keep running with this project as the hopper design we're also gonna be building one again with linear bearings that it's going to be much more rigid for actual cutting applications so stay tuned for that I want to thank tormach they're the sponsor in these videos they helped put these content out they helped allow me to dedicate the time to these videos they actually using the tormach vise is here to hold up the setup for just to make it rigid and easy for the videography so thanks to tormach if you guys are interested in this stuff please comment subscribe thumbs up share it with your friends it means a lot I remind that 00,000 subscribers which I'm is incredible to me I'd like to get to a hundred which seems insurmountable right now but I'm gonna try to keep putting out good content on Arduino and see and see and manufacturing and prototyping and we'll take it from there so with that folks take care stay well I'll see you soon [Music]