PDA

View Full Version : Proximity switches or limit switches



chillybo
08-12-2019, 02:14 PM
Hi everyone.
I'm at the stage of my build where I am about to buy electrical items. Could anyone cast any light on the differences between proximity switches and limit switches? Where would one be chosen over the other, advantages and recommendations.
My design is s 4 foot by 2 foot gantry style router made from aluminium extrusion.
Regards Chris.

cropwell
08-12-2019, 04:27 PM
A proximity switch is a type of switch. A limit switch is a designated use of a switch. Limit and Home switches can be either electronic, like a proximity switch or mechanical, like a microswitch.

My personal preference is for Homing using proximity switches and Limits using microswitches.

chillybo
08-12-2019, 05:13 PM
Thank's, cropwell so you have separate switches for homing and limits? From what I've gathered you can use the limit switches also as home switches (the home command initiates the desired directions of each axis). Is your design based on increasing safety / reducing risk of damage to the machine? As in the limit switches are placed slightly beyond the position of the home switches.

cropwell
08-12-2019, 06:02 PM
I think design is a bit of a strong term to apply to my machine. I bought it from a company in Devon!. It came with proximity switches to act as homing reference only. These were mounted axially and I found it too easy to jog into them and crush them. So I went mad and put X++, X--, Y++, Y-- and Z++ homes and limits mounted so they operated by the axis traversing the switch. At the moment I have only one set on each axis as I had a wiring fault and disabled them temporarily (about a year ago!!)

JAZZCNC
08-12-2019, 09:46 PM
Thank's, cropwell so you have separate switches for homing and limits? From what I've gathered you can use the limit switches also as home switches (the home command initiates the desired directions of each axis). Is your design based on increasing safety / reducing risk of damage to the machine? As in the limit switches are placed slightly beyond the position of the home switches.

The main advantage of using separate Limit switches is that you are protected while Homing. When the switches are shared for both Homing and limits then Limits are Ignored While Homing so it's not quite as safe.
That Said the advantages of using Shared switches, Esp if you use Single switch that travels with axis and searches for Targets at each end of travel is much simpler wiring with less chance of wiring errors, Also lower costs.

Regards which switch type to use then it's a personal choice. My personal preference is the Proximity switch because they are accurate and cheap. Also simple to mount.and don't have some of the issues mechanical switches can have.

cropwell
08-12-2019, 10:32 PM
That Said the advantages of using Shared switches, Esp if you use Single switch that travels with axis and searches for Targets at each end of travel is much simpler wiring with less chance of wiring errors, Also lower costs.

AND I would add, less to go wrong over time.

chillybo
09-12-2019, 09:53 PM
Ah right, so would this be a proximity switch that could be mounted midway between say a gantry side. So its a single switch that detects a metalic reference point as it travels to the side of it at the ends of each axis. Or is there also a mechanical switch that could do this?
I like this idea it makes a lot of sense.

chillybo
09-12-2019, 09:59 PM
Thanks for this Jazz this makes a lot of sense and gives more flexibility of where to locate the proximity switch on my machine.

JAZZCNC
10-12-2019, 11:26 PM
Ah right, so would this be a proximity switch that could be mounted midway between say a gantry side. So its a single switch that detects a metalic reference point as it travels to the side of it at the ends of each axis. Or is there also a mechanical switch that could do this?
I like this idea it makes a lot of sense.

You can use the same approach with simple mechanical switches but they tend to slide over a ramped trigger plate to prevent damage to switch. Or you can buy Lever type mechanical switches with end stop that flicks the lever.
Proximity switches are my preferred switch type because they are none contact cheap and simple to use and fit.

chillybo
11-12-2019, 11:29 AM
I will probably use proximity switches for homing and mechanical switches for limits just to add another layer of protection. Im not sure if I should buy normally open or normally closed proximity switches. My controller is the CSIO IPM and I'm using Mach 3. If I set the limit input to accept a normally closed circuit and the home / proximity switches to normally open on a different input to the controller would this work?
Thanks in advance...

Kitwn
11-12-2019, 12:41 PM
The danger with normally open switches is that a bad connection doesn't show up until your machine crashes straight through them. They must be connected in parallel. Wiring faults with normally closed switches will show up immediately. They need to be connected in series.


