Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: camtech on July 30, 2007, 06:38:49 PM

Title: limit switches and cable sheilding
Post by: camtech on July 30, 2007, 06:38:49 PM
hello folks im having a weird problem and im also new to building a cnc.
i have all of my six limit switches in series anditseems when im running it will go into estop or a limit switch is tripped when all is well.
im wondering if it is a good idea to have them all in series .

also im running wires pretty close to the servo motor wires and do they need to be sheilded.

im running mach 3.

i also when i uncheck the estop in the pins config page it will go and check it self again.

im just tring to get mach 3 configured with the limits anf homing swiches and it is getting tough.

thanks............Robert
Title: Re: limit switches and cable sheilding
Post by: Chaoticone on July 30, 2007, 06:51:55 PM
Hey Robert, would be best if all cable was shielded. You can try to add some debounce if you haven't allready and see if it helps. General config. make it about 2000 and try.

Brett
Title: Re: limit switches and cable sheilding
Post by: Hood on July 31, 2007, 04:20:44 PM
For the estop just change the active state and it wont be a problem. But best to get a real estop on your machine for safety reasons.
Hood
Title: Re: limit switches and cable sheilding
Post by: SimonD on August 03, 2007, 01:55:35 PM
I am suffering with Limit Switches triggering at the moment albeit only occasionally now.

My machine currently has 2 axis running, with 2 limit switches on each axis, wired in series to individual inputs.
Both the motor cables and the limit cables are shielded. One cable works fine (1.5m) , the other seems to pick up interference, it is almost as though it is a "tuned length" (2m)
The cables are wired so the shield is connected only at the controller end. If I switch the cables around then it trips amost immediately.

I have tried debounce up to 2000 and it seems to improve the situation slightly.
Title: Re: limit switches and cable sheilding
Post by: pointcloud on August 03, 2007, 04:28:09 PM
How many wires are in the cable you are using? If it's 2 and 1 ground, have you grounded one end at least? If it is more than 2 you should consider changeing them out... The more wires you have the more antenna you'll have...
Title: Re: limit switches and cable sheilding
Post by: Rkjohn on August 03, 2007, 05:04:09 PM
For the estop just change the active state and it wont be a problem. But best to get a real estop on your machine for safety reasons.
Hood
I cant get rid of the "external estop requested"  Where do I change the active state. Ive tried everything & it just comes back.
Title: Re: limit switches and cable sheilding
Post by: SimonD on August 03, 2007, 06:09:25 PM
I am using 2 core and shield for the limits. Grounded at the controller end only.

After reading through the forum one suggestion was to connect a 0.1 microfarad capacitor across the switch.

The only capacitors I have to hand are 1 microfarad and so tonight I tried it...
I attached a 1 microfarad capacitor across each of the two switches on the longer run and it seems to have cured the problem.
The machine ran a long test program without failing which was encouraging.
I will do some more testing tomorrow and see if I can just connect the capacitor at the controller end of the cable, that way I will only need 1 capacitor per axis.

Is a 1 microfarad capacitor too big? What effect will it have?

Title: Re: limit switches and cable sheilding
Post by: Greolt on August 03, 2007, 08:12:39 PM

I cant get rid of the "external estop requested"  Where do I change the active state. Ive tried everything & it just comes back.

It is in "Ports and Pins"  You will have to scroll down a bit.  Toggle the "Active Low" setting.

I have found that if not using the Estop function (probably should be) then it is best to assign it to a non existent pin.

I have mine set to port 0 pin 0.

If assigned to a legitimate unused pin then Mach is monitoring it at all times and will react to any noise it picks up.

Also if assigned to a pin then make sure that pin is not left floating. That's when it is most susceptible to noise.

Tie it down with a 3k resistor between it and ground.

Greg
Title: Re: limit switches and cable sheilding
Post by: motorhead101 on August 11, 2007, 01:22:03 AM
I had this same exact problem when my limit swithes were wired in series normally closed.  No matter what I tried, the MACH program would say that a limit switch tripped for absolutly no reason.  I tried everything to isolate the wires, ect.

I ended up wiring my limit switches in parallel normally open, not one problem since, and it doesn't make a diffrence if the limit switch cable is wrapped around the servo power cables...

Should fix your problem, exactly what's causing the problem I'm not sure, but that will fix your problem.

Michael
Title: Re: limit switches and cable sheilding
Post by: cjmerlin on August 11, 2007, 04:49:02 PM
Hi, Placing a capacitor across a switch will damp any noise spikes which is essentially an AC component and the capacitor will short any AC to the ground wire.

A 0.1uf capacitor is ideal for this and will easily filter mains bourne hum or ripple and some computer noise.

However, using larger values may induce a current spike when the switch is opened/closed.

Long term you may shorten the life of the switch.  1uf is probably not too bad if you only have a 5v high on the switch, I'd still recommend getting some 0.1uf's from RS or Farnell or your local electrical supplier.

Regards
Title: Re: limit switches and cable sheilding
Post by: SimonD on August 11, 2007, 05:45:16 PM
Thanks for the explanation of that the capacitor does and the affects of higher values. I will get some 0.1uf's with my next electrical order and replace the ones I am currently using.

Thanks
Simon

Title: Re: limit switches and cable sheilding
Post by: cjmerlin on August 12, 2007, 06:53:35 PM
Glad to help..



Regards
John
Title: Re: limit switches and cable sheilding
Post by: vmax549 on August 13, 2007, 09:19:04 PM
When you wire all the switches in series you create a really long attenna. THe caps should cure the problem. Also vibration can  trip a switch.

(;-) TP