FOSS milling toolchain: freecad gbrl on ramps – discussion

This is the discussion thread for the related tutorial

1 Like

I like your short video series. Thanks for putting this together. I will have to try freecad again. Check your link on the Video-5. It seems to be the same as the Video-4 link.

1 Like

corrected the link of video4

I’m ill (have the flu) so progress is slow.

Currently, I try to figure out which grbl on ramps version would work on the dual endstop setup.

There is this this modification, but I guess its for the default mpcnc setup.

I found grbl-mega which supports 5 axis. I wonder if anybody configured/adapted it for the mpcnc (axis clones for x and y) aleready?

This has been asked for here. I could not figure this out so far and think I should go to bed again now.

I plan to add a post in the tutorial where we collect different grbl on-x solution, probably for the default and the dual endstop setup, followed by e.g. post collectin possible frontends like bCNC. This one looks appropriate to me as it runs on any system supporting python.

Kudos to you, Alex, for putting effort behind your idea to have a FOSS solution. Working through the details and creating tutorials is harder than it looks. Keep it up, and I look forward to following your efforts.

ah, to bad. I lost a long post.

In short.

I like the idea everybody adding a small delta and ending up with impressive things as @Ryan @Jeffeb3 demonstrated.

I flashed the grbl fork but then recognized that it’s for default setup - so people running the default setup on ramps should be fine using this togehter wit bCNC following this tutorial.

I digged into a possible solution for the dual endstop auto squaring setup and ended up in the grbl-Mega-5x sub-branch. I try to get some advice here.

shorter posts from now on as i lost a long one…

I’m still not fully convinced of grbl:

The main branch is for 3 axis and it’s not yet planned to support 5. The 5x is a subbranch which might never end up upstraem as the author of the main branch concentrates currently on ARM controllers.

An alternative would be:

switch to linuxcnc, using an inexpensive hardware as demonstrated by @dkj4linux. I don’t know if we could base a default and dual endstop firmware there more easily and with a better chance to be long term supported.

I guess for first I will continue with the grbl on ramps route. Perhaps other can provide their solution.


Working through the details and creating tutorials is harder than it looks
You are so right! It took me 10 min to figure out how to use freecad (I used it for designing 2 years ago). And then 3 hours to make the videos (you can't imagine how often I restarted the records ;-))

After reading much (also linux cnc related) I come to the conclusion that it could be the easiest to add a marlin-mpcnc post to freecad.

I had a look at it and found - working through the issues pointed out by @guffy

These codes set the current plane as follows:
  • G17 : XY (default)
  • G18 : ZX
  • G19 : YZ
This mode applies to G2/G3 arc moves. Normal arc moves are in the XY plane, and for most applications that's all you need. For CNC routing it can be useful to do small "digging" moves while making cuts, so to keep the G-code compact it uses G2/G3 arcs involving the Z plane.

These commands are supported in Marlin 1.1.4 and later with ARC_SUPPORT and CNC_WORKSPACE_PLANES enabled.

I will test that (at least the dual endstop firmware is based on marlin 2 - so this should be easy).

We then would have open the point with G1 and G0.

@Ryan , you stated

alex: but in stock Marlin G0 is an alias for G1,
This has just changed, Marlin has now separated them.
What does that mean? We could just get away with default grbl output?

So to sum up for now:

We could just derive from grbl pp in freecad, possibly configure some basic mpcnc related settings, possibly replacing G1 by G0 with F and that could be it. I learned in the meantime how to do that in freecad (its a simple py macro we need to copy) and could do that.

Anything else we should check?

To make some advertisement for support:

If we could achieve this we would have ‘our’ own mpcnc post in freecad and all the different mpcnc univers machines could use it - I think this would be worth it.



Bart’s esp32 board runs grbl32 and supports dual endstops. You can also just add hardstops to your machine if you want repeatability. That’s how I started, and that got me through lots of orders.


With the esp32 boards you get wifi and onboard controls, SD card, and it’s fairly inexpensive.

in FreeCAD, holding tabs are called ‘tags’ and are available as a ‘Dressup’ on an operation.

[attachment file=100268]

hey, things get going :slight_smile:

thanks @Aaron and @edwardvmills I will have a look at it.

In the meantime I got an answer from Raphael in the grbl-mega-5x github. Seems like dual endstop is just a configuration issue and he has already done it.

-> I also need to test that

should we add it to the tutorial? is someone willing to write it up?


…yeah! I like the progress. I knew: things are there - we just need to sum it up and add some smaller deltas to it!

I like grbl, but is there a reason the CAM tutorial won’t work with Marlin? I think we are still majority Marlin here.

the reason is there no marlin-post (so far).

See also my post in option C) -> my favorite

As far as I understood, you are ‘the man’ regarding firmware. I think it would be doable; could you give me some hints about which (other) gcodes to check? Or do you have good contact to the marlin universe? marlin is based on grbl, so for a marlin pro togehter with you it could be easy to list the g / M codes where something should be done. I could do it then.
Concentrating on milling for first, i imagine that this list might end up quite short…

The sending software (repetier, octoprint, cnc.js) all have a lot of work to be compatible with both firmwares, but just gcode files are pretty good already.

Guffy has rewritten the fusion post processor and I’m sure would know a lot more than me about the little hiccups that need to be worked around. The biggest cause of pain that I’m aware of is Z moves that are too fast. Z moves should have a separate speed setting and they need to be set each time you switch from xy to z.

By default (which is really what you should work towards) G0 is a straight map to G1. So you need to set speeds when you’re using G0.

There used to be problems with () style comments, but that mught be fixed. Don’t use line numbers or checksums. Most everything else is pretty simple amd the Marlin gcodes are well documented.

BTW, I would love to help with this, but I am super swamped and the nice weather is calling me out too.

thanks for your replies

i tried ‘to get out of guffy as much as possible’. its what is written on the linked page

i don’t know if it relevant to the level of detail you guys need, but i ran the grbl output of freecad through repetier to the MPCNC board supplied by V1, which i i believe is Marlin. i dont have the endstops set up, and i never messed with home commands.





Not sure if you’ve seen it, or if it is what you are looking for, but there was a thread a while ago about running GRBL 5X on Ramps, and the OP did get it working on an MPCNC with dual endstops.

Here’s the link:


Hi Leon,

Thanks for that! Great work by @Pablo Casaña! I have been searching for it but did not find it (i was in direct contact with the people from mega-x5).

I will test it and add a link to the tutorial.