Spindle nema 34 duet 2 wifi
-
@Phaedrux said in Spindle nema 34 duet 2 wifi:
Have you seen this on connecting external drivers?
https://docs.duet3d.com/en/User_manual/Connecting_hardware/Motors_connecting_external
I'm building a lathe and I have to turn the spindle with the nema 34
-
When mapping the axis with M584 you need to use the R1 parameter to set it as a rotational axis.
https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m584-set-drive-mapping
Then I think you'll need to figure out the steps per degree of rotation.
-
@Phaedrux said in Spindle nema 34 duet 2 wifi:
When mapping the axis with M584 you need to use the R1 parameter to set it as a rotational axis.
https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m584-set-drive-mapping
Then I think you'll need to figure out the steps per degree of rotation.
Thanks for the answer and the other linear axes .584 R0 ?
-
R0 is the default for XYZUVW I believe. Rotational is the default for ABC.
But you can specify R0 or R1 if you want to be specific.
-
This is something that will be of interest to me in the future, so please keep us up to date with your progress, @paolozampini1973, and drop in some code too, please!
Out of curiosity, though: I have a Duet3 MB6HC and use four of the stepper motor controllers (X, Y1, Y2 and Z). Will that leave me with two, to go down the rotary wormhole? I assume I'd only need one, for that purpose, though.
Thanks
-
@Phaedrux instead to declare axes in degrees instead of mm
-
@Nightowl Yes, but I'm building a 9-axis machine that will have a socket and a lathe in one machine with two k12 125 rotary spindles and for making holes and milling it will be another rotary axis for drilling and milling
-
@paolozampini1973 Rotation axes are usually configured so that one rotation is 360mm, so 1mm is 1 degree. Your DM860H stepper driver sets the number of steps per motor revolution (see section 7 of https://www.kocomotion.de/webshop/DM860.pdf); I'd probably set it to 16 microsteps on a 1.8 degree stepper (because you don't get better accuracy using more steps, when the full step accuracy for the stepper motor is usually +/-5%), for 3200 steps per revolution. This would be 360/3200 = 8.889 steps per mm at the motor. You have a 2:1 gear ratio, so this increases to 17.778 steps per mm. That can go in your config.g as
M92 A17.778
, assuming your rotational axis is A. If you want continuous rotation, you can either set it as an extruder axis E, or set M208 for the axis to a very large number, eg 10,000,000mm (I can't remember what the limit is).Ian
-
@droftarts said in Spindle nema 34 duet 2 wifi:
or set M208 for the axis to a very large number, eg 10,000,000mm (I can't remember what the limit is).
I just wanted to point out the same...
it would be cool, if we could config eg. M208 A'max' R1, and FW would automatically allow max length (HW-dependend?) -
@droftarts said in Spindle nema 34 duet 2 wifi:
@paolozampini1973 Rotation axes are usually configured so that one rotation is 360mm, so 1mm is 1 degree. Your DM860H stepper driver sets the number of steps per motor revolution (see section 7 of https://www.kocomotion.de/webshop/DM860.pdf); I'd probably set it to 16 microsteps on a 1.8 degree stepper (because you don't get better accuracy using more steps, when the full step accuracy for the stepper motor is usually +/-5%), for 3200 steps per revolution. This would be 360/3200 = 8.889 steps per mm at the motor. You have a 2:1 gear ratio, so this increases to 17.778 steps per mm. That can go in your config.g as
M92 A17.778
, assuming your rotational axis is A. If you want continuous rotation, you can either set it as an extruder axis E, or set M208 for the axis to a very large number, eg 10,000,000mm (I can't remember what the limit is).Ian
Ok thank you I will let you know when I have assembled the machine I wanted to ask you instead for the cutter the ratio is 3:1 ratio with a nema 17 How do I make it work FOR MILLING AND DRILLING ?
-
@paolozampini1973 I’d think you want a proper spindle for milling and drilling, not a NEMA17, even at 3:1. Most operations would be at high rpm that stepper motors are just not designed for. You would have to use a second Gcode stream to control it, otherwise the spindle would turn at the feedrate of the current move, and be coordinated with it.
Ian
-
@droftarts said in Spindle nema 34 duet 2 wifi:
@paolozampini1973 I’d think you want a proper spindle for milling and drilling, not a NEMA17, even at 3:1. Most operations would be at high rpm that stepper motors are just not designed for. You would have to use a second Gcode stream to control it, otherwise the spindle would turn at the feedrate of the current move, and be coordinated with it.
Ian
For sure. Much easier to configure and control, too.
-
@paolozampini1973 in your original question, is the NEMA34 for the main lathe spindle/chuck? Because you will have the same problem there; coordinating the stepper motor for continuous rotation for normal lathe operations. I don’t know if there is a stepper or servo controller than you can switch from step control to continuous rotation.
Ian
-
@droftarts
If I understood him right, the NEMA34 chuck is for thread cutting. One of the rare usecases where a stepper is superiour to a spindle motor; he don't need a gearbox with the right ratio to match spindle RPM with thread pitch. -
@o_lampe You're right, if it's just for thread cutting then a stepper would work well. For more general lathe use, either an indexing DC motor, or a servo motor with step and continuous operation (if such a thing exists) would be better.
Ian
-
@droftarts said in Spindle nema 34 duet 2 wifi:
@o_lampe You're right, if it's just for thread cutting then a stepper would work well. For more general lathe use, either an indexing DC motor, or a servo motor with step and continuous operation (if such a thing exists) would be better.
Ian
My basic understanding is that the 1HCL driver has two similar modes to what is being suggested above, traditional step mode for open loop and then it drives the stepper in a pseudo torque mode as if it was a brushless motor when in closed loop. I may have misunderstood but I'm sure @dc42 would be able to confirm or deny.
If that's true then Duet may already have a hardware solution that could be repurposed with a new firmware build.
Interested as I hav a Denford CNC lathe to convert some time in the future...
-
@CNCModeller No, not really. Both open and closed loop modes of the 1HCL use step-and-direction-based inputs, coordinated with other axes. Open loop mode is just like 'normal' stepper drivers. Closed loop mode is still coordinated with other Gcode based movements, just with feedback and, as you say, is a pseudo torque mode, ie will try to get to the position commanded, or generate an error if it doesn't. It's not acting like a spindle, which is turned on, runs at a given speed (usually rpm) while other axes control the coordinated movement, and then stops when commanded.
Though perhaps such a 'spindle' mode for stepper drivers could be added to the firmware wishlist? I'm still not sure if it is an ideal use of a stepper motor, though.
Ian
-
@droftarts said in Spindle nema 34 duet 2 wifi:
such a 'spindle' mode for stepper drivers could be added to the firmware wishlist?
I believe, we've asked infinite rotation as FW feature before.
But there was a good reason, why it's complicated to implement. Can't describe it with my own words. Brain is frozen -
@o_lampe said in Spindle nema 34 duet 2 wifi:
@droftarts said in Spindle nema 34 duet 2 wifi:
such a 'spindle' mode for stepper drivers could be added to the firmware wishlist?
yesI believe, we've asked infinite rotation as FW feature before.
But there was a good reason, why it's complicated to implement. Can't describe it with my own words. Brain is frozen -
Firmware organizes all axis movements in time frames (X moves n mm in 0.1 seconds, Y m mm in the same time etc.). A continuous movement doesn't have a time frame (because it's infinity time), so it's a problem.
A solution could be to add a separate FreeRTOS task which makes the continuous movement for a (stepper-)motor by generating own stepper signals without any time frame planning. It would run isolated from all other movements, but this needs to be added to the firmware, something for the wishlist.