Kit

JAZZCNC
11-12-2019, 06:52 PM
If your taking this route using separate mechanical Limits to homes then Go with NC for the Limits and wire in series using just 1 input like as been suggested.
For the Homes, it doesn't really matter because you can set Mach3 to see trigger when goes low and you will need them on separate inputs for IP/M to see them. My pref is NO for Homes.
Also, note You cannot wire the Home switches in series with the IP/M controller and use 1 input for all the homes like can be done with some Mach setups.

I'm going to guess at your next question regards Proximity which will be NPN or PNP. It doesn't matter is the answer because the IP/M will allow you to use either. NPN tends to be more available than PNP, esp in NC type.

chillybo
11-12-2019, 09:05 PM
Thanks Jazz. Have just had a NPN normally closed proximity switch delivered from Amazon. Im guessing then that with this device I would set the input for it to active high? Im going to have a play with it at the weekend. I have wired a couple of steppers and drivers up to the IPM to get them moving and to get familiar with Mach and the hardware. I'l connect the proximity switch up and see how it works. The electrics and the machine haven't come together yet.

JAZZCNC
11-12-2019, 09:38 PM
Thanks Jazz. Have just had a NPN normally closed proximity switch delivered from Amazon. Im guessing then that with this device I would set the input for it to active high?

No that would be Active Low.
Because the type is N/C Mach sees the signal all the time(High) and when signal disappears (low) the pin goes active. So it's (Active Low)
If it was N/O type it would be the reverse. The pin is low and goes Active when the signal is High. (Active high)

Word of caution with the IP/M and it's inputs. They are Non-isolated which means the don't tolerate being miss wired so before you go connecting anything up to them be sure you fully understand what your doing, they don't take prisoners.!

Neale
11-12-2019, 09:53 PM
Actually, taking each home switch into separate inputs on the CSMIO isn't a big issue as it has plenty of inputs available. It also means that you can set Mach3 to home more than one axis at a time, which saves a bit of time on a larger machine. I home Z by itself (to get it to highest level above bed) and then X and Y together.

I also use proximity switches for combined home/limits although I have wired upper and lower limits in series on each axis partly to save one input channel but also to reduce wiring through cable chains a little. You have 24V available and proximity switches in series work fine with that. Because they are also limit switches I use NC throughout for the safety reasons mentioned.

chillybo
13-12-2019, 11:39 AM
Nice one. Thanks for explaining this Jazz

chillybo
13-12-2019, 06:42 PM
So before i attempt to wire a mock home proximity switch into one of the the inputs can anyone please confirm I am understanding the wiring correctly. The brown wire from the proximity switch should be wired to positive side of the 24 PSU that supplies the IPM. The blue wire is wired to the negative side of the same PSU. The black signal wire then goes into one of the inputs on the IPM for instance pin ten. Then I designate pin 10 as the home input (X in this case) and set the pin to active low as in the picture. Is this correct? Thanks in advance

2686326864

