Accel stepper acceleration

Hi,

Hopefully I'm not missing something silly here as I'm surprised I haven't found an answer, I have had a good look,

I have a slotting Machine which I have feed running a stepper motor, the feeds working great but if I have it in rapid mode it can stall the stepper,

I'm trying to achieve moving a joy stick to rapid the bed in which ever direction, therefore I don't have a stop point in mind but just want it to stop when I realise,

What's the best function to use to creat a ramp up, constant speed then ramp down after joy stick is realised?

Any help much much appreciated,
Ralph

Ralphh85:
What's the best function to use to creat a ramp up, constant speed then ramp down after joy stick is realised?

If you want the position of the joystick to change the rate of acceleration it's not going to be easy. The AccelStepper library is not designed for that.

If you are content to treat the joystick as an ON - OFF device then if you call move() with a large number of steps when the joystick is first moved it will accelerate up to speed. If you call stop() when you release the joystick it will figure out the deceleration needed to bring it to a stop. You need to keep calling the run() function until after it actually stops.

I'm not sure if you could use the position of the joystick to change the maximumSpeed(). Try it.

...R

I actually have a pot which changes the max speed but as there no acceleration to this speed I currently have to manually use the pot to start it off slow then speed it up, works but not great,

Open to any suggestions,

Cheers,

Ralphh85:
but as there no acceleration to this speed

Why not?

Post your program.

...R

The codes at work, sadly I'm home and the Mrs will moan if I go work at 9pm lol,

However...

I'm using ConstantSpeed.pde basically, which is correct for just running while a buttons pressed with no defined finish point but has no acceleration, your reply earlier has triggered an idea, I could ditch the potentiometer and run my own speed increase per cycle, I will have a look tomorrow,

Thanks for the reply,
Ralph

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.