GRBL vs. Marlin for milling

G21/G20 and G94/G95 aren’t in Marlin. If you picked inches per minute in estlcam, the grbl might have picked G95 and the F numbers would be all different.

ESTLCAM is set to mm/s, which is the same as in Marlin configuration file.

If those G codes are not in Marlin, I’m guessing they will they just be ignored, right?

And that may be why I had no issues during the milling process.

I think Marlin prints a “command not recognized” and just keeps going.

1 Like

I stuck with Marlin coming from the 3D printing world (although I prefer Repetier), but the more I learn about the capabilities of GRBL, the more interest I am in trying it out. I have the dual endstop setup. is that possible with grbl? Five independently driven steppers and dual end stops? I can’t find a GRBL board on Amazon that has more than 4 stepper drivers.

There was a thread here where someone added dual endstops and compiled it for a RAMPS board. To make it work on a minirambo or rambo, the digitpots need to be set, and the ports need to be configured (at least).

The dual endstop was in a bit of a beta state.

Here’s the thread in the forum about running a version of GRBL on a RAMPS board and being able to utilize dual endstops.

https://www.v1engineering.com/forum/topic/grbl-running-on-ramps/

Not real familiar with this stuff but I would think that you should be able to make it work on your MKS Gen L board.

 

2 Likes

Thanks for the link to that thread! I had just found the grbl-MEGA-5X github and was wondering what all I would have to do to make it compatible with the MPCNC with dual endstops.

Am I understanding correctly that I have to have an external PC/Laptop/Raspberry Pi for machine control? Can I use the LCD/SD Card at all?

That is correct. CNC.js on a v1pi or even running as a desktoo application works well with it though.

First thank you for putting this CNC together as open source.

I was thinking for a while building a CNC but being a hobby could not get one for my small budget. This one was able too build it for under $200 but had to cut some corners :wink:

As I already have a 3D printer which uses RAMPS and marlin FW decided to go with this hardware.

Wired the current Y axis (the one moving on the roller blades) using dual stepper drivers and wired the Z motors in parallel. Currently have no end-stops and was annoyed by the question marks on the LCD display so I start learning the Marlin Firmware code.

Currently I am waiting for some cheap mill bits to start cutting something.

I can build small gcode either by hand or generate it using software and quickly found some limitations of the firmware. So I am currently building a custom CNC menu into the firmware and I am looking for feedback.

The CNC menu appears immediately before the existing MOTION menu on the LCD and currently planning to implement the following structure:

MAIN
  • CNC
    • MOVE AXES
      • MOVE X
      • MOVE Y
      • MOVE Z
    • RESET ALL AXES
    • PROBE
      • PROBE Z DOWN
      • PROBE X RIGHT
      • PROBE X LEFT
      • PROBE Y RIGHT
      • PROBE Y LEFT
    • MILLING
      • CONFIGURATION
      • MILL TOP
        • SET TOOL DIAMETER
        • SET PATH OVERLAP %
        • SET BOARD SIZE X
        • SET BOARD SIZE Y
        • SET MILL DEPTH
        • SET MILL SPEED
        • SET MILL DIRECTION
        • Execute MILL TOP
      • MILL X SIDE
        • SET MILL SIZE
        • SET MILL DEPTH
        • SET MILL SPEED
        • Execute MILL X SIDE
      • MILL Y SIDE
        • SET MILL SIZE
        • SET MILL DEPTH
        • SET MILL SPEED
        • Execute MILL Y SIDE
      • DRILL
        • SET MILL DEPTH
        • SET MILL SPEED
        • Execute DRILL
    • RESET X AZIS
    • RESET Y AZIS
    • RESET Z AXIS
MOVE AXES:
  • My machine has no limit switches so I put the existing trim down MOTION MENU here to help with setting the origin manually.

RESET ALL AXES:

  • allows for setting the HOME position (X=0, Y=0, Z=0)

  • unfortunately in Marlin G92 X0 Y0 Z0 does not set machine coordinate but offsets so had some trouble getting this working correctly.

PROBE:

  • this menu helps with probing each axis using specific directions as I am planning to use a sticky metallic tape to find the board X Y Z position.

MILLING:

  • soon realized that if I want to use metallic tape I need a good surface to mount it to, so I built this menu to be able to run simple milling procedures.

  • In order to have a good surface I decided to implement algorithms that generate gcode in memory and drives directly from the LCD. (no SD card necessary)

  • Added operations for milling a corner of the board flat so I can stick the tape. This can be used for changing tools later one (I still have to figure this thing out)

  • Also added one more operation for drilling at the current position in order to be able to screw the board if needed.

The last three menu Items are currently there for manually set each axis origin separately.

 

Please give me any feedback on this menu and if you would like to see something else inside.

If @Ryan agrees I can work with him on getting these changes applied to his GitHub for somebody else to test them. I only have limited time and a single machine to test with so any help is appreciated.

The 3D printing got to the point where everything is so simple, on the CNC world no so much, and my plan is to bring this one step closer to pressing one button and start the milling :slight_smile:

PS: @chaotix here was mentioning the SCAN function that finds the edges of the print. would be interested to hear more about this feature as I think would be useful to implement too.

 

You can keep your own branch current with my firmware on github. That is easier than me trying to keep track of menu edits as the LCD stuff changes all the time.

Hi! I’m trying to do a pcb milling machine but I don’t know if I have to use arduino CNC shield or Ramps. I know that Ramps are mostly used to build 3d printers and that it uses Marlin firmware but the thing that I don’t know is if Marlin can be switched to be used for CNC or if it’s better to use CNC shield for arduino with GRBL.
Thanks!

Oh my… Yes, yes, yes, and I believe yes.

