External Stepper Motors Problem
-
I am using this stepper motor driver and stepper motor kit:
After breaking out the Duet's external stepper driver signals from the 50 pin connector I step the signal up from 0-3.3 to 0-5V and then send it through a differential line driver. This feeds directly into the stepper driver. I've gotten my motors to work, however, I have to set the pulse width to around 50microseconds at least. Also the Duet will disconnect after a few movements reporting this error from Pronterface:
[ERROR] Can't read from printer (disconnected?) (SerialException): call to ClearCommError failed
[ERROR] Can't write to printer (disconnected?) (SerialException): WriteFile failed (WindowsError(22, 'The device does not recognize the command.'))
[ERROR] Can't write to printer (disconnected?) (SerialException): WriteFile failed (WindowsError(22, 'The device does not recognize the command.'))
[ERROR] Can't write to printer (disconnected?) (SerialException): WriteFile failed (WindowsError(22, 'The device does not recognize the command.'))
[ERROR] Can't write to printer (disconnected?) (SerialException): WriteFile failed (WindowsError(22, 'The device does not recognize the command.'))
[ERROR] Disconnecting after 4 failed writes.
Disconnected.For further troubleshooting here is my config.g file:
; Configuration file for Duet WiFi (firmware version 1.21)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool v2 on Thu Jun 20 2019 13:54:55 GMT-0500 (Central Daylight Time); General preferences
G90 ; Send absolute coordinates...
M83 ; ...but relative extruder moves; Network
M550 P"Frank" ; Set machine name
M552 S1 ; Enable network
;*** Access point is configured manually via M587
M586 P0 S1 ; Enable HTTP
M586 P1 S0 ; Disable FTP
M586 P2 S0 ; Disable Telnet; Drives
M584 X5 Y6 Z7
M569 P5 T200 S1 ; Drive 5 goes forwards
M569 P6 T200 S1
M569 P7 T200 S1M350 X16 Y16 Z16 E16 u16 V16 I1 ; Configure microstepping with interpolation
M92 X100.00 Y100.00 Z1600.00 E5040.00 u64.4 V64.4 ; Set steps per mm
M566 X900.00 Y900.00 Z12.00 E25.00 U100 V100 ; Set maximum instantaneous speed changes (mm/min)
M203 X60000.00 Y60000.00 Z300.00 E60.00 U1500 V1500 ; Set maximum speeds (mm/min)
M201 X1000.00 Y1000.00 Z100.00 E50.00 U1000 V500 ; Set accelerations (mm/s^2)
M906 X2500.00 Y1500.00 Z1500.00 E400.00 u1500 V1500 I30 ; Set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout; Axis Limits
M208 X0 Y0 Z0 u0 S1 ; Set axis minima
M208 X255 Y310 Z200 u500 S0 ; Set axis maxima; Endstops
M574 X1 Y1 S0 ; Set active low and disabled endstops
M574 Z1 S2 ; Define Z to use Probe. Home to Min
M557 X15:215 Y15:195 S20 ; Define mesh grid
M558 P5 X0 Y0 Z1 H2 F300 T6000 ; Set Z Probe to type Switch or Digital output where Z probe connector is used. Used for z only
G31 P50 X-40.70 Y8.70 Z3.57 ; Set Z probe trigger value, offset and trigger height
M574 u0 s3; Z-Probe
;M558 P1 H5 F120 T6000 ; Set Z probe type to unmodulated and the dive height + speeds
;G31 P500 X0 Y0 Z2.5 ; Set Z probe trigger value, offset and trigger height; Heaters
M305 P0 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 0
M143 H0 S120 ; Set temperature limit for heater 0 to 120C
M305 P1 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 1
M143 H1 S280 ; Set temperature limit for heater 1 to 280C;Disable heater to free up PWM channel
M307 H7 A-1 C-1 D-1 ;Disable heater 7 for BLTouch; Fans
M106 P0 S0 I0 F500 H T45 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned on
M106 P1 S1 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on; Tools
M563 P0 D0 H1 ; Define tool 0
G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0CM563 P1 S"MicroDispense" D0 ; Define tool 2
;M572 D0 S0.15 ; Pressure Advance initialization
;M557 X110:180 Y55:100 S15 ; Mesh size for FR4 substrate
;M558 P0 X0 Y0 Z0 F120 T600 H2 ; Probe initialization;M200 D9.5 ; Enable Volumetric extrusion
; Automatic saving after power loss is not enabled
; Custom settings are not configured
Any insight would be greatly appreciated.
-
@nickpm
We are using stepper motors, and their drivers also need some adjusted pulses.
We adjusted the pulse length like this:; Drives M569 P5 T2.5:2.5:5:0 ; X driver 5 requires an active high enable, 2.5us minimum step pulse, 2.5us minimum step interval, 5us DIR setup time and no hold time
-
One of the problems I ran into was the 2.5us pulse width was too small for good signal integrity.
-
@nickpm your pronterface connection problem: maybe you need M555 P2 according to https://forum.duet3d.com/topic/6956/cannot-connect-through-pronterface
In newer firmware M555 P2 is the default, but your firmware may be older.