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?
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
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 ?
$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
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?
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