PDA

View Full Version : Limit and Home Switch Choice



Wobblycogs
28-11-2013, 12:27 PM
I've been looking at the limit and home switch circuits and I can't decide what the best option is. At the moment my circuit consists of a PMDX-126 BOB. Keep in mind I've only just learnt what things like pull up resistors are so there could be all manner of nonsense in what I say below.

My initial thought was to have separate home and limit switches. For the limits I was thinking six cheap and cheerful NC micro-switches wired in series (example (http://uk.farnell.com/honeywell-s-c/v15t16-cc300a05k/micro-sw-roller-lever-spst-nc-16a/dp/1620682)) connected from e-stop to gnd - a pair for each axis. This connector on the PMDX is active high with a pull up so when any switch is opened the machine should stop. I would also fit a manual e-stop switch in series. I like this arrangement because it's simple and cheap. The micro-switches won't be positionally very accurate but all I care about here is stopping the machine self-destructing. My concern is the switches will fail closed due to the dusty environment they will be operating in. A more expensive option such as this (http://uk.farnell.com/schmersal/tk4236-11z-m20/limit-switch-safety/dp/4186813) which is IP67 rated might be better.

Seeing (the price of) that second switch got me thinking about using a single limit switch for each axis. As it's a roller switch then a small ramp at either end of the machines travel should be all that is needed to detect the limit at both ends of the travel. I don't immediately see a problem with this and I've seen it on some other machines.

That really got me thinking, perhaps I could combine the home and limit switches and if I only need three switches I could go for something more expensive and robust. I'm going to including a 24v safety supply which at the moment is doing nothing more than control the relay providing power to the rest of the system. I like the look of PNP induction sensors like this (http://uk.farnell.com/multicomp/mcpip-t12l-011/sensor-m12-pnp-shielded-nc/dp/2218037) and I was thinking I could power three of them in series from the safety power supply and wire them across e-stop.

I'm not sure I've fully understood the way home and limit switches work though. The PMDX manual says that if an e-stop is triggered then all step / dir signals are stopped, this would make homing difficult to say the least. But elsewhere I've read that (Mach3 at least) can override ignore the e-stop when homing so that limit switches can be used as home switches.

My other question (for the moment) was about accuracy and reliability. What switch / sensor types are best for homing? I've seen machines built with every type of switch imaginable and there doesn't seem to be a clear best option.

Cheers.

JAZZCNC
28-11-2013, 03:17 PM
Matt I would have separate home and limit switches has often you'll want your home switch inside the limits.

The PMDX is great for limits because like you say it shuts down it's outputs in hardware so it's quite safe compared to lesser normal BOB's that just send a signal to the control software.
Same goes for the E-stop and the Fault option if your drives have them, the PMDX cuts outputs in hardware and at same time sends a signal to Mach so it stops the program.

Ramped limits are fine and work good if you can make them fit.

For the Home switches I would use NPN proximity with the PMDX has you can power them with the on board 12V and it's easy. Thou if your using 24v anyway then PNP will be fine and it can handle them easy enough.

When Mach homes it ignores the limits (Not E-stop) but I'm not sure about the PMDX if sharing switches has I never share switches but my gut feeling is it's doesn't and will just kill the outputs.? Send Steve Stallings at PMDX an email he'll tell you.

EddyCurrent
28-11-2013, 06:14 PM
Agree with Jazz, have separate home and limit switches, also as he says home switches are inside limits. In reality your machine should never hit the limits, you should use the soft limits in Mach too.
PMDX sounds good from the descriptions above, you need to keep the limits in hardware only.
I'm going for one limit per axis with adjustable strikers at each end.
Home switches need to have good repeatability so that's the parameter I think is most important, at the moment I have not decided myself which ones to use. If you decide on proximity type remember Mach strikes the limit then reverses slightly so potentially it could crash into the switch if homing speed is too high, this implies you mount them sideways but this might affect the detection repeatability.
You mention buying cheap switches but it's like cheap tyres, I'd want them to be reliable otherwise machine can be damaged at much higher cost.

JAZZCNC
28-11-2013, 06:47 PM
If you decide on proximity type remember Mach strikes the limit then reverses slightly so potentially it could crash into the switch if homing speed is too high, this implies you mount them sideways but this might affect the detection repeatability.

You shouldn't mount the switches so they get rid upto but rather get rid over then this doesn't happen, This applies to the limits has well.
With Proximity switches then generally the closer you set the gap the better or sooner they detect. With the threaded type you can use this to fine tune them.!!

Wobblycogs
28-11-2013, 07:06 PM
Cheers guys, separates it is. Separates feel like a better solution which is why I started out with that in mind.

I must admit I was wondering about the best way to mount the induction switches. The obvious method is to have them directly approach a metal plate as that feels like it would give the clearest detection but it would also be crash prone if the axis didn't stop fast enough. This badly drawn picture shows what I mean (I failed art).
10874

My concern with the non-crashing arrangement is that the sensor won't have a repeatable home location.

Update... I see Jazz has just posted while I was writing this, that looks like a vote for the non-crashing arrangement with a very small gap.

JAZZCNC
28-11-2013, 07:51 PM
My concern with the non-crashing arrangement is that the sensor won't have a repeatable home location.

Update... I see Jazz has just posted while I was writing this, that looks like a vote for the non-crashing arrangement with a very small gap.

Yes 100% vote for Non crash setup and having it other way doesn't make it any more accurate just puts it in the killing zone.!! . . . And you would crash into it that's 100% guaranteed. . .Lol

EddyCurrent
28-11-2013, 07:53 PM
G0704 Home/limit proximity switch repeatability test - YouTube (http://www.youtube.com/watch?v=IGO47l62T2o)
Proximity Limit Switch Instructions | CNCRouterParts (http://www.cncrouterparts.com/proximity-limit-switch-instructions-p-216.html)

birchy
28-11-2013, 08:59 PM
I'm doing a mill conversion and will be using 2 N.C. micro switches per axis. They will be mounted in the same position in piggy-back style. The first switch is in series with the e-stops and kills the mains supply, the second one is the homing switch. They will be activated by staggered cams so that the home switch is activated approx 2mm before the e-stop.

EddyCurrent
28-11-2013, 10:02 PM
This is the type of thing I think of when it comes to limit switches
Honeywell Limit Switch | eBay (http://www.ebay.co.uk/itm/Honeywell-Limit-Switch-/321259148264?pt=UK_BOI_Electrical_Components_Suppl ies_ET&hash=item4acc8993e8)

Wobblycogs
29-11-2013, 04:28 PM
Thanks for the advice on home and limit switches. Hopefully I've now got a reasonable first stab at a circuit diagram for the machine.

The stuff on the left hand side such as the wiring of the steppers and the power supply control I'm fairly happy with (the power control is basically a copy of circuit Irving drew). I'm a less confident that the stuff on the right is correct.

I'm happy enough with the e-stop circuit as it's just a bunch of N.C. micro switches and a big red button.

The manual for the AM882 drivers seems a bit vague with exactly what happens when the alarm activates. As far as I can tell the alarm can be set to either active high or active low and I'll set it to active high. Since the fault pin on the PMDX is active low and pulled up I've put in a N.O. relay which gets closed in the case of an alarm (because one of the alarms goes high). If I understand correctly the relay is necessarily because the ground for the alarms is not necessarily the ground on the PMDX. I can see this isn't fail safe but I'm not sure it needs to be as a fault shouldn't be an immediately dangerous situation.

The PNP inductive home switches are wired as per the PMDX manual so I think they are correct but I don't understand what is stopping them dumping a ton of power into the PMDX when the sensor is triggered. Do I need a current limiting resistor in the circuit and if so what size? Actually the same question goes for the AM882 fault circuit.

The circuit diagram image is really big, you might be best off right clicking and opening it in a new window / tab.

10897
10898

Now to start reading up on the VFD wiring...

JAZZCNC
29-11-2013, 05:07 PM
I'm happy enough with the e-stop circuit as it's just a bunch of N.C. micro switches and a big red button.

Erm I wouldn't be.? It's using 5V signal from BOB it would be better if you run 24v thru the switches and have it thru relay like you have the Fault. Then just return the 5V signal thru relay contacts. 24V will keep the switches clean and less noise immune.


The PNP inductive home switches are wired as per the PMDX manual so I think they are correct but I don't understand what is stopping them dumping a ton of power into the PMDX when the sensor is triggered. Do I need a current limiting resistor in the circuit and if so what size? Actually the same question goes for the AM882 fault circuit.

Why not use NPN and the 12V on the PMDX to get around this.? Think the PMDX inputs can handle upto 33V but not sure about the amps.!!

With the fault your not sending anything in just breaking or returning the signal.

Wobblycogs
29-11-2013, 10:31 PM
As always Dean a couple of very good points. I knew as soon as I said I was happy with the e-stop circuit that there would be something wrong with it :smile:, it's my super power.

As you suggested I've put in a relay and run 24V through the switches. Can I just check that my understanding of how this works is correct. I think this is a suitable relay (http://uk.farnell.com/imo-precision-controls/srf-1c-sl-24vdc/relay-spco-24vdc/dp/1094010). Since the voltage is 24V and the coil resistance is 2.8k will this portion of the circuit draw 23/2800 = 8.6mA? It can handle 2A across the contacts which must be about 500* what the PMDX will put through it.

I was using PNP sensors because I had a 24V supply already in the system. That's a really stupid reason to make life difficult for myself though so I've switched them over to using NPN. I assume 12V is sufficiently noise immune for this to not be a problem?

Is the two e-stop button arrangement a good / bad idea? The one at the top left will completely kill everything by removing power. I only envisage using that in "hand-being-eaten-by-the-machine" emergency and it will be on the control box (probably). The e-stop button connected to the PMDX is for "uh-oh-that's-not-good" type emergencies and will be mounted on the machine.

10916

birchy
30-11-2013, 12:23 AM
E-Stop are EMERGENCY stops, so should be wired for YOUR protection. When you've got your hand wrapped around a cutter, you won't have time to ponder on which E-Stop to press...

The "usual" way to setup E-Stops is using a 24VDC circuit with all E-Stops in series which then drop out a contactor (or proper safety relay if you have plenty of cash!). You latch the contactor via a reset button and N.O. auxiliary contact on the relay. This way, the circuit will be safe if any E-Stop is activated or a cable gets broken. I've put my axis limits in series with the E-Stops because a near-crash IS an emergency. As for your feedback, you simply use another spare aux contact on the relay to make or break the BOB com/5v link.

10917

Ulsterman
30-11-2013, 03:28 AM
Okuma Howa Mill AC2 Okuma 5 Pin Limit Multiple Switch 5 Pin Limit Okuma | eBay (http://www.ebay.com/itm/OKUMA-HOWA-MILL-AC2-OKUMA-5-PIN-LIMIT-MULTIPLE-SWITCH-5-PIN-LIMIT-OKUMA-/181124026541?pt=LH_DefaultDomain_0&hash=item2a2bd550ad)
Recommend this style of switch as they work almost as a scraper of the Dog as it travels over and very high position accuracy

JAZZCNC
30-11-2013, 10:34 AM
Okuma Howa Mill AC2 Okuma 5 Pin Limit Multiple Switch 5 Pin Limit Okuma | eBay (http://www.ebay.com/itm/OKUMA-HOWA-MILL-AC2-OKUMA-5-PIN-LIMIT-MULTIPLE-SWITCH-5-PIN-LIMIT-OKUMA-/181124026541?pt=LH_DefaultDomain_0&hash=item2a2bd550ad)
Recommend this style of switch as they work almost as a scraper of the Dog as it travels over and very high position accuracy

Ah ah this is DIY CNC.!!. . . I can buy all the ballscrews for a Small machine for less than that.!! . . . . . . Completely OTT in this case.



E-Stop are EMERGENCY stops, so should be wired for YOUR protection. When you've got your hand wrapped around a cutter, you won't have time to ponder on which E-Stop to press...

Very very true I ounce got my T-shirt caught in the Long timing belt that runs across back of my machine and I can tell you I shit myself.!! . . In the Split seconds it happened It Didn't even enter my head to hit the E-stop.!! . . Looking back it was very Funny.!! . . Belt grabbed it and started pulling me into the pulleys I fought back pulling away and we wrestled until it had half peeled the tea shirt off my back before the material thru the belt off the Pulley. . . Looked like something from a Cartoon. . .Lol (didn't learn from it either has there's still no covers on belts. . Lol)


I've put my axis limits in series with the E-Stops because a near-crash IS an emergency. As for your feedback, you simply use another spare aux contact on the relay to make or break the BOB com/5v link.

Don't Agree but Know what your saying. Hitting the limits isn't really an emergency it's a machine positional error and no different from missed steps which you wouldn't hit the E-stop for, or should say want to Kill power for.
Really it comes down to how you want to stop the machine if some thing goes wrong, that could be a serious situation or just because you see something like it's going to hit a clamp etc.? There's several ways to look at it.!

When it's Minor then you just want to Halt the machine movement so Feed hold is best, you don't always want the Spindle or Coolant, Vacuum etc to go Off. This could be the case with the Limits has it's only lost position why would you want the spindle off or Vacuum.? Turning the spindle off could damage the tool if it's still in the material, same goes for vacuum no need for it off.

When it's serious has in E-stop you want every thing OFF all power Killed.!


Is the two e-stop button arrangement a good / bad idea?

Yep I would drop the E-stop in the limits circuit and just have E-stop Kill power. The PMDX has feature to MACHINE HOLD just wire this in with the limits relay and let it do the work.

firetrappe
30-11-2013, 11:32 AM
Wobbly, I just noticed that revision 19 of the PMDX-126 manual was posted on the PMDX website a couple of days ago. Just thought i'd give you the heads-up.

Si.

Wobblycogs
30-11-2013, 01:42 PM
I completely agree about the e-stop being for my protection which is why there is a button to cut the power. My thinking with the arrangement I had is essentially what Jazz has described. Hitting the limits is bad but I don't think it should be considered a life and limb emergency that calls for cutting the power as long as, and this is the important point, the machine can handle the situation safely.

Here's the plan then...


Keep the e-stop that cuts the power and in fact add another button in series with it. One button will be on the control box and the other will be on the machine.
Remove the e-stop button from the limits circuit.
Add a machine hold button.


Great t-shirt story Dean, it reminded me of a near miss I had. I'd been doing some DIY around the house and I needed to clean up some debris so got the vacuum cleaner out. All the tools I'd been using were in the way so I picked them all up to clean around them. So there I am, both hands full of tools with the vacuum cleaner hose pinned under one arm and swinging about. I bend down to do some cleaning and the vacuum cleaner nozzle leaps up like a wild animal and starts sucking on my t-shirt. I practically jump out of my skin and try to bat it away with my other hand. Unfortunately I'd forgotten that hand had a Stanley knife in it and I managed to run the blade across my wrist. Luckily for me I'd been abusing the blade for the last hour and it was blunt so the cut wasn't very deep, if it had been a new blade I'd definitely have been in A&E trying to explain why it looked like I'd tried to kill myself.

Wobblycogs
30-11-2013, 06:25 PM
Ok, slight problem with using the machine hold function of the PMDX: I only have one parallel port and it signals on port 2 pin 10. As I'm a glutton for punishment I was going try using LinuxCNC at first; if I was going the SmoothStepper route this wouldn't be an issue, sigh. I assume the only way I'm going to be able to use the machine hold function is fit a second parallel port so can anyone recommend a brand of card that works well?

I'm obviously not understanding something because I don't really see how the "K" input (assuming it's in machine hold mode) is different to the e-stop input on the BOB. Both inputs disable the step and direction signals and tell the computer the machine has stopped. The computer can tell the two situations apart because they come in on different pins but the machine is stopped either way so surely there's nothing the computer can do. Given that I currently only have one parallel port would an option be to put a machine hold switch in the limits circuit?

birchy
01-12-2013, 03:24 PM
Don't Agree but Know what your saying. Hitting the limits isn't really an emergency it's a machine positional error and no different from missed steps which you wouldn't hit the E-stop for, or should say want to Kill power for.
Really it comes down to how you want to stop the machine if some thing goes wrong, that could be a serious situation or just because you see something like it's going to hit a clamp etc.? There's several ways to look at it.!

When it's Minor then you just want to Halt the machine movement so Feed hold is best, you don't always want the Spindle or Coolant, Vacuum etc to go Off. This could be the case with the Limits has it's only lost position why would you want the spindle off or Vacuum.? Turning the spindle off could damage the tool if it's still in the material, same goes for vacuum no need for it off.
Soooo, should the limit switches be in series with the E-Stops or not? I've essentially got 2 mains supplies - one direct to the PC, Monitor, 24V PSU, etc and one switched through the safety contactor. When a safety switch is activated, it kills the power to the 42V steppers PSU. I haven't fitted the spindle VFD yet, but it will use the "safe" supply as I'll want the spindle to stop when I hit an E-Stop. But with the limits in series, an overshoot will also cause an emergency stop. Is there a better way of doing this? I don't want to rely on software to handle E-Stops.

Wobblycogs
01-12-2013, 04:04 PM
The PMDX-126 e-stop connector cuts the step and direction signals when the e-stop is triggered. My understanding is that this will probably stop the steppers faster than if you just cut the power and it doesn't rely on software (well, it probably relies on the firmware in the BOB but that's a lot better than going back to Mach / LinuxCNC to handle e-stop). My concern with having the limits cutting the power is that it will happen comparatively frequently compared to real emergencies and I've read in a few places it's not a good idea to just cut power to steppers that are in motion due to back emf. I wouldn't take just my word for it though. I assume if your bob can't cut the step and direction signals it would easy enough to stick in a relay to perform the same function.

EddyCurrent
01-12-2013, 09:02 PM
Along with this thread and my own I can see there is never going to be a consensus of opinion with regard to limits and emergency stop circuits. All anyone can do is see what others have done and choose the bits that suit them best.
Here's how mine is going to be, I just changed a few things this weekend and will upload my 'as build' drawings later.
My emergency stop circuit consists of a big red button on the control panel and another in series on the machine, the limits are also in series with these buttons and a relay in the VFD indicating a fault condition is also in the circuit. Everywhere I have worked the limits, which I'm going to call 'ultimate limits' because that is what they are, always form part of the emergency stop circuit. These limits should never be activated, Mach3 has 'soft limits' for example that should operate first (don't know about Linux system).
I'm also using a PILZ emergency stop relay (@birchy it only cost £25 on ebay) so when the emergency stop circuit is activated the relay de-energizes removing power to the stepper drivers, sending Mach3 an E/stop signal, stopping the VFD by using a special emergency stop function and a Safe Torque Off (STO) feature.
The system can only be reset when all the relays and buttons are in the correct position and the VFD has been reset.
I also have a ‘stop’ button on the control panel that sends a STOP signal to the VFD and also stops Mach3 running. There is a ‘pause’ pushbutton that sends a ‘FeedHold’ signal to Mach3, it also stops the VFD.
To recover from a stop or pause condition a ‘reset’ button is pressed which also sends Mach3 an OEM signal to activate its RESET button and the VFD powers up again. Any time Mach3 is stopped it activates an Enable signal to stop the stepper drivers. Also in series with my pause button is a spindle over temperature switch and in series with my stop button is a relay that indicates if any of the AM882's have gone into alarm.

JAZZCNC
01-12-2013, 10:33 PM
There is a ‘pause’ pushbutton that sends a ‘FeedHold’ signal to Mach3, it also stops the VFD.
To recover from a stop or pause condition a ‘reset’ button is pressed which also sends Mach3 an OEM signal to activate its RESET button and the VFD powers up again.

Eddy don't do that has when you "Feedhold" you won't want the spindle to stop spinning. It could still be in the material which would cause tool damage.
Also When you release "Feedhold" Mach won't start the Spindle without an M3 command or OEM code to turn it back on and if you "Feedhold" chances are your in the middle of a job and just want to pause for something like clearing chips etc. . . That's the point of "Feedhold" it's not to be used for Emergency or any Safety feature.

Now has to the rest of the Limits and E-stop best way debate then it's Simply down to preference.
I prefer to have E-stop Buttons Kill power to everything. Limits I have separate and just have kill Signals to drives and Send Signals to Control to stop the code.
If drives have Fault signals like AM882 then they are wired in series with Limits and just Kill signals and inform control.

Feedhold is not for this purpose and shouldn't be used has such IMO. In Mach's case it also doesn't stop instantly either has it has to clear the Look-ahead buffer first so can't be relied upon to stop quickly.

EddyCurrent
02-12-2013, 09:16 AM
Eddy don't do that has when you "Feedhold" you won't want the spindle to stop spinning. It could still be in the material which would cause tool damage.
Also When you release "Feedhold" Mach won't start the Spindle without an M3 command or OEM code to turn it back on and if you "Feedhold" chances are your in the middle of a job and just want to pause for something like clearing chips etc. . . That's the point of "Feedhold" it's not to be used for Emergency or any Safety feature.

I never suggested using it for Emergency or safety use. Regarding leaving spindle turning, I can make it do that, thanks.


Feedhold is not for this purpose and shouldn't be used has such IMO. In Mach's case it also doesn't stop instantly either has it has to clear the Look-ahead buffer first so can't be relied upon to stop quickly.

I'm only using FeedHold from a pause pushbutton and the spindle overtemp so that I can carry on again after assessing the situation, I saw it carries on a while depending on the look-ahead setting. All of these features are easily 'shorted out' in the panel if they become a problem later on.

JAZZCNC
02-12-2013, 02:55 PM
I'm only using FeedHold from a pause pushbutton and the spindle overtemp so that I can carry on again after assessing the situation, I saw it carries on a while depending on the look-ahead setting. All of these features are easily 'shorted out' in the panel if they become a problem later on.

Can tell you 100% It will be a problem from day one if your relying on "feed hold" to stop Instantly because it doesn't. Even with Motion control Card that can process the Code much faster so use lower Lookahead than Mach's PP driver you can't get "feed hold" to stop instantly without losing Steps and that's the whole point of "feed hold" Otherwise you may has well just E-stop and presume lost position.!!

EddyCurrent
02-12-2013, 04:54 PM
Can tell you 100% It will be a problem from day one if your relying on "feed hold" to stop Instantly because it doesn't. Even with Motion control Card that can process the Code much faster so use lower Lookahead than Mach's PP driver you can't get "feed hold" to stop instantly without losing Steps and that's the whole point of "feed hold" Otherwise you may has well just E-stop and presume lost position.!!

I don't understand why you think I'm wanting it to stop instantly, I know that is doesn't and that's fine because it's not part of any emergency or safety requirement.

JAZZCNC
02-12-2013, 05:16 PM
I don't understand why you think I'm wanting it to stop instantly, I know that is doesn't and that's fine because it's not part of any emergency or safety requirement.

Don't know myself if being honest. . Lol . . . . Just thought you did from some of the other posts.!! . . . Anyway Crack on and I'll keep Stum in future.!!