Author Topic: Limit switches for Small CNC Mills  (Read 33270 times)

Offline MadMax

  • Ewok
  • *
  • Posts: 2
    • View Profile
Limit switches for Small CNC Mills
« on: February 27, 2013, 22:21:40 pm »
Hi I'm new here & this is my first post.   I needed some limit switches for my Warco WM14 mill and the available ones seemed too large an too expensive so I designed my own.   The requirement was for a swich that was:
Physically small
Rugged
Sealed (for use with coolant)
inexpensive
easy to fit.

I used a sealed sealed microswitch available from CPC.farnell.com the part number is SW04705.
Then I designed a one piece machined aluminium housing to protect the switch and screw it to the milling machine.   The X axis swich is activated by both of the limit stops which came on the mill as standard.
For the Y axis switch I had to add two round limit stops of my own.   The mounting holes in the microswitch need to be tapped out M3.   Two M4 tapped holes need to be added to the milling machine castings to mount the switch housing.   On one axis I had to add a 0.5mm shim behind the switch housing to stop it rubbing on the moving X slide, I guess it depends on how your castings line up as to whether you will have to do this.   Both switches are mounted to the same casting, i.e. the one that moves up and down the Y axis slide bed, this makes wiring and controlling the wire path quite simple as you only have one cable section moving relative to the base.
Machine with a 3mm cutter, cut the front side fist then pick up on the screw hole datum to cut the back side
Hope someone else will find this useful.
« Last Edit: February 28, 2013, 19:26:36 pm by MadMax »

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4563
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Limit switches for Small CNC Mills
« Reply #1 on: April 08, 2013, 16:46:34 pm »
Many people just use cheap microswitches and some form of cam (lobe not software) to activate them.  The average microswitch is not waterproof or oil proof though.  On the other hand there are plenty of proximity switches that are, and there are even a few that are pretty reasonabley priced. 

http://www.cnc4pc.com/Store/osc/index.php?cPath=29_84

http://www.cnc4pc.com/Store/osc/product_info.php?products_id=422
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com

Offline joel.r1

  • Droid
  • **
  • Posts: 69
    • View Profile
Re: Limit switches for Small CNC Mills
« Reply #2 on: April 09, 2013, 15:47:06 pm »
Hi,
With cheap switches, I also faced the issue they triggered randomly when CNC machine was vibrating a bit during milling, causing a dummy 'out of limit' emergency stop.
Joel

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2678
    • View Profile
Re: Limit switches for Small CNC Mills
« Reply #3 on: April 09, 2013, 17:45:44 pm »
Must have been really very low grade :)
With mechanical switches there's the problem with contact bouncing and some minor trigger deviations still enough to bring an error if you zero the machine and reposition the tool on a job already in progress.
I've been thinking about optical switches with slotted optocouplers but with some kind of enclosure to prevent dust settling on the slots and activated indirectly (some short rod protruding outside).

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 9075
    • View Profile
Re: Limit switches for Small CNC Mills
« Reply #4 on: April 09, 2013, 18:04:35 pm »
ALL mechanical switches bounce.  But optical sensors may 'dither' unless they have built-in hysteresis logic.

