Using external stepper motor drivers
Overview
There are a few reasons for using external stepper motor drivers:
- You may want to use the expansion header to drive more extruders, but not want to use a Duex 2 or Duex 5 expansion board with the Duet 2 (Wifi or Ethernet) or the Duex 4 with older generation Duets;
- You may want to drive larger stepper motors than the internal stepper drivers are rated for (currently 2.4A on the generation 2 Duets, and 2.0A on the generation 1 Duets);
- You may need 11 or 12 stepper drivers, which is two more than is supported by a Duet 2 + Duex 5.
The expansion header has support for 5 external drivers on the Duet 2. The pinouts for the expansion header are important to make a note of when connecting external drivers:
The generation 2 Duets also support two additional drivers connected to the CONN_LCD connector.
The pinout for the two additional drivers supported by the CONN_LCD connector are as follows (the pins for drive 10 and its endstop input are on one side of the connector, and the pins for drive 11 are on the other side).
CONN_LCD pin | Signal |
---|---|
LCD_DB5 | Step 10 |
LCD_DB6 | Dir 10 |
LCD_DB7 | Enable 10 |
ENC_B | Endstop 10 |
LCD_DB4 | Step 11 |
LCD_E | Dir 11 |
LCD_RS | Enable 11 |
ENC_A | Endstop 11 |
You can also pick up +3.3V and ground from CONN_LCD.
Important! External drivers must always be connected to the expansion connector of the Duet or to the CONN_LCD port. The 3-pin pads on the Duet near to the stepper drivers are test pads and are not suitable for connecting external drivers.
Connecting external stepper drivers with differential inputs
These stepper driver modules generally have optically isolated inputs labelled STEP+, STEP-, DIR+, DIR-, ENA+ and ENA-.
If they require no more than about 2mA @ 3V on the step, dir and enable inputs, then you can drive them directly from the expansion connector of the Duet. See the expansion connector pinouts above. Connect STEP+ and DIR+ to your chosen Step and Dir pins on the expansion connector or CONN_LCD, and connect STEP- and DIR- to ground. Connect ENA+ to +3.3V and connect ENA- to your chosen Enable pin.
If your external stepper drivers need more than 3V or more than about 2mA then you should use the Duet Expansion Breakout Board or some other method to provide differential drive signals.
Connecting Pololu-style drivers
These take single-ended STEP, DIR and EN (step, direction and enable) signals, for example the popular http://reprap.org/wiki/StepStick have the following pin out:
Even though the stepsticks are nominally 5V boards, nearly all stepper driver chips are specified for 3.3V operation too.
External Extruders Example
This example shows how to add one external stepper driver to drive a third extruder on a Duet 2 Wifi.
At the Duet 2 Wifi end the pins needed to connect to are highlighted in this image:
A custom cable is made up that connects these pins to the Stepstick.
In this example the Stepstick is mounted on on a RAMPS 1.3 pcb, just adding the minimal components needed to support 1 more driver. It was much quicker to use a RAMPS pcb that was spare than to use stripboard to make a custom stepper driver carrier for the stepstick driver, however that is all that the pcb is doing so directly connecting to the stepstick or using a stripboard will also work. It is important to connect a bulk capacitor of ~100uF between power and ground close to the stepstick.
At the RAMPS pcb end:
And the RAMPS PCB with the other components fitted:
An alternative to using a RAMPS PCB is to use an adapter such as this one http://hobbycomponents.com/motor-drivers.... Note that the pin labelled 5V must be connected to 3.3V on the Duet, not to 5V.
TMC2130 Example
It is possible to use Trinamic stepper drivers in the so called "standalone mode". Since as for now the logic allowing to control the SPI features are not implemented one needs to configure the stepper driver with the CFG pins, those are the pins that would otherwise be used for the SPI interface and are configured with different states: pull up (to VIN), pull down (to GND) or open.
Refer to https://www.trinamic.com/fileadmin/asset... to identify the CFG pins and follow the tables "CFG0", "CFG1 and CFG2" and "CFG3 to set the desired mode pages 85-86 of TMC2130 data sheet.
Notice that the order from the top is CFG0, CFG3, CFG2, CFG1
CFG0 - controls the TOFF setting which can help with noise reduction, to achieve the recommended by the datasheet setting this pin needs to be pulled down. On a step stick breakout board like the one from the picture that pin in open, so has to be pulled down to ground, a pin can be soldered up on the step stick.
CFG1 and CFG2 - those two allows to choose the mode of operation - between the StealthChop and SpreadCycle, microsteps and step interpolation. Note that the CFG1 pin is most likely pulled down to ground on your breakout board (with a 10k ohm resistor).
CFG3 - allows to specify the mode of current setting. An open pin allows to set the reference voltage (Vref) with the potentiometer.
There's also the the SPI, CFG4 and CFG5 pins that are on the bottom of the stick. Recommended settings for the CFG4 is pull down to ground and pull up for CFG5. The SPI pads need to be soldered together to disable the SPI mode in favor of the configuration by the CFG pins. The following picture shows how those can be soldered (if there is the need for that - some will already be bridged correctly with 0 ohm resistors).
Noise reduction
If noise is reduced then there are different settings to consider for the CFG pins. 24V power supply (when compared to 12V) reduces noise considerably on it's own. Page 82 of the linked datasheet provides more information about that.
Using External Drivers for X/Y/Z Axis
To use external drivers to drive X, Y and/or Z axes instead of the internal ones, you need to remap the X/Y/Z axis to the external driver. The drive numbers are:
Number | Name |
---|---|
0 | X Axis |
1 | Y Axis |
2 | Z Axis |
3 | E0 Axis |
4 | E1 Axis |
5 | E2 Axis (Expansion Header) |
6 | E3 Axis (Expansion Header) |
7 | E4 Axis (Expansion Header) |
8 | E5 Axis (Expansion Header) |
9 | E6 Axis (Expansion Header) |
10 | 10 (LCD_CONN Header) |
11 | 11 (LCD_CONN Header) |
To remap the X, Y or Z motors to external drivers in RepRapFirmware 1,14 or later, use the M584 command.
Configuring the Enable polarity and step timing
The Enable signals on the expansion connector are active low by default but you can change this using the R parameter in the M569 command. You can also set a minimum step pulse width and other timings in the M569 command using the T parameter; try 1us to 4us when using external drivers.
3 Comments
why i can’t use driver 11 on LCD_CONN Header but driver 10 can use.
I use code:
M569 P10 S0;
M569 P11 S0;
M584 X10 Y11;
I have CoreXY 3d printer and driver 10 can use and 11 is not.
Quốc Huỳnh Minh - Reply
Hello a pleasure to greet you. I was reviewing the numbers on configuration of external drivers, but it is very brief and I am something new but my input project is to make a 3D printer of high precision and speed with low vibration etc. then for this I will use stepper motors NEMA17 Stepper Motor 1.5A 0.52Nm 2Phase 48.3mm (1.9in.), model MS17HA6P4150) 0.9 Deg Moon's brand the same brand has a driver with emulation but I have no idea what it would be like to do wired to configure in the Duet Wifi, although I understand clearly that I must use the pin com LCD, you with more experience my question would be the following, how much performance can I get to the SR3-Mini controllers from Moon's with the Duet Wifi, can give me that high precision with reduced inertia and precise control? and how would the connection between this and the Duet Wifi?
glennholguin - Reply
Please ask this question on the forum.
David Crocker -