Tuning a linear slide

Questions about using encoders with the Roboclaw product line
Post Reply
Joe
Posts: 34
Joined: Fri Dec 23, 2016 1:00 am
Tuning a linear slide

Post by Joe »

What ist the best way to tune the motor of a linear slide?
What steps do I have to make? Can I use auto tuning for velocity and position in some way?
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Tuning a linear slide

Post by Basicmicro Support »

If there is not a lot of slop then the autotune would work ok. The auto tuner works best with minimal backlash(slop) and reasonable resolution encoders. It has problems with linear acuators for both reasons, a lot of backlash and very low resolution analog encoders.

For the velocity autotuner it want s to run the motors back and forth to determine the maximum speed of the motor. If moves the motor about half a second at approx 20% duty in both directions. If your linear slide is too short this can be a problem.

To work around this(if it is a problem) you need to determine the motors maximum speed in encoder counts manually. Run the motor at some speed eg 10% duty and read the encoder speed. Multiply that value by 10(if you ran the motor at 10%). That is your motors approximate maximum speed. Motor speed is mostly linear in relation to voltage/duty.

Then go to the Position Settings window and enter that value as the QPPS for the motors. Then you can run the Position Autotuner(which will also autotune for velocity but without the step that tries to determine the motors maximum speed).

Note before you do any autotuning that you make sure your encoders are counting in the correct direction. In the PWM Settings window run the motor forward(by sliding the motor slider UP). The encoder values should increase when the motor starts moving. If they decrease then the motor or the encoder signal wires need to be reversed.

Post Reply