General Settings in Motion Studio

Introduction

The General Setting section of Motion Studio is where the majority of the settings for the RoboClaw are configured. The General Settings windows is divided in to panes that group together settings that are related. This Application Note breaks down each pane setting by setting and explains the purpose and function of each setting.

Figure 1: The general settings window.

Sections

Setup

Figure 2: The setup pane.

Control Mode
This is where the control mode of the RoboClaw is set. The available modes are packet serial, simple serial, analog and rc.
Packet Serial
Packet serial mode is used when controlling a RoboClaw via USB or the serial port of a microcontroller. A wide range of commands can be sent and data read back from the RoboClaw. The command set is documented in the manual. There are also libraries for Arduino and Python to use the full features set of packet serial mode.
Simple Serial
Simple serial mode is similar to packet serial mode in that it allows a microcontroller to control a RoboClaw. However in simple serial mode single bytes are sent instead of long packet commands. This allows for a simpler control scheme however it isn’t as feature rich as packet serial mode.
Analog
Analog mode is used when potentiometers or an analog joystick are used as a control input to the RoboClaw.
RC
RC mode allows an RC radio system to be used to control the motor controller. Two channels from the receiver can be connected to the RoboClaw.
PWM Mode
This setting affects how power is sent to both motor channels. There is usually not a reason to change it from “Sign Magnitude”. The advantage to “Sign Magnitude” is that it’s more power efficient and that it can drive both resistive and inductive loads. The advantage to “Locked Antiphase” is that it can read low current values, however it can only drive inductive loads.
Single Channel Mode
Single channel mode is used to bridge two motor channels in to one channel doubling the current capacity to twice that of a single channel.
Swap “Mode” and “Lipo” buttons
This setting allows the physical Mode and Lipo buttons to be swapped.
Swap Encoder Channels
This setting swaps the encoder channels a and b.
Enable Multi-Unit Mode
This setting must be enabled when using multiple RoboClaws in packet serial mode. The setting must be set on each RoboClaw in use.
Enable USB to TTL relay mode
When this is enabled it allows mutliple RoboClaws chained together to all be operated with commands sent over USB to the first RoboClaw. When using this mode each RoboClaw must have a unique packet serial address.
Reverse M1 relative direction
When this setting is enabled motor channel 1 operates in the opposite direction as the default setting.
Reverse M2 relative direction
When this setting is enabled motor channel 2 operates in the opposite direction as the default setting.

Serial

Figure 3: The serial pane.

Packet Serial Address
This sets the address of the RoboClaw for use in packet serial mode and USB-to-TTL relay mode. There are eight address options from 128-135. When using mutliple RoboClaws at the same time each RoboClaw must have a unique serial address.
Baudrate
This sets the baudrate for serial commuincations. Values between 2400-460800 bps are available. When communicating with the RobClaw over a serial connection the baudarte for the RobClaw and the microcontroller/computer must match for communication to work properly.
Timeout
This setting is used to set the timeout value for serial communications. By default the timeout is set to zero and disabled. If a values is set (measured in seconds)
Simple Serial Slave Select
This setting is used to enable the slave select option for using multiple RoboClaws in simple serial mode. When it is enabled it allows a specific RoboClaw in a groups of RoboClaws to be selected to receive and execute byte commands.

Battery

Figure 4: The battery pane.

Battery Cutoff
This settings set the low voltage setting at which the RoboClaw will stop working. Setting it to “Use User Settings” allows for custom settings described below. The “Auto Detect” option allows the RoboClaw to automatically set the cutoff based on the voltage it detects, however overly charged or discharged batteries can cause this option to not work properly. The remaing options of “3 cell” through “8 cell” are based on Lithium Polymer battery cutoff voltages. They are calculated by multiplying the cell count by 3 volts. For example: setting the cutoff to “3 cell” sets the cutoff voltage to 9 volts.
Max Main Battery
This setting represents the maximum voltage at which the RoboClaw’s primary power supply can operate at before disabling itself.
Min Main Battery
This setting represents the minimum voltage at which the RoboClaw’s primary power supply can operate at before disabling itself.
Main Battery Offset
This setting allows the display and internal representation of the voltage detected by the RoboClaw to be adjusted for the main battery.
Max Logic Battery
If a logic battery is being used this setting sets the maximum voltage at which the RoboClaw will disable itself.
Min Logic Battery
If a logic battery is being used this setting sets the minimum voltage at which the RoboClaw will disable itself.
Logic Battery Offset
This setting allows the display and internal representation of the voltage detected by the RoboClaw to be adjusted for the logic battery.

RC/Analog

Figure 5: The rc/analog pane.

