Adding a External Stepper Driver to the Duet 0.8.5



  • Hello! I have been using my computer for a while now and have had an issue with the Y-axis motor not being stong enought to fully manage the massive bed I am using. I now have a Nema 23 motor ready to be used on the printer but I have no clue on how to manage the software to add a external stepper driver.

    Hardware:
    Nema 23 Stepper 4-wire
    Duet 0.8.5 Ethernet
    DueX4 Expansion Card
    M542T Stepper Driver

    This is the current list of items that may be applicable to the situation. The stepper driver has the typical [ A+, A-, B+, B-], [ PUL+, PUL-, DIR+, DIR-, ENA+, ENA-], [ DC+, DC-]. I just have no idea on how to manage the software. Ill add the config file below. Any help would be appreciated!!!!

    Config File:

    ; PX-11 Configuration SD-Image for Duet 0.8.5

    ; Communication and General
    M111 S0 ; Debug off
    M550 PPX-11 ; Machine name
    M551 Preprap ; Machine password

    ; Network Config
    ;*** If you have more than one Duet on your network, they must
    ; all have different MAC addresses, so change the last digits
    M540 3C:34:6A:14:EE:24 ; MAC Address
    ;*** Adjust the IP address and gateway in the following 2 lines
    ; to suit your network
    M552 P0.0.0.0 ; IP address (0 = use DHCP)
    ;M554 P192.168.1.1 ; Gateway
    ;M553 P255.255.255.0 ; Netmask
    M555 P2 ; Set output to Marlin
    M575 P1 B57600 S1 ; Comms parameters for PanelDue

    ; Axis and Motor Configuration - (change to S0 to reverse it)
    M569 P0 S1 ; Drive 0 goes forwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S1 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M569 P4 S1 ; Drive 4 goes forwards
    M569 P5 S1 ; Drive 5 goes forwards
    M569 P6 S1 ; Drive 6 goes forwards
    M569 P7 S1 ; Drive 7 goes forwards
    M569 P8 S1 ; Drive 8 goes forwards

    M574 X1 Y1 Z1 S1 ; set endstop configuration (X and Y endstops only, at low end, active high)
    M906 X800 Y1700 Z800 E800 ; Set motor currents (mA)
    M201 X800 Y800 Z400 E1000 ; Accelerations (mm/s^2)
    M203 X10000 Y10000 Z1000 E2000 ; Maximum speeds (mm/min)
    M566 X300 Y300 Z30 E20 ; Minimum speeds mm/minute
    M208 X532 Y430 Z840 ; Set Axis Maxima
    M208 X0 Y0 Z-0.2 S1 ; Set Axis Minimum
    M92 X80 Y80 Z398.56 ; Set axis steps/mm
    M92 E60:60:60:60:60:60 ; Set extruder steps per mm
    G21 ; Work in millimetres
    G90 ; Send absolute coordinates
    M83 ; Relative extruder moves

    ; Z probe section
    M558 P1 X0 Y0 Z1 H3 F200 T5000 ; Smart IR Z probe, used for homing Z axis, dive height 3mm, probe speed 200mm/min, travel speed 5000mm/min
    G31 X11.0 Y0.5 Z1.20 P500 ; Set the probe height and threshold (put your own values here)

    ; Thermistors
    ; Duet 0.8.5 uses 4.7K resistors
    ; H & L for ADC Correction
    M305 P0 T100000 B3950 R4700 H0 L0
    M305 P1 T100000 B4267 R4700 H0 L0
    M305 P2 T100000 B4267 R4700 H0 L0
    M305 P3 T100000 B4267 R4700 H0 L0
    M305 P4 T100000 B4267 R4700 H0 L0
    M305 P5 T100000 B4267 R4700 H0 L0
    M305 P6 T100000 B4267 R4700 H0 L0
    M570 S180 ; S = (180 sec. to heat up)

    ; PID Setting for extruders
    M301 H1 P10 I0.10 D100 T0.50 S1.0 ; Extruder 0
    M301 H2 P10 I0.10 D100 T0.50 S1.0 ; Extruder 1
    M301 H3 P10 I0.10 D100 T0.50 S1.0 ; Extruder 2
    M301 H4 P10 I0.10 D100 T0.50 S1.0 ; Extruder 3

    ; Tool definitions
    ;*** Extruder 0
    M563 P0 D0 H1 ; Define tool 0
    G10 P0 S0 R0 ; Set Oper. & Standby Temp
    ;*** If you have a 2 or greater extruder build, un-comment the next 2 lines
    M563 P1 D1 H2 ; Define tool 1
    G10 P1 X20 S0 R0 ; Set Oper. & Standby Temp
    ;*** If you have a 3 or greater extruder build, un-comment the next 2 lines
    ;M563 P2 D2 H3 ; Define tool 2
    ;G10 P2 S0 R0 ; Set Oper. & Standby Temp
    ;*** If you have a 4 or greater extruder build, un-comment the next 2 lines
    ;M563 P3 D3 H4 ; Define tool 3
    ;G10 P2 S0 R0 ; Set Oper. & Standby Temp
    ;*** If you have a 5 or greater extruder build, un-comment the next 2 lines
    ;M563 P4 D4 H5 ; Define tool 4
    ;G10 P4 S0 R0 ; Set Oper. & Standby Temp
    ;*** If you have a 6 extruder build, un-comment the next 2 lines
    ;M563 P5 D5 H6 ; Define tool 5
    ;G10 P5 S0 R0 ; Set Oper. & Standby Temp

    ; Bed probe section (not needed if you use a bed.g file)
    ;*** Adjust the XY coordinates in the following M557 commands to suit your build and the position of your Z probe
    M557 P0 X60 Y0 ; Four…
    M557 P1 X60 Y165 ; ...probe points...
    M557 P2 X200 Y165 ; ...for bed...
    M557 P3 X200 Y0 ; ...levelling
    ;M557 P4 X141 Y82.5 ; 5th probe point for levelling (un-comment this to get a 5th point at the centre of the bed)

    ; Epilogue
    ;*** If you are using axis compensation, put the figures in the following command
    M556 S78 X0 Y0 Z0 ; Axis compensation here
    T0 ; select first hot end


  • administrators

    can you confirm you also have a Duex4? That has the remaining stepper channels on the 0.8.5 allocated to the drivers on the Duex4.



  • I do have the DueX4 expansion card, but I do not believe it is entirely necessary for the situation. I need a 3+ amp output for the motors, and as far as in know the Duet 0.8.5 and DueX4 expansion cannot supply that current. Hence the reason for me needing external steppers.

    I appreciate the reply!


  • administrators

    Set up your config.g file to use one of drivers 5 to 8 (which are normally on the DueX4) to drive the Y motor by using the M584 command - see https://duet3d.com/wiki/G-code#M584:_Set_drive_mapping. Then connect your external driver to pins on the expansion bus as follows:

    ENA+ to +3.3V
    ENA- to Enable of your chosen driver channel
    PUL+ to STEP of your chosen channel
    DIR+ to DIR of your chosen channel
    PUL- and DIR- to ground

    You may need to extend the step pulse time for the external driver, using the M569 command.



  • I believe that is exactly what I'm looking for! I didn't see those raw stepper outputs on the DueX4 but I'll look again, I'm sure they're there somewhere.

    I appreciate the help! I'll be able to work on it later today sometime hopefully!


  • administrators

    The raw stepper outputs are not provided on the X4. If you want to use the X4 as well as external drivers, you will need to put a 3rd socket on the ribbon cable to get at the expansion bus pins, or solder wires on the back of the expansion bus connector on the X4.



  • Ok, I think I am headed along the right path now. As far as I know, the code input into the config file should be:

    M584 X0 Y5 Z2 E3

    X mapped to the initial drive 0, Y mapped to first extruder on expansion header (5), Z mapped to initial drive 2, and the extruder mapped to the initial drive 3.

    Now that that is taken care of, the only thing left to handle would be the pins at which i need to connect [PUL+, PUL-, DIR+, DIR-, ENA+, ENA-]. So if I'm not mistaken, the pinout I need to connect to should be:

    ENA+ > Pin 3 [+3.3V]
    ENA- > Pin 24 [PC20]
    PUL+ > Pin 19 [PC7]
    PUL- > Pin 2 [GND]
    DIR+ > Pin 20 [PB14]
    DIR- > Pin 2 [GND]

    Edit: Sorry for so many questions and such, I'm not the best at programming and such. I am much better with 3D and mechanical design.


  • administrators

    Yes, I think those are the correct pin numbers.



  • Ok, I'm finally back and able to work on the printer again. I connected all of the wires as I stated in the previous post of mine. Sadly, I am getting no input to the drive whatsoever.

    Things that may be causing an issue:

    • ENA+ is said to require +5V at the driver instead of the +3V I had previously listed.
    • Possibly improper from my coding of the M584 command.
    • Possible incorrect pinout from my previous post.

    @dc42, you have been awesome so far and I feel like I'm getting very close! Any help is appreciated!


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.