Page 1 of 2

False Limit Switch Triggering

Posted: Wed Jan 13, 2016 7:27 pm
by MidCitySlim
... so I have been running my SO3 for a couple months now with no issues with the Additive Aerospace Limit Switch kit. I am now encountering some false limit switch triggering. Here's where I'm stuck:

- Power up SO3
- Start UGS, Soft Reset, $H
- Set Zeroes for all axes, turn on Router
- Run Job
- SO3 Homes in upper right corner, then triggers alarm (I believe it's the Y-axis) before any of the Job can run
- Quit Job, Soft Reset, then $H again
- Run Program
- SO3 Homes (a very short distance), triggers alarm again in very beginning

I'm baffled. I cleaned all the dust off the tracks, rechecked the program (I have run it successfully a number of times).

Any advice?

Re: False Limit Switch Triggering

Posted: Wed Jan 13, 2016 7:42 pm
by cvoinescu
Did you change anything? Moved wires, replaced spindle, different circuit, new power strip, new software, changed GRBL settings, new computer, using laptop plugged in whereas it was on batteries before -- anything.

Re: False Limit Switch Triggering

Posted: Wed Jan 13, 2016 7:43 pm
by KAScnc
In the 3D printer world, we experience false limit switch activation when the stepper motor wires cross over directly over the switch wires. Usually we twist the wires tightly and do large loops if you have to cross the stepper wires.
I haven't received my switch kit yet, so this is only conjecture on my part.

Re: False Limit Switch Triggering

Posted: Thu Jan 14, 2016 1:25 pm
by lordmundi
I've said it many times, but the lack of active noise isolation on these limit switch inputs on the microcontroller, or on the kit being sold with limit switches, is a HUGE flaw. If you put a scope on those wires and see the very large amount of EMI noise that comes from those stepper motors and the spindle, you would, I think, agree with me that opto-isolators or any other isolation that is current driven, is required. Just putting a strong pull-up or pull-down resistor is not enough. You need something current driven because while the noise voltages can be quite high, the power in them is almost nothing. So it wouldn't be enough to turn on the LED in an opto-isolator.

And for those that don't use opto-isolators and say "I don't have a problem"... I say, you are lucky and it is probably only a matter of time before it happens on a long cut.

IMO, not only the limit switches, but any of those inputs such as feed-hold, cycle start, probes, etc. should all have opto-isolators and the input side should use the 24V or stepper motor supply with the microcontroller side using the microcontroller voltage (usually 5V).

P.S. - This won't apply to you given the scenario you described, but in case others come across this in a search, another thing I've found that can trigger these limit switches (even if you have opto-isolators), is an electric arc from static electricity build-up from dust collection. I was blown away when I saw what kinds of voltages that a dust collector can build up. Check out some youtube videos.

Re: False Limit Switch Triggering

Posted: Thu Jan 14, 2016 1:50 pm
by Fablicator
MidCitySlim wrote:... so I have been running my SO3 for a couple months now with no issues with the Additive Aerospace Limit Switch kit. I am now encountering some false limit switch triggering. Here's where I'm stuck:

- Power up SO3
- Start UGS, Soft Reset, $H
- Set Zeroes for all axes, turn on Router
- Run Job
- SO3 Homes in upper right corner, then triggers alarm (I believe it's the Y-axis) before any of the Job can run
- Quit Job, Soft Reset, then $H again
- Run Program
- SO3 Homes (a very short distance), triggers alarm again in very beginning

I'm baffled. I cleaned all the dust off the tracks, rechecked the program (I have run it successfully a number of times).

Any advice?
I had a thought,

Some programs send a goto 0,0,0 as their first command after homing, which would trigger the endstop. Look at your g-code to verify the program never sends any of the axis back to zero. I vaguely remember having to change this default behavior in fusion 360.

~Andrew

Re: False Limit Switch Triggering

Posted: Thu Jan 14, 2016 1:51 pm
by Picengraver
Add a 0.1uf ceramic capacitor between the limit switch inputs at the Arduino/? and ground. Might be all that is needed.
John Champlain
http://www.picengrave.com

Re: False Limit Switch Triggering

Posted: Thu Jan 14, 2016 2:09 pm
by wunderaa
lordmundi wrote:I've said it many times, but the lack of active noise isolation on these limit switch inputs on the microcontroller, or on the kit being sold with limit switches, is a HUGE flaw. If you put a scope on those wires and see the very large amount of EMI noise that comes from those stepper motors and the spindle, you would, I think, agree with me that opto-isolators or any other isolation that is current driven, is required. Just putting a strong pull-up or pull-down resistor is not enough. You need something current driven because while the noise voltages can be quite high, the power in them is almost nothing. So it wouldn't be enough to turn on the LED in an opto-isolator.
With the SO3, the limit switches are activated by grounding the input. I'm not sure EMI would be a factor here, would you?

I would try and eliminate the possibility of a bad switch, exposed wires, something that would cause a short to ground on one of the switches.

Re: False Limit Switch Triggering

Posted: Thu Jan 14, 2016 2:46 pm
by cvoinescu
Picengraver wrote:Add a 0.1uf ceramic capacitor between the limit switch inputs at the Arduino/? and ground. Might be all that is needed.
The Carbide Motion board that comes with the Shapeoko 3 already has RC low-pass filters, pull-ups, and Schmitt triggers on all six inputs (three limits and three buttons).

Re: False Limit Switch Triggering

Posted: Thu Jan 14, 2016 2:57 pm
by Picengraver
Thanks, I did not know that. I have the same on my Uno for my S2, using your published circuit, and I still had to add the capacitors.??? I am using home/limit switches on ends of each axis. Since that cured my issues, I did not investigate further.

John
www.picengrave.com

Re: False Limit Switch Triggering

Posted: Thu Jan 14, 2016 4:46 pm
by cvoinescu
I have drawn many circuits, and most have capacitors; my "ideal" one is identical to what's on the Carbide Motion board (except I'm not sure what part values they used).