User Manual
RoboClaw Series
Brushed DC Motor Controllers
RoboClaw Series User Manual
82
Encoder Tuning
To control motor speed and or position with an encoder the PID must be calibrated for the
specic motor and encoder being used. Using Ion Studio the PID can be tuned manually or by
the auto tune fucntion. Once the encoders are tuned the settings can be saved to the onboard
eeprom and will be loaded each time the unit powers up.
The Ion Studio window for Velocity Settings will auto tune for velocity. The window for Position
Settings can tune a simple PD position controller, a PID position controller or a cascaded Position
with Velocity controller(PIV). The cascaded tune will determine both the velocity and position
values for the motor but still requires the QPPS be manually set for the motor before starting.
Auto tune functions usually return reasonable values but manually adjustments may be required
for optimum performance.
Auto Tuning
Ion Studio provides the option to auto tune velocity and position control. To use the auto tune
option make sure the encoder and motor are running in the desired direction and the basic
PWM control of the motor works as expected. It is recommend to ensure the motor and encoder
combination are functioning properly before using the auto tune feature.
1. Go to the PWM Settings screen in Ion Studio.
2. Slide the motor slider up to start moving the motor forward. Check the encoder is increasing
in value. If it is not either reverse the motor wires or the encoder wires. The recheck.
Before using auto tune you must rst set the motors and encoders maximum speed. For the
purpose of auto tune the maximum quadrature pulse per second (QPPS) is the maximum speed
the motor and encoder can acheive. When using an absolute encoder the QPPS will be the
maximum rotational speed of the absolute encoder. Check the encoders data sheet to ensure the
maximum rotational speed is not exceeded. Auto tune for position control can not automatically
measure the maximum QPPS due to most position control systems having a limited range of
movement.
3. To determine the maximum QPPS value, use the PWM settings screen to run the motor and
encoder at 100% duty by moving the slider bar full up or down. Record the value from M1 Speed
or M2 Speed elds at the top of the window. This is your maximum QPPS speed. If the motor
can not be ran at full speed due to physical constraints, then an estimated maximum speed in
encoder counts is required.
4. Enter the QPPS speed obtained from step 3 into the QPPS elds under settings. Ensure the
correct QPPS is entered for the corresponding motor channel. Two identical motors and encoders
may not function exactly the same so the maximum QPPS may vary.
5. To start auto tune click the auto tune button for the motor channel that is will be tuned rst.
The auto tune function will try to determine the best settings for that motor channel.
If the motor or encoder are wired incorrectly, the auto tune function can lock
up and the motor controller will become unresponsive. Correct the wiring
problem and reset the motor controller to continue.
!