Using Ramping

Stepper motors, unlike DC motors need to be ramped up/down to speed and you cannot simply just start sending out high speed pulse trains without expecting to see the motors jam and stall. This is why you get some almost nice musical notes coming out of the motors when following toolpaths with tight curves or where a change of direction is needed while moving.

Here is a typical chart of ramping up a stepper motor.

PTHAT Ramping Routines

With the PTHAT we have built in very simple ramping routines that gives you a divisor of the target speed and also a timing marker that will be used to determine when the next divisor speed is triggered. This method works very well across the range of speeds and also if very slow ramping speeds are needed, the firmware will detect if there is enough time to complete the ramp over the distance. If there is not enough time, then it will automatically re-calculate and start ramping down.

Calculating the Ramping Routines

If we have a target speed of 10000Hz and we set a divisor of 100 and a pause of 10ms then it would divide the 10000/100 and ramp up/down in increments of 100Hz. The ramp up/down time would be 1000ms and the total time at target speed would be dependant on the amount of pulses that needed to be sent.


The PTHAT will automatically work out when ramping up would finish and when the start of ramping down starts. If a pause/resume command is sent the PTHAT again will re-calculate the ramp up/down needed to continue.
Also with the PTHAT you can send a command with only a start ramp or only a finish ramp. This then allows the use of buffered commands that can change the speed on the fly and you only have to ramp down when changing direction.

Share This