584,812 active members*
5,484 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 23
  1. #1
    Join Date
    Sep 2018
    Posts
    38

    Limit Switch Noise Fixed!

    Thought I would share my limit switch noise solution. I searched here looking for answers a couple years ago when my PM25 CNC conversion kept getting false triggers on the limit switches. I wired in some resistors which helped, but never totally fixed it. I tried shielded wires too but that didn't work.

    I kept getting "Limit Switch Triggered" in Mach 3 while cutting, which would freeze the machine. I have a 48V system two large Nema 23's and a Nema 34, all running at 5A's.

    Anyways, I researched it and decided to make a better solution.

    My limit switch filter board puts a load across the limit switches to reduce voltage spikes, an RC circuit to filter that signal, then a Schmitt trigger to remove jitter and add hysteresis, a level shifter to convert the signal to 5V, and current limiting resistors to protect the output wires from short circuits.

    It's been on the machine for the last couple months, and has finally fixed my noise problem!

    Pics of the final board and a screenshot of the signals!

  2. #2
    Join Date
    Jan 2005
    Posts
    15362

    Re: Limit Switch Noise Fixed!

    Quote Originally Posted by patrick31 View Post
    Thought I would share my limit switch noise solution. I searched here looking for answers a couple years ago when my PM25 CNC conversion kept getting false triggers on the limit switches. I wired in some resistors which helped, but never totally fixed it. I tried shielded wires too but that didn't work.

    I kept getting "Limit Switch Triggered" in Mach 3 while cutting, which would freeze the machine. I have a 48V system two large Nema 23's and a Nema 34, all running at 5A's.

    Anyways, I researched it and decided to make a better solution.

    My limit switch filter board puts a load across the limit switches to reduce voltage spikes, an RC circuit to filter that signal, then a Schmitt trigger to remove jitter and add hysteresis, a level shifter to convert the signal to 5V, and current limiting resistors to protect the output wires from short circuits.

    It's been on the machine for the last couple months, and has finally fixed my noise problem!

    Pics of the final board and a screenshot of the signals!
    No it fixed your limit switch problem, the noise is still there are you using any EMI Main Power Filters as this normally will solve most EMI noise
    Mactec54

  3. #3
    Join Date
    Sep 2018
    Posts
    38

    Re: Limit Switch Noise Fixed!

    Quote Originally Posted by mactec54 View Post
    No it fixed your limit switch problem, the noise is still there are you using any EMI Main Power Filters as this normally will solve most EMI noise
    My limit switches are fine, the problem was noise while it was machining parts causing it to freeze up in mach 3. The machine would think a limit switch triggered, but the machine was not touching any limit switches while machining. I'm using a filter, the one I built!

  4. #4
    Join Date
    Dec 2003
    Posts
    24216

    Re: Limit Switch Noise Fixed!

    The only thing with filters, they may cure the problem but the cause is still there, I have lost track of the amount of post That have had apparent spurious L.S triggering where I have advised on earth bonding all supply commons and possible equipotential earth bonding of the machine and it has cured the problem.
    Unfortunately many of these legacy posts are no longer there to quote as they disappear after a certain age due to forum 'cleaning'
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  5. #5
    Join Date
    Sep 2018
    Posts
    38

    Re: Limit Switch Noise Fixed!

    Quote Originally Posted by Al_The_Man View Post
    The only thing with filters, they may cure the problem but the cause is still there, I have lost track of the amount of post That have had apparent spurious L.S triggering where I have advised on earth bonding all supply commons and possible equipotential earth bonding of the machine and it has cured the problem.
    Unfortunately many of these legacy posts are no longer there to quote as they disappear after a certain age due to forum 'cleaning'
    Al.
    I never did the earth bonding. I just hooked all the ground wires together. But yeah I'm glad this cured the problem, even if the grounding is still not perfect, my issue is fixed so I'm happy and making parts.

  6. #6
    Join Date
    Jan 2005
    Posts
    15362

    Re: Limit Switch Noise Fixed!

    Quote Originally Posted by patrick31 View Post
    My limit switches are fine, the problem was noise while it was machining parts causing it to freeze up in mach 3. The machine would think a limit switch triggered, but the machine was not touching any limit switches while machining. I'm using a filter, the one I built!
    The reason you had noise that caused false triggers is because of bad Grounding somewhere in your system and no Mains Power Filter the filter you made is just a band-aid, the noise is still there which will affect other parts of your electronics over time

    This is one of the most common problems with Hobby builds and easy to fix without the filter you made, this type of filter you made normally will slow down the reaction time of the limit switches

    Are you using a VFD Drive for your Spindle control / Drive if so this is where most of the EMI noise comes from
    Mactec54

  7. #7
    Join Date
    Sep 2018
    Posts
    38

    Re: Limit Switch Noise Fixed!

    I appreciate your willingness to diagnose possible underlying problems with my machine. The one thing you are correct about, is that the filter board slows down the reaction time. That is an engineered value. You can see that in action in my first post with the logic analyzer screenshot.

    I do have a VFD. I've also tested your theory as that was mentioned on the forums here. It ran the program without the spindle/without cutting, it would still kick out due to limit switch errors.

    I scoped the switches, there was high frequency noise coming from the steppers under high acceleration moves (my machine runs a heavy vice, heavy spindle/headstock) and those high current moves were inducing noise into the limit switch wires.

    My motion control board sends the weak 12v signal from the switches through a resistor, then straight to the CPU pin. Bad design, but I didn't design that. The board should have had it's own engineered filter for the inputs. My filter board solved that problem. You can call it band-aid 20 more times, but I have had zero issues since installing this board, and am very happy to be able to make parts without issue.

  8. #8
    Join Date
    Jan 2005
    Posts
    15362

    Re: Limit Switch Noise Fixed!

    Quote Originally Posted by patrick31 View Post
    I appreciate your willingness to diagnose possible underlying problems with my machine. The one thing you are correct about, is that the filter board slows down the reaction time. That is an engineered value. You can see that in action in my first post with the logic analyzer screenshot.

    I do have a VFD. I've also tested your theory as that was mentioned on the forums here. It ran the program without the spindle/without cutting, it would still kick out due to limit switch errors.

    I scoped the switches, there was high frequency noise coming from the steppers under high acceleration moves (my machine runs a heavy vice, heavy spindle/headstock) and those high current moves were inducing noise into the limit switch wires.

    My motion control board sends the weak 12v signal from the switches through a resistor, then straight to the CPU pin. Bad design, but I didn't design that. The board should have had it's own engineered filter for the inputs. My filter board solved that problem. You can call it band-aid 20 more times, but I have had zero issues since installing this board, and am very happy to be able to make parts without issue.
    So you new where the noise was coming from so why did you not fix that source, before you made the board, there is nothing wrong with you making the filter board, just not needed if you had fixed the problem

    Sounds like your motion control board is not great as well which one did you use is good to post about control boards that could cause problems, so others don't make the same buy
    Mactec54

  9. #9
    Join Date
    Aug 2021
    Posts
    1
    Quote Originally Posted by Al_The_Man View Post
    The only thing with filters, they may cure the problem but the cause is still there, I have lost track of the amount of post That have had apparent spurious L.S triggering where I have advised on earth bonding all supply commons and possible equipotential earth bonding of the machine and it has cured the problem.
    Unfortunately many of these legacy posts are no longer there to quote as they disappear after a certain age due to forum 'cleaning'
    Al.
    Ahh that explains why I can’t find a good all-in-one place to determine exactly how to approach earthing all my components. Someone who knows what they’re talking about and writing an A-Z guide as a sticky would be an amazing help to a vast number of visitors!

  10. #10
    Join Date
    Dec 2003
    Posts
    24216

    Re: Limit Switch Noise Fixed!

    Quote Originally Posted by readeral View Post
    Ahh that explains why I can’t find a good all-in-one place to determine exactly how to approach earthing all my components. Someone who knows what they’re talking about and writing an A-Z guide as a sticky would be an amazing help to a vast number of visitors!
    Yes, I had posted previous post on this, but after a certain period of time, the old legacy posts get deleted when they reach a certain age it seems.
    I will see If I can post a revision.
    I generally make a point of earth grounding all power supply commons to the star point, your PC PS low voltage is already at GND via the MB common plane screws
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  11. #11
    Join Date
    Sep 2018
    Posts
    38

    Re: Limit Switch Noise Fixed!

    Been running the filter board for over a year now. Got a few hundred hours on the machine and zero issues!

  12. #12

    Re: Limit Switch Noise Fixed!

    Do you think the filter is needed, or is it a bandaid for some underlying issue? If it works, it works, no issues on my end there. I am just curious because I don't use any filters on my proximity switches and have never had an issue. I run my switches off a dedicated 24v supply, I suppose that could help.

  13. #13
    Join Date
    Jan 2005
    Posts
    15362

    Re: Limit Switch Noise Fixed!

    Quote Originally Posted by CL_MotoTech View Post
    Do you think the filter is needed, or is it a bandaid for some underlying issue? If it works, it works, no issues on my end there. I am just curious because I don't use any filters on my proximity switches and have never had an issue. I run my switches off a dedicated 24v supply, I suppose that could help.
    Even with correct wiring practice's in place, filters should be throughout the electrical cabinet for the different devices, being used, noise is noise and it will always be there, filters in the right places take care of most noise problems

    Even your 24v supply will emit noise so nobody is immune to noise of some kind
    Mactec54

  14. #14
    Join Date
    Dec 2003
    Posts
    24216

    Re: Limit Switch Noise Fixed!

    Quote Originally Posted by CL_MotoTech View Post
    Do you think the filter is needed, or is it a bandaid for some underlying issue? If it works, it works, no issues on my end there. I am just curious because I don't use any filters on my proximity switches and have never had an issue. I run my switches off a dedicated 24v supply, I suppose that could help.
    Filters are usually a cover for some underlying problem, I prefer to nail the source, I ground PS commons where ever possible.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  15. #15
    Join Date
    Jan 2005
    Posts
    15362

    Re: Limit Switch Noise Fixed!

    Quote Originally Posted by Al_The_Man View Post
    Filters are usually a cover for some underlying problem, I prefer to nail the source, I ground PS commons where ever possible.
    Filters are built into any good system and are a code requirement in some countries
    Mactec54

  16. #16
    Join Date
    Sep 2018
    Posts
    38

    Re: Limit Switch Noise Fixed!

    Quote Originally Posted by CL_MotoTech View Post
    Do you think the filter is needed, or is it a bandaid for some underlying issue? If it works, it works, no issues on my end there. I am just curious because I don't use any filters on my proximity switches and have never had an issue. I run my switches off a dedicated 24v supply, I suppose that could help.
    My motion control board should have filtering on the input pins, but it's a cheap chineese board and it doesn't. It just has pull up resistors.

    If I had higher quality board, there would be no issue because it either has hardware filtering, or software filtering, or both. It has none so this board fixed it. I have them on ebay now and sold a few.

  17. #17
    Join Date
    Sep 2018
    Posts
    38

    Re: Limit Switch Noise Fixed!

    Quote Originally Posted by Al_The_Man View Post
    Filters are usually a cover for some underlying problem, I prefer to nail the source, I ground PS commons where ever possible.
    This is nonsense.

    Filters are used because they raise noise immunity and vastly increase reliability of systems in the real world where everything isn't perfect and equipment still needs to work day in and day out.

  18. #18
    Join Date
    Jan 2005
    Posts
    15362

    Re: Limit Switch Noise Fixed!

    Quote Originally Posted by patrick31 View Post
    My motion control board should have filtering on the input pins, but it's a cheap chineese board and it doesn't. It just has pull up resistors.

    If I had higher quality board, there would be no issue because it either has hardware filtering, or software filtering, or both. It has none so this board fixed it. I have them on ebay now and sold a few.
    eBay Item #
    Mactec54

  19. #19

    Re: Limit Switch Noise Fixed!

    Quote Originally Posted by patrick31 View Post
    My motion control board should have filtering on the input pins, but it's a cheap chineese board and it doesn't. It just has pull up resistors.

    If I had higher quality board, there would be no issue because it either has hardware filtering, or software filtering, or both. It has none so this board fixed it. I have them on ebay now and sold a few.
    Thanks! I appreciate the response!

  20. #20
    Join Date
    Sep 2018
    Posts
    38

    Re: Limit Switch Noise Fixed!

    Quote Originally Posted by mactec54 View Post
    eBay Item #
    A search for limit switch filter should turn it up pretty quick, there aren't many options out there which is why I made this.

Page 1 of 2 12

Similar Threads

  1. Limit switch noise: Optocoupler, 12v, 24v?
    By Biggs427 in forum CNC Machine Related Electronics
    Replies: 16
    Last Post: 09-06-2023, 07:38 AM
  2. Triple Play Solid State Limit Switch Noise Filter
    By mill808 in forum CNC Machine Related Electronics
    Replies: 0
    Last Post: 04-19-2017, 11:07 PM
  3. Electric noise - home/limit switch
    By feragto in forum DIY CNC Router Table Machines
    Replies: 33
    Last Post: 11-21-2010, 06:33 PM
  4. Need help with noise on limit switch cables. Elco or AC cap?
    By riva in forum CNC Machine Related Electronics
    Replies: 4
    Last Post: 11-14-2008, 12:04 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •