开源改变世界

超越 6 轴 #349

推推 grbl 2年前 (2023-01-30) 205次浏览
关闭
AndreasEpp 打开了这个问题 2020 年 3 月 15 日 · 28条评论
 Closed

Going beyond 6 Axis#349

AndreasEpp opened this issue on Mar 15, 2020 · 28 comments

注释

超越 6 轴 #349

你好,

你认为有机会推动 grbl esp32 超越 6 轴吗?
我正在寻找 6 个步进轴和 2 个伺服轴,但我很感兴趣你可以将它推到多远。
背景:我正在构建一个运动控制装置并且会用完轴^^

需要明确的是,我并不是要你实施这个。我只是在寻找一个方向。
如果这在理论上可行,我会去做,如果不行,我会去别处看看。

感谢您花时间制作 Grbl_Esp32!

问候,
安迪

超越 6 轴 #349

为什么不只使用 2 个 grbl ESP32 设置?

超越 6 轴 #349

那是我想到的替代方案之一。我严重依赖 G93 反向进给速率模式,并且担心如果一个运行伺服系统而另一个运行步进电机,则两个 esp32 将不会完全同步。

超越 6 轴 #349

在当前形式下,Grbl_ESP32 受 RMT 通道和引脚限制。每个步进器需要 2 个 RMT 通道,其中 ESP32 有 10 个,所以总共有 5 个步进器。还有一个引脚限制。如果排除 UART 和 SD 卡所需的引脚,则剩下大约 19 个引脚,其中 5 个只能作为输入引脚,因此得到 14 个输出引脚。考虑到每个步进器需要 2 个引脚,将其中的一些用于主轴控制、冷却剂等,你几乎没有引脚了。使用 I/O 扩展器有一些可能性,但它需要大量的工作,两者软件和硬件,以实现这一目标。一种方法是使用具有更多引脚的新型 ESP32-S2。它应该在今年夏天问世。底线 – 没有超级简单的方法可以在短期内将 Grbl_ESP32 扩展到更多轴。

超越 6 轴 #349
作者
安德烈亚斯艾普 commented 2020 年 3 月 15 日  

So 5 stepper axis is a limit anyway, hmmm…
The ESP32-S2 might be worth to wait (“43 programmable GPIOs” according to their website)
I am currently utilizing 4 Axis on an arduino Mega, so I’ve got a bit of time.

My plan is to use the 6 stepper axis of the arduino mega and try to sync an esp32 to it for servo control.

This is starting to smell like it needs a homebrew solution^^

超越 6 轴 #349
Owner

Each stepper only needs 1 RMT per channel on the step pin. The direction pin is standard GPIO.

Axes like hobby servos do not need RMT.

Most of the axis calculations use 8 bit values, so that is a limiting factor. The settings like $100 would be the next limit at 10.

With this said, it is a lot of work to change from the current limit of 6.

超越 6 轴 #349
Author

Axes like hobby servos do not need RMT.

Okay, but the limit with only 5 RMTs being available would still rule out the esp32 for the stepper control for me.

Most of the axis calculations use 8 bit values, so that is a limiting factor. The settings like $100 would be the next limit at 10.

That’s 5 steppers and 5 servos right?

If anyone is interested: Here is a first video of my motion control rig in action. All controlled with grbl and a bit of movie magic ;)

超越 6 轴 #349
Owner

There are 8 RMT Channels.

You are currently limited to 6 lettered axes by Grbl.

超越 6 轴 #349
Author
AndreasEpp commented 2020 年 3 月 16 日  

Oh, I see. I thought because of MitchBradleys answer that there would be a limit at 5.
In any case it looks like going beyond 6 axis on a singel esp32 is going to be difficult.

On synchronizing two grbl controllers:
Is it possible to set the “Feed Hold” mode via the GPIO pin, fill the buffer of both controllers and then start both of them via the “Resume” GPIO pin. After that I just have to keep both buffers from starving and all should be good right?

超越 6 轴 #349
Owner

You can control hold and start via GPIO, but there is no way to guarantee sync.

What are the servos used for? Maybe they don’t need to be lettered axes.

超越 6 轴 #349
Author

The servos control the zoom and focus of the camera. They need to be animated along with the motors.

I generate g-code with the G93 command to move to a location within a specific amount of time (e.g. 1 second). Because the steppers have a different acceleration than the servos seperating them to different controllers might be a bad idea …

I have seen the use of M commands to lift and lower a pen with a servo in a pen plotter.
The problem with this ist that the movement is instantaneous and not synced to the movement of the axis. But, if I choose the G93 intervalls small enough this may not make a difference. Is it possible to add two of these servos ontop of the 6 lettered stepper axis?

超越 6 轴 #349
Owner

If the motion synchronization was not a big deal, I thought a command like M67 could be added.

That could send a PWM value to the servo. While the gcode is defined as synchronized, that just means the planner makes sure all previous moves have completed before sending out that PWM value. The servo would then start moving at its fastest rate towards its target and the next gcodes would also begin executing.

I could foresee upping the count to 8 sometime in the future, but it is not a priority at this time. I don’t even see a lot of Grbl 6 axis machine right now.