I'm running a stepper via an EM806 driver and I'm generating the pulses with a PIC via PWM. The frequency is modified by changing the PR2 register, it's pretty crude as it doesn't guarantee a linear speed change, but it's easy to implement (every 25ms or so I simply reduce the PR2 by one), here's what the acceleration curve is like:

Click image for larger version. 

Name:	PR2_ramp.PNG 
Views:	492 
Size:	18.5 KB 
ID:	11706

The motor stalls sometimes during acceleration, which got me into thinking that maybe the speed is increased too quickly. I'm guessing the answer is no, but is there an easy way to calculate dynamic torque or an acceleration rate to guarantee the least torque drop during speed ramp up? The motor ramps up from 60RPM to 240RPM within 1500ms and is running at 800microsteps per turn.

Regards,
T.