Grbl - Arduino Uno: Advanced motion controller

309 views
Skip to first unread message

Ravi Ganesh

unread,
Nov 3, 2021, 11:44:09ā€ÆAM11/3/21
to OpenPnP
Hi Mark,
Request you to add and support this Grbl firmware in Advanced motion controller section..
It incorporates M114, M115 and a few more.

For makers who want to do great things with simple tools this could be useful.


PS: I will post the video of its action after the Indian Deepavali Holidays.
Happy Deepavali.

Ravi


ma...@makr.zone

unread,
Nov 3, 2021, 12:47:38ā€ÆPM11/3/21
to ope...@googlegroups.com

Hi Ravi,

Looks good!

Can I just use any "naked" Arduino and use this with no connections? So I can test the responses? Or does it require certain inputs wired (NC end-stops?)

More as a side note, some questions/remarks:

  1. I'm sure there is a good reason, but why did you not base your repository on the official gnea grbl? So changes can be easily integrated in the future? Like you started here, it seems?
    https://github.com/surabibio/grbl_4axes
    I.e. why did you not finish your integration there?
  2. Only the gnea original has the Wiki with the instructions, such as how to build, you should link there from your readme.
    https://github.com/gnea/grbl/wiki/Compiling-Grbl
  3. Why do you call it 5 axis? IMHO, driving two steppers with the same Y step/dir is not a 5th axis. šŸ˜

_Mark

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/4197a30a-685f-4e1f-a389-cf0d45f17a37n%40googlegroups.com.

surab...@gmail.com

unread,
Nov 3, 2021, 1:29:43ā€ÆPM11/3/21
to ope...@googlegroups.com

Hi Mark,

Yes you can use any Arduino (that uses a Atmega328p). I am a fan of visual manual homing and I have never used limit switches even in my mills.

Ā 

More as a side note, some questions/remarks:

  1. I'm sure there is a good reason, but why did you not base your repository on the official gnea grbl? So changes can be easily integrated in the future? Like you started here, it seems?
    https://github.com/surabibio/grbl_4axes
    I.e. why did you not finish your integration there?

This is based on the official gnea grbl and my code except in stepper.c is in #defines. So I did have an eye on future synchronization with the official grbl. (That grbl_4axes is a production running version for me and I did not want to touch it! Ā This latest port required all step pins to be in one port and direction pins in another ! Hence not backward compatible, unless a rewiring is done on my old machine)

Ā 

  1. Only the gnea original has the Wiki with the instructions, such as how to build, you should link there from your readme.
    https://github.com/gnea/grbl/wiki/Compiling-Grbl

OK

  1. Why do you call it 5 axis? IMHO, driving two steppers with the same Y step/dir is not a 5th axis. šŸ˜

Grbl called it DUAL_AXIS. I too wondered why all this effort if you can simply share pins for dual axis.

BTW Ā step pins are different. Only direction pin is same and by compilation it can also be allotted to a different pin in the same port.

I will call it 4.5 axis. šŸ˜‰ OK?

Ā 

BR,
Ravi Ganesh

--
You received this message because you are subscribed to a topic in the Google Groups "OpenPnP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpnp/2apLtTpBakQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/5a4a15f5-bfc1-2725-7d54-8c2216792129%40makr.zone.

surab...@gmail.com

unread,
Nov 3, 2021, 1:43:17ā€ÆPM11/3/21
to ope...@googlegroups.com

Hi Mark,

You can go ahead and fork the official grbl and then replace all files with my files, so the official repository will be in openpnp account.

Any future updates I will make from this openpnp account and give a valid pull request. OK?

Ā 

BR,
Ravi

Ā 

Ā 

From: ope...@googlegroups.com <ope...@googlegroups.com> On Behalf Of ma...@makr.zone
Sent: Wednesday, November 3, 2021 10:18 PM
To: ope...@googlegroups.com
Subject: Re: [OpenPnP] Grbl - Arduino Uno: Advanced motion controller

Ā 

Hi Ravi,

--
You received this message because you are subscribed to a topic in the Google Groups "OpenPnP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpnp/2apLtTpBakQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/5a4a15f5-bfc1-2725-7d54-8c2216792129%40makr.zone.

ma...@makr.zone

unread,
Nov 3, 2021, 2:06:34ā€ÆPM11/3/21
to ope...@googlegroups.com

Hi Ravi,

Well, you would have to ask Jason, but if he/you ask(s) me, I would not want to adopt this into OpenPnP.

IMHO, OpenPnP needs to remain neutral versus the different controllers. Also, I would not want to support and maintenance a grbl fork.Ā 

There can be links etc. from the Wiki to your repo though:

https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares

Btw, I think you should also not use the "OpenPnP" name or logo other than to say it is compatible.

_Mark

ma...@makr.zone

unread,
Nov 3, 2021, 2:07:55ā€ÆPM11/3/21
to ope...@googlegroups.com

> Grbl called it DUAL_AXIS. I too wondered why all this effort if you can simply share pins for dual axis.

No, if I understand correctly, their dual motor feature has two sets of step/dir pins, it is only used to home/square the machine, i.e. align the two steppers with each other.

- New dual motor support feature for gantry CNC machines. An axis motor isĀ  efficiently mirrored to a dedicated set of step and direction pins (D12/D13 or A3/A4) with no detectable loss of performance. Primarily used to independently home both sides of a dual-motor gantry with a pair of limit switches (second shared with Z-axis limit pin). When the limit switches are setup correctly, Grbl will self-square the gantry (and stay square if $1=255 is programmed). Beware use at your own risk! Grbl is not responsible for any damage to any machines.

https://github.com/gnea/grbl/commit/b75e5571eeaeb22a88304716fb1e7411f9c28be0

