MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.3k stars 19.25k forks source link

[FR] Reliable non-stepper output #6389

Closed dronus closed 3 years ago

dronus commented 7 years ago

Is there any easy way to modify Marlin to get a reliable low-level axis position output via SPI or Serial interfaces?

Would be useful to add an external non-stepper motor control like servo-controlled DC or brushless motors.

Receiving high frequency step/dir signals again for many axes simultanously is not that easy for an external controller...

bobc commented 7 years ago

Do you have a specific hardware in mind, or is this one of those "wouldn't it be nice if Marlin did everything on any platform" kind of things?

I suspect that controlling drivers via SPI/serial at the required rate would be more than an AVR could handle, but without knowing the number of axes, the bit rate, the protocol and the update frequency it's impossible to be sure. Engineering can only work with numbers.

On 19 April 2017 at 10:32, dronus notifications@github.com wrote:

Is there any easy way to modify Marlin to get a reliable low-level axis position output via SPI or Serial interfaces?

Would be useful to add an external non-stepper motor control like servo-controlled DC or brushless motors.

Receiving high frequency step/dir signals again for many axes simultanously is not that easy for an external controller...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MarlinFirmware/Marlin/issues/6389, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7VR9AVqVZO0SAvZvlXC7Zbf-Zyc-ofks5rxdS5gaJpZM4NBbcW .

thinkyhead commented 7 years ago

I've implemented a two-board printer that uses i2c to communicate from the main board (a Megatronics 3) to the secondary board (a RAMPS 1.4). The second board manages 4 Z axis steppers and 4 endstops so that it can home, move Z, and auto-level as commanded by the main board, which handles all other functions.

The main board's instance of Marlin merely sends very short string commands to the secondary board (running a very stripped-down version of Marlin), and can query the second board for its "state" — which is simple: "B" for busy, "L" for leveled successfully, "H" for homed successfully, "F" for failed, etc.

It works well and has produced some very nice (and large) prints.

bobc commented 7 years ago

Sure, you can do operations like bed levelling which are not time critical, but what about controlling steppers during printing?

On 26 April 2017 at 10:53, Scott Lahteine notifications@github.com wrote:

I've implemented a two-board printer that uses i2c to communicate from the main board (a Megatronics 3) to the secondary board (a RAMPS 1.4). The second board manages 4 Z axis steppers and 4 endstops so that it can home, move Z, and auto-level as commanded by the main board.

The main board's instance of Marlin merely sends very short string commands to the secondary board, and can query the second board for its "state" — which is simple: "B" for busy, "L" for leveled successfully, "H" for homed successfully, "F" for failed, etc.

It works well, in fact.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MarlinFirmware/Marlin/issues/6389#issuecomment-297326619, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7VR4co8GZmr8mDtqXVHMQz9m16y-cOks5rzxQSgaJpZM4NBbcW .

thinkyhead commented 7 years ago

but what about controlling steppers during printing?

For running a Z axis the serial speed is more than adequate.

bobc commented 7 years ago

Yes, but while extruding?

On 26 April 2017 at 11:00, Scott Lahteine notifications@github.com wrote:

but what about controlling steppers during printing?

For running a Z axis the serial speed is more than adequate.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MarlinFirmware/Marlin/issues/6389#issuecomment-297329275, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7VR6dKCfTaIBgthHvsuBk_D0ZG-tIHks5rzxWugaJpZM4NBbcW .

bobc commented 7 years ago

It would be great if this feature was in Marlin, I designed a 6 axis extruder expansion board, but never got round to using it. I would like to do a version with an I2C IO expander.

On 26 April 2017 at 11:01, Bob Cousins bobcousins42@googlemail.com wrote:

Yes, but while extruding?

On 26 April 2017 at 11:00, Scott Lahteine notifications@github.com wrote:

but what about controlling steppers during printing?

For running a Z axis the serial speed is more than adequate.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MarlinFirmware/Marlin/issues/6389#issuecomment-297329275, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7VR6dKCfTaIBgthHvsuBk_D0ZG-tIHks5rzxWugaJpZM4NBbcW .

thinkyhead commented 7 years ago

Yes, but while extruding?

What can I say? It works well. I haven't tried "vase mode" where Z movement and extrusion are simultaneous. And this machine self-levels, so it doesn't use any Z compensation while printing. Any Z-only movements (hops and layer changes) are synchronous.

It would be great if this feature was in Marlin

If you'd like to mess with it, here are the branches:

I did these for a client who never paid me, so they belong to the world now.

dronus commented 7 years ago

Well, I like to use Marlin as universal CNC controller as it provides quite well working lookahead. But for many uses, servo motors would be a better choice. So just outputting speed or position information via SPI would allow external controllers to be connected, without havin the Arduino handle servo control as well.

thinkyhead commented 6 years ago

The demand for this kind of feature is extremely low and devs have a lot on their plates dealing with bugs and 32-bit migration so it's unlikely this will be implemented anytime soon. But, you may be able to hire a developer for $$$ if you need this feature very much.

boelle commented 5 years ago

@dronus Please post your question either on discord: https://discord.gg/n5NJ59y or on facebook: https://www.facebook.com/groups/2080308602206119/ The issue list is for bugs and feature requests only Please close this issue once you have posted it on one of the 2 links Thanks :-D

dronus commented 5 years ago

While I used a question mark, this still is a feature request I thought...

boelle commented 5 years ago

@thinkyhead this one should have the feature request label added and the question label removed

boelle commented 5 years ago

wrong label

InsanityAutomation commented 5 years ago

I would think this may be more feasible with drivers like the TMC5160 and 4361 more available now. @teemuatlut may be the expert on the capability to do this with TMC drivers and if a 2.1 milestone is feasible.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.