# Limit/home Switch Repeat Ability In Home Cnc



## Metal (Apr 5, 2016)

So I'm putting together my bridgeport, going to probably get the oiler and knee on this week/end.

It's time to start thinking about the CNC stuff I'll be putting on it.

On my previous cnc project, I used kind of garbage amazon switches which were a pain in the butt to setup.
On this one, I'd like .0005 or better repeatability , Ideally I'd like to be able to have my vise jaws a known distance from all three axis's zero so I can get something remotely sort of resembling a production run without having to edgefind every time I move the part

So anyways, with some googling, I havent really been able to find a whole lot of information on specifics, It appears that long-arm mechanical switches are the way most people go for this sort of thing, I'd prefer to make a little box with roller switches in it, and have the mill axis interact with that rather than directly with the switch (for cleanness mostly)

What switches are you folks using and how accurate are they?


----------



## JimDawson (Apr 5, 2016)

I have never seen a limit switch that would hold that kind of repeatability.  They may exist but are not common.  Use slow acting switches rather than snap action, they are much more repeatable.  I normally use a direct acting, roller actuator type switch, and actuate it with a 15° cam.



On the mill I don't use home switches, only overtravel limits.  When using the vice for multiple parts, I normally edge find the jaws, then offset the zero to where ever I need it to be, rather than set a zero from fixed machine coordinates.  I also set a ''parking position'' where the Z is retracted to a safe position, then the X/Y moves to the parking position at the end of an operation.  This is set up somewhere so it gets the tool off of the work to facilitate a tool or workpiece change or to allow room to take a measurement.  The parking position can be anywhere in the working envelope of the machine.  During the run, you never lose your zero unless there is a power fail or in the case of open loop steppers, lose steps.

On the router, I do use home switches to set the initial zero position for the X/Y.  This just parks the table with the tool centered on the top right corner.  But I am not interested in extreme accuracy at that point, it's just a starting place.  I normally makes no difference if the start point of the work is +/- 1/16 or so because I always leave excess material for removal.


----------



## Metal (Apr 5, 2016)

well, it also helps if I dont move the decimal point too far! I was actually looking for .005 accuracy 

The closest thing ive found has been these, which are probably doable, but I'd prefer not to trust my meat fingers soldering together something that will prevent a crash (theoretically) as I'm actually a celebrity, the worlds worst solderer. 
http://www.cnczone.com/forums/open-source-cnc-machine-designs/101878-cnc-forum.html

otherwise I've found a few proximity sensor kits, which are in the hundreds of dollars, i'd rather not bite /that/ bullet, but i have seen some clever enclosures that combine the +/- switch into one so you'd only need 3


----------



## JimDawson (Apr 5, 2016)

0.005 is proabaly in the realm of possibility.  Depending on how your machine as configured and what software you are using, 3 switches makes the most sense.  That is exactly how my machine is set up.  One switch on X, one on Y, and one on Z.  The switches are mounted in a fixed position, and there is a cam at each end of the travel that actuates the switch for the X & Y.  On the Z, the switch is buried in the quill stop plunger system and uses the stock quill stop hardware to actuate.  The switches are wired active low (normally closed) so that in case of a wire break it looks like a tripped switch to the computer.  I would not use any electronics in the limits, just standard limit switches.  They are pretty bullet proof.

If you are using Mach3, you can tell it to use the travel limits for a home switch when homing.  Other software I don't know about.  Again, on a mill, I don't see a need for a fixed home position.  To get extreme home accuracy, it is common to home to a switch, then move to the encoder index pulse to set the actual home position.  This takes the switch accuracy out of the equation and provides a very repeatable position.


----------



## Metal (Apr 5, 2016)

Yeah that is how I have my current cnc wired, except with 2 switches per axis since they were cheap.

I'll poke around in mach3, I was "hoping" to have a higher jog speed which ramps down to more reasonable/accurate speed after pressing a first switch and approaching the home switch so that homing doesn't take quite so long, but some googling i'm not finding anyone that has done it that way (mach3 by default trips the switch, overruns a small amount and then backs off until the switch unsets, where it sets home, i'm not sure overrunning with a bridgeport like that and all that inertia is a good idea, but i'd also like finding home to not take /forever/ as the huge table makes its way over to it.

my concern overall is that with this conversion I'm not going 100% cnc, I'm leaving the handles on, so a handle bump might throw the whole thing off (and backlash concerns) so having an accurate home would be nice, a known rest position could also work if I wasn't so concerned about something moving on me.


----------



## JimDawson (Apr 5, 2016)

