Welcome to Our Community

Some features disabled for guests. Register Today.

Limit switches not alarming - why?

Discussion in 'CNC Mills/Routers' started by Graham Payne, May 8, 2019.

  1. Graham Payne

    Builder

    Joined:
    Nov 7, 2018
    Messages:
    17
    Likes Received:
    5
    I am running grbl mega with Ramps 1.6. A Mega2560 with a Ramps 1.6 board. I'm led to believe the pinouts are the same as Ramps 1.4.
    Using OpenBuilds Control the motors run fine but when I hit the limit switch it doesn't put the machine in an Alarm state as it should.
    I have hard limits enabled using NO switches.
    If I click the Troubleshooting tab the limit box responds when I activate the switch, so the signal is getting thru.
    So whats going on?
     
  2. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,927
    Likes Received:
    4,291
    As its not the official Uno version of Grbl (github.com/gnea/grbl) I'd start by investigating the firmware itself. Possibly one of "we havent made that work with our port" kind of thing.
    Official Grbl / Grbl-Mega does work
     
  3. Graham Payne

    Builder

    Joined:
    Nov 7, 2018
    Messages:
    17
    Likes Received:
    5
    Not sure what you mean by "official"; this is open source firmware. It is 'grbl-Mega-1.1f.20170802'.
    I've tried several other flavours including the official grbl/grbl Mega version. all the same except one (a 0.9 version), but that crashed the software because of Openbuilds Control sending a '$J' (???) when jogging.
    And they all work, reporting the limit switch to OpenBuilds Control under the 'troubleshooting' tab as I have already mentioned.
    It's OpenBuilds Control software where the problem is I think. Any Ideas ?
     
  4. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,927
    Likes Received:
    4,291
    $J = Official new way to Jog in the Official Grbl 1.1: See here gnea/grbl


    Officially, Grbl runs on an Uno: See gnea/grbl
    Also Officially, it can run on a MEGA: See gnea/grbl-Mega with some exceptions and limitations... but Grbl Mega doesnt match the RAMPS pinout

    As you are running a RAMPS then the logical conclusion is you are using some FORK and not the official GRBLs from github.com/gnea

    The reason the official ones does not match the RAMPS pinout is that it needs pins on specific ports to tie interrupts to, to make basic things like Endstops work and to speed up output signalling (port addressing vs bitbanging).

    Get rid of the ramps standard and use one of the official builds, then all will play well... Those "forks" are usually nothing but a mess
     
    sharmstr likes this.
  5. Graham Payne

    Builder

    Joined:
    Nov 7, 2018
    Messages:
    17
    Likes Received:
    5
    Thanks for reply Peter.
    Actually this release was the first I tried (limits didn't work).
    And, this release has the defines for a Ramps board, which I used in config.h.
    In defaults.h I set the hard limits enabled, homing enabled and homing direction mask = 3.
    I have tried this with a Ramps 1.4 and a Ramps 1.6; still no limits alarm.
    Reports limits response in the Troubleshooting tab, but I think the interrupt isn't firing.
    I am using 3 wire limit switches (+5v, 0v, signal), checked with DVM the signal does go to 0v when activated.
    So what am I doing wrong?
     
  6. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,927
    Likes Received:
    4,291
    Config? Hard limits enabled? Homing enabled?
     
  7. Award

    Award Well-Known
    Builder

    Joined:
    Nov 12, 2018
    Messages:
    60
    Likes Received:
    35
    Hello Graham,

    I was looking up interrupts and ports for GRBL and Arduino Mega for something unrelated and came across this thread on Github( Ramps 1.4 · Issue #11 · gnea/grbl-Mega ) which discusses your problem with Ramps and hardware limit switches. It is quite a long thread but in summary you aren't doing anything wrong it is just that Ramps doesn't play nicely with GRBL like Peter said. There are a couple of solutions offered in the thread if you are coding inclined.

    Cheers

    Adam
     
    Peter Van Der Walt likes this.
  8. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,927
    Likes Received:
    4,291
    And if you cannot code, throw away the ramps, and use the official pinout instead :)
     
    Award likes this.
  9. Graham Payne

    Builder

    Joined:
    Nov 7, 2018
    Messages:
    17
    Likes Received:
    5
    Thanks Adam, I'll check this out in the morning, getting late here in Queensland.
     
    Award likes this.
  10. Graham Payne

    Builder

    Joined:
    Nov 7, 2018
    Messages:
    17
    Likes Received:
    5
    I've been coding 40 years, as a hobby only.
     

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