With the current state of affairs, Marlin is getting really good at being a CNC firmware. GRBL is still probably better is some ways due to its better feedback loop, but there are ways to work around all of it. Around here, the bulk of experience is with Marlin, but there is also a good working base of GRBL users. That being said, there is a small, but enthusiastic group (2-3?) of folks tinkering with LinuxCNC (no firmware, your Linux workstation is your controller).

If you go with Marlin, spring for a bonafide Rambo board (Ryan sells them at about the best price you’ll find). The RAMPs boards you find these days are Chinesium clones that tend to release their magic smoke easily, and the Mega boards they are often paired with come from the same factories. The Rambos have good protections (easily replaceable fuses, etc), and you may end up spending less on the one expensive board than on a number of cheaper boards. The MKS and SKR (I may have my alphabet soup wrong) boards are also being used, along with the Archim boards, but some configurations are really bleeding edge, and will require a lot of firmware tweaking and flashing.

GRBL has some interesting things happening, including a fork with 5+ axis control, allowing for dual endstops along with the (currently) better laser handling (vs. Marlin).

Ultimately, if you’re milling PCBs, the most important thing to do is to keep your build as small as you can and either keep your Z size really short, or always put your workpiece on a platform of some sort to effectively reduce the Z height to near zero. This is all to maintain rigidity and increase your precision. Large builds and extending your Z axis make for floppy spindles. :slight_smile:

I’ve probably “plugged” Marlin more than GRBL, but that’s because I know it better. I know GRBL enough to know it’s a great firmware, and that there is no reason not to use it. Personally, I think they are both fine for our purposes, and you should go with what you are most comfortable with.

Oh, and welcome to the circus! :clown_face:

2 Likes

Thanks!!! I know what you mean… but there’s something GRBL has that Marlin doesn’t or viceversa

1 Like

Right now (things change fast), Marlin has these advantages:

  • Support for tons of boards, from the mega/Ramps to the 32 bit $$$$ boards.
  • Support for an attached LCD.
  • Hundreds of thousands of 3D printers running the software, and a very active set of developers. The generic motion software is pretty reliable and stable.
  • If you 3D print, you’re probably already familiar with it.
  • Ryan’s preflashed Rambos are the easiest way to get started, and they include Marlin
  • The docs and the community here are focused mainly on Marlin

The advantages of grbl:

  • CNC only, so the theme isn’t printing. For example, on the LCD, to print from an SD card on marlin, you choose “print file”. grbl doesn’t have an LCD, but still…
  • The motion for laser engraving is better, although the Marlin devs are working on it, and they are just about there with a good laser mode.
  • Many CNC programs need special attention when working with Marlin. CNC.js, for example works better with grbl than Marlin. AFAIK, bCNC does work with grbl and not Marlin. We have a good set of software that works though. More info at the software workflow.
  • It is a smaller piece of code, so it would be easier to change if you had a specific change you wanted to make.

grbl has one main software version, and it basically only works on the arduino uno breakout board. There are modifies copies of grbl for some other boards (like the 5 axis rambo or ramps forks). It is possible to use these, but they are definitely not as “stable” as the main grbl software.

A worthy mention is the Grbl_esp32, which is a modified copy of grbl meant to work with the ESP32 boards. I am personally a fan of them, but I don’t have much experience. There is an MPCNC board for it. It will definitely be harder than the preflashed rambo from Ryan.

3 Likes

I am new. This is my first post. I am almost done printing my MPCNC Primo but I want to run it on GRBL as I am most familiar with the CAM software for laser and cnc milling. I am coming from a generic 3080.

I went with the 23.5mm 3/4 EMT conduit as I already have some.

Only problem is I am someone who needs that step by step guide and I can’t find it with a lot of googling and YouTubing. I’m not a tech person just a mechanically inclined person.

I really want to avoid marlin. Would someone volunteer their sanity to help me.

Need a hardware guide and step by step on flashing firmware I guess.

Also to note I would like dual endstops which I guess I would need to sacrifice for Grbl but I have an idea on how to deal with that and manually square the machine.

1 Like

You will likely get more responses to your question if you create a new topic rather than appending it to a five-year-old topic.

As for GRBL, the starting point is the selection of the control board. To me, there seems to be many forks of GRBL, each built around a control board or a class of control boards. Some of these forks seem to be well supported, while others seem almost experimental with limited support. The most mature version (for the MPCNC) is built around the CNC Shield, but with support for only four drivers, you definitely won’t get dual endstop support with this control board.

I did run across this topic some time back where someone implemented a version of GRBL with dual end stops for the Rambo board, but I don’t know how much support there is for that version.

1 Like

I am going to stick to what you guys offer and just adapt. Relearn a little it can’t kill me I’ll get it built and running and use estlcam. As for a laser I’ll have to work that out too. I’d rather have a working machine than a bunch of parts that can’t move cause I can’t figure out how to use 5 steppers on a 3 stepper board

1 Like

If you really want GRBL, there are active users on the forum that use CNC Shields, so I’m sure you can get it running. As for using 5 steppers on a 3-stepper board, you would need to wire them serially. Here is one wiring diagram. I don’t think V1 sells serial harnesses anymore, so you would need to wire it yourself.

As for laser on Marlin, the V1 maintained firmware for the Rambo and SKR Pro boards have laser support enabled. For other boards, you would need to make some simple changes before compiling. I run a laser on my Rambo board all the time.

1 Like

If you really want to do that I would recommend this, 6 Pack Universal CNC Controller from Bart Dring on Tindie I was told the board is in the works to get into a production somewhere else so hopefully they will be available soon.

I will say the easiest way by far and the most supported is Marlin around here. Once you get it working, though, you should not have to touch it again.

2 Likes

You can run a second shield. Self squaring would still be out of question but you would be able to run a pair of drivers and steppers per axis on those UNO boards.

1 Like