There is a way in Mach3 to get it to rapid to a position near home, slow down, and then find home.  There is a setting in there somewhere, I have done it, but I don't remember exactly what the setting is.  This only works if your DRO is pretty close to the real world, for instance, it won't work on a cold start.


----------



## jbolt (Apr 5, 2016)

I'm using proximity sensors from Automation Direct on my mill and router. Repeatablity is within 0.001". Took me a while to get it right. What I learned is the sensor targets need to be at least the size of the sensor face or larger and the gap set to within the specification of the sensor. They work best when the sensor face moves at the target but this would require two sensors per axis. When using a single sensor that moves across the target from the side I found I get the best results when the target has a sharp straight edge vs round(ed). I use one switch for each axis with two targets. Other things that help are having very low or no backlash, and on my mill having the dovetail gibs properly adjusted and use quality way oil. The sensors/targets need to be protected from swarf, coolant etc.


----------



## mksj (Apr 5, 2016)

Agree with Jbolt, I have been using the AutomationDirect proximity sensors as a VFD electrical stop, repeatablity is better than 0.001" at the same feed rate, but the stopping point will change if the feed rate is significantly changed. They need a metallic, preferable steel stop to be parallel to the sensor face for maximum sensitivity. AD has various P sensors, most are under $50. I have been using, PFK1 series, 8mm range, shielded, and a high sampling rate of 1.5Khz, either the PFK1BP-3H or PFK1BN-3H. I use mechanical limit switches for some applications, they do not have the repeatability and reliability of a P sensor.


----------



## Metal (Apr 6, 2016)

Thanks for the info!
for my research what breakout board are you using ? since parallel voltage is 5.5v at best and these take 10v at minimum I'm assuming either you're using something more advanced than I used previously or there's another board inline with the switches.


----------



## RJSakowski (Apr 6, 2016)

Metal said:


> So I'm putting together my bridgeport, going to probably get the oiler and knee on this week/end.
> 
> It's time to start thinking about the CNC stuff I'll be putting on it.
> 
> ...


I was concerned about poor repeatability with the Tormach mechanical limit switches.  I installed an optical homing system and can routinely get +/- .ooo1".


----------



## jbolt (Apr 6, 2016)

Metal said:


> Thanks for the info!
> for my research what breakout board are you using ? since parallel voltage is 5.5v at best and these take 10v at minimum I'm assuming either you're using something more advanced than I used previously or there's another board inline with the switches.


Both machines have PMDX-126  breakout boards with PMDX-107 spindle control add-on boards. The PMDX-126 is powered by 110vac or 220vac and has 12 vdc on the board to power the proximity sensors. Otherwise you could use a separate power supply for the sensors.

Not sure what your looking at for motion control. My mill uses an Ethernet Smooth Stepper motion controller which mounts directly to the PMDX-126 and the router uses a UC100 USB motion controller. The UC100 works okay but will occasionally loose connection which is really frustrating. Eventually I will replace the UC100 with another Smooth Stepper.


----------



## Metal (Apr 6, 2016)

I've been looking at copley servo amplifiers, since I already have two beefy servos and encoders, and they are surprisingly cheap: http://www.copleycontrols.com/Motion/pdf/412.pdf

I'm not sure if I am going to have the Z axis be the quill, or the knee (I'm leaning towards knee since quill runout looks like a thing, but ive seen people suggest both) and will eventually build a 4th axis.


----------



## JimDawson (Apr 6, 2016)

The Copley amps look like a good choice.  You just need a motion controller that is compatible with the inputs, outputs, and your choice of CNC controller software.


----------



## Metal (Apr 6, 2016)

Yep, I'll shop around tonight but i'd like to get this nailed down soon, steppers were easy in comparison and I have no way of testing the encoders on these servos so I want to keep this as cheap as possible, if I have to upgrade to more accurate/featured electronics later I'm fine with that, but going all in on expensive controllers and then get stuck buying new servos may put me way over budget.

Or I could sell these things and just go steppers again...


----------



## JimDawson (Apr 7, 2016)

Many motion controllers will run both steppers and servos.

The encoders can be tested with a scope, it is also possible to test them with a Fluke 87 multimeter in Hz/% mode.  Normal input voltage to the encoder is 5VDC.

A 12 volt battery will run the servo motors just to confirm that they work.

This is just my opinion, but I would (did) put the Z on the quill.


----------



## Keith Foor (Apr 7, 2016)

RJSakowski said:


> I was concerned about poor repeatability with the Tormach mechanical limit switches.  I installed an optical homing system and can routinely get +/- .ooo1".