If you want to support it on your grbl, I think you need to reserve the extra pins and document them.

> I will call it 4.5 axis. šŸ˜‰ OK?

Don't call it 4.5 axis either. The terminology for half axes is reserved too šŸ˜‚

https://en.wikipedia.org/wiki/2.5D_(machining)

It is about motors, not axes, so better call it "dual Y motor", as they do.

_Mark

ma...@makr.zone

unread,
Nov 3, 2021, 2:11:17ā€ÆPM11/3/21
to ope...@googlegroups.com

Ravi Ganesh

unread,
Nov 4, 2021, 12:53:18ā€ÆAM11/4/21
to ope...@googlegroups.com
Hi Mark,
Thank YouĀ so much for the info on Dual Axis. I now understand. I will change it to dual Y/X.
One (or rather two) grbl repositoryĀ already exists under openPnP account. I would request you to continue to harbour them. I found it very useful when I first experimented with openPnP.
i would request you and Jason to decide and update it ratherĀ thanĀ stay with the 2017 code?
And also give a better rating for grbl in theĀ wiki page
It currently stands
There is a modification of Grbl availableĀ hereĀ but it is out of date, unsupported and somewhat buggy. You can use it in a pinch if it's all you have, but it's not recommended.

Cheers,
Ravi Ganesh


ma...@makr.zone

unread,
Nov 4, 2021, 2:58:43ā€ÆPM11/4/21
to ope...@googlegroups.com

> One (or rather two) grbl repositoryĀ already exists under openPnP account.

Huh? I never noticed them. I learn new stuff every day. šŸ˜‚

Note, Jason is the creator of OpenPnP and owner of the repo. I'm just a contributor that happens to be a quite active šŸ˜

Personally, I don't want to be involved with Grbl, I have enough on my plate as it is. I've created PRs/forks ofĀ  Smoothieware and TinyG for OpenPnP already. They created huge amounts of support work, at least before I made Issues & Solutions.

https://makr.zone/smoothieware-new-firmware-for-pnp/500/

https://makr.zone/tinyg-new-g-code-commands-for-openpnp-use/577/

But Jason might grant you access rights to https://github.com/openpnp/grbl, so you could integrate the newer upstream version and your work.

_Mark

surab...@gmail.com

unread,
Nov 4, 2021, 11:37:23ā€ÆPM11/4/21
to ope...@googlegroups.com

Hi Mark,

For minor updates like these I wish you should make the call without disturbing Jason ā€“ the boss.

Ā 

I think Jason is also celebrating the Deepavali festival. He is very silent.

ma...@makr.zone

unread,
Nov 5, 2021, 8:16:38ā€ÆAM11/5/21
to ope...@googlegroups.com

OK, in any case, make a PR, please. I don't know if I got the access right, but if I can, I'll merge it (subject to a quick review of the diffs).

We can always undo if for some reason, Jason is against it.

_Mark

Ravi Ganesh

unread,
Nov 20, 2021, 2:20:08ā€ÆAM11/20/21
to OpenPnP
Hi Mark,
Sorry for the delay. The camera in ther new machine failed. I am waiting for a replacement camera and I am planning to do a complete pick and place job. I will get back with to the grbl firware along with a working video!!

ma...@makr.zone

unread,
Nov 24, 2021, 3:53:35ā€ÆAM11/24/21
to OpenPnP
Hi Ravi,

I've added Grbl and unhomed machine support in the OpenPnP testing version. Please download here:


Description here:


The ball is now in your court šŸ˜ āš½ or is it šŸ?
  • The Grbl support was not tested, I leave that to you!
Thanks!

_Mark

Ravi Ganesh

unread,
Dec 2, 2021, 5:23:57ā€ÆAM12/2/21
to OpenPnP
Hi Mark,
Grbl support is fine. Here is a video of grbl with I&S.
Some pain points:
Serial port is not selected by derault.
Axis letters have to be entered manually.
Otherwise everyting is fine and can get a machine from nullDriver to GcodeAsyncĀ  in less tha 5 minuts using I&S


And a special thanks for Sync Initial Location. This also works fine.
Ravi

mark maker

unread,
Dec 2, 2021, 6:00:30ā€ÆAM12/2/21
to ope...@googlegroups.com

Thanks Ravi,

two things:

  1. I assume Xon/Xoff is not ok. I just re-read this and agree. I will make it suggest as disabled.
  2. You dismissed the Motion Control. I assume this means Grbl cannot control the acceleration on the fly. Like with a M204 command.
    https://www.reprap.org/wiki/G-code#M204:_Firmware_dependent

    Any chance you could add it to your firmware?

    It would mean a huge leap in functionality. Grbl already supports setting it using $12x commands, I expect it would be possible to override this with a dynamic setting, by implementing M204 Sxxx, but not writing back to the EEPROM.
    I did a similar thing for TinyG (which is based on Grbl).
_Mark
--
You received this message because you are subscribed to a topic in the Google Groups "OpenPnP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpnp/2apLtTpBakQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpnp+u...@googlegroups.com.

surab...@gmail.com

unread,
Dec 2, 2021, 7:37:39ā€ÆAM12/2/21
to ope...@googlegroups.com

M204:

Thanks Mark for asking me to do it.

I will give it a shot.

Ā 

Ā 

Ā 

From: ope...@googlegroups.com <ope...@googlegroups.com> On Behalf Of mark maker
Sent: Thursday, December 2, 2021 4:30 PM
To: ope...@googlegroups.com
Subject: Re: [OpenPnP] Grbl - Arduino Uno: Advanced motion controller

Ā 

Thanks Ravi,

Reply all
Reply to author
Forward
0 new messages