Question: Connecting extruder motor(s) using regular Nema17



  • Hello,

    I am very new to this, so I hope someone can shed some light on the issue. I am hitting a roadblock because I believe I am dealing with a fundamental misconception of my own preventing me from seeing clearly what the problem is. 🙂

    I am trying to connect two Nema 17 stepper motors (see link) with these specs as E0 and E1:

    • Manufacturer Part Number: 17HS19-2004S1
    • Motor Type: Bipolar Stepper
    • Step Angle: 1.8 deg.
    • Holding Torque: 59Ncm(83.6oz.in)
    • Rated Current/phase: 2.0A
    • Phase Resistance: 1.4ohms
    • Inductance: 3.0mH+/-20%(1KHz)

    I am building a clay printer, so all I need is off-the-shelf Nema 17 motors driving a screw & a piston. When I issue...

    M302 P1; cold extrusion
    T0; enable E0
    G1 E10 F60; extrude 10mm of filament at 1 mm/s
    

    ...the motor moves (or rather stutters) with very little torque, so I can stop by holding on to the shaft. I have connected other motors to E0 and E1, but same results (so no hardware failure or bad wiring). Also when I convert one of the Duex5 drivers to act as an Extruder (e.g. E2) the same happens.

    It appears to me that as soon as you tell a driver to be an extruder, the current is limited and consequently the motor has trouble moving.

    Any idea what I am not seeing or what my misconception is?

    I am on the latest firmware and have a Duet 2 Wifi with an Duex5 extension board.

    This is my config.g:

    ; Configuration file for Duet WiFi (firmware version 3)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v3.1.3 on Thu Jul 23 2020 10:22:00 GMT+0200 (Central European Summer Time)
    
    ; General preferences
    G90                                                                 ; send absolute coordinates...
    M83                                                                 ; ...but relative extruder moves
    M550 P"Clayster"                                                    ; set printer name
    
    ; Network
    M552 S1                                                             ; enable network
    M586 P0 S1                                                          ; enable HTTP
    M586 P1 S0                                                          ; disable FTP
    M586 P2 S0                                                          ; disable Telnet
    
    ; Drives 
    M569 P0 S1                                                          ; X1
    M569 P1 S1                                                          ; Y
    M569 P2 S1                                                          ; Z1 & Z2
    M569 P3 S1                                                          ; E0
    M569 P4 S1                                                          ; E1
    M569 P5 S1                                                          ; Z3
    M569 P6 S1                                                          ; Z4
    M569 P7 S0                                                          ; X2
    
    M584 X0:7 Y1 Z2:5:6 E3:4                                            ; remap motors 
    
    M350 X16 Y16 Z16 E16:16:16:16:16 I1                        				; configure microstepping with interpolation
    M92 X100.00 Y100.00 Z1600.00 E2000.00:2000.00:1600.00:1600.00:100.00	; set steps per mm
    M566 X900.00 Y900.00 Z150.00 E120.00:120.00:150.00:150.00:900.00   		; set maximum instantaneous speed changes (mm/min)
    M203 X6000.00 Y6000.00 Z180.00 E1200.00:1200.00:180.00:180.00:6000.00 	; set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z20.00 E250.00:250.00:20.00:20.00:500.00        	; set accelerations (mm/s^2)
    M906 X1000 Y1000 Z1000 E1000:1000:1000:1000:1000 I30           			; set motor currents (mA) and motor idle factor in per cent
    M84 S30                                                    				; Set idle timeout
    
    ; Axis Limits
    M208 X0 Y0 Z0 S1                                                    ; set axis minima
    M208 X380 Y380 Z350 S0                                              ; 38cm x 38cm x 35cm
    
    ; Endstops
    M574 X1 S1 P"!xstop+!duex.e4stop"                                   ; configure active-low endstop for 2 X-motors
    M574 Y1 S1 P"!ystop"                                                ; configure active-low endstop for low end on Y via pin ystop
    M574 Z1 S1 P"!zstop"												; remove once Z probe has been installed
    
    ; Z-Probe
    ;M558 P3 C"^zprobe.in" H5 I1 F120 T6000     			             ; set Z probe type to switch and the dive height + speeds
    ;M558 P5 C"^zprobe.in" H5 I1 F120 T6000                              ; backup
    ;G31 P500 X0 Y0 Z2.5                                                 ; set Z probe trigger value, offset and trigger height
    ;M557 X15:215 Y15:195 S20                                            ; define mesh grid
    
    ; Miscellaneous
    M575 P1 S1 B57600                                                   ; enable support for PanelDue
    
    ; Extruder I 
    M563 P0 D0  														; enable tool 0 & extruder E0 (D0)
    G10 P0 X0 Y0 Z0 													; axis offsets for extruder
    G10 P0 R0 S0														; set extruder active and standby temperature to 0 Celsius
    
    ; Extruder II
    M563 P1 D1  														; enable tool 1 & extruder E1 (D1)
    G10 P0 X0 Y0 Z0 													; axis offsets for extruder
    G10 P0 R0 S0														; set extruder active and standby temperature to 0 Celsius
    


  • Hi,

    Well declaring a driver to be an extruder doesn't limit the current. That setting is made in M906 as you have done.

    Does the stepper work when connected to, say, the X connector?

    If so...

    • change the various extruder settings to match the X axis settings
    • reconnect the stepper to the extruder connector
    • test to see if it works
    • if it does restore the desired extruder settings one by one and test again to see if it is a question of the settings being used.

    And, just FYI, you don't need all of those extruder settings, E16:16:16:16:16 for example, just the first two will suffice.

    Frederick



  • Hi, there!

    Thank you. This is very helpful indeed.

    I will do as you advise. The motor does work as expected when I connect it to one of the other axis drivers (e.g. X).

    The unnecessary entry you saw refer to one of the other 7 motors for x, y, and z I have hooked up to the Duex5 board. They should be fine.

    Before I continue, are you saying that the avaliable current is not reduced or limited when defining one of the drivers as a tool in the tool section (M563)? It should behave the same way, correct?



  • @wieman01 said in Question: Connecting extruder motor(s) using regular Nema17:

    The unnecessary entry you saw refer to one of the other 7 motors for x, y, and z I have hooked up to the Duex5 board. They should be fine.

    In the M584 command you only list two extruders E3:4. Therefore in all other commands like M350 you only need values for those two extruders.

    Before I continue, are you saying that the avaliable current is not reduced or limited when defining one of the drivers as a tool in the tool section (M563)? It should behave the same way, correct?

    An extruder is just another stepper whose settings are made there along with all the other steppers.

    It's relation to being used for a tool does not alter those settings in anyway.

    Frederick


  • administrators



  • @dc42 said in Question: Connecting extruder motor(s) using regular Nema17:

    Have you checked the phases of the stepper motor wires? https://duet3d.dozuki.com/Wiki/Choosing_and_connecting_stepper_motors#Section_Connecting_stepper_motors

    Thank you, @dc42. Yes, I have. These motors work fine when I connect them to other drivers. And other motors start showing same faulty behavior when I connect them to either E0 or E1.

    I will do someore testing tomorrow and let you know. I think there may be a problem with the settings like Frederick has mentioned.



  • Hello again,

    I was able to resolve my issue. The problem at hand lay in the Drives Section of my "config.g" file. I previously used the Duet Configurator and subsequently made a few changes by hand. That must have messed it up and caused these problems.

    So I did as you advised, Frederick, and changed the extruder settings to match the X axis configuration. I also adjusted the faulty E16:16:... line.

    Both extruder motors now behave/move the way they should. I think I have a solid baseline now and should be able to solve any other upcoming problems myself. It's always tough creating your first working version when you are new to something, but once it's there the rest falls into place as you go forward.

    Thank you both for your help & patience. I know it can be challenging at times to help newbies like me asking the same questions times and again when the solution should be so obvious. 🙂

    Just to share this with other fellow Duet 2 & Duex5 users:

    ; Configuration file for Duet WiFi (firmware version 3)
    
    ; General preferences
    G90                                                                 ; send absolute coordinates...
    M83                                                                 ; ...but relative extruder moves
    M550 P"Clayster"                                                    ; set printer name
    
    ; Network
    M552 S1                                                             ; enable network
    M586 P0 S1                                                          ; enable HTTP
    M586 P1 S0                                                          ; disable FTP
    M586 P2 S0                                                          ; disable Telnet
    
    ; Drives 
    M569 P0 S1                                                          ; X1
    M569 P1 S1                                                          ; Y
    M569 P2 S1                                                          ; Z1 & Z2
    M569 P3 S1                                                          ; E0
    M569 P4 S1                                                          ; E1
    M569 P5 S1                                                          ; Z3
    M569 P6 S1                                                          ; Z4
    M569 P7 S0                                                          ; X2
    
    M584 X0:7 Y1 Z2:5:6 E3:4                                            ; remap motors 
    
    M350 X16:16 Y16 Z16:16:16 E16:16 I1                        	; configure microstepping with interpolation
    M92 X100.00 Y100.00 Z1600.00 E250.00:100.00							; set steps per mm 
    M566 X900.00 Y900.00 Z20.00 E200.00							   		; set maximum instantaneous speed changes (mm/min)
    M203 X6000.00 Y6000.00 Z180.00 E1200.00:100.00					 	; set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z250.00 E250.00					        	; set accelerations (mm/s^2)
    M906 X1000 Y1000 Z1000 E1000 I30 				          			; set motor currents (mA) and motor idle factor in per cent
    M84 S30                                                				; Set idle timeout
    
    ; Axis Limits
    M208 X0 Y0 Z0 S1                                                    ; set axis minima
    M208 X380 Y380 Z350 S0                                              ; 38cm x 38cm x 35cm
    
    ; Endstops
    M574 X1 S1 P"!xstop+!duex.e4stop"                                   ; configure active-low endstop for 2 X-motors
    M574 Y1 S1 P"!ystop"                                                ; configure active-low endstop for low end on Y via pin ystop
    M574 Z1 S1 P"!zstop"												; remove once Z probe is available
    
    ; Z-Probe
    ;M558 P3 C"^zprobe.in" H5 I1 F120 T6000     			            ; set Z probe type to switch and the dive height + speeds
    ;M558 P5 C"^zprobe.in" H5 I1 F120 T6000                             ; backup
    ;G31 P500 X0 Y0 Z2.5                                                ; set Z probe trigger value, offset and trigger height
    ;M557 X15:215 Y15:195 S20                                           ; define mesh grid
    
    ; Miscellaneous
    M575 P1 S1 B57600                                                   ; enable support for PanelDue
    
    ; Extruder I 
    M563 P0 D0  														; enable tool 0 & extruder E0 (D0)
    G10 P0 X0 Y0 Z0 													; axis offsets for extruder
    G10 P0 R0 S0														; set extruder active and standby temperature to 0 Celsius
    
    ; Extruder II
    M563 P1 D1  														; enable tool 1 & extruder E1 (D1)
    G10 P0 X0 Y0 Z0 													; axis offsets for extruder
    G10 P0 R0 S0														; set extruder active and standby temperature to 0 Celsius
    


  • Hi,

    Glad to hear you are making progress.

    A few of things you may want to address.

    In the M560 P2 S1 command you have a comment showing Z1 and Z2.

    Keep in mind that the two connectors there put the steppers in series sharing the same driver whereas your Z3 and Z4 steppers have their own drivers.

    While this might work fine but it might not. Just something to be aware of.


    In the M350 command you have E16:16 which is appropriate since you have two E steppers however you have X16:16.

    Note this from the documentation for M350:

    RepRapFirmware does not support individual motor settings where an axis has multiple motors connected to different stepper drivers. The first parameter specified will be used for all motors on the axis. You should use identical motors on any axis that has more than one motor to avoid unexpected behaviour.

    So the X16:16 does no harm but the second 16 serves no purpose. You may want to remove all such unneeded values just to simply things.


    In the M566 command you only have E200.00.

    It might be best to have E200.00:200.00 to be sure you have the desired settings for each E stepper.

    You may want to check all such situations.


    Just FYI regards the M208 command. What you have is fine and is how the configuration tool creates things. However if desired you can also use the form X0:380 Y0:380 Z0:350 which keeps all the values together on one line.


    Frederick



  • Hello Frederick,

    Thank you, this was very valuable. In fact I adapted all your suggestions, in particular number 1. That is because I want to use bed leveling for 4 independent motors, so all Z-steppers actually have to have their own driver. Therefore I reassigned Z2.

    Also the other comments make a slot of sense. I cannot thank you enough for all the time you are taking to help me.

    This is what it looks now:

    ; Configuration file for Duet WiFi (firmware version 3)
    
    ; General preferences
    G90                                                                 ; send absolute coordinates...
    M83                                                                 ; ...but relative extruder moves
    M550 P"Clayster"                                                    ; set printer name
    M302 P1																; enable cold extrusion for clay printing
    
    ; Network
    M552 S1                                                             ; enable network
    M586 P0 S1                                                          ; enable HTTP
    M586 P1 S0                                                          ; disable FTP
    M586 P2 S0                                                          ; disable Telnet
    
    ; Drives 
    M569 P0 S1                                                          ; X1
    M569 P1 S1                                                          ; Y
    M569 P2 S1                                                          ; Z1
    M569 P3 S1                                                          ; E0
    M569 P4 S1                                                          ; E1
    M569 P5 S1                                                          ; Z2
    M569 P6 S1                                                          ; Z3
    M569 P7 S0                                                          ; X2
    M569 P8 S1                                                          ; Z4
    
    M584 X0:7 Y1 Z2:5:6:8 E3:4                                          ; remap motors 
    
    M350 X16 Y16 Z16 E16 I1			                        			; configure microstepping with interpolation
    
    M92 X100.00 Y100.00 Z1600.00 E250.00:100.00							; set steps per mm
    M566 X900.00 Y900.00 Z20.00 E200.00:200.00					   		; set maximum instantaneous speed changes (mm/min)
    M203 X6000.00 Y6000.00 Z180.00 E1200.00:100.00					 	; set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z250.00 E250.00:250.00				        	; set accelerations (mm/s^2)
    
    M906 X1000 Y1000 Z1000 E1000 I30 				          			; set motor currents (mA) and motor idle factor in per cent
    M84 S30                                                				; Set idle timeout
    
    ; Axis Limits
    M208 X0:380 Y0:380 Z0:350 S1                                        ; 38cm x 38cm x 35cm
    
    ; Endstops
    M574 X1 S1 P"!xstop+!duex.e4stop"                                   ; configure active-low endstop for 2 X-motors
    M574 Y1 S1 P"!ystop"                                                ; configure active-low endstop for low end on Y via pin ystop
    M574 Z1 S1 P"!zstop"												; remove once Z probe is available
    
    ; Z-Probe
    ;M558 P3 C"^zprobe.in" H5 I1 F120 T6000     			            ; set Z probe type to switch and the dive height + speeds
    ;M558 P5 C"^zprobe.in" H5 I1 F120 T6000                             ; backup
    ;G31 P500 X0 Y0 Z2.5                                                ; set Z probe trigger value, offset and trigger height
    ;M557 X15:215 Y15:195 S20                                           ; define mesh grid
    
    ; Miscellaneous
    M575 P1 S1 B57600                                                   ; enable support for PanelDue
    
    ; Extruder I 
    M563 P0 D0  														; enable tool 0 & extruder E0 (D0)
    G10 P0 X0 Y0 Z0 													; axis offsets for extruder
    G10 P0 R0 S0														; set extruder active and standby temperature to 0 Celsius
    
    ; Extruder II
    M563 P1 D1  														; enable tool 1 & extruder E1 (D1)
    G10 P0 X0 Y0 Z0 													; axis offsets for extruder
    G10 P0 R0 S0														; set extruder active and standby temperature to 0 Celsius
    

  • Moderator

    @wieman01 said in Question: Connecting extruder motor(s) using regular Nema17:

    M906 X1000 Y1000 Z1000 E1000 I30

    Don't forget the second extruder motor current.



  • @Phaedrux said in Question: Connecting extruder motor(s) using regular Nema17:

    @wieman01 said in Question: Connecting extruder motor(s) using regular Nema17:

    M906 X1000 Y1000 Z1000 E1000 I30

    Don't forget the second extruder motor current.

    Thank you. When I use the same current for both, could I not leave it as it is? Only have two value where they are different? Just a thought because this looks neat.



  • @wieman01 said in Question: Connecting extruder motor(s) using regular Nema17:

    @Phaedrux said in Question: Connecting extruder motor(s) using regular Nema17:

    @wieman01 said in Question: Connecting extruder motor(s) using regular Nema17:

    M906 X1000 Y1000 Z1000 E1000 I30

    Don't forget the second extruder motor current.

    Thank you. When I use the same current for both, could I not leave it as it is? Only have two value where they are different? Just a thought because this looks neat.

    Hi,

    Even if the values are the same you should always specify both.

    Frederick



  • Hi,

    But then the same applies to this line:

    M350 X16 Y16 Z16 E16 I1		
    

    So "E16" should read "E16:16" , but the x, y, z should only have one value as discussed before, correct?

    wieman01


  • Moderator

    @wieman01 said in Question: Connecting extruder motor(s) using regular Nema17:

    correct?

    Correct.

    The extruders are different than other axis because each extruder is treated independently. They may have different motors and are not commanded in a coordinated way like other axis are.

    If you don't specify the parameters for each extruder you may end up with an unknown default value and unexpected behaviour.



  • @Phaedrux said in Question: Connecting extruder motor(s) using regular Nema17:

    @wieman01 said in Question: Connecting extruder motor(s) using regular Nema17:

    correct?

    Correct.

    The extruders are different than other axis because each extruder is treated independently. They may have different motors and are not commanded in a coordinated way like other axis are.

    If you don't specify the parameters for each extruder you may end up with an unknown default value and unexpected behaviour.

    Thank you, Phaedrux, that makes sense now. Will make the changes as agreed. I think I should have a very solid baseline now for my next endeavor when my capacitive Z probe arrives (NPN NO).

    Thanks to all of you for bearing with me. These last few days have been very insightful and crucial to my project.


Log in to reply