Full speed command doesn't seem to be 32767

Questions about using encoders with the Roboclaw product line
Post Reply
SouthernAtHeart
Posts: 32
Joined: Fri Jan 29, 2016 4:00 pm
Full speed command doesn't seem to be 32767

Post by SouthernAtHeart »

My setup:
Roboclaw 7x2 running 1 motor that has an encoder on it.
The encoder is a 600ppr encoder.
The settings for the encoder are as follows:
//Velocity PID coefficients
#define Kp 3.0
#define Ki 1
#define Kd 0.25
#define qpps 57000

I just guessed at the PID values, and they seem to be working good. The qpps value I found from running the motor at full speed and watching the value at the top of the ion motion app, to the right of the encoder value, like the data sheet said.

I use an arduino to send packet serial to the roboclaw.

I have successfully setup the motor, with it's encoder, and used the arduino to send commands to the motor, like:
roboclaw.SpeedM1(address, speed); //send the speed value

In the previous line, what is the range of speed? I thought the data sheet said it was a signed value up to 32767. But that doesn't seem to run the motor at full speed?
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Full speed command doesn't seem to be 32767

Post by Basicmicro Support »

The PID values can probably be alot higher but if they work well for your requirements then you shouldnt change them. In most cases I see the P value in the 10s or even hundreds and the I values is usually about 1/10th the P valie. D in velocity only can almost always be set to 0 but .25 is so low its practically 0 anyway.

The DUTY cycle range is +-32767(eg for the Duty and DutyAccel commands), not for speed commands. The Speed range is +-QPPS(eg the max speed of the motor).

Post Reply