Neale
13-12-2019, 07:08 PM
I can't comment on the switch wire colours without a diagram in front of me, but you do need to take a wire from the -ve pin for your chosen input to the common negative - on the IP/M both sides of the inputs are floating. In Mach3 I seem to remember that you need to select the correct port as well as pin - can't remember it offhand but I think it's either 1 or 10. It's in the manual. Also, be very careful with pin numbering - it's not quite what you might think! Mach3 input 10 is actually physical pin 11 on the CSMIO and its corresponding negative connection is pin 24. Again, this is all in the manual but it's easy to miss (don't ask me how I know, etc...)

JAZZCNC
13-12-2019, 08:47 PM
I can't comment on the switch wire colours without a diagram in front of me, but you do need to take a wire from the -ve pin for your chosen input to the common negative - on the IP/M both sides of the inputs are floating. In Mach3 I seem to remember that you need to select the correct port as well as pin - can't remember it offhand but I think it's either 1 or 10. It's in the manual. Also, be very careful with pin numbering - it's not quite what you might think! Mach3 input 10 is actually physical pin 11 on the CSMIO and its corresponding negative connection is pin 24. Again, this is all in the manual but it's easy to miss (don't ask me how I know, etc...)

You are using NPN type switch so what you actually need to do is Take the Black signal wire to the (-) input and run 24v+ to the (+) input.
The port in Mach3 is 10 and select the input number, not the Pin number because as Neale says they are numbered differently.

chillybo
13-12-2019, 10:38 PM
26867 Thanks Jazz and Neal. Should it be like this then?

JAZZCNC
14-12-2019, 01:27 AM
26867 Thanks Jazz and Neal. Should it be like this then?

Yes that's correct.

chillybo
14-12-2019, 01:13 PM
So I have wired the proximity switch as per my diagram and it seems to be working as an E stop rather than a home switch. Its very confusing. Although its an NC proximity switch it seems to be working the opposite way round. When no metal is near the sensor the light on the back of it is on and the message external E stop requested appears and I can not reset Mach 3. If metal is placed near the proximity sensor the light goes off and I am able to select reset and I can jog. As soon as I remove the metal object the steppers stop and the reset button is activated again.
To my mind its as if its set up as an E stop and its acting as a normally open switch. Confused.com
Anyone have any ideas?

chillybo
14-12-2019, 01:47 PM
Despite all of this when I go into diagnostics the proximity switch is identified as a home switch as per video

https://www.youtube.com/watch?v=nb6dIlxtino

JAZZCNC
14-12-2019, 05:26 PM
So I have wired the proximity switch as per my diagram and it seems to be working as an E stop rather than a home switch. Its very confusing. Although its an NC proximity switch it seems to be working the opposite way round. When no metal is near the sensor the light on the back of it is on and the message external E stop requested appears and I can not reset Mach 3. If metal is placed near the proximity sensor the light goes off and I am able to select reset and I can jog. As soon as I remove the metal object the steppers stop and the reset button is activated again.
To my mind its as if its set up as an E stop and its acting as a normally open switch. Confused.com
Anyone have any ideas?

Switch the active Lo and it will work correctly. Why it's throwing e-stop I'm not sure, the only reason I can think of is that the E-stop input# is set to same as Limit input #.
The light is on because it's NC and should go out when tripped.

chillybo
14-12-2019, 07:41 PM
I managed to get it working and its acting like a home switch now. Jazz I think your right about it having something to do with the E stop input. When I scrolled down and looked at the E-stop port it was not set to port 10. I set the E stop to port 10 (because I'm only experimenting with the electrics and Mach to find out how things work there is no physical E stop). Anyhows if i jog forward and then press home the stepper reverses and when I put a screwdriver near it it stops and rotates the opposite direction briefly. So thats me gaining an understanding of this part of things thanks of everyones advice on here.
Thanks.

chillybo
15-12-2019, 11:51 AM
https://www.youtube.com/watch?v=AvlpkAbFUgY

I think its time to ask Santa for a control cabinet.

chillybo
21-12-2019, 01:48 PM
26925

I 3d printed a mount.

Thanks again for all the advice.

cropwell
21-12-2019, 03:14 PM
You may wish to revise the end-on approach, the first time you jog into and crush a switch. Don't ask me how I know. They work just as well when the profile just glides in from the side.

:biggrin:

Rob-T

Clive S
21-12-2019, 04:11 PM
You may wish to revise the end-on approach, the first time you jog into and crush a switch. Don't ask me how I know. They work just as well when the profile just glides in from the side.

:biggrin:

Rob-T

+ one

chillybo
21-12-2019, 06:19 PM
Hmm, I could mount it sideways on. Im planning on using it as one of the home switches and just using mechanical switches for the limits that I would mount on the other side.

chillybo
21-12-2019, 10:30 PM
Cropwell I've just been playing with the homing function and guess what? I did manage to run into the proximity switch. No damage though because I had my cursor on the reset button in Mach 3 and the switch mount wasn't fastened down. What I can't understand is why is the proximity switch detecting the gantry, stopping and backing off as it should but then moving forward crashing into the proximity switch. Could it be because I haven't set my steps per mm properly yet?

pippin88
22-12-2019, 01:56 AM
Long time since I've used Mach 3, but likely you have the direction of the final homing move or the position of the switch (in software) set wrong.

Mach 3 thinks it needs to do a final move in that direction.

I could solve it if you were using LinuxCNC.

cropwell
22-12-2019, 02:10 AM
Jogging seems to ignore home switches.

Kitwn
22-12-2019, 11:16 AM
Jogging seems to ignore home switches.
Time to set up the soft limits before bolting that end-stop in place.

chillybo
22-12-2019, 02:23 PM
Ive changed homing settings in Mach and it woks fine now. Other problem was the steppers were stalling but I've increased the current output on the drivers and its flying along now.
Just need to learn how to work out steps per mm with my 2005 ball screws and 26 teeth driver pulley to 22 teeth driven ratio.

chillybo
22-12-2019, 02:51 PM
Motion
https://www.youtube.com/watch?v=1iJ4v9MIKRA

JAZZCNC
22-12-2019, 04:46 PM
Ive changed homing settings in Mach and it woks fine now. Other problem was the steppers were stalling but I've increased the current output on the drivers and its flying along now.
Just need to learn how to work out steps per mm with my 2005 ball screws and 26 teeth driver pulley to 22 teeth driven ratio.

Don't fry your noodle trying to work it out just let mach3 do it.! . . Go to the Settings tab, just above Reset there's a button says "Set Steps per unit" this will work it out for you by moving a distance you tell it and by measuring the actual distance it moved it works out the Steps per required.

chillybo
23-12-2019, 07:09 PM
Thanks for that information Jazz. My noodle is easily fried. I used a digital calliper and let the gantry push it up against a stop on the rail. Ive unwired it all now because my control enclosure was delivered today. Im going to use the proximity sensors for homing and mechanical switches for limits. I'l position the limit switch so the gantry just touches it without switching when its detected by the proximity sensor. That way if the gantry goes to close the sensor it'l trip the limit before it damages anything.

https://www.youtube.com/watch?v=HZF8jKtbkvo

JAZZCNC
24-12-2019, 03:53 PM
Thanks for that information Jazz. My noodle is easily fried. I used a digital calliper and let the gantry push it up against a stop on the rail. Ive unwired it all now because my control enclosure was delivered today. Im going to use the proximity sensors for homing and mechanical switches for limits. I'l position the limit switch so the gantry just touches it without switching when its detected by the proximity sensor. That way if the gantry goes to close the sensor it'l trip the limit before it damages anything.


Your setup is not a good one.? Often when you crash into limits it's not slow like your doing in testing, it's usually at rapid feeds or higher cutting feeds when machine loses position
by missed steps due to things like Sticktion or binding, etc. In cases like these, the gantry doesn't stop instantly and you get over travel which will smash your setup to pieces.

You need to ride over switches, not into them.!

chillybo
24-12-2019, 04:52 PM
Point taken I'l change it when I put it back together. If what you say is a possibility of happening then how do we guard against other things getting damaged like BK / BF bearing blocks? Is it therefore wise to leave a good margin of rail / ballscrew for stopping distance?

JAZZCNC
25-12-2019, 12:43 PM
Point taken I'l change it when I put it back together. If what you say is a possibility of happening then how do we guard against other things getting damaged like BK / BF bearing blocks? Is it therefore wise to leave a good margin of rail / ballscrew for stopping distance?

Well BK/BF blocks are not easily damaged so wouldn't be too worried about them, stepper motors will stall before doing any damage. However, if you have anything that can be damaged then it's best to fit Sturdy bump stops after the limits. Skateboard wheels work well.!

chillybo
25-12-2019, 10:53 PM
The plastic mounts for the limit switches I printed will actually slide down the rails and the extrusion if the gantry goes up against them (provided i use plastic slot nuts that I've designed and printed that will secure the mounts in place up until a certain amount of force). I could modify the print so that the rail carriages come into contact with the mounts after the limit switch is activated so it would slide the mounts and activated limit switch out of the way without damaging them. Behind this I could put a buffer as you suggested. I think this would work and if things did go tits up I'd notice it happening if I was looking. The mounts are cheap to reprint if they do get damaged. Next question is... is it worth using one off those PILZ relays to cut PSU/mains voltage off and does this stop movement quicker?
Thanks for all the advice.

JAZZCNC
25-12-2019, 11:24 PM
The plastic mounts for the limit switches I printed will actually slide down the rails and the extrusion if the gantry goes up against them (provided i use plastic slot nuts that I've designed and printed that will secure the mounts in place up until a certain amount of force). I could modify the print so that the rail carriages come into contact with the mounts after the limit switch is activated so it would slide the mounts and activated limit switch out of the way without damaging them. Behind this I could put a buffer as you suggested. I think this would work and if things did go tits up I'd notice it happening if I was looking. The mounts are cheap to reprint if they do get damaged. Next question is... is it worth using one off those PILZ relays to cut PSU/mains voltage off and does this stop movement quicker?
Thanks for all the advice.

Then you have all the hassle of setting back up again and I don't think you realize just how many times or how easy it is to smack a limit when new to CNC and setting a machine up for the first time. To be honest I don't see the problem with making them slide past and do away with the hassle.? They also work better IMO but that's open to debate which I'm not getting into.

Regards the Pilz then you don't need it at a hobby level and while it might detect a mili sec or two quicker that won't change anything because it's inertia you are dealing with and couple of mili secs of movement is nothing.

chillybo
26-12-2019, 01:47 AM
Probably won't bother with a Pilz then at least for now. I could make it so the limits / home are sideways on. I'm still a fair way off sussing out how to position the other axis switches but i do have options. I'm new to this lark and my preconceptions and concerns about damage have been more focused on the machine frame / bearings and ball screws etc as this would be more catastrophic and expensive. I really appreciate advice based on actual experience and I'm in no doubt that i haven't done enough research to get things right first time. Which ever way my machine turns out i'l certainly be keeping an eye on it especially when I'm cutting stuff that goes near the edges of the bed.

Kitwn
26-12-2019, 02:20 AM
One of the main dilemmas with any DIY project is working out where best to direct the inevitably limited funds. Having never heard of a PILZ relay before I did a quick search and seeing what you have to pay for one, I agree with Jaz. You don't need one!

chillybo
27-12-2019, 05:57 PM
26965 OK guys so the plan now is to go with 3 proximity switches mounted sideways and now underneath the table one for homing two as limits. This looks like suitable place to put them.

chillybo
31-12-2019, 01:38 PM
26968

So this wiring diagram is how the home switch works. Next question is how do I wire two of the same NPN NC switches in series to act a limit switches.
Regards Chris

JAZZCNC
31-12-2019, 04:01 PM
26968

So this wiring diagram is how the home switch works. Next question is how do I wire two of the same NPN NC switches in series to act a limit switches.
Regards Chris

You are using an IP-M why would you wire them in series you're not short of inputs surely.? Wiring prox switches in series slows there reaction time so it, if not needed, wouldn't do it.

However, if you must do it then simply take the Signal wire (black) from first switch to the (0V) on the second and repeat for any further switches in wired series. On the last switch take the Signal to the IP-M (-)input.

grantx
28-06-2021, 06:39 PM
Which one did you get? Im looking to get a few as well.

JAZZCNC
28-06-2021, 09:24 PM
Which one did you get? Im looking to get a few as well.

Grant if you need any proximity switches I can supply you with some. Drop me an email if need any.

chillybo
28-06-2021, 09:54 PM
I used NPN normally closed proximity sensors in the end. I mounted them sideways on so they can't get damaged. They work a treat. I use them just as home switches. I have mounted some as limit switches but I haven't wired them up yet because soft limits seem to work just fine.

dazp1976
28-06-2021, 11:32 PM
I'm debating my wiring for the NPN-NC prox sensors for mine too atm.
Easier to wire in series, however I have a UCBB with 18 inputs.
That's 1 for the estop, 6 for the servo, which leaves another 11 available.

Will be using CAT7 solid core shield cable to go from control box to a connector box on side of machine using RJ45 shielding connectors.
RJ45 modules at either end.
Then from connector box on machine side to the switches using flexible cable.

chillybo
29-06-2021, 11:50 AM
I have the CS labs IP/M controller that has plenty of inputs. I used the individual inputs rather than wiring in series.