Hi,
I'm using a esp32 and stepper motor: 17hS08-1004S + drv8825.
I wrote a simple test program, to understand how AccelStepper works.
I'm worry about one thing - I do only full turns in my code. Always never stepper doesn't stop in the start position. Even during 1-5 rounds.
I was trying to play with speed and acceleration but without any results.
That is true but I would not set it at the maximum, 0.65V for vref would be OK.
Otherwise your hardware set-up is good. So something wrong in the code.
Also remenber that steppers can loose steps when under a load and/or with high acceleration rates
Nope, Vref sets the current the same for any step setting. Definitely good to use some microstepping rather than full-steps, with full steps its very prone to miss-stepping due to resonance.
Depends on the torque you need. In full step position ( both coils are engaged with the same current) the DRV8825 sets the current to 71% of the setting. As already mentioned this is independent from the microstep setting. If you don't need the full torque this is better for stepper and driver ( they don't get as hot).
I increased VREF to 0,65V ~ 1.3A.
Seems the problem with precision is because of acceleration setting. When I put incredible high value as an acceleration than stepper is precise.
I guess I don't know how to use acceleration.
What is "incredible high value?" We can't read your mind: use numbers.
If your acceleration is too slow, the stepper may pass through a resonant speed point where it will jitter around and lose steps.
Conversely, if acceleration is too fast, then it may not turn at all. Mechanical systems are interesting
Basically how fast you want it to accelerate. Acceleration will be limited by the voltage available from the supply and the inertia of the load. In more complex controller, I've been able to avoid the resonance (if indeed that's what the problem is) by setting the starting speed above zero, but if you can't do that then the next best thing is to change the acceleration.
Ok, so my understanding:
If the motto has high/ to high resonance
Than acceleration doesn't work and have to be high to break a resonance threshold. Where the voltage is a factor.
Is that correct?
Perhaps mid-band resonance - lower acceleration means the motor has more time at the resonant speed and is more likely to jump steps. Fix is more microstepping or mechanical damping, and keep the acceleration faster enough to pass mid-band quickly.
An unloaded stepper motor is very resonant, its perhaps the worst case.