Hello Guest it is March 29, 2024, 03:41:30 AM

Author Topic: Limit Switches and Interference  (Read 15702 times)

0 Members and 1 Guest are viewing this topic.

Limit Switches and Interference
« on: October 13, 2012, 03:23:56 AM »
First real post on the board for me!

I'm setting up the limit switches on my CNC router at the moment.  They're just the simple lever type, two per axis, wired in series and normally closed.  Yesterday they were working so well I sat back with a coffee to admire my success while watching the LED indicator lights up as expected on the Mach3 Diagnostics tab.

But today I've had a setback  :o  The only difference is that I also wired up the stepper motors and gave them a spin.  They worked as expected too.  But just when I thought this home made CNC caper was easy, I got an unexpected limit switch trip.  I can reproduce it, but it is random.

I'm wondering if the wiring to the limit switches should be shielded?  At the moment it's not - could that be my problem?

Thanks.
____________________
Ian B

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Limit Switches and Interference
« Reply #1 on: October 13, 2012, 04:14:24 AM »
Hi brw,

Welcome to the forum.

In order to prevent possible false triggering, such as you have experienced, the limit switch wiring should be made with shielded cable. Only connect the shield to GND at the controller end and you should be OK.

Tweakie.
PEACE

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Limit Switches and Interference
« Reply #2 on: October 13, 2012, 08:36:25 AM »
A workaround is to set the Debounce setting in general config to maybe 5000 or so, which will filter out the noise a bit. You can set it higher if you need to, but the higher it is, the longer it delays Mach3 seeing the switch being triggered.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Limit Switches and Interference
« Reply #3 on: October 14, 2012, 09:45:44 PM »
Thanks for the replies.

I'll get some shielded cable and re-wire those limits switches.  And I might have a tinker with the debounce setting too.

Perhaps ferrite chokes would have solved my problem.  My system must be close to stable.  They would be the $6 and two minute solution.  As opposed to the re-wiring solution at $40 and four hours.
____________________
Ian B

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Limit Switches and Interference
« Reply #4 on: October 15, 2012, 04:47:16 AM »
If you try ferrite's I would be most interested to hear your results.

Tweakie.
PEACE
Re: Limit Switches and Interference
« Reply #5 on: October 15, 2012, 05:26:20 PM »
This may be another case where I've rushed in when I should have made another cup of coffee and had a good think about the problem.

Using unshielded single core cable and running to each limit switch in turn (i.e. a loop) probably just created a rather affective antenna to collect EMI.  Of course, if I tried to build an antenna it probably would have failed, but I'm great friends with Murphy :)

What I plan to do now is use 2 core shielded cable and run each back to a common point, series connect the switches at that point and take the circuit ends back to the limit input to my controller.
____________________
Ian B
Re: Limit Switches and Interference
« Reply #6 on: October 15, 2012, 10:29:24 PM »
I haven't tried this because I haven't had a problem - yet - but what about a bypass capacitor (0.1 uf or so) from each switch to ground?

Here is a discussion regarding them - http://www.seattlerobotics.org/encoder/jun97/basics.html 
"It is well that war is so terrible -- lest we should grow too fond of it." Gen. R.E. Lee CSA

The United States Constitution (c) 1791. All Rights Reserved.

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Limit Switches and Interference
« Reply #7 on: October 16, 2012, 01:46:43 AM »
The bypass cap's have been proven to have good results but for long term reliability shielded cables may be a better.

Tweakie.
PEACE
Re: Limit Switches and Interference
« Reply #8 on: October 26, 2012, 11:05:19 PM »
Well...............my problem is worse now :(

After re-wiring the limit switches with shielded cable and grounding one end of the braid per separate cable run, my limit switch circuit is less reliable than ever.  On the bright side, perhaps this might make diagnosis easier.

I'll systematically try to rule out faulty switches and bad solder joints etc but after that I'll be stumped.  I'm beginning to think my CNC controller might be twiddling pins at the limit switch pin inputs - can't get a return call from the place of purchase (I deliberately purchased locally to get help if and when needed - sheesh).

Might even try configuring the Mach3 limit switch circuit as Normally Open, but that would be less than ideal even if it worked.

Suggestions welcome :)
____________________
Ian B
Re: Limit Switches and Interference
« Reply #9 on: October 27, 2012, 03:13:47 AM »
After much head scratching, I'm close to going to watch TV for the rest of the evening then sleeping on the problem.  Pity I can't get the World Series baseball on free to air TV here!

My router is made of aluminium extrusions.  I've measured a 1.2V AC voltage between the frame and earth when the stepper motors are energised.  I can't imagine that is normal but also can't really see where it is coming from.

More detective work ahead.
____________________
Ian B