Cannot reverse motor direction
-
Hello,
I am good with mechanics, but know very little about coding. I recently upgraded the extruder for my clay printer, but I need to reverse the stepper motor direction so that it runs in unison with the printer head extruder. I first tried changing M569 P4 from S0 to S1, and reset the board. Nothing changed. Next, I updated from firmware 2.02 to 3.0, and that worked fine. I confirmed the change succeeded using Serial Tools on my Mac laptop. I've spent two days trying to solve this without luck. I'm uploading my config file in case anyone can help me. Thanks for your time if you can. I have also searched this forum for answers before posting this request for help.
config.g -
; Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.3.10 on Fri Mar 25 2022 17:57:58 GMT-0400 (Eastern Daylight Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"StoneflowerV3" ; 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 S0 ; physical drive 0 goes forwards M569 P1 S0 ; physical drive 1 goes forwards M569 P2 S1 ; physical drive 2 goes forwards M569 P3 S0 ; physical drive 3 goes forwards E0 M569 P4 S1 ; physical drive 4 goes backwards E1 M584 X0 Y1 Z2 E3:4 ; set drive mapping M350 X16 Y16 Z16 E16:16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z1600.00 E67.67:67.67 ; set steps per mm M566 X900.00 Y900.00 Z12 E900.00:900.00 ; set maximum instantaneous speed changes (mm/min) M203 X60000.00 Y60000.00 Z200 E6000:6000 ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z80.00 E1000:1000 ; set accelerations (mm/s^2) M906 X2000 Y2000 Z2200 E600:2000 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 X480 Y480 Z480 S0 ; set axis maxima ; Endstops M574 X1 S1 P"xstop" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin xstop M574 Y1 S1 P"ystop" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin ystop M574 Z1 S2 ; configure Z-probe endstop for low end on Z ; Heaters M140 H-1 ; Disable heated bed ; Fans M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off M106 P1 S1 I0 F500 H-1 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned off M106 P2 S1 I0 F500 H-1 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned off ; Tools M563 P0 D0:1 ; Define tool 0, use Extruder 0, Extruder 1 and no heater G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C M567 P0 E4.0:1.0 ; Run ram extruder 1 at normal speed, run extruder 0 (print head) 4.0 times faster T0 ; Select tool T0 M302 P1 ; allow cold extrusion ; Custom settings are not defined ; Miscellaneous M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
-
-
@fcwilt said in Cannot reverse motor direction:
Frederick
Hi Frederick,
Thank you very much for making time to look at this. Yes, I first contacted the producer of my printer, and he instructed me to change P4 from S0 to S1. I have tested other simple config changes like changing the printer name to confirm that changes are saved to the SD card, and it works fine. I can see the printer name change on my printer's LCD screen.
I have also tried changing other stepper drive polarities for P0, P1, P2, or P3, reset the board (and even powered the machine off and on again), but there is never any change in motor directions. When I open the config file through my web browser, the saved changes are always sustained. I understand this is how it is supposed to work, so I cannot figure out what I've done incorrectly.
Could it be an error with the M563 code to identify the tools? I've read the change logs to begin learning about necessary config changes when updating from firmware 2.03 to 3.0, and thought I got it right.
I'm under pressure for upcoming deadlines, so I'm panicking to get this machine running again.
-
Have you executed M569 P0 (or P1 or P2 or P3 or P4) from the DWC Console to see if the desired direction is reported?
Do this right after a re-boot or reset before executing any other code, like homing an axis.
Frederick
-
Make sure there isn’t A) an override config file and b) if there is one, there isn’t something overriding it using the same command
Sam
-
@fcwilt thank you Frederick. I wasn't familiar with that command and tried it per your instructions. M569 is showing that the motor direction is changing per my edits to the config file, but each time I run my machine there is no difference.
In order to eliminate another variable, I have also tried this with my original extruder as well as the new one, but neither changer direction even though the M569 command shows that it should be.
-
@samlogan87 Hi Sam, thank you. Would a config override file be titled config-override.g? I looked back through all of my system files and do not see that. A config.bak file was generated after I edited the original config, but guess that this is not an override file.
-
@carefullylarry said in Cannot reverse motor direction:
@fcwilt thank you Frederick. I wasn't familiar with that command and tried it per your instructions. M569 is showing that the motor direction is changing per my edits to the config file, but each time I run my machine there is no difference.
In order to eliminate another variable, I have also tried this with my original extruder as well as the new one, but neither changer direction even though the M569 command shows that it should be.
Well at this point I am beginning to think that there is some other code that is being executed when you print which is restoring the original stepper settings.
What slicer are you using?
Please post one of the files you are trying to print so we can look for any suspicious code.
Thanks.
Frederick
-
@fcwilt I'm not even running files at this stage. I'm using the Stoneflower clay printer control box to manually extrude and manually change direction for retract or feed.
With the original extruder, the print head auger and extruder run in unison as needed whether I manually retract or feed with the control box. The new extruder from the same company runs opposite of the print head auger direction, so it cannot print clay like this.
Before trying to correct the stepper motor direction through the config file, I had tried switching the stepper motor wires and that partially worked. It ran in the correct direction, but made a loud noise that the company confirmed should not be happening. Therefore, I returned the wiring in the original configuration, and attempted to correct through the config file.
-
@carefullylarry said in Cannot reverse motor direction:
Before trying to correct the stepper motor direction through the config file, I had tried switching the stepper motor wires and that partially worked. It ran in the correct direction, but made a loud noise that the company confirmed should not be happening. Therefore, I returned the wiring in the original configuration, and attempted to correct through the config file.
Changing the wiring should have worked unless perhaps something is wrong with the driver.
Which extruder (E0 or E1) did you change the wiring on?
Did you restore the original wiring and then try changing the wiring to the other extruder?
Frederick
-
@fcwilt
Hi Frederick, the ram extruder is E1. I also tried changing the direction for P3 (E0 is the print head extruder), and that also did not change. It looks like the driver on the Duet board isn't working? If it were a cable problem, then either E0 or E1 should have worked.I've also ruled out that it could be a problem with the stepper motor on the new ram extruder since I have tried changing P4 direction using my original ram extruder as well as the new one. Neither change direction.
I've also been corresponding with Stoneflower to solve this. The easy fix should have been changing all 4 of the stepper motor wires in reverse order. That does change the motor direction, but the stepper motor then makes loud noise once it starts pushing the clay through. The noise does not occur with the original wire configuration when I manually control the feed and extract.
This has become maddeningly frustrating. I really appreciate you making the time to help me troubleshoot.
-
@carefullylarry said in Cannot reverse motor direction:
I've also been corresponding with Stoneflower to solve this. The easy fix should have been changing all 4 of the stepper motor wires in reverse order. That does change the motor direction, but the stepper motor then makes loud noise once it starts pushing the clay through. The noise does not occur with the original wire configuration when I manually control the feed and extract.
To reverse the direction of a stepper you swap the 2 wires to one coil only.
Did you try that?
Frederick
-
@carefullylarry have you checked which pairs of motor wires are phases? Loud noises and vibration from motors usually mean that they have not been phased correctly. That would also explain why M569 S1 does not reverse the direction.
-
After swapping two wires resulted in noise, I followed the directions from the manufacturer to reverse the order of all 4 wires, and that results in the same noise problem. My work schedule has been too busy recently to get back to this.
I have been very careful to clarify with the company that my wires connections are correct. I do not know how to identify which pairs of wires are phases. If wires are incorrectly matched, can this cause damage to the stepper motor? I can try other combinations outside of how I've been instructed to pair them to see what happens. I'm really at a loss and incredibly frustrated at this point. I will buy another Duet board since it seems that the driver has failed and even swapping wires won't work for some reason. This has sabotaged a collaboration project that cannot be completed in time now.
-
@carefullylarry Two ways:
Short two of the stepper wires, if it gets hard to turn, thats a pair/phase.
Use a multimeter to find the pairs. -
@carefullylarry said in Cannot reverse motor direction:
I do not know how to identify which pairs of wires are phases.
-
@phaedrux and Stephen6309, thank you both very much. This is very helpful with so little time to work on it currently.