Two steppers and two end stops on one axis
-
Thank you for all replies, I now think have enough info to implement this.
-
@kazolar It does guarantee square! If you go through my homing scripts you see that the Y axis are homed independently. And as it is very difficult to insure the switches trigger at the exact same distance from the mechanical reference for 0, one of the two Y axis needs to be just slightly moved back (fractions of a mm). Once that is done, the gantry is properly squared.
-
@catalin_ro so you are doing the same thing I suggested -- which is home Y right and Y left to hit individual limit switches -- maybe I read something wrong at nearly 3 am -- I thought you were doing series end switches -- which would not guarantee square...I re-read it now and you're doing the same thing as I am (I did it in logic circuits because otherwise I don't have enough end stops/stepper outputs on the duet to have each Y axis stepper go to duet directly) -- my system uses 16 steppers -- so I had to get creative
-
@kazolar I was thinking on something similar to your solution before using the Duet as I used GRBL for about 2 years on another CNC machine with twin Y axis.
-
@Catalin_RO it works super well -- just a couple of logic circuits -- 3.3v friendly chips and it works perfectly. I ended up designing a PCB and getting it made in China for $30 -- so it's nice and professional -- it takes a few 10 pin ribbons from duet, and has outputs for the 2 physical end stops (Y and U axis) + power and I plug in the extra steppers + end stops into it. There is no latency since it's just basic logic gates. One benefit I can't ever crash the X gantries past the end stops since the step pin stops being sent when end stop is hit and direction is into the end stop, so even safer than software limits
-
I have almost got this to work now. I have a some odd behaviors though.
I have a Duet 0.6 with a Duet Shield. Four steppers connected (driver 0,1,3,4) and four switches NO connected connected beside each corresponding stepper connection.
These are my issues (so far ) :
- To get it to work I added a M574 to the homing file.
- The end stop switch beside the connector for drive 4 => Y2 triggers homing end on drive 3 => X2
- The end stop switch beside the connector for drive 3 => X2 triggers homing end on drive 4 => Y2
- The drives created in the homing file goes faster during homing, despite resetting max speed in homing file. After homing and two steppers per axis they have the same speed.
- After homing the U and V axis turns up in DWC
What am I doing wrong?
homey.g ------------------------------------------------------ M584 Y1 V4 ; split steppers M574 Y1 V1 S0 G91 ; relative moves G1 Y-650 V650 F450 S1 M584 Y1:4 ; join steppers G92 Y0 V0 G90 homex.g ------------------------------------------------------ M584 X0 U3 ; split steppers M574 X1 U1 S0 G91 ; relative moves G1 X-650 U-650 F450 S1 M584 X0:3 ; join steppers G92 X0 U0 G90 config.g ------------------------------------------------------ ; Configuration file for Duet 0.6 (firmware version 1.21) ; General preferences G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves ; Network M550 P"MPCNC" ; Set machine name M552 P192.168.0.67 S1 ; Enable network and set IP address M553 P255.255.255.0 ; Set netmask M554 P192.168.0.1 ; Set gateway M586 P0 S1 ; Enable HTTP M586 P1 S1 ; Enable FTP M586 P2 S0 ; Disable Telnet M540 PDE:AD:BE:EF:CA:FA ; Drives M584 X0:3 Y1:4 Z2 ; Tools M563 P0 D0 ; Drive direction M569 P0 S1 ; Drive 0 goes forwards M569 P1 S1 ; Drive 1 goes forwards M569 P2 S1 ; Drive 2 goes forwards M569 P3 S0 M569 P4 S1 ; Steps and Speed M92 X80.00 Y80.00 U80.00 V80.00 Z4000.00 ; Set steps per mm M566 X900.00 Y900.00 Z12.00 ; Set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 Z180.00 U6000.00 V6000.00 ; Set maximum speeds (mm/min) M201 X500.00 Y500.00 Z20.00 U500.00 V500.00 ; Set accelerations (mm/s^2) M906 X800.00 Y800.00 Z800.00 I30 U800.00 V800.00 ; Set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 U0 V0 S1 ; Set axis minima M208 X600 Y400 Z100 U600 V600 S0 ; Set axis maxima ; Endstops M574 X1 Y1 U1 V1 S0 ; Set active low and disabled endstops ; Z-Probe M558 P0 H5 F120 T6000 ; Disable Z probe but set dive height, probe speed and travel speed M557 X15:100 Y15:195 S20 ; Define mesh grid ; Heaters M140 H-1 ; Disable heated bed
-
-
You should create U and V in the initial M584 command in config.g, otherwise the references to U and V later in config.g won't work. That's why you needed the M574 commands in the homing files. It may also be why the speeds are wrong. Also add parameter P3 to that M584 command to hide the U and V axes initially.
-
In your homing files, add parameter P5 to the initial M584 commands, to make U and V visible and controllable; and add P3 to the later M584 commands to hide them. Also swap the order of the G92 and M584 commands, or get rid of the G92 commands (you don't need them if your M208 lower axis limits are set correctly).
-
Regarding the swapped endstop connectors, the pin assignment should be correct for the DueX4 board. Maybe there is a pin difference between the DueX4 and the Duet Shield; or maybe they are wrong for the DueX4 too. I'll check when I get time.
-
-
Thank you so much for the quick an accurate help.
All problems are now solved, the steppers now move with the same speed AND the end stop switches works for the correct steppers now. I guess my config caused some confusion. So no need to look into the Duet Shiled wiring.
Once again, thank you so much!
/Tomas
-
Thanks, I'll mark it as solved. I'm planning to make dual endstop setups much easier in firmware 2.03.
-
Final settings (for future use by anyone interested):
config.g ----------------------------------------- ; Drives M584 X0:3 Y1:4 Z2 U3 V4 P3; Three axis visible ; Tools M563 P0 D0 ; Drive direction M569 P0 S1 ; Drive 0 goes forwards M569 P1 S1 ; Drive 1 goes forwards M569 P2 S1 ; Drive 2 goes forwards M569 P3 S1 M569 P4 S1 ; Steps and Speed M92 X80.00 Y80.00 U80.00 V80.00 Z4000.00 ; Set steps per mm M566 X900.00 Y900.00 U900.00 V900.00 Z12.00; Set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 Z180.00 U6000.00 V6000.00; Set maximum speeds (mm/min) M201 X500.00 Y500.00 Z20.00 U500.00 V500.00; Set accelerations (mm/s^2) M906 X800.00 Y800.00 Z800.00 U800.00 V800.00 I30; motor currents (mA) and motor idle factor M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 U0 V0 S1 ; Set axis minima M208 X600 Y400 Z100 U600 V600 S0 ; Set axis maxima ; Endstops M574 X1 Y1 U1 V1 S0 ; Set active low and disabled endstops homex.g ---------------------------------------- M584 X0 U3 P5; split steppers, 5 axis visible G91 ; relative moves G1 X-650 U-650 F450 S1 ; fast homing X and U in parallell ;G92 X0 U0 ; Make adjustments to square axis here M584 X0:3 P3; join steppers, 3 axis visible G90