Mixing
This setting enabled mixing when the control mode is set to “RC” or “Analog”. Mixing mixes two channels of input together so that a robot can be controlled in a differential drive fashion. An example of this is a tank style robot. Moving the control stick on one axis drives the robot backwards and forwards, moving the control stick on the other axis turn both motors in opposite directions and allows the robot to turn left and right.
Exponential
Setting the exponential options for “RC” or “Analog” mode lessens the control response around the center of the controller’s range. This makes a robot or vehicle controlled by a RoboClaw easier to control.
MCU
This setting is used when using a microcontroller to send RC style pulses to control a RoboClaw in “RC” mode. When this setting is enabled the auto-calibration of pulses in disables and the microcontroller can send slower or faster pulses than those normally sent by an RC system.
RC Flip/Mode Switch
When this setting is enabled an RC channel can be connected to pin header S3 and used to change the direction of both motor channels at the same time. This is useful when a robot is flipped over. Swapping the direction of both motor allows the robot to continue being driven the same way as before it was flipped over.
Enable Encoder 1
This setting enables to the use of encoder channel 1 while in “RC” or “Analog” mode. The encoder will be used to control speed or position depending on what the encoder was tuned for in Motion Studio.
Enable Encoder 2
This setting enables to the use of encoder channel 2 while in “RC” or “Analog” mode. The encoder will be used to control speed or position depending on what the encoder was tuned for in Motion Studio.
Max Deadband
This sets the upper limit of deadband while in “RC” or “Analog” mode. Deadband is the range from the center of the control input that registers as no input signal. This allows for a small amount on control input for which there is no response from the motor controller.
Min Deadband
This sets the lower limit of deadband while in “RC” or “Analog” mode. Deadband is the range from the center of the control input that registers as no input signal. This allows for a small amount on control input for which there is no response from the motor controller.

Motors

Figure 6: The motors pane.

M1 Max Current
This sets the limit for the maximum amount of current that can be drawn by motor channel 1. When the RoboClaw reaches this limit motor power is scaled back to prevent the RoboClaw from exceeding the limit. A warning condition will show up on the board’s LED indicators and in the Motion Studio control software.
M2 Max Curent
This sets the limit for the maximum amount of current that can be drawn by motor channel 2. When the RoboClaw reaches this limit motor power is scaled back to prevent the RoboClaw from exceeding the limit. A warning condition will show up on the board’s LED inicators and in the Motion Studio control software.
M1 Blanking
This setting is the percentage of the motor duty cycle below which to ignore current readings for motor channel 1.
M2 Blanking
This setting is the percentage of the motor duty cycle below which to ignore current readings for motor channel 2.
M1 Default Accel
This setting adjusts the rate of motor acceleration when changing speed for motor channel 1. The range of values is 0-655360.
M1 Default Deccel
This setting adjust rate of motor deceleration when changing speed for motor channel 1. The range of values is 0-655360.
M2 Default Accel
This setting adjusts the rate of motor acceleration when changing speed for motor channel 2. The range of values is 0-655360.
M2 Default Deccel
This setting adjust rate of motor deceleration when changing speed for motor channel 2. The range of values is 0-655360.

I/O

Figure 7: The io pane.

Encoder 1/2 Mode
This setting is where to type of encoder attached to channel 1 and 2 is set. The options are “quadrature” and “absolute”. If there is any confusion about the type of encoder being used reference the documentation for the encoder.
S3 Mode
Default
The default setting for S3 is as an RC flip mode switch. Leaving this set to default enables that functionality.
E-stop (latching)
This setting enables e-stop functionality on S3. Both motor channels will stop when the e-stop is triggered. Latching means that the controller will need to be reset to resume operation.
E-stop
Allows for e-stop functionality with external hardware on S3. This setting does not latch the controller.
Voltage clamp
This setting enables voltage clamp functionality. External hardware must be used to create a voltage clamp circuit. See the manual for recommendations on hardware and wiring.
RS485 direction
Setting this options allows the controller to send a signal to an RS485 bus and devices.
Encoders enable/disable
This setting allows an RC type signal to enable and disable both encoder channels.
S4/S5 Mode
Disabled
If selected this option disables any and all functionality on the pin header.
E-stop (latching)
This setting enables e-stop functionality on S3. Both motor channels will stop when the e-stop is triggered. Latching means that the controller will need to be reset to resume operation.
E-stop
Allows for e-stop functionality with external hardware on S3. This setting does not latch the controller.
Voltage clamp
This setting enables voltage clamp functionality. External hardware must be used to create a voltage clamp circuit. See the manual for recommendations on hardware and wiring.
Motor 1/2 Brake
Allows for control of external brake with appropriate external hardware
Motor home (auto)
If this setting is enabled the motor controller will automatically home the motor to the switch connected to the header on startup.
Motor home (user)
This setting allows the user to set custom settings for homing the motor to the switch on the header. The duty setting sets the motor speed during homing and the timeout is the amount of time allowed for homing before the motor stops attempting to find the home position.
Motor 1/2 home (auto)/ limit(fwd)
If selected auto homing of the motor is set as well as using the switch as a forward limit switch.
Motor 1/2 home (user)/ limit(fwd)
Sets the switch on the header up as a home switch with custom settings and as a limit switch in the forward direction.
Motor 1/2 limit (fwd)
This sets the attached switch up a forward limit switch.
Motor 1/2 limit (rev)
This setting sets up the attached switch up as a reverse limit switch.
Motor 1/2 limit (both)
When set this utilizes the attached switch as a limit switch in both directions.
CTRL 1/2 Mode
These pin options are only supported on boards that have the CTRL1/CTRL2 output pins. They are digital output pins that can support a handful of use cases.
Disabled
This setting disables the output pins.
User
When set this allows the user to set the pins high or low from code using packet serial mode.
Voltage clamp
This setting is used to utilize the output pins to control external voltage clamp hardware.
Motor 1/2 brake
This setting is used to allows the output pins to operate external brake hardware.