Grbl on RAMBo w/ Dual Endstops!

tl;dr I have Grbl working on my MPCNC + RAMBo with full dual-endstop support! I’d love it if other people could give it a try!

I built upon to the great work from @enducross (and GitHub user @fra589) to get grbl-Mega-5X working on RAMPS boards and also @alexp’s instructions on how to invert the endstops for the NC endstops. I added support for digipots and microsteps necessary to support the RAMBo board. I also added a feature to provide per-axis offsets, similar to the {X,Y}_DUAL_ENDSTOPS_ADJUSTMENT / M666 setting in Marlin.

I set the pin map so that if you followed the Marlin instructions for dual endstops with RAMBo, you should just be able to drop in this firmware and it should work out of the box.

My code is the mpcnc-rambo-support branch of my fork of grbl-Mega-5X on GitHub. Here’s how you can try it out:

  1. Download the code from my branch (either with git or by clicking the 'Download' button).
  2. Follow the instructions on the Grbl wiki for compiling / flashing Grbl.
  3. (Optional) To set per-axis offsets to square your machine, set values for settings ($150, $151, $153, $154 for axis X1, Y1, X2, Y2 respectively). For example, to tell axis X1 to move 1.7mm from the endstop to square the machine, send $150=1.7 to Grbl using your gcode-sending software of choice (I like CNCjs). These offsets are applied during homing ($H).
  4. (Optional) You may also want to set the per-axis max travel settings as appropriate for your machine's size with $130, $131, $133, $134 for axis X1, Y1, X2, Y2 respectively.
Let me know how it goes!

Excellent work. Thank you!

1 Like

What!?! That is pretty nuts, great work!

1 Like

Awesome! I wonder if it would be possible to compile GRBL for Rambo Mini? This is great, as grbl itself can’t do dual endstops on any axis as it only has 3 axis total.

1 Like

Thanks for the love y’all!

@forgecnc the main Grbl project ( and would probably work on the Mini Rambo if you ported my digipots and microstep changes over. I’d be happy to make a pull-request with digipots and microsteps into the main Grbl repo, but I want confirmation from a maintainer that they would be willing to accept the change if I put in the work. I created two issues: #695 for microstep controls, and #696 for digipots to ask if they’d like to have those features in Grbl. We’ll see what they say.

Alternately, you can probably use my branch if you change N_AXIS to be 3 instead of 5. I think @fra589 wrote grbl-Mega-5X in such a way that it can still work with only 3 axes, but I’m not sure. Please report back if you give this a try.

1 Like

Also, I just wanted to clarify, there is no lcd/SD support right? That’s what I’m thinking, but just wanted to verify.

Correct, no LCD or SD support in Grbl. But I think it’s way more usable to just use CNCjs on a Pi with a touchscreen anyways. Bonus is that you can load gcode over WiFi.

Edit: I did notice this issue with some folks adding LCD and SD support to Grbl.

1 Like

Will it still work for RAMPS ?

Probably! Though you can just use grbl-Mega-5X for RAMPS. Maybe I’ll submit my axis adjustment code as a pull request to that repo

1 Like

I’ll try to setup your version on RAMPS and report here because I want to use endstop adjustment.
That will be nice if it got merged. I’ve opened and issue a while ago in grbl-Mega-5X but it was closed with resolution not needed.

Great! Make sure to comment out CPU_MAP_2560_RAMBO_BOARD and uncomment CPU_MAP_2560_RAMPS_BOARD from config.h. Let us know how it goes!

I can confirm that everything works for RAMPS

there is a small bug with digipots settings
I did a quick hack to make it work but I think there should be a better solution. This setting should probably not present if digipots are disabled in the code

I’ve also added an config file for to be able to build it easily





@zerg32 thanks for letting me know about the bug. I got buy-in from the grbl maintainer @chamnit to add the digipots code to the gnea/grbl-Mega repo. I’ll make sure to include your fix when I make the PR to that repo. support is a nice addition. Thank you!

I’ve only #ifdef the set_current method. If you are going to bring it to the main repo I think it is a good idea to #ifdef the setting also. In other case we’ll have a setting that does nothing.

I put up my pull-request upstream for digipots!

Ideally I’d like to get as much of this as possible merged upstream so that I don’t have to maintain a sizeable fork :slight_smile:


Awesome! I know the feeling less edits make for much easier fork maintenance.

Hi everyone,

I’m new to the community but i’m very interessed but putting GRBL on my lowrider v2.

I flashed my Rambo with the firmware found on this topic.

As the firmware is for MPCNC I think it’s normal untill I make some changes that my steppers don’t do what they are supposed to do … Can some one help me ?

By the way I have planed to put endstops but i’m still waiting for the 3D printed parts, so for now my lowrider doesn’t have endstops. I uncommented the homing cycle on start in the config.h (I think it’s ok) but when I try to move some directions, with CNCjs, I can read in the console “ALARM:2 (Soft limit) [msg: reset to continue]”



Well i’m making my path into the mess …

so I have changed assigment letters of Axis 4, in “config.h” to assign it to the Z axis (for the lowrider). So now every stepper do what they are supposed to do exept for the “Axis_4” that is moving much slower than the other Z axis … I have tried to change the steps/min, … etc in “defaults.h” to match with the original Z axis but seems to do nothing … it keeps to move slower.

moving to negative coordinates is ok with “$20=0”, it is also done for this part …

Someone can help me ?


(excuse my english by the way, hope you understand everything)

Ha I’m sure you do know the feeling! I’ve been impressed with how well you’ve kept the MPCNC/MP3DP/LowRider cose organized!

@dhuvelle I don’t have a lowrider so I don’t think I can be very helpful. Let us know if you make progress!

OK !!! Found the solution !! YOUHOU

It was the Grbl settings in the EEPROM that wasn’t right … I don’t know why it wasn’t changing the settings in the EEPROM when I was flashing with Arduino IDE (I don’t know how it works, but maybe there is something to change in the firmware and this can help you or it is normal).