The solution is to use edge-triggered de-bounce circuitry on any switch of any type.  One should always do this.  I might even say "must" do it, in order to ensure reliability.  A de-bouncer can be as simple as an R/C circuit (not recommended, because they're slow), or flip-flop (fast).

If using a flop, limit switches should be double-throw varieties (most micro-switches are), so that the 'unswitching' clicks the flop back to its un-set state.

LLoyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline MadMax

  • Ewok
  • *
  • Posts: 2
    • View Profile
Re: Limit switches for Small CNC Mills
« Reply #5 on: April 13, 2013, 10:47:56 am »
The switch I have specified is a quality sealed to IP67 and has a lever arm cam follower built in.  they cost about £5 from CPC.  I am using it with soluble oil coolant and they've been fine for the last 4 months.  Yes there are some quite low cost tailor made limit switches available but the main thing is that my design fits the space available on my small mill.   If I had a larger mill or was using my mill to make money I would fit something bigger.   
I agree with Joel, all mechanical switches create a 'splash' as the contacts make or break so the signal has to be debounced either electrically or in software.   Optical proximity sensors can also produce signal jitter at the point of switching but almost all of these debounced internally by a hysteresis cicruit so the end user does not see it.
I've not tested the accuracy of these switches, but they seem OK for my level of machining.

I will test them and post it here.

Offline Jeff_Birt

  • CNC Jedi
  • *****
  • Posts: 821
    • View Profile
Re: Limit switches for Small CNC Mills
« Reply #6 on: April 13, 2013, 12:31:48 pm »
A lot of folks get really excited by the accuracy if switches/sensors used for homing. The advantage of having home sensors is that you or CNC control program can know where each axis is physically so it can prevent you from overrunning an axis. No matter what type of switch/sensor you use it won't be really accurate by itself. Mechanical switches are typically the worst, optical sensors are good but get dirty and useless very quickly. My favorite is proximity sensors, no moving parts, sealed and very reliable.

Since the work piece is moved all around on a mill having a dead accurate homing sensor is typically not an advantage. To get really accurate homing if you just 'have' to 'have it you can use a combination of your home sensor and the index channel of the axis drive motors encoder. When the axis sensor is triggered and then the index signal is seen the controller will see this as a home signal. You CNC controller has to be able to do the required logic internally or you will have to add an external circuit.

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 9075
    • View Profile
Re: Limit switches for Small CNC Mills
« Reply #7 on: April 13, 2013, 13:57:33 pm »
Exactly right, Jeff.  I know of no 'intelligently designed' CNC equipment that uses limit switches for anything but sensing that they are 'close' to home.  Home is some arbitrary and always changing distance to the encoder's zero index (or stepper's zero position) AFTER the limit switch has been sensed.  Even with proximity sensors, chips, oil, and other goo will slightly alter when 'close' is sensed -- perhaps only by a couple of tenths of a thousandth, but still different over time.

LLoyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4563
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Limit switches for Small CNC Mills
« Reply #8 on: June 21, 2013, 18:51:50 pm »
There is a debounce setting in Mach that may help also. 
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 9075
    • View Profile
Re: Limit switches for Small CNC Mills
« Reply #9 on: June 21, 2013, 21:19:36 pm »
"Debouncing" a switch only covers the mechanical dither (bounce) of the contacts.  A switch can close at different times, almost arbitrarily.

But for example, take the time when the switch is pushed by it's detenting block.  Now glue a chip to that block with a drop of oil -- it changes now a a different point, depending upon the thickness of the chip.

On my machine (at least the way I work), it's extremely important that home be accurate to a tenth.  I often must abandon jobs for a day or two, then resume where I left off.  If home isn't "home", I'm screwed.

My machine uses massive industrial limit switches, but only uses them to find "close to home", then uses the servo encoders' wheel index marks to find 'true' home.

LLoyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline Jeff_Birt

  • CNC Jedi
  • *****
  • Posts: 821
    • View Profile
Re: Limit switches for Small CNC Mills
« Reply #10 on: June 22, 2013, 11:39:44 am »
I have accumulated some common switches used on hobby type CNC machine for home/limits switches and have scrounged up the business end of an old micrometer. I plan on mounting each switch to a bracket on a tooling plate and recording its opening closing position over several cycles, temperature changes, to see if vibration can set on off when it is very close to triggering, etc.

I hope this will provide the evidence to show newcomers what to expect and NOT expect from limit/home switches.

Offline Garyhlucas

  • CNC Jedi
  • *****
  • Posts: 1470
    • View Profile
Re: Limit switches for Small CNC Mills
« Reply #11 on: June 27, 2013, 00:48:11 am »
"Debouncing" a switch only covers the mechanical dither (bounce) of the contacts.  A switch can close at different times, almost arbitrarily.

But for example, take the time when the switch is pushed by it's detenting block.  Now glue a chip to that block with a drop of oil -- it changes now a a different point, depending upon the thickness of the chip.

On my machine (at least the way I work), it's extremely important that home be accurate to a tenth.  I often must abandon jobs for a day or two, then resume where I left off.  If home isn't "home", I'm screwed.

My machine uses massive industrial limit switches, but only uses them to find "close to home", then uses the servo encoders' wheel index marks to find 'true' home.

LLoyd

On an old bandit my Home position was on a PostIt, stuck on the control box. I'd find my home position for a job then look at the manual dials on the screws and write down the values for X, Y and Z.  The dials were big so I could easily split the distance between marks to a couple of tenths. I'd just jog the machine back to those positions and zero everything.  Made the mistake of not installing dials on the machine I just built.  Would have been nice if the motor coupling were larger in diameter so I could just add a pointer and scribe an index mark on the coupling. I might add a disk for that purpose.
Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/