Trouble with position mode

Questions about using encoders with the Roboclaw product line
Post Reply
RTT
Posts: 2
Joined: Mon Sep 21, 2015 4:01 pm
Trouble with position mode

Post by RTT »

I have a RoboClaw 2x15A Motor Controller (V5) driver hooked up to a brushed motor with an optical encoder. I have set up and tuned the velocity loop and it is working great through the full range of speeds. When trying to tune position mode, I get pulsating or lurching motion as the motor moves towards the command point. This is with only P gain in the position loop. This happens with all values of P, as P gets lower, the overall motor speed and lurching gets slower, but is still there. It eventually gets to the right spot and stops. I have tried with two different motor/encoder setups, each with different types of encoders and get identical behavior.

I am running the driver through USB from a Windows laptop for testing. I will be using packet serial from a microcontroller once everything is set up.

Am I doing something wrong?
RTT
Posts: 2
Joined: Mon Sep 21, 2015 4:01 pm
Re: Trouble with position mode

Post by RTT »

I figured out the problem. When dragging the position slider in Ion Motion, it appears to send out a bunch of buffered commanded positions as you move, so the pulsating motion is the driver hitting each of the points sent as you drag the slider from one position to another. It appears to work as expected from an MCU.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Trouble with position mode

Post by Basicmicro Support »

Yes. I noticed that as well. I've changed the sliders to use those commands in immediate mode instead of buffered. That will be in the new release.

Post Reply