2014-02-21 02:38 AM
Our Setup:
L6470 with a small stepper (75mA Phase Current) and a linear stage.
We need to extend the movement Interface of the IC of +-2^21, to do long movements but have smoother movement in microstep mode.
Therefore our planned algorithm is like following:
Setup is Microstepmode128.
If the movement exceeds 2^21 ->
Switch to lower microstep mode (e.g. 1/64).
Do 99% of the required movement with microstepmode 1/64.
Switch to microstepmode 1/128 again
Move the remaining 1% with 1/128 again.
Note
: Movement is always in the granularity of FullSteps. So Resting Positions are always at a Full step position to not run into problems in that direction.)This works most of the time, but we encoutered some problems, most likely resulting from the point while switching to a new step Mode.
For example:
We start at microstepmode128
Electrical position is 0.
We move 384 microsteps.
Electrical position is 384 (is correct, it's 3 fullsteps - we are in a valid fullStepPosition)
I change the stepmode to 1/2.
Now we can see a small movement on the linear stage with a MicrometerClock. -> This is not expected / and should not happen imho.
And the electrical Position changes to 128, which we also can't explain.
The Datasheet states that on changing step mode the ElectricalPosition is changed to the first microstep. But as we are always in a fullStep, there should not be a movement at all. Best regards.andreas #l64702014-02-24 02:29 AM
Hello Andreas,
Changing the step-mode causes the electrical position to be reset to 0, so if the previous value is different from 0 the motor changes its position.Changing the step-mode during operation brings another drawback: the device bust be set in high impedance, so the motor is not kept in position by the holding current.If you want to increase the range of the absolute position register you can consider to use the SYNC function. This way a position feedback is provided to the MCU and it can be used in combination with a counter to measure the number of full-steps performed by the device even if it is working at 128 microstep.Best RegardsEnrico2014-02-24 06:49 AM
Hello Enrico,
Thanks for fast reply,
I do not believe the sync pin is feasible for our application. I forgot to mention that the user should not see the range extender functionality. So it is also not an option to drive 50% , stop , drive the rest. We want to drive 99% with another step mode, stop and drive the last part with fullMicrostepMode again. Whereas the last 1% of the movement is that small the user does not notice a movement at all.
In the example above, the stepper was at absolute position 384 (in MicrostepMode 1/128). As 384/128=3 - this is a FULL step position. Changing the step mode to 1/2, the register: ''electrical position'' changes its value to 128. And the stepper is also moving.
So at which electrical position is it safe to switch to another step mode ? Safe by means of the rotor will stay at the same position as before. And Full Step Positions do not work as expected.
The mechanic which is driven by the stepper is self-impending, so there is no movement from this side.
I have no problem if the electircal position is reset to 0, but the problem i phase is that i do not know which is the zero position (128? 256? 384?
- why is it 128 above?)./ Does it make a difference on which is the source/target step mode ?
I would be happy to know where i can switch step mode, without impact on rotation.
Best regards.andreas
2014-02-27 03:55 AM
We did another bunch of tests, where i want to present the results here:
We started always in step mode 1/128, with a full reset (power off - on).
Moving to Position 512
electrPos = 0
Switch step mode to 1/2
electrPos = 128
Moving to Position 128
electrPos = 128
Switch step mode to 1/2
electrPos = 128
Moving to Position 256
electrPos = 256
Switch step mode to 1/2
electrPos = 128
Moving to Position 384
electrPos = 384
Switch step mode to 1/2
electrPos = 128
Moving to Position 384
electrPos = 384
Switch step mode to 1/32
electrPos = 128
Moving to Position 128
electrPos = 128
Switch step mode to 1/32
electrPos = 128
So every step change led to a change of the electrical position to 128.
Open Questions
Is the electrical position register information trustworthy about this information?
Is the electrical Position 128 the safe position to switch step mode, where no movement will be introduced?
Best regards.andreas
2014-03-05 11:51 PM
The EL_POS register contains a counter covering 4 full steps (a complete sinewave) and it should be reset to 0 each time you change the step mode value, so if you want to change the step mode keeping the electrical position unchanged you need to do it when EL_POS is zero.
In your last test something is wrong: changing the step mode the EL_POS should be 0, not 128. Enrico2014-03-11 08:16 AM
There was an error in the test setup. The ElPos register ist now zero after each stepMode Change.
And our testruns look good now (no lost steps so far) if we only change the stepMode et electricalPos = 0. best regards.andreas2014-03-13 06:33 AM
Very good.
Kind Regards Enrico