how to move a stepper motor constantly?
-
Does Duet have a command or set of them that makes a stepper motor move constantly?
-
Not at present. There is only one movement queue (with some exotic exceptions), and G0 G1 with multiple axis perform "coordinated linear motion", ensuring that all axis arrive a the specified point at the same instant in time.
Future releases will contain both conditional g-code and multiple movement queues, and these MIGHT do what you want.
What is the use case? There could be a potential range of solutions that involve an IO pin that can be manipulated by gcode on the Duet, that pin then driving an arduino or similar to drive the stepper.
-
There is a way to do it using additional hardware. Using additional hardware would enable a stepper motor to turn continuosly, and the circuitry to do so could be arranged in many different ways. One strategy might use DUET fan IO pin, (controllable by codes) to gate on/off a nano-arduino driving an A4988 step-stick hooked up to a stepper motor. Another, might use a LM555 timer chip arranged as an astable multivibrator, again gated (drive the RESET line up/down by a DUET fan I/O pin). The output of the timer would be connected to an A4988 stepstick. If you need to control the direction of spin, use another fan pin.
There is almost always a way to do things. The DUET controllers are excellent.
See:
https://www.instructables.com/id/555-TIMER-CIRCUIT-TO-DRIVE-a-STEPPER-MOTOR/
https://www.makerguides.com/a4988-stepper-motor-driver-arduino-tutorial/
These are just a few ideas. If you look around a bit I'm fairly certain you are likely to find an actual step-by-step solution, although there is enough information in the above URLs to implement your own solution.
Good Luck,
3mm
-
How long is 'constantly' ? A day? a year? 100 years?
You can have a very long macro file with a larger number of move operations.
-
@Danal said in how to move a stepper motor constantly?:
Not at present. There is only one movement queue (with some exotic exceptions), and G0 G1 with multiple axis perform "coordinated linear motion", ensuring that all axis arrive a the specified point at the same instant in time.
Future releases will contain both conditional g-code and multiple movement queues, and these MIGHT do what you want.
What is the use case? There could be a potential range of solutions that involve an IO pin that can be manipulated by gcode on the Duet, that pin then driving an arduino or similar to drive the stepper.
The use case is a 3mm filament coil extruder, when I am not printing I am manufacturing filament.
@3mm said in how to move a stepper motor constantly?:
There is a way to do it using additional hardware. Using additional hardware would enable a stepper motor to turn continuosly, and the circuitry to do so could be arranged in many different ways. One strategy might use DUET fan IO pin, (controllable by codes) to gate on/off a nano-arduino driving an A4988 step-stick hooked up to a stepper motor. Another, might use a LM555 timer chip arranged as an astable multivibrator, again gated (drive the RESET line up/down by a DUET fan I/O pin). The output of the timer would be connected to an A4988 stepstick. If you need to control the direction of spin, use another fan pin.
There is almost always a way to do things. The DUET controllers are excellent.
See:
https://www.instructables.com/id/555-TIMER-CIRCUIT-TO-DRIVE-a-STEPPER-MOTOR/
https://www.makerguides.com/a4988-stepper-motor-driver-arduino-tutorial/
These are just a few ideas. If you look around a bit I'm fairly certain you are likely to find an actual step-by-step solution, although there is enough information in the above URLs to implement your own solution.
Good Luck,
3mm
Thank you for your answers as well as they have given me ideas, surely use a GPIO pin to control a microcontroller with some...
@zapta said in how to move a stepper motor constantly?:
How long is 'constantly' ? A day? a year? 100 years?
You can have a very long macro file with a larger number of move operations.
some hours no more than one day.
-
@jhonf441 said in how to move a stepper motor constantly?:
The use case is a 3mm filament coil extruder, when I am not printing I am manufacturing filament.
@jhonf441 said in how to move a stepper motor constantly?:
some hours no more than one day.
so you just need a very long motion, and the limitation, if any, would be the size of the datastructure used for the coordinate systems and settings. Lets say 3kg 1.75mm filament is 1,000m, or 1,000,000mm - if the firmware cannot move to 1,000,000mm then you could do 1,000 moves of 1,000mm each? Or maybe you could set up the machine step/mm to be step/m and only need to move to 1,000m insteaf of 1,000,000mm?