Hello Guest it is December 01, 2021, 04:06:53 PM

Author Topic: The solutions to my false limit switch triggering issues  (Read 12210 times)

0 Members and 1 Guest are viewing this topic.

The solutions to my false limit switch triggering issues
« on: December 09, 2015, 07:50:22 PM »
Hello All, just setting up my first DIY CNC machine with 4-axis and ran into issues with limit switches triggering falsely.  I finally solved these but it was really tough and time consuming, so thought I'd share what fixed the problems to help others who may have the same issues.

First off, I'm not into electronics.  I know some basic things, but not much about circuits and such.

I built a 4 axis hot wire cutter machine.  I installed 8 limit/home switches, one at the end of each axis.  These are setup as Normally Open (NO), and only complete a signal/ground when physically triggered.

After setting up my hardware and wiring the servos and switches in place the motors worked fine, no issues.  Once I setup the limit switches in Mach3 they almost immediately triggered a STOP/RESET.  Sometimes I could start everything ok, but as soon, or shortly after, moving a motor they would trigger again.

When Mach3 is in STOP/RESET it will not show the current values of the inputs for these, but what I did figure out is if I only enabled the HOME setting for the switches it would not trigger a RESET and I could watch the input LEDs on the Diagnostic page.  This finally allowed me to see the switch signals randomly triggering.

I tried the debounce setting, up to 4000, but it had very little effect, if any.  One thing that did help significantly was to separate my limit switch wiring from my servo motor wiring by at least 10-12" +  Then I could almost use a high debounce setting, but eventually it would still trigger, just took a lot longer.  If this was a solution it would have been extremely tough to rewire successfully!

I won't go through all the troubleshooting I did, but the three separate things I found, which each caused the issue on it's own are below:

1)  The two limit switches for each axis were wired together to a single input pin.  Because of this the wiring loom for them created a kind of loop between the two switches and the hardware case they plugged into.  I am aware of electromagnetic induction, but just didn't pay attention and ran a servo wiring loom through this loop.  Keep in mind the loop is an odd shape and very large so it's not as obvious as you might think to see.  Obviously when the servo was triggered using 24v signals it induced a signal in the 5v limit switch wiring.  That was the easy one... to fix.

2)  I used shielded cable for the limit switches, however, I did not GROUND the shielding to anything.  Once I went back and grounded ALL the segments of shielded wire together and to the hardware case (earth ground) that solved another of the causes of false signals.  This one wouldn't have been so bad except I had to figure it out after my wiring was all done.  It took hours to rewire and fix.

3)  The third and probably least obvious, to me anway, issue was that I found unless I ran a ground wire from EACH servo housing to the hardware case (earth ground) it would also trigger the limit switches/wiring.  BTW, the servo case ground also grounded all the metal parts in my machine's hardware.

After ALL three of those were done I have no false signaling at all, I even ran the wires tightly wrapped together parallel for nearly 10ft.

Other useless things I tried or was going to try:

-Debounce setting, did nothing
-Tried tying the negative terminals of my two INDEPENDENT power supplies (one 24v and another 12/5v) together.  Bad idea, one power supply got pretty warm before I quickly disconnected them.  I would not recommend this!  People in other posts recommended... so I tried and learned not to do it.
-Tried the above three solutions independent of each other.  This did not work, obviously, and led to very long troubleshooting time.
-Probably a lot more I'm not remembering right now!

The final lesson I learned was to check your wiring, look for ground loops, or maybe just make sure all components (everything electrical or not) are well grounded and not causing induction in other wires!

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: The solutions to my false limit switch triggering issues
« Reply #1 on: December 09, 2015, 10:12:07 PM »
Great, always nice when it starts coming together.

You forgot a few other options, caps on the inputs and or ferrites on the wires. They wouldnt have changed anything. It is just methodical slow elimination of 1 thing at a time.
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)
Re: The solutions to my false limit switch triggering issues
« Reply #2 on: December 09, 2015, 10:41:40 PM »
Yes, I have some 0.1 uF Caps which arrived today, but I fixed the issue at the root before they came.  I'm happy to have solved it at the source without the band aids!  I'm amazed at how many forums and threads I read which only suggested the workarounds instead of finding the root source of the problem.

Offline Tweakie.CNC

*
  • *
  •  8,864 8,864
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: The solutions to my false limit switch triggering issues
« Reply #3 on: December 10, 2015, 01:17:48 AM »
Nice work Avecnc - the methodical approach.  8)

Thanks for sharing the information, I am sure it will help others that follow.

Tweakie.
KEEP SAFE !

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
The solutions to my false limit switch triggering issues
« Reply #4 on: December 10, 2015, 08:14:33 AM »
I definitely understand that information on this issue is hard to comprehend. I have chased those problems too. In fact you probably wasted some time reading my posts.


Sent from my iPhone using Tapatalk
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)

Offline Tweakie.CNC

*
  • *
  •  8,864 8,864
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: The solutions to my false limit switch triggering issues
« Reply #5 on: December 10, 2015, 08:26:38 AM »
I definitely understand that information on this issue is hard to comprehend. I have chased those problems too. In fact you probably wasted some time reading my posts.

I am sure time was never wasted, everything was just added to the knowledge base.  ;)

Tweakie.
KEEP SAFE !

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: The solutions to my false limit switch triggering issues
« Reply #6 on: December 10, 2015, 09:05:48 AM »
Tweakie, I only hope it has been remembered. Or did I ever figure out why the problem went away? But my wiring techniques improved some ;-)
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)

Offline Tweakie.CNC

*
  • *
  •  8,864 8,864
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: The solutions to my false limit switch triggering issues
« Reply #7 on: December 10, 2015, 11:00:31 AM »
I Must admit, I did try writing a guide (for beginners) to wiring a CNC machine about a year ago. http://openbuilds.com/threads/electronics-101.693/

The further I got into it the more I realized just how much of a grey area it really is. Sadly, few of the newcomers to that forum took much notice and all the same wiring mistakes are still being made and re-discovered all over again.  ;D

Tweakie.
KEEP SAFE !

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: The solutions to my false limit switch triggering issues
« Reply #8 on: December 10, 2015, 12:59:49 PM »
Then if Al the Man gives me an answer and it is most likely correct, somehow I dont understand that either. There is still too much misunderstanding on my part about Earth/Ground/Negative. For some reason I can only think - and + no matter if it is AC or DC. That is just the beginning of how wrong I can be. I bet trying to write that guide helped clarify it too.
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)

Offline Chaoticone

*
  • *
  •  5,626 5,626
  • Precision Chaos
    • View Profile
Re: The solutions to my false limit switch triggering issues
« Reply #9 on: December 10, 2015, 01:20:19 PM »
I Must admit, I did try writing a guide (for beginners) to wiring a CNC machine about a year ago. http://openbuilds.com/threads/electronics-101.693/

The further I got into it the more I realized just how much of a grey area it really is. Sadly, few of the newcomers to that forum took much notice and all the same wiring mistakes are still being made and re-discovered all over again.  ;D

Tweakie.

I know exactly what your saying Tweakie. This was my attempt at prevention. http://www.machsupport.com/forum/index.php/topic,25616.0.html

I would like to think it has helped some but I think it is one of those things that we just have to go through to learn about it. Wisdom is something no one can take from you. Unfortunately no one can give it to you either. Hind site is 20/20 and while a lot of information is available I think an awful lot of it only makes sense if viewed in the rearview mirror.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!