Mysterious behavior.
-
I have set up my printer.
Duet wifi 2 with ver 3 firmware.
I have wired Mechaduinos closed loop motors in X and Y axis and have separate 5V supply for the Vin control for the mechaduinos.
The printer has X and Y ballscrews with X max homing and Y min homing.both X and Y motors tested and calibrated well with Ramps 1.4/arduino control.
and never did anything of the below...Problem....
I have tried to sort the X axis...
I have set the X axis to hit micro-switch,
then back off
Re-home at slower speed
move back off and stopSometimes..
(a) axis starts homing in the opposite direction
(b) sometimes it homes as programmed.I have not fully configured the Y as well, however more often than not,
this takes the wrong directionWhat is going on?
Z seems to run ok. It does not have the mechanduino.
here is my firmware
config
; Configuration file for Duet WiFi (firmware version 3)
; executed by the firmware on start-up; General preferences
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
M550 P"MENDELEVIUM 3D HULK TWIN TOOLS" ; set printer name; Network
M552 S1 ; enable network
M586 P0 S1 ; enable HTTP
M586 P1 S0 ; disable FTP
M586 P2 S0 ; disable Telnet; Drives S0 forward S1 reverse
M569 P0 S0 ; X physical drive 0 goes forwards
M569 P1 S0 ; Y physical drive 1 goes forwards
M569 P2 S1 ; Z physical drive 2 goes forwards
M569 P3 S0 ; E0 physical drive 3 goes backwards
M569 P4 S0 ; E1 physical drive 4 goes backwardsM584 X0 Y1 Z2 E3:4 ; set drive
mapping
M350 X16 Y16 Z16 E16:16 I1 ; configuremicrostepping with interpolation
M92 X5000.00 Y5000.00 Z400.00 E297.80:297.80 ; set steps per mmM566 X900.00 Y900.00 Z60.00 E120.00:120.00 ; set maximum instantaneous speed changes (mm/min)
M203 X6000.00 Y6000.00 Z180.00 E1200.00:1200.00 ; set maximum speeds (mm/min)
M201 X500.00 Y500.00 Z20.00 E250.00:250.00 ; set accelerations (mm/s^2)
M906 X800 Y800 Z800 E800:800 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 Z380 S0 ; set axis maxima; Endstops
; Explanation The 1 or 2 with the axis name denotes if the endstop is in the min pos (1) or the maximum position (2)
; S is the Homing direction S 1 is max direction and S0 is the minimum DirectionM574 X2 S1 P"xstop" ; configure active-high endstop for high end on X via pin xstop
M574 Y1 S0 P"ystop" ; configure active-high endstop for low end on Y via pin ystop
M574 Z2 S1 P"zstop" ; configure active-high endstop for high end on Z via pin zstop; Z-Probe
M558 P0 H5 F120 T6000 ; disable Z probe but set dive height, probe speed and travel speed
M557 X15:215 Y15:195 S20 ; define mesh grid; Heaters
M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin bedtemp
M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0
M307 H0 B1 S1.00 ; enable bang-bang mode for the bed heater and set PWM limit
M140 H0 ; map heated bed to heater 0
M143 H0 S120 ; set temperature limit for heater 0 to 120C
M308 S1 P"e0temp" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin e0temp
M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1
M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
M143 H1 S280 ; set temperature limit for heater 1 to 280C
M308 S2 P"e1temp" Y"thermistor" T100000 B4138 ; configure sensor 2 as thermistor on pin e1temp
M950 H2 C"e1heat" T2 ; create nozzle heater output on e1heat and map it to sensor 2
M307 H2 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
M143 H2 S280 ; set temperature limit for heater 2 to 280C; Fans
M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency
M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency
M106 P1 S1 H-1 ; set fan 1 value. Thermostatic control is turned off; Tools as per forum instruction
M563 P0 S"EXTRUDER 0" D0 H1 F0 ;TOOL 0 USES DRIVE 0 AND HEATER 1
G10 P0 S0 R0 X-16.5 Y0 ; set tool 0 axis offsets
M563 P1 S"EXTRUDER 1" D1 H2 F1 ; define tool 1
G10 P1 S0 R0 X16.5 Y0 ; set tool 1 axis offsets; Custom settings are not defined
; Miscellaneous
M575 P1 S1 B57600 ; enable support for PanelDue
M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss; homex.g
; called to home the X axisG91 ;realtive mode
G1 X500 F250 H1 ; move X rapidly / 300mm up/ until Homing is triggerd
G1 X-4 F100 ; retract X 3mm slowly
G1 X10 F25 H1 ; rehome at slow speed
G1 X-5 F25 ; BACK OFF 5MM
G90 ; return to absolute mode; homey.g
; called to home the Y axis
;
; Created by Tonio 28feb 2021
G91 ;realtive mode
G1 Y-300 F1000 H1 ; move Y rapidly / 300mm up/ until Homing is triggerd
G1 Y5 F300 ; retract Y5mm slowly
G1 Y-15 F100 H1 ; rehome at slow speed
G1 Y5 F300 ; retract Y5mm slowly
G90 ; return to absolute modeAny help appreciated..
thanks in advance. -
@mendelevium said in Mysterious behavior.:
M574 Y1 S0 P"ystop" ; configure active-high endstop for low end on Y via pin ystop
S0 is not valid
see
https://duet3d.dozuki.com/Wiki/Gcode#Section_M574_RepRapFirmware_Num_3why are you not using the default homing scripts the the configurator generates?
M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin bedtemp
M308 S1 P"e0temp" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin e0temp
M308 S2 P"e1temp" Y"thermistor" T100000 B4138 ; configure sensor 2 as thermistor on pin e1tempB4138 is the default and incorrect. find the correct beta value in your thermistor documentation.
-
If you are using external drivers you will almost certainly need to add timing parameters to the M569 lines. You need to find what the timing requirements are for your drives and then update the M569 with the needed T parameter: https://duet3d.dozuki.com/Wiki/Gcode#Section_M569_Set_motor_driver_direction_enable_polarity_and_step_pulse_timing
It is probably the lack of the timing parameter that is causing the driver to sometimes move in the wrong direction.
-
how are you running the closed loop stepper drivers with the tmc2660?
-
@Veti
I have used the online configurator and it would`nt work so I dug some info and adjusted it maybe with the wrong. I will check/follow your link thank you. -
@Veti
I have tapped the duet 2 wifi boards X and Y axis- step/Dir board test terminals and soldered two leads out of each. The mechaduino steppers are powered 12 V from the power supply and have a 5v supply for the Mechaduino
s Vin. I have some light humming but think that I will manage to eliminate that. -
so you are running 2 stepper drivers of 1 signal?