Yes, the only way to get that level of  repeatability is via optical sensors.  Some DRO scales are actually optical and you know what the repeatability is them.  Trick is if you are going to do a DIY setup you need the Stops to be almost centered on the machine and have a sliding bar with holes that are very small that the detectors are reading through.  The setup would need to block the light unless you were at the stop as opposed to allowing the light all the time its' not at the stop.


----------



## Metal (Apr 8, 2016)

JimDawson said:


> Many motion controllers will run both steppers and servos.
> The encoders can be tested with a scope, it is also possible to test them with a Fluke 87 multimeter in Hz/% mode.  Normal input voltage to the encoder is 5VDC.
> A 12 volt battery will run the servo motors just to confirm that they work.
> This is just my opinion, but I would (did) put the Z on the quill.



Yeah i can confirm the servos spin, one seems a little rougher so I may replace the bearings in it
For the controller I'm eying this guy, which comes highly recommended and appears to have all the features I could want http://www.pmdx.com/pmdx-126


----------



## JimDawson (Apr 8, 2016)

Metal said:


> For the controller I'm eying this guy, which comes highly recommended and appears to have all the features I could want http://www.pmdx.com/pmdx-126



I'm not seeing a way to connect encoders or get +/- 10V outputs to command the servo drives.  Maybe I missed something.


----------



## Metal (Apr 12, 2016)

Hey one more question: would putting LED's inline with limit/home switches so that I would know which one is tripped cause any sort of issues you can think of?


----------



## JimDawson (Apr 12, 2016)

That could be done, but normally you can visually see which switch is tripped.  The exception to this might be in the case of a switch failure or a broken wire and the switches are wired in series.  Would aid in troubleshooting, but not really needed in normal operation.  It might take a little electronic logic to get the LEDs to come on properly without tripping the input.

Depending on which controller or breakout you are using, it may have individual inputs for all of the switches so the state could be monitored via the computer screen.
.
.


----------



## Cadillac STS (Apr 14, 2016)

For home shop I would not use home or limit switches and instead put all the money and time you would have spent on that into the best positioning probe you can get.  The probe will set the location for starting your cut and that is most important.  You can start and stop the cutter somewhere convenient to get to but doesn't matter if it is .0001 of "Home" every time.  And home CNC is usually one part at a time with you there to see it so you always have the emergency stop button if something is way off.  Any type of eyes off CNC is a different story needing safety limits but if you are there they are not necessary.  A really good probe is key though.


----------



## JimDawson (Apr 14, 2016)

Cadillac STS said:


> For home shop I would not use home or limit switches



I agree about the home limits on a mill, but I would not run my machine without end-of-travel safety limits.  If something goes horribly wrong, this provides an extra level of protection for the mechanical components.  Plug in the wrong sign or slip a decimal point on a rapid move and you'll see what I mean.  You can't get to the e-stop fast enough, ask me how I know
.
.


----------



## Metal (Apr 14, 2016)

I do have an okay probe, but I won't go without limit switches, I'm relatively competent, but I'm not going to risk a ton of work and money because I didnt feel like spending a few bucks on switches.

I feel like 6o bucks or so on home switches is a safer investment than many hundreds on a quick change that i'll probably want soon after having to constantly probe 

I generally re-zero or edgefind all the time with my small benchmastermill, unnecessarily probably but it was good practice, if the BP holds location much better, which it should, it should be a lot less annoying


----------



## steve323 (Apr 14, 2016)

Cadillac STS said:


> For home shop I would not use home or limit switches and instead put all the money and time you would have spent on that into the best positioning probe you can get.  The probe will set the location for starting your cut and that is most important.  You can start and stop the cutter somewhere convenient to get to but doesn't matter if it is .0001 of "Home" every time.  And home CNC is usually one part at a time with you there to see it so you always have the emergency stop button if something is way off.  Any type of eyes off CNC is a different story needing safety limits but if you are there they are not necessary.  A really good probe is key though.



Are you suggesting a 2 stage set of switches?  Use the high quality positioning probe to set the accuracy, but add a set of cheap over-travel switches to protect the machine if something goes wrong.  The over-travel switches can be wired in parallel (or series) and a single trip would shut down the machine.  You could use an over-travel switch at both ends of each axis, so 6 switches for a typical machine with XYZ axis.

Steve


----------



## chevydyl (Apr 14, 2016)

I agree with Jim about travel limits, I mean take my machine, with slow 100ipm rapids, BUT there is 12lb-ft of torque at that speed and about 4 hp on the screws
Most hobby or home shop machines won't have that much power but bet it will break something


----------

