Welcome to Our Community

Some features disabled for guests. Register Today.

Debugging Limit Switches

Discussion in 'CNC Mills/Routers' started by DarkPenguin, Jul 30, 2020.

  1. DarkPenguin

    DarkPenguin Well-Known
    Builder

    Joined:
    Sep 16, 2017
    Messages:
    201
    Likes Received:
    65
    Hi,

    So my Openbuilds limit switches have been peachy since I installed them and figured out how they work.

    Suddenly they are tripping in the middle of a job. Randomly. I've changed nothing on the setup. The only thing wrong with the machine are two wheels that need adjustment. Not a limit switch thing.

    I've moved wires around. Added ferrite beads to just about everything. No joy. And no change.

    How do I debug this? Why does this start out of nowhere? Can my router (makita) be screwing me? Do these things start making more noise out of nowhere? I have two wall warts connected to my PC. Can they start to noise things up?

    I have not power cycled the BlackBox. Is this worth doing? I've reset it a number of times. But not the power.

    I'm trying to figure out how to tell which one is tripping. I homed the machine and pulled the y axis plug.

    Thank you for your help.

    Tom
     
  2. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,923
    Likes Received:
    4,291
    Grbl uses port-group interrupts to speed up detection (important to stop in time, polling is too slow) but that does mean even grbl does not know which input it was. The group as a whole reports a limit hit.

    Apart from emi, a switch itself can get damaged mechanically (vibration makes it close) which wiggling it while running an aircut can help diagnose

    Power cycle probably wont make a difference.
     
  3. Corey Corbin

    Corey Corbin Well-Known
    Builder

    Joined:
    Feb 27, 2016
    Messages:
    135
    Likes Received:
    62
    I had a EMI problem when I got my XYZ probe. Now its not the probes fault it was mine. When I first built the machine I was aware of the emi of limit switches so bought opticouplers to isolate them. I had not had one problem with interference. When I first got the probe after I was done zero'in my part I would place the probe on the table next to the machine. Well I started having trips here and there. I would have job here and there not finish. Then the machine would finish a job. Then on one job it couldn't even travel a inch and then it would say it had to re home for safety. Then I looked over and realized I had thrown the probe on the table and the little magnet had attached its self the PSU of my 500w spindle. Ahhh! So now I place it far away from any power supply. I put it goes in a drawer on the workbench. I have not had a emi trip since. Just thought I would share, something small like a habit of where I placed a piece of equipment was causing the trip. And I do believe it was tripping through the probe cause I still have the opicouplers on the limit switches.
     
    Peter Van Der Walt likes this.
  4. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,923
    Likes Received:
    4,291
    That's one to remember for sure!

    And yeah, it happens
    The other day I couldn't understand why all of a sudden my plasma was killing the USB ports on the PC all at once all of a sudden. Turns out i was just shooting some video, unplugged the camera but left the USB cable plugged into a front-usb port on PC. That hanging cable acted like an antenna
     
  5. DarkPenguin

    DarkPenguin Well-Known
    Builder

    Joined:
    Sep 16, 2017
    Messages:
    201
    Likes Received:
    65
    Neato. I just leave the xyz probe hanging off the back of the machine. Guess I'll disconnect it.

    But I haven't had it trip since I power cycled it. Still running tests.
     
  6. DarkPenguin

    DarkPenguin Well-Known
    Builder

    Joined:
    Sep 16, 2017
    Messages:
    201
    Likes Received:
    65
    It ran for hours today. All I did was kill the power and pull the usb cable. Re-homed and ran what was failing for hours and hours.
     
  7. Corey Corbin

    Corey Corbin Well-Known
    Builder

    Joined:
    Feb 27, 2016
    Messages:
    135
    Likes Received:
    62
    Good catch. And a note to self to remember to remove all USB cords not in use.

    @DarkPenguin nice glad you found something that worked.
     
  8. DarkPenguin

    DarkPenguin Well-Known
    Builder

    Joined:
    Sep 16, 2017
    Messages:
    201
    Likes Received:
    65
    So, if I use the xyz probe I have to completely disconnect it afterwards. If I leave it connected use I will eventually get a spurious limit switch failure. If I have it connected but do not use it things are fine.
     
  9. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,923
    Likes Received:
    4,291
    See docs:blackbox:faq-emi [OpenBuilds Documentation]

    Any cable can catch stray EMI. Refer the link above for some tips (Ferrites, spacing wires, avoid VFD, shielding in extreme cases)
     
  10. DarkPenguin

    DarkPenguin Well-Known
    Builder

    Joined:
    Sep 16, 2017
    Messages:
    201
    Likes Received:
    65
    I do wonder about static from the vacuum. I'll look into grounding that.
     
  11. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,923
    Likes Received:
    4,291
    Oh yeah thats very often the case, especially because cheaper vacuums have 100% plastic hoses. Remember the balloon rubbing on your head fun when you were a kid? - proper dust systems have metal spirals around the pipe, because dust + static electricity sparks have even caused fires (or explosions) but a length of bare copper through it does a good job too
     
    daxliniere likes this.
  12. Corey Corbin

    Corey Corbin Well-Known
    Builder

    Joined:
    Feb 27, 2016
    Messages:
    135
    Likes Received:
    62
    Oh man if you want to watch some YouTube videos with static, google " static electricity gas station explosion" Before I touch the pump I always touch ground to discharge the static. What eye opener.
     
    Peter Van Der Walt likes this.
  13. DarkPenguin

    DarkPenguin Well-Known
    Builder

    Joined:
    Sep 16, 2017
    Messages:
    201
    Likes Received:
    65
    I switched to soft limits.
     
  14. perks1018

    perks1018 New
    Builder

    Joined:
    Dec 23, 2019
    Messages:
    9
    Likes Received:
    0
    Can you still home with soft limits only? I switched to optical switches and had it almost all set up and running after I expanded my machine (workbee clone) to a 1510. Everything was/is great except for my Z switch (named after my youngest son, who is notoriously contrary) which insisted on being ON (according to Control troubleshooting) when it wasn't triggered. When I triggered the switch, it showed OFF in Control, meaning the switch was operating albeit backwards. By the way, this was still when that switch was an Openbuilds Extension roller switch with the filter etc. Convinced that the internal circuitry was corrupt, I clipped out the old roller switch and soldered in a new one, this time jumping the wires in order to make it NC, even though it was still wired in parallel. IOW, the switch was now ON until it was triggered. This fooled Control and everything worked peachy but required that I set $5=1 for the system to operate. Figuring everything would sort itself out when I replaced it with the optical switch (I had to print a custom mount and trigger finger before I could do that) imagine my horror when after running the 12 feet of wire through two cable chains and the final sheathing that the optical switch LED glowed bright green when I plugged it in, indicating it was triggered. Furious at the thought that I, despite meticulously connecting, soldering, and double shrink wrapping each and every joint of the four meter-long dedicated (but unshielded) cable, had shorted one of those connections, I pulled all the wiring back out, and ran a brand new three conductor cable the whole length with the same result. I tested the end stop with a short cable plugged into the Z limit socket and it worked fine. Apparently, the twelve feet of unshielded wiring was picking up enough EMI to trigger the switch? I've never had any EMI problems with the smaller version of this machine before despite running my router cord with the all the other cables? Will an optoisolator on the limit switches fix this?
     
  15. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,775
    Likes Received:
    1,358
    Best solution to emi problems is always to identify and remove the source. If you have mains (or worse - vfd or spindle) wiring close to and parallel to low voltage wiring you have created a capacitor - which is a low resistance path for AC current. Physical distance is the best cure, shielding can only do so much.
    Alex.
     
  16. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,923
    Likes Received:
    4,291
  17. Gary Caruso

    Gary Caruso OpenBuilds Volunteer
    Staff Member Moderator Builder

    Joined:
    May 19, 2016
    Messages:
    1,193
    Likes Received:
    532
    I hardly ever (almost never) home my machine.. Set the work zero and go, I only worry about it when doing larger projects with expensive material.
    But my machine is very dialed so your results may vary.
    Gary
     
  18. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,923
    Likes Received:
    4,291
    If you run Fusion GCODE and other more advanced CAMs that also runs in G53, you need Machine Coordinates set too
     
  19. DarkPenguin

    DarkPenguin Well-Known
    Builder

    Joined:
    Sep 16, 2017
    Messages:
    201
    Likes Received:
    65
    I still have switches for homing. But limits are soft.

    You want homing switches with grbl. Otherwise sooner or later you'll turn the machine on in a weird place, set your work zero, hit go, and watch the machine try to cut the stock or itself in half. Soft limits just yells at you when it is going to overrun. Way less catastrophic than hard limits. Life is better this way.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice