# Machsupport Forum

## Mach Discussion => General Mach Discussion => Topic started by: JayBee on April 04, 2008, 04:59:39 PM

Title: microsteps should not be included in resolution calculations
Post by: JayBee on April 04, 2008, 04:59:39 PM
Hi

Stirling said in recent thread...'microsteps should not be included in resolution calculations  because they can't be relied upon to be equal in size'

Am I understanding this right & could someone (Stirling ?) expand for me

Mach set to 400 steps per mm
Jog increment 0.01 mm
Jog mode step
So each '0.01 jog' would be 4 micro steps

Does Stirling's statement mean that on one jog the table might move 0.01, on the next 0.015 and the next 0.05 ?

Or have I totally misunderstood ?

If so...
Is there a regular pattern to this, or is it random ?
Would it average out over several jogs ?

Many Thanks

John
Title: Re: microsteps should not be included in resolution calculations
Post by: Chip on April 04, 2008, 06:25:34 PM
Hi, John

Micro Steps are Step's and must be included in your Step's Per Unit in "Motor Tuning" calculations.

200 st. stepper X 10 micro st. = 2000 step's per turn.

Thanks, Chip
Title: Re: microsteps should not be included in resolution calculations
Post by: JayBee on April 04, 2008, 07:50:38 PM
Thanks Chip,

I understand the steps per unit calculation, it was the comment about micro steps being different sizes that I was seeking clarification on  :)

The implication is that if Mach tells the motor to move a certain number of micro steps, the actual distance moved by the table may not be as simple as  I thought!

John
Title: Re: microsteps should not be included in resolution calculations
Post by: Hood on April 04, 2008, 08:01:25 PM
It will be close to your commanded position but could be spot on or  one way or another from the microstep but your accuracy would still be more than +-1 micro step.
Hood
Title: Re: microsteps should not be included in resolution calculations
Post by: Ian Ralston on April 05, 2008, 05:30:57 PM
John,

Stepper motors have an error of 3-5 % angular positional error per full step. In your example 400 microsteps/mm is say 50 full steps/mm i.e each step is 0.02mm. The positional error is then 0.0006 - 0.001 mm. Microstepping has greater errors in percentage terms within the full step but will probably not be greater than the errors already there. If you need greater positional precision, then you have to increase the steps/mm at the expense of your top speed.

Ian (Not Stirling, where is he?)
Title: Re: microsteps should not be included in resolution calculations
Post by: mhasting2004 on April 06, 2008, 03:51:01 AM
Hi All

Figured I'd add my \$0.02 worth.

The way I like to think of it is that a stepper motor acts more like a solenoid than a conventional DC motor. Each step can seen as the plunger of a solenoid being either fully out or fully retracted with each winding acting in unison (one pushing one pulling), both very predictable locations. Half steps try and hold the solenoid in between these two locations by having both windings either pulling or pulling in opposition , thus less predictable. Finally micro varies these forces in small steps increasing one windings pull while decreasing the others. This is much less predictable as it is not just mechanically related to the poles inside the stator (as in the case of a full step) but also the relative flux generated by each winding.

It is also important to not that these inaccuracies of micro stepping are not accumulative as the first and last step of a series of micro steps is infact a full step.

Clear as mud?

I do agree with the statement however that true resolution of a machine should be measured in full steps and at a stretch 1/2 steps. Microstepping is more useful as a smoothing function to improve motor performance.

Cheers

Mark
Title: Re: microsteps should not be included in resolution calculations
Post by: jimpinder on April 06, 2008, 04:37:26 AM
To put it all together -

You can guarantee that with a stepper motor any STEP will be within 3 to 5% accuracy when it stops ( and it is only on that step) - so if you have 200 step per rev, the accuracy of the stop is 5/20,000 of a full rev or 0.09 of a degree if my maths is right.

The accuracy of the micro steps cannot be guaranteed, but even if they were twice as large since there are 8 to make up a step, it must be still more accurate that a full step.

The only time it comes to bite you is if you are relying on this in your computation of steps per unit.

Mine is geared down, and I need 48,000 steps per inch. So I need 48 steps per thousanth of an inch so I can get very accurate (if I can manage 1/2 a thou I will be happy, so I have 24 steps to play with).
If I geared up my axis drive for speed - say direct motors and much more pitch on the leadscrew - took out the 3 to 1 reduction and altered the leadscrew to say 1/2 pitch (a bit excessive, but you get the idea) then I would be down to 8,000 steps per inch - only 8 steps per thousanth of an inch.

Still enough for me, you might say, but in the quest for speed (some talk of 100 inches per minute) these ratios might increase until you were is a position when microsteps start coming into the calculations of standard units of mm or inch. If, say, you got down to 5 microsteps per thousanth then you cannot guarantee the accuracy as you can with a full step.

A lot of time spent discussing a very small difference - since it is non-cumulative - but neither can it be calculated.

