Newbie - question on default values for speed & accel

Questions about using encoders with the Roboclaw product line
Post Reply
Posts: 11
Joined: Fri Apr 01, 2022 1:30 pm
Newbie - question on default values for speed & accel

Post by ronstory »


I'm new to the roboclaw and most of my experience with servos is using custom LM628/629 HW. I trying to understand how the RC works.

In the LM628 world, I would program a single max acceleration values (same value for both accel and decel) and set a max speed along with the PID settings. Once that was done I could just do position movement and velocity movements (if less than the programmed max velocity).

The doc seems a little vague on accel and decel. There is a way to set the default accel and speed, but it's doesn't mention decel. Is default decel the same as the accel? I'm asking since the RC had commands that allow you to set different accel and decel values in a single motion command.

Also... why doe the document refer to the term "deccel"? Decceleration is not a word, but deceleration is. ;^)

Ron 2x7A
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Newbie - question on default values for speed & accel

Post by Basicmicro Support »

All values are in relation to the motors maximum speed(QPPS). 1. Setting a speed higher than QPPS will fail to reach that speed.

2. Not leaving enough margin between the target speed and the maximum speed(QPPS) means the motor may not have the power to hold that speed under its given load. I recommend leaving a 20% margin minimum, so never set a speed higher than 80% QPPS and expect the controller to hold it.

3. We leave everything in encoder counts(position), counts per second(speed) or counts per second per second(accel/decel) to keep the interface simple. If you prefer to do things in RPM or RPS or whatever you are free to do the conversion.

To go from encoder counts per second to RPM it would be cps / 4 / encoder lines per rotation / gear ratio / 60.

Post Reply