Hello Guest it is March 28, 2024, 04:53:13 AM

Author Topic: Phantom Limit Switch Events  (Read 10106 times)

0 Members and 1 Guest are viewing this topic.

Phantom Limit Switch Events
« on: June 23, 2009, 08:44:18 AM »
By this I mean when you get a "limit switch triggered" message and everything stops, but no limit switches have been physically triggered.

I've been playing with this for some months now, applying the scientific method.

I tried all the usual scenarios, from really cheap and crap single core conductor with crimped spade terminals wiring all the limit switches in series, right up to grounded high quality shielded cable soldered on to the limit switches.

In between I have played with all the debounce settings too, even setting them as high as 20,000.

I have even played with all the possible earthing methods between machine tool, computer, parallel port breakout card, you name it.

To be sure, ALL these variables had some effect, as indeed did other devices on the same mains circuit switching in and out, and indeed the various routings and separations of various cables.

However, attach an oscilloscope to the limit switch circuit and suddenly things become clearer, especially when you set things back to the bad scenarios rather than the "that seems to be working fine now" scenarios.

Sit there with your eyes glued to the scope screen and every single phantom limit switch event is mirrored by a spike in the noise shown on the oscilloscope waveform.

N.B. I have not been able to determine from mere observation where this noise is coming from, for all I know it could be the neighbours mobile phone or the workshop computer wireless network card, there was no obvious trigger such as "there goes the compressor" or "I just started the lathe motor inverter."

I think that all this investigative work is important, other wise you have "cures" that work for me, but not for you, e.g. raising debounce to 3,000, because all these cures are in effect lucky guesses that mask the problem, rather than curing it. I wasn't content with fixing it for me, I wanted to fix it for everyone, including me on my next machine, or after I move this one, or after I add another tool to the workshop, etc etc.

The definitive cure is to purchase a single 0.1 uF (micro-farad) polyester capacitor (electrolytics are no good as they have +ve and -ve preferences) and attach it across the two limit switch wires close to where they join the parallel port breakout board.

Here in the UK you can buy them individually from Maplins for 13p each.

I would not go any smaller than 0.1 uF initially, nor would I go bigger, too big will dump too much current when the limit switches actually close, but you could buy three or four 0.1 uF and parallel them up one by one to test if required.

Instantly I had to increase the gain on the oscilloscope by 10x to see the same noise spikes, and even then they were significantly reduced and much more rounded with shallower slopes.

As far as curing the phantom limit switch problem goes I was able to set everything back to "worst" case scenarios with minimal debounce and the phantom limit switch problem appears to have been totally eliminated.

Given that this is a potential cure that costs the price of a cigarette, is easy to test (just clip the cap across the wires with two croc clip test leads) and doesn't require altering anything else, I would suggest you try it out as a FIRST resort rather than last, if you have phantom limit switch issues.

HTH etc

Re: Phantom Limit Switch Events
« Reply #1 on: June 23, 2009, 02:20:27 PM »
The one thing I forgot that also counts.

Your stepper controllers, PSUs and breakout board all REQUIRE forced air cooling, I run a couple of standard PC 80mm fans @ 12 volts on exhaust at the top of my cabinet, if I turn them off I get random limit switch events after about 15 minutes.

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Phantom Limit Switch Events
« Reply #2 on: June 24, 2009, 11:03:57 AM »
This seems like an excelent cure. Isn't it curious how the solution to the most vexing problems turn out to be so obvious . . AFTER they are found.

Even at my 'Electronics for Dummies' level, I know that caps are a common solution for dirty signals. Can't believe I've not read this cure before.

I solved my phantom triggers AND my inaccurate homing in one swoop with photointerruprors and shielded cable, and I also wired to accomodate 12v or 24v operation if that becomes neccessary.

Methinks now I would definately try the caps first.

Kudos to you for the great tip!
Re: Phantom Limit Switch Events
« Reply #3 on: July 04, 2009, 03:18:24 PM »

I've always had a minor problem with limit triggers, probably due to my low level of electrical wiring expertise. By setting the debounce to 1500, my "phantom events" occurred about every 15 hours or so of operation. Since I'm a hobby user, this has been a minor problem (far exceeded by my struggles in learning how to fixture parts well!), but aggravating.

I installed a filter cap as outlined by above by GF and reset the debounce to 400. As yet (probably ~30 hours of operation) I haven't had a limit switch shutdown. I'm guardedly optimistic that this problem has gone away for good...

Thanks for what seems to be a simple, elegant solution...

SF
Re: Phantom Limit Switch Events
« Reply #4 on: February 25, 2012, 07:52:26 AM »
Hello everyone. I think this only my second post.I have just finished bolting together fine line automation 100,and the 5 volt limit switches are giving me fits.I rewired them in parallel with shielded cable. I like parallel because I can see witch switch is triggered in Mach3. I am using the hobby cnc pro controller with nema 23 steppers. I bought the capacitors you recommended,but am not clear how to use them. Would one leg of a capacitor go pin #11 for X axis limits and home, and the other leg to the common terminal? and so on for the rest of the inputs? Sorry to ask such basic questions,I am a retired brick mason whose electrical know how is limited to plugging it up and hoping it switches on.
Thanks for any help
Re: Phantom Limit Switch Events
« Reply #5 on: February 25, 2012, 08:42:11 AM »
This cure has been brought up on here before, but it always helps to keep it fresh. Well done for the effort put in to find it.
Re: Phantom Limit Switch Events
« Reply #6 on: February 25, 2012, 09:55:31 AM »
I would be willing to bet simple adding stiff pullup resistors would have yielded the same result, without the potential delays that sizable capacitors can introduce....

Regards,
Ray L.
Regards,
Ray L.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Phantom Limit Switch Events
« Reply #7 on: February 25, 2012, 12:53:43 PM »
Not sure how wiring in parallel allows you to see individual switches in Mach, I presume you mean you wired them all separate and use an input for each?
Hood
Re: Phantom Limit Switch Events
« Reply #8 on: February 25, 2012, 01:14:13 PM »
I think I should have said that I wired each axis in series. I know little about electronics and less about the termonology. Can you explain in a step by step way the connections of the capacitors and the use of a (stiff ?) resistor mentioned in the post by Guy and Himy.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Phantom Limit Switch Events
« Reply #9 on: February 25, 2012, 04:00:34 PM »
Wouldnt be series either, what I would think you have is possibly taking each switch from an input and then  combining the other side of the switches and then to 0v.
For the capacitor you would connect between the input and 0v (Gnd)
Hood