It all depends on what you want your machine for - if you are working in wood clearly any accuracy you decide on does not really matter, because wood expands and contracts dependent on humidity. Some plastics do the same with temperature.
I work mainly with steel and would like to be able to guarantee 1/2 a thou on my parts (I can't measure any better anyway) - so I am  on 48,000 steps per inch - my movement (if you followed the other thread) I have settled at 12 inches per minute, which is comfortably within the capablilities of my motors - without taking too long to move about.

It all depends what you want - accuracy or speed.

Title: Re: microsteps should not be included in resolution calculations
Post by: JayBee on April 06, 2008, 05:48:24 AM
Thanks All

We all have different ways of understanding things and one of the joys of this forum (at least to me) is that several people explain the same thing in different ways and taking a bit from here and a bit from there brings light to my darkness.

All makes a lot more sense now!

One remaining question...

Will the motor stop on a micro step or is it always stopped on a full step?

Thanks
John
Title: Re: microsteps should not be included in resolution calculations
Post by: stirling on April 06, 2008, 08:52:41 AM
Thanks Mark - better explanation than I'd have managed.

We need to take care of not making the common mistake of confusing accuracy with resolution. Clearly microsteps by definition are smaller than a step (their resolution) but their closeness to, and their consistancy with their ideal is poorer than it is for a step (their accuracy). Therefore microsteps are less accurate than steps.

As has already been said effectively, the errors in a microstep being significant in the grand scheme of things should'nt be overstated. I mentioned it in the other thread in passing simply in an attempt to be "accurate" in what I was saying. Wow - you have to be careful what you say with you lot  ;D

To answer your last question John, my best shot would be that a motor will stop best it can on a microstep but if the dynamics of the machine pull or push it slightly away from the microstep's "holding" point it may well stop there instead - but that's just how I see it - like I say you have to be carefull with you lot

LOL - however when you turn off the power - again depending on the machine's friction level the motor may "cog" itself to a full step - if its a permamnent magnet type motor - OMG - let's not go there...

Ian
Title: Re: microsteps should not be included in resolution calculations
Post by: JayBee on April 06, 2008, 09:39:38 AM
Ian

Don't be too careful what you say...

If you hadn't made your original comment, I would still be wasting hours trying to solve a problem that in fact is not a problem but a 'feature'!  :D

John
Title: Re: microsteps should not be included in resolution calculations
Post by: stirling on April 07, 2008, 08:32:05 AM
Thanks John

For the sake of fun... (will I ever learn?)

Say you're using morphing capable drives and you're cutting a diagonal straight line in XY and suppose the angle or gradiant of the line is such that the X axis is moving at a rate above where the drive morphs and the Y axis is moving at a rate below where the drive morphs.

Are you going to get the X axis moving in full step increments and the Y axis moving in microstep increments and therefore the detail of the path may be not quite what you'd expect? i.e. is the "staircase" going to be coarser than you'd have otherwise expected from the microstep resolution of the system? FWIW I think the answer's - no.

Answers on a postcard please - cos I don't know  ;D

And no I don't have too much time on my hands - it's lunch time!
Title: Re: microsteps should not be included in resolution calculations
Post by: Ian Ralston on April 07, 2008, 05:25:27 PM
Stirling,

For a definitive answer to this, ask the same question in the Yahoo Gecko group. You will probably get an reply by THE expert, Mariss Freimanis, he is very good at explaining such problems.

As only half an expert, I think you are probably right in theory, but other factors come into the equation. Say you have a stepper with 200 full steps and a driver set at 10 microsteps and this setup yields 1000 microsteps per mm i.e. each microstep is 0.001 mm and a full step is 0.01 mm. Then if you were running in full step mode on two axes, you would generate a staircase of 0.01 steps, as you suggested. However, this would only occur on a G0 move, as at cutting speeds, the stepper will probably be in microstep mode, so your staircase steps would be too small to make any practical difference. . Mechanical inertia, cutting tool deflection and any latency in the driver and software will smooth this out. If you need a perfectly smooth finish with a stepper, then you are going to need a setup with more steps per mm.

As I understand it, a well set up servo will plot a mean path and so will not suffer the same problems.

Ian (who is still climbing the learning curve. :))
Title: Re: microsteps should not be included in resolution calculations
Post by: stirling on April 08, 2008, 07:37:18 AM
For a definitive answer to this, ask the same question in the Yahoo Gecko group. You will probably get an reply by THE expert, Mariss Freimanis, he is very good at explaining such problems.

Agreed - What little I know about steppers and drivers has mainly come from reading Mariss's posts and papers on one site or another.

As only half an expert, I think you are probably right in theory, but other factors come into the equation. Say you have a stepper with 200 full steps and a driver set at 10 microsteps and this setup yields 1000 microsteps per mm i.e. each microstep is 0.001 mm and a full step is 0.01 mm. Then if you were running in full step mode on two axes, you would generate a staircase of 0.01 steps, as you suggested. However, this would only occur on a G0 move, as at cutting speeds, the stepper will probably be in microstep mode, so your staircase steps would be too small to make any practical difference. . Mechanical inertia, cutting tool deflection and any latency in the driver and software will smooth this out. If you need a perfectly smooth finish with a stepper, then you are going to need a setup with more steps per mm.

Agreed again - as you say, except at really slow speeds, due to the momentum of the rotor (in an unmounted motor) plus the system (for a mounted motor) a stepper is rotating smoothly and not actually "stepping" at all.

Ian (who is still climbing the learning curve. :))

Likewise - may your learning curve be a smooth one. ;D

Cheers

Ian