Adding Limit Switches to my Gatton CNC - Part 2

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey y'all welcome to the second half of my two-part series on adding homing and limit switches to my Gatton c and c now I'm going to start this by cleaning up a couple of messes that I left in my last video somehow I ended up leaving out all of the footage on connecting up the shielding wires in the shielding cable and I failed to mention where I got the limit switches or how I mounted them at all so before we get into the settings in Mach 3 for our homing and limit switches let me go ahead and clean up those messes right now okay here's a small piece of this shielded cable and I've gone ahead and I've removed some of the outer insulation so you can see now you've got a little bit of a fiberglass filament here for to help when it comes time to pull the wire then you have this metallic shielding that wraps up the wires but if you'll notice besides the red and the black you also have this bare silver conductor I don't know if you can see that or not just this wire right here that is the shielding wire that needs to be connected to ground at one and when you run your regular standard positive and negative cables to where they're supposed to go this shielding wire one end of it needs to be connected to ground also now in doing my research for this there were a couple of schools of thought some folks said yes you needed to do run this to an earth ground meeting you know a grounding rod driven six foot into the ground and then a cable run in and this hook to it but on this machine being made out of plywood you know we're not talking about lightning strike protection here we're talking about you know voltages we're talking about basically radio frequency interference we're not talking about any kind of real run through this so all we're doing is we're dissipating interference as it builds up so grounding this to the terminal strip that I have run down below is just fine in this case the important thing to take away from this is that this gets connected at one end only it does not get connected to anything at the other end if you connect it to something else at the other end you will create a ground loop and you'll be chasing electrical and electronic gremlins till the cows come home and those of you who live in areas that are totally devoid of cows you know how long of a wait that could be so connect it up at one end but do not connect it to anything on the other end it's there to absorb any kind of radio frequency signal that comes into it and run it down to ground that's all it's there to do okay for the limit switches for the mounts themselves these were sent to me by Andrew Hague over at the Old English workshop and he has posted them over on his Thingiverse page I'll put a link in the description box below to his Thingiverse page where he's put all of the files separately so you can go download them and either 3d print them yourself or have them 3d printed for you they basically consist of these blocks up here one on the front of the gantry and one on the back edge of the gantry and then these little bumpers up here and the switch will come forward and hit against this edge of the bumper and trigger the limit switch the distance for the y-axis and up here on the x-axis we have these bumpers mounted to the top of the gantry upright one on each end of the x-axis then we have this switch mount up here there's a switch on this side and a switch on that side and obviously they'll those switches will touch these bumpers and trigger the x-axis and over here is the z-axis now Andrew also sent me these bumpers to be mounted up here on the top of the top and down at the bottom of the Z box so that when the Z box goes down this follows it and triggers a switch that would be mounted here now I'm not running a lower limit switch and for the upper limits I chose instead to go ahead and trigger it trigger the switch off the top of my tramming plate here so that's my setup but these bumpers the files are over at Andrews Thingiverse page now if you don't have a 3d printer I will also go ahead and include a link to 3d hubs comm they're kind of an unofficial registry of people who have a 3d printer that would be more than happy to take on a job like this so that you can get a set of these made up for yourself so all of those links will be in the description box below and thank you once again Andrew I really do appreciate all of the parts and supplies and these cool motor spacers that you sent me now let's get into the computer get into Mach 3 and get these switches configured and rockin and rollin okay well startup Mach three so we can get in and get our limits which is set up now the settings here are fairly simple and fairly straightforward so the first thing we'll do is we'll go up into our config menu and we're gonna hit ports and pins okay we're gonna make a quick diversion here just for a second and go to motor outputs and that is just to confirm something if you look over here all the way over here on step port and Direction port in my case I'm using port one that's because I'm using my parallel port and this is why we're stopping here just to confirm you'll want to use the same port that you're using for your motors okay that's internal to the computer and mach3 knows to send through that port and the computer will recognize the signals that's all we're doing is just confirming which port on the computer we're using from there we'll go over to input signals tab right here and we'll want to go down here on the signal 4x + + X - - and the same thing for y + + + - - + x + + and - - make sure we enter that same port number here so mine is already set up now over here we'll see pin numbers and now it's time to enter the pin numbers that we physically attached our wiring to out on the CNC so in my case I have my X run to pin number 11 so I'm gonna put pin 11 in the plus plus and the minus - because we're wired in the series clips and we'll do here then we'll come down to the Y and on mine I have the Y going to pin 10 and do the same down here and then for the Z I'm on pin 12 now I'm only going to mark the Z plus plus on mine because I'm not running a Z minus limits which I'm not putting a limit switch on the bottom of my z axis now from here we need to look over and make sure we do not have a checkmark in active low and just to clear up a little bit of confusion some folks don't know what the active low actually means active low in Mach 3 means that the circuit is active at zero volts active high means the circuit is active at five volts or more we're running a normally closed circuit at +5 volts DC so we need to make sure active low is turned off all the way across here we should have red X's all the way through the column then here we should also have red X's all the way through the column all the way down the column and we should have nothing in the hotkeys it should be set for zero that's all there is now we can come back over here to this end and we can enable our zeep our excuse me our X plus plus limit our X minus minus and go just go down the line do the same thing for Y and then Z I'm not activating I'm not enabling the Z minus minus because I'm not running that switch then we'll come down here and click apply and click ok we got a reconfiguration he stopped we'll reset that now the next setting will come down here to config and we'll click Save Settings it's important and I'm going to keep doing this it's important to remember that save settings that command writes all of these changes to the XML file on the hard drive so that Mach 3 will remember these settings the next time you start it up if you don't go into config and click save settings every change you make effects this session of Mach 3 only and the minute you and you exit Mach 3 shut it down all those changes are lost so that's one of the most important things you'll do is click Save Settings right here okay now we'll go over here to the settings tab in Mach 3 and we're gonna talk a little bit about limits which overrides as it sits right now our slimmin switches are activated and they're ready to go if I should drive say for the sake of argument the z-axis all the way up and trigger that limits which Mach 3 is not gonna let me reset to drive off of that limit it's just stopped it stalled you're stuck so we need a way to override that limits which indication now there's two ways to do it there's the pain in the rear end way and then there's the easy way well I'm all about easy but I'll show you the pain in the rear end way first and that is to come out of program run here into the settings tab come down here and you'll see manual lib limit override then you can click this button and you'll see the red LED starts flashing that means you can now override that limit switch click reset and drive that axis off of the limit now you can keep it that way if you'd like but that simply means every time you hit a limit switch you're going to have to come in and do that in order to reset that condition and drive off the limit switch well there's an easier way to do it and that is to come up here let me go ahead and reset okay there's an easier way to do that here and this is auto limit override now auto limit override is the easier way to go simply because if you drive an axis to the limit switch trigger that limit switch it will Mach 3 will automatically override and allow you to click reset and drive off of that switch you don't have to come back into settings and hit manual limit override it will do it automatically it still stops the axis nothing like that changes the minute you drive on to that limit Mach three stops the motion of that axis you will have to come in and click reset to be able to drive off of that that limits which keep in mind is mach3 the system will not prevent you from driving that limit driving that access to the wrong way after you trigger trigger limit so if you're raising your Z up and you trigger the limit switch whether you use auto limit override or manual limit override it doesn't matter which Mach 3 will stop that axis let you know you've got a limit switch trigger then whether you reset it manually or automatically it will not prevent you from driving that axis up more so make sure you drive off of that limit not on to it further that's the only warning there ok so we've got a green LED here an auto limit override we can go back to the program run screen hit config and again save settings our limit switches are now set up they're active they're ready to go they're ready for us to test them on the CNC but we'll do that later on when we test homing and limits all at once okay when setting up the homing switches we're going to take a slight digression here and talk just a little bit about the Cartesian coordinate system now the Cartesian coordinate system is for our purposes right now and setting up homing it we just need to remember a couple of things X is left to right always Y on the screen is up and down out on the machine Y is toward the front of the machine toward the back of the machine X will always be expressed first Y second Z if it's expressed at all will be last those of you who were in the military and were trained how to read a military map know that you read that map right and up Cartesian coordinate system is very similar motion to the right is always a positive number motion to the left is always a negative number regardless of where you start so if you have a plot pointed here for just purposes of discussion and you plot another point back here you have moved in a negative direction even though you're still on the positive side of zero in this graph so it even though you're in positive territory motion to the left motion downward is still a negative move and that will become relevant here in just a couple of minutes but I wanted to get that out of the way for further explanation of the Cartesian coordinate system and how it relates to Mach 3 at the end of the video I'm going to recommend an excellent video by mr. Paul Campbell over a hit on his YouTube channel but I'll get into that a little bit later on we're going to complicate that matter just a little bit in Mach 3 in that we have two sets of coordinates now some of you have probably seen this and maybe even click the button a little bit just to see what it does when this button is not lit up we are in our work coordinate system meaning that the representation over here in our display is of our work piece of our work material when we click machine coordinates and you've got this lit up around the outside here you'll notice that my dro is changed this is the position the tools position in relationship to the entire CNC table these are the coordinates the machine uses to keep track of itself and know where it is in relation to our homing switches and that's basically all the Machine coordinates care about the system just is concerned with where homing is where the home switches are and this is more or less a set it and forget it type of a deal once you set your machines coordinate zeroes you shouldn't have to ever change them at all unless you're having a problem or you decide for some reason you need to do that usually you will be in work coordinates and you'll rarely if ever even be concerned with machine coordinates but to set up our homing switches that is important because you have a decision to make we'll get into that in just a second okay to enable the homing switches we'll need to go back up here into the configuration menu and come down here to homing and limits now right off the bat I'm going to suggest that we ignore the soft limit settings right here we ignore them for right now that's another video that's another topic and they're not strictly speaking necessary to use they're kind of a luxury it's a good thing to have but it's kind of outside of the scope of this video so we're going to ignore these three columns right here right now also you'll see here this reversed column this is used in your motor set up your initial motor setup anything you have in this column right here will not be changed so we'll ignore this column now as well what we're going to concern ourselves with over here is home- auto zero and speed okay here's where you have a decision to make there are other positions but to keep this simple you have a choice to make of whether you want to home your C&C either to the front left corner of the table or the right rear corner of the table its 100% up to you by default when Mach 3 starts homing when you come up here and you click ref all home when you start up Mach 3 by default Mach 3 is going to start moving in the positive direction which means that your Z is gonna rise all the way to the top of its travel and trigger the homing switch your X is gonna move all the way over to the right side and trigger that homing switch then your Y is going to move all the way to the back and trigger that homing switch so if you have red X's down here on your x y&z you are going to be homing your C and C to the right rear corner of the table if you would prefer to home it up to the front left corner of the table what you'll do is you'll come along and you'll put a check mark here in the home neg on the X and home neg on the y and that's all so if you put a check mark here you are going to home your x and y axis to the front left of the table if you shut these off you'll be homing your c and c to the right rear of the table once you get this set again this is usually a set it and forget it type of a deal unless you change your mind later on and decide you know what I made a mistake then you can come back and change these but normally you'll only set it up this one time so for me what I want to do is I want to home my C and see down here I will go ahead and leave both of these no I will go ahead and I'll check home neg on both of these now I want my z-axis to home to the top of its travel it's a positive number so I will leave that unchecked autozero we're going to go ahead and put a checkmark in all three auto zero boxes and the reason for that is when we click ref all home our machine coordinate dr.oz once my z-axis moves all the way to the top and triggers that button it will back off of that switch until the switch disconnects then set my dro to zero then it'll move on to the x axis move it over into the left until it hits that switch back off a little bit until that switch disengages then set this dro to zero and it'll do the same for the y move all the way to its position and engage then back off of that switch then set this dro to zero you want it to go ahead and automatically zero these D arroz speed percentage when you click ref all home the first thing that's going to happen is your Z is going to start moving first this percentage is the percentage of your velocity settings that you have when you setup your motors so in my case for instance I have my Z set to where my Rapids are a hundred and twenty inches per minute I know it's a short axis it'll never get up that high but that's the maximum amount that it's allowed to go with my percentage at 20 which is the factory default it will take 20 percent of that number so in other words when my Z starts homing it's going to start moving up in my case at 24 inches per minute conversely here my X&Y I have the rapids on those set at 200 inches for a minute 40 percent of 200 is 40 so they are going to move at 40 inches per minute so 20 is the factory default I see no reason to say to change that 40 inches per minute is not so that you'll be able to read a book while it's homing but it's not so fast that you're going to damage a switch or damaged an axis when it makes contact with that switch so I'm going to go ahead and leave these numbers as they are and click OK all right now we'll go back up into configuration menu go to ports and pins go over to input signals and now we'll take our X home turn it on we'll go to Y home turn it on we'll go to Z home and turn it on so these are now enabled but we now have to tell it which pin number we're working on and this will be the same as your limit switches so in my case I'll be doing 11 for my X 10 for the Y and whoops 12 for the Z and we are enabled across the board once again active-low turned off all the way down the column and emulated turned off hotkey 0 what am i doing here activate that ok all right so we've got our port we've got our pin number active low shutoff emulated shutoff nothing in the hotkeys we'll go ahead and hit apply then ok we'll go into a configuration reset we'll go ahead and clear that then go back to the config menu and save settings again so that it writes those changes to the hard drive okay now this next setting I'm going to show you is probably the single most important setting that we've got in Mach 3 for this now in my case my CNC is already nted to wear my gantry moves on the y-axis I have a master motor and I have a slave motor in my case the a is slave to the Y the way I have it set up right now I only set let me go back in here and show you put some pins input I have done nothing with the a axis down here there are no ports there are no pins there are no nothing we don't want to confuse the system but we want that a axis motor to turn when our Y axis turns so reset will go over here to config general config we'll come down here on the center in the general configuration corner go right down here to this little setting home slave with master axis and we'll put a check mark there if you do not put a check mark here when you go to slay when you go to home this axis your master axis motor will start turning your slave motor will not you'll start to hear creaking and cracking and rip that gantry apart if you're not fast enough on that emergency stop button putting this little check mark here homes the slave motor with the master motor on that axis this is probably the single most important setting that you're going to set make sure you do that whatever axis your gantry moves on you want that slave motor turning with that master motor now we're gonna do something else since we're in this screen right here we're gonna come up to input signal D bouncing and noise rejection okay now bear with me a second here you electronics guys already know about switch bounce and what it is and what to do about it for those of us who are not electronics guys I had to look into this and figure out what's what it means basically signal bounce is when you flip a switch to you and me it feels like a positive definite switch the switch clicks and the circuit is just closed inside that switch however there could be anything from pitting on the switch reads to some debris in there or what have you and even though we feel that secure positive click the reads in the switch are actually bouncing just a little bit and that can take I mean just a microsecond or two for that to for that bounce to indicate but the system is reading it as two engagements of the switch in not one so we'll need to filter that out and at the same time we'll be filtering out spikes of RF interference and the way we'll do that is we'll come up here to our D bounce interval and we're going to change this to 1000 now you see this over here times forty US us is a symbol for in this case microsecond and a microsecond is a one millionth of a second so what we're setting this for is any spike in signal through the cabling on our switches or any kind of a switch bounce will have to be longer than in our case forty thousand one millionths of a second now I know it sounds like I probably sounded like Charlie Brown's teacher to some of you non electronics folks folks and I sound that way to myself too but what this does is this filters out any kind of a spike in RF interference or any kind of a false indication from other forms of interference or even just a crummy switch by delaying that initial pulse of current or dropping current or a pulse increase in current through that cable now in researching this and checking it out it was recommended that 1000 is a good number to start with here if you start getting false limits which triggers or even false II stop triggers generally if you if you can find no problems no physical mechanical problems the switch is good the wiring is good you don't have any other troubles adjusting this number here is a way to filter out interference that are causing the false positives 1000 is the place is the recommended starting point you might have to adjust it up if it keeps happening some of the folks that I talked to in some of the forums they have theirs up in the seven eight nine thousand the overwhelming majority are sitting at one to two thousand so it's generally accepted to start with the lowest number first which would be a thousand and if but if you keep having false II stop or limits which triggers come back and adjust this if everything else checks out okay so the short answer to the long story here is put a checkmark slit in-home slave with master axes and put your deviance interval to 1,000 will click okay we will once again come up to config save settings now we'll restart Mach 3 after we restart Mach 3 and get it open to backup we'll go over to the CNC and we'll test our limit switches that will test our homing switches okay out here in the shed on the CNC we're gonna give you a mock three view of all of this first now I know I'm using a different screen set than most of you probably have but the screens are going to be basically good enough they'll be similar enough to where you'll be able to follow exactly what I'm doing the appearance may be a little bit different on your screen than on mine but everything remains the same I've got the computer fired up obviously I've got my controller turned on and everything is all set and ready and we're getting ready to test the switches now the first thing we want to do before we go any further at all is come over here to the diagnostics tab in Mach 3 and in this screen the area we're looking at is right up in here you'll see in this column here you have m1 plus limit then over here we have m1 minus limit than m1 home in this case m1 stands for motor 1 m2 stands for motor 2 & 3 motor 3 those are what we're concerned with here we have the plus limits the minus limits and the homing you'll notice these rows here there are no LEDs turned on there are none turned on at all that's the way it should be because none of my switches are engaged if I engage the Z limit you'll see motor 3 lights up yellow and the plus limit and the m3 home I also get a reset because that's a limit switch so I can come down here click reset and we have no LEDs showing at all if you have an LED showing in this screen and a switch is not activated if you're not on a one of your limits and you have an LED lit up over in this area here get in and check it out go back into your config ports and pins make sure you have active low turned off then if that makes absolutely no difference go check your switches check your wires you've got a short or something there these LEDs will light up when there's zero current running to them because we are running a normally closed circuit so if we're clear here we've got no LEDs lit up in this screen we're ready to go ahead and test I'll go back into my program we're on the screen and I'm in work coordinates you see I've got a little light here that says Machine coordinates are on or when it's off we're in work coordinates so I'm gonna test all three of my all of my limit switches right now and the first one I'll check is the Z which I know work because we just tested it but we'll check went ahead and clicked it we've got limits which triggered we've got the reset flashing and emergency mode activated so I'll come down here and hit reset now I'm going to check my X on one side here and I got a limit switch trigger so now I'm gonna reach up here and do the other side of the X and I got a limit switch trigger okay now I'm gonna check the Y this is on the front of the gantry we have a limit switch trigger and I'll check on the back of the Y and we have a limit switch trigger so we know our limit switches are set up correctly they work and they are ready and raring to go just to confirm I'm going to go ahead and run my Z up and trigger a limit so moving up moving up getting close and there we go the z-axis stopped moving I got a limit switch trigger and now I'll go ahead and click reset and because again because I set that at Auto limits which override I can go ahead and reset it and now drive my Z down to disengage that switch so I'll go ahead and I'll do that on the X and the y also but we'll move the camera so you can see what I'm doing okay let me start off by saying there's no real good position for the camera in here so pardon my back okay now I've purposely set my x-axis way over and I'm going to go ahead and I'm going to drive it on to that limit switch just to test it out and we shall see okay I ran it on to the limit the axis stopped moving I've got a reset here it's triggered a reset so I'll go ahead and reset it and drive it off the axis okay I'll go ahead and test my Z whoops wrong one and there's my Z limits which triggered go ahead and reset and drive it back down okay and the same is true with the Y I won't bore you with the details I've already tested the Y I know they work so now it's time to test homing knowing that I have good XY and Z switches on here we can do a ref all home on the screen meaning I will just click that ref all home and let it do its thing now because it's only moving at 40 inches per minute I'm going to go ahead and pre position them get them a little bit closer because I know my X is going to move in that direction there's no sense in waiting for it to move over there all the way at 40 inches per minute same is true with my Y I know it's gonna home to the front there's no sense in waiting for it to get all the way over there so now I'll step in click ref all home in Mach 3 and we'll let it do its thing I'm switching over my Diaw rose to machine coordinate and click ref all home my Z goes up my-y comes forward and my ex moves to the side and all of my dr.oz in machine coordinates have reset themselves to zero this is my machines home position now I'll move the camera let you have a shot of Mach 3 while I home it one more time ok again because we have such close quarters in here you may see the Z or the X moving but if you can see over here on my screen now in Machine coordinates I've got an LED lit up here my dr.oz are set to wherever the machine is I'm gonna go over here and click ref all home and we'll watch Mach 3 move and reset all my dr roads so ref all home the LED turns red on the Z the Z moves now the Y now the X and there's my router getting very much in the way but now you see what's going on let me back this out of here [Music] with the exception of my Y which I just moved in machine coordinates I have Z 0 I have X 0 and I've got green lights all the way down that tells me that everything has been 0 this session I'll switch back over now to work coordinates and we're ready to go ahead and load a project load some g-code mount the work material to the table and go so with the homing and limits which is tested we can put this one to rest I'm going to call that the end of this video now as promised earlier I'm putting a link in the description box below to the channel of a gentleman by the name of Paul Campbell now mr. Campbell has created some extremely good videos on setting up homing and limit switches that go much further in depth and both hard limits and soft limits on his limit switch videos then in the homing he starts getting into offsets and using fixtures with your C and C so I highly recommend you checking them out again I'll put a link in the description box below to his channel it's really worth the time well I'd like to thank you very much for watching what turned out to be another extremely long video y'all really have the patience with me and I appreciate it if you got anything out of this long old thing please give me a thumbs up down there I really do appreciate the thumbs ups and if you want to keep following along I've got a couple more things to do to my gat and C&C before I can start cutting on it consider subscribing to my channel whether you subscribe to me or not again thank you very much for taking the time to watch this and y'all take care [Music]
Info
Channel: Mark Lindsay CNC
Views: 22,765
Rating: undefined out of 5
Keywords: Add Limit Switches, Limit Switches, Homing Switches, Limit Switch, Limit, Homing, Switch, CNC Router, CNC, Router, CNC Machine, Gatton CNC, DIY CNC, Homebuilt CNC, Hobby CNC, Woodworking, Machine, Homemade CNC, Hobby, Homebuilt, Homemade, DIY
Id: s5Wn9MTqmVY
Channel Id: undefined
Length: 44min 36sec (2676 seconds)
Published: Wed Nov 01 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.