Welcome! Log In Create A New Profile

Advanced

Swapping between step sizes in real time?

Posted by Soronemus 
Swapping between step sizes in real time?
October 03, 2015 11:54PM
Hey guys,

I'm designing/building/controlling a new style of delta robot for my masters' thesis. I am trying to do the controls for the robot using an arduino mega and pololu stepper drivers. After playing around with it a bit and reading about it the speed of the stepper motors seems to be limited greatly in part by the frequency of the controller. I had the idea to overcome this by using all of the different step types throughout any given motion. Microstep when starting a move and picking up speed, interleave and half step when almost at max speed, then full steps when at max speed. Once decelerating the same process could be used until you come to a stop with microstepping for good precision and fluidity.

I see a ton of problems with this approach and I am wondering if anyone does it this way. The biggest problem I would think (other than the code being complicated) is how the stepper would react when swapping between the stepping types. For example trying to swap from microstep to interleave stepping while in a strange shaft position not attainable through interleave stepping.

Do people just avoid this problem all together and stick in one step size throughout the life of their printer, and just adjust the stepping speed?

I ordered a smoothieboard out of frustration because I read it is the best performing controller (although a lot more expensive). I should be able to step as fast as I need to with the smoothieboard due to the sheer superiority of its hardware over the arduino mega, but I would like to know the solution to this for future reference. I would much rather spend 30 bucks for a ramps 1.4 kit than 140 bucks for a smoothieboard if I can do the same thing with both.

TLDR: Can I change step sizes during one movement of a stepper to maximize speed if processor frequency is the bottleneck, like a horse going through its different gaits(walk, trot, canter)? Or do I have to stick to one step size and adjust its speed to suit all of my needs?
Re: Swapping between step sizes in real time?
October 04, 2015 01:47AM
The processor only spits out step and direction signals. The motor driver chip/module interprets the step pulses as full steps or microsteps depending on jumpers or programmable settings (A4988, DRV8825, etc), or dip switches (external modules). Varying the step size on the fly will require the CPU to perform additional processing (as well as PCB modifications). If you're already concerned about the CPU being a bottle neck, adding additional processing like variable microstepping is only going to make it worse.

A 200 step/rev motor will provide highest resolution at 16 usteps/step and both are typically used in a 3D printer. Higher usteps/step will smooth the motion without providing any increase in resolution. Also, the higher you set the microstepping, the lower your maximum possible print speed due to CPU limitations (100k pulses per sec for smoothieboard). Print quality is inversely proportional to print speed due to intertia of moving components, among other things. There's not much point in using 16:1 ustepping to get high resolution if you're going to be driving the thing so fast that it makes sloppy prints anyway.


Ultra MegaMax Dominator 3D printer: [drmrehorst.blogspot.com]
Re: Swapping between step sizes in real time?
October 04, 2015 03:39AM
Take a look at the Duet and RepRapFirmware. Unlike other firmwares, it calculates the step times precisely according to delta kinematics instead of using the segmentation approximation. Yet it can do travel speeds of 300mm/sec when using 0.9 degree/step motors and 16x microstepping (160 microsteps/mm).

A simpler approach than variable microstepping is to switch to double or quad stepping at high speeds, i.e. send 2 or 4 pulses in quick succession. Many firmwares do this already, including Marlin and RepRapFirmware.

Edited 1 time(s). Last edit at 10/04/2015 03:42AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Swapping between step sizes in real time?
October 16, 2015 06:44AM
Thats is been played with a number of times..


issue is if you switch micro stepping on the fly the A4982 gets rely confused. its not designed for this.. (I’ve see it written somewhere not to do this, but cant find the reference atm)


but with a 32 bit controller this is just silly... you have tonnes of cpu to pump the step lines
Re: Swapping between step sizes in real time?
October 16, 2015 05:37PM
Thanks for the input guys, I am going to be using an arduino due with a ramps 1.4 board/pololu drivers to drive my printer and stick with a single step size (either 1/8th or 1/16th microstepping).
Re: Swapping between step sizes in real time?
October 17, 2015 02:12AM
Hope you realize the ramps 1.4 is not a drop on and go module for a due. There are 5v vs 3,3v issues and pin conflicts..

see [forums.reprap.org]

Also ramps-fd has its own issues (see [forums.reprap.org])

Edited 1 time(s). Last edit at 10/17/2015 02:26AM by Dust.
Sorry, only registered users may post in this forum.

Click here to login