Welcome! Log In Create A New Profile

Advanced

5-Axis Robot Control Using Duet

Posted by PayTor 
5-Axis Robot Control Using Duet
January 06, 2017 03:18PM
Hi All,

I'm working on a 5 axis robot with stepper motor linear actuators. Currently, I'm using a Rumba board with Marlin firmware. Everything seems to be fine except that I can only home three axes (XYZ) with Rumba. Because Rumba only has ports for X (min,max), Y (min,max), Z (min,max) limit switches and I don't know how to modify the Marlin firmware to add more endstops.

Therefore, I was looking for more options that I came across the Duet board. It seems it can control 5 stepper motors and has pins for 5 limit switches. Now my question is whether it is a good choice for me or not. My requirements are as follows:

  • Driving 5 stepper motors independently with the ability to home them.
  • The capability for adding one or two DC motor drivers with speed and direction control.
  • Having extra output pins (15 to 20 I/O pins).


My other question is a more general one and I appreciate any help you guys can provide. Is there a way to read inputs using any of the available boards and firmwares and perform an action based on the status of the input. The best I could do was to read the inputs using Marlin and wait in the GCode for the status to change. Basically, the GCode stops at a certain lines until the input status changes from HIGH to LOW or vice versa. But that's not enough in most cases. Has anybody been interested in something like this?

Thank you all in advance.
VDX
Re: 5-Axis Robot Control Using Duet
January 06, 2017 05:22PM
... I've "expanded" the M-codes in Marlin4Due for reading specified pins in groups or single and tweaked the handshaking between Pronterface (modified version now called gieCAPS) and Marlin4Due to read this pin-groups.

This was a special developmen for our "comercial" machines and software, but the code parts in Marlin4Due and Pronterface/gieCAPS are derived from and so will stay OS, if you want to modify your firmware and host software on your own.

For homing additive axis I would write subroutines in the firmware (e.g. copy and modify the X-homing to a new routine) and call them through added M- or modified G-codes (e.g. "G28 XYZABCE").

Moving them synchrone with XYZ(E) would be a much bigger problem - here you have to change/expand the path planner and lookahead workflow ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: 5-Axis Robot Control Using Duet
January 06, 2017 05:45PM
The standard firmware binary for the Duet supports independent control and homing of up to 6 axes, plus extruders up to a total of 9 stepper motor drivers for the Duet 085 and 10 for the Duet WiFi. Of course you need to add one of the expansion boards if you need more than 5 drivers. There are many spare I/o pins on the expansion connector. You can control these as outputs using the M42 and M280 commands.

You can set up macro files to run when endstop inputs are triggered. There is one endstop input per possible motor driver, so 10 in all using the Duet WiFi. That leaves you with 5 after your axis endstop switches. You would need to modify the firmware if you need more inputs.

The web interface will display the position of as many of the 6 axes as you configure. The 5" and 7" versions of the PanelDue touch screen also support up to 6 axes. The 4.3" version supports only 4 axes.

HTH David

Edited 2 time(s). Last edit at 01/06/2017 05:47PM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: 5-Axis Robot Control Using Duet
January 09, 2017 01:59PM
Thank you very much for your responses and awesome info that you provided. I've decided to order the Duet and play with it to see how things go. I'll definitely need your help in the future too!
Re: 5-Axis Robot Control Using Duet
January 13, 2017 06:47PM
Hi David,

I got the Duet 0.8.5 board. I was able to connect it through Ethernet and control all of the 5 stepper motors separately. However, I couldn't figure out how to home the extruder motors. I tried to use commands like this: G1 E-200 F2000 S1 similar to Z homing, but it didn't work. Could you please help me with this?

Also is it possible to move all 5 axes simultaneously? Is it possible by defining U and V axes?
Re: 5-Axis Robot Control Using Duet
January 13, 2017 08:19PM
Homing information can be found on the wiki pages.
Re: 5-Axis Robot Control Using Duet
January 13, 2017 08:25PM
Thanks, I've seen those. I tried to make a homeE.g file similar to the XYZ home files, but it didn't work for me. I'm trying to use the extruder stop switches to home to extra axes.
Re: 5-Axis Robot Control Using Duet
January 14, 2017 01:26AM
Use the M584 command to create additional motion axes U and V. Then you can use homing files homeu.g and homev.g. You will need firmware version 1.16 or later.

Edited 1 time(s). Last edit at 01/14/2017 01:27AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: 5-Axis Robot Control Using Duet
January 16, 2017 06:27PM
Thanks David, it worked. I had already defined U and V axes and homeu.g and homev.g. The problem was with my firmware version. I upgraded to 1.17 and it's all good now.

The only thing I can't yet fully grasp is your previous comment where you said I "can set up macro files to run when endstop inputs are triggered". I know I can run the macros with M98 command, but how can I run them the moment a switch is triggered?
Re: 5-Axis Robot Control Using Duet
January 17, 2017 02:24AM
See the M582 and M583 commands in the gcode wiki.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: 5-Axis Robot Control Using Duet
January 23, 2017 02:59PM
Hi David,

Thanks for all your comments. I bought DuetWifi and Duex5 boards and defined U and V as additional axes. I also could use the U and V limit switches to trigger macros as you described which is very useful. It goes a long way for me and I'm sure for many people if they know something like this exists. Good job on this!

I have some questions though.

Something weird happened this morning. I could home and control 5 axes previously without a problem. But now, when I home U and V axes, they lock and don't move any more. I have to use M84 to turn them off and they move again. I connected those motors and limit switches to X and Y axes, they work without a problem. Do you have any suggestions?

Also, how can I use the endstops on Duex5 to trigger the macros. For U and V endstops I used something like this: M581 U S1 T2 and M582 T2 in the gcode. For extruders, how can I do that? Do I need to define a tool?
Re: 5-Axis Robot Control Using Duet
January 23, 2017 05:27PM
Did you also redefine the extruder drives in the M584 command that you use to create the U and V axes, as recommended in the wiki? Otherwise you may stîll have extruder drîves mapped to the same drivers, which can cause confusion when idle detection kicks in.

To trigger macros from the extruder endstop inputs, just use E0, E1 etc. in place of X, Y in the M581 commands. E0 is the first endstop input after the ones used up by your axes.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: 5-Axis Robot Control Using Duet
January 23, 2017 10:23PM
It all worked for me. I used "M584 X0 Y1 Z2 U3 V4 E5:6:7:8:9" in the beginning of the config file and the confusion was eliminated.

The triggers also worked. However, the extruder numbers were E2 to E6 after using E0 for U and E1 for V.
Re: 5-Axis Robot Control Using Duet
January 24, 2017 03:28AM
From what I read in Davids Wiki, you should also specify W-axis, even if you don't have one.
Re: 5-Axis Robot Control Using Duet
January 24, 2017 01:01PM
No, you should not create a W axis if you don't need one. OTOH if you do create a W axis, you must create U and V as well.

Is there a particular piece of text in the wiki that isn't clear to you? If so, please point it out and I will rewrite it.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: 5-Axis Robot Control Using Duet
January 25, 2017 03:51AM
Quote

You can use M584 to create additional axes - for example, to represent additional carriages on a machine with multiple independent X carriages. You should not create axis W unless you also create axis V, and you should not create axis V unless you also create axis U.

It was this sentence in reprap-wiki, but after reading it twice my poor brain finally got it right sad smiley
Sorry, only registered users may post in this forum.

Click here to login