Welcome! Log In Create A New Profile

Advanced

Add additional axes to Marlin which need to be homed

Posted by JanJans 
Add additional axes to Marlin which need to be homed
May 26, 2021 03:14PM
Hi all,

I created a 3D printer tool changer which stores its tools on an elevator. The tools are exchanged by a cable pulling system. These two additional axes both need to be added to Marlin. Both axes need to run independently but not necessarily synchronized with any other axis. The elevator axis uses a home sensor. The cable pulling axis an end stop sensor.

One way to add these axis to Marlin would be by calling them an extruder. Extruder 4 and 5 to be precise. However, extruders don't have a homing functionality within Marlin. Here is where things become more difficult.

I have tried to figure out how Marlin handles end stops so I can add one to a specific axis. However I have been unsuccessful at this time. I don't understand how the whole end stop system works within Marlin.

I am in over my head on this one and need a push in the right direction. Any help would be greatly appreciated. How would you do this?

Video of the 3D printer with really bad software. The two additional axis are operated by WRITE to the step pin with delays....
[www.youtube.com]
Re: Add additional axes to Marlin which need to be homed
May 26, 2021 09:21PM
real 6 axis marlin is coming, be patient.

Or switch to RRF, like most do on more complicated printers.

Edited 1 time(s). Last edit at 05/26/2021 09:21PM by Dust.
Re: Add additional axes to Marlin which need to be homed
May 27, 2021 01:02PM
O dear. I have been reading about RRF. Sadly enough I am running an atmega 2560. I don't know if this is compatible.
Anyway, changing firmware completely is less than ideal. I already made several modifications to Marlin. I think I can wait. I will try to run the elevator as an extruder with some other code for homing. I think I would get this to work.

Any rough idea on the release date of 6 axes Marlin?
Re: Add additional axes to Marlin which need to be homed
May 27, 2021 09:47PM
It is being worked on daily...
[github.com]
Re: Add additional axes to Marlin which need to be homed
May 28, 2021 01:26PM
That is great!
I have done some reading on the github page and this is indeed what I am looking for. Fantastic! I will wait patiently smiling smiley
Re: Add additional axes to Marlin which need to be homed
June 03, 2021 08:22PM
Hi, I am the main developer of six axis / multi-axis support for Marlin 3D-printer firmware. 6 axis support was recently merged into official MarlinFirmware/Marlin bugfix-2.0.x. I provide bleeding edge source code for testing Marlin with (currently) up to 7 non-extruder axes in the branch 9axis_pull at https://github.com/DerAndere1/Marlin. There are "tagged releases" of 6 axis Marlin under the name Marlin2ForPipetBot since some years and documentation at the Marlin2ForPipetBot wiki as well as on the PipetBot-A8 project homepage at https://derandere.gitlab.io/pipetbot-a8 with constantly improving feature support. Multiple users have adapted my firmware for driving CNC machines like pipetting robots, syringe pumps, hot wire foam cutters and 3D printers with 4 - 8 axes. Just follow the instructions from the Marlin2ForPipetBot wiki for configuration and compilation.
Your feedback will help to find- and fix bugs. Also, now is the perfect time for you to develop a multi-axis slicer and the inverse kinematic model for your machine.

@JanJans, since the two axes you want to use for your tool changer are not involved in positioning of the tool-head during printing, you can use multi axis Marlin out of the box. no kinematics are needed in your case if I understand correctly. One additianal thing that might help you is, that I already implemented a feature to specify different G-code sequences to be executed when the machine receives toolchange commands T0 and T1, respectively. Lets say you use current MarlinFirmware/Marlin bugfix-2.0.x and in your Configuration.h, your toolchanger axes are named A (#define AXIS4_NAME 'A') and B (#define AXIS5_NAME 'B'). Then just enable EVENT_GCODE_TOOLCHANGE_T0 in Configuration_adv.h and change it to something like
#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG28 B\nG1 A10 B50 F100\nG1 A20 B20 F200\nG1 A5 B20 F100"
... so the toolchanger is moved using the specified event G-code sequence (individual steps are separated by \n) whenever the toolchange command T0 is sent to the printer. Do the same thing with EVENT_GCODE_TOOLCHANGE_T1 , e.g.:
#define EVENT_GCODE_TOOLCHANGE_T1 "G1 A10 B20 F100\nG1 A20 B50 F200\nG1 A5 B50\n"
... so the toolchanger is moved to another position (in this case: end position A5 B50) whenever the toolchange G-code command T1 is sent to the printer.

Best regards
DerAndere

Edited 4 time(s). Last edit at 06/05/2021 07:38AM by DerAndere1.
Re: Add additional axes to Marlin which need to be homed
October 13, 2021 04:51AM
Hi DerAndere,

My apologies for the late reply.
That is great to hear! I haven implemented this is yet. The problem is that I modified Marlin a lot. Changing firmware is going to be a lot of work and requires a fair amount of testing. One day I will implement it. For now, I am happy with the results I got for handling the elevator as an extruder and some hacked code around it which is absolutely terrible but it works rather well.

I hope these new axis can be homed individually. This was actually my main problem because handling the axis as it where an extruder does not allow for homing.

Kind regards,

JanJans

Edit
Perhaps it is fun to show how my machine turned out. Nowadays the tool changing sequence is somewhat optimized compared to the video below. For example, material insertion is on top of the purge tower and not somewhere in the air. Overall speed is also improved although still really slow.....
[www.youtube.com]

Edited 1 time(s). Last edit at 10/13/2021 04:58AM by JanJans.
Sorry, only registered users may post in this forum.

Click here to login