BASICMICRO RoboClaw Series Brushed DC Motor Controllers RoboClaw Solo RoboClaw 2x5A RoboClaw 2x7A RoboClaw 2x15A RoboClaw 2x30A RoboClaw 2x45A RoboClaw 2x45A ST RoboClaw 2x60A Roboclaw 2x60HV Roboclaw 2x120A Roboclaw 2x160A Roboclaw 2x200A User Manual Firmware 4.1.34 and Newer Hardware V3, V4, V5, V6 and V7 User Manual Revision 5.7 (c) 2014, 2015 Ion Motion Control.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers Liability Statement By purchasing and using Basicmicro's products you acknowledge and agree to the following: Basicmicro has no liabilities (and, to the Basicmicro's knowledge, there is no basis for any present or future action against the company giving rise to any liability) arising out of any injury to individuals or property as a result of ownership, possession or use of any product designed or sold by Basicmicro.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Contents Warnings............................................................................................................. 9 Introduction...................................................................................................... 10 Motor Selection............................................................................................ 10 Stall Current...................................................................................
BASICMICRO RoboClaw Series Brushed DC Motor Controllers Packet Serial................................................................................................ 28 Configuration Using Motion Studio..................................................................... 29 Mode Setup................................................................................................. 29 Control Mode Setup.......................................................................................
BASICMICRO RoboClaw Series Brushed DC Motor Controllers RC Mode With Mixing..................................................................................... 51 RC Mode with feedback for velocity or position control....................................... 51 RC Mode Options.......................................................................................... 51 Pulse Ranges................................................................................................ 51 RC Wiring Example...........
BASICMICRO RoboClaw Series Brushed DC Motor Controllers Advanced Packet Serial...................................................................................... 66 Commands.................................................................................................. 66 14 - Set Serial Timeout ................................................................................. 66 15 - Read Serial Timeout ..............................................................................
BASICMICRO 135 136 148 149 252 253 - RoboClaw Series Brushed DC Motor Controllers Read M1 Max Current Limit.................................................................... 79 Read M2 Max Current Limit.................................................................... 79 Set PWM Mode..................................................................................... 79 Read PWM Mode...................................................................................
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 51 - Buffered Drive M1 / M2 With Signed Speed, Individual Accel And Distance..... 97 52 - Drive M1 With Signed Duty And Acceleration.............................................. 97 53 - Drive M2 With Signed Duty And Acceleration.............................................. 98 54 - Drive M1 / M2 With Signed Duty And Acceleration...................................... 98 55 - Read Motor 1 Velocity PID and QPPS Settings.................................
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Warnings There are several warnings that should be noted before getting started. Damage can easily result by not properly wiring RoboClaw. Harm can also result by not properly planning emergency situations. Any time mechanical movement is involved the potential for harm is present. The following information can help avoid damage to RoboClaw, connected devices and help reduce the potential for harm or bodily injury.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Introduction Motor Selection When selecting a motor controller several factors should be considered. All DC brushed motors will have two current ratings, maximum stall current and continuous current. The most important rating is the stall current. Choose a model that can support the stall current of the motor selected to insure the motor can be driven properly without damage to the motor controller.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers Logic Power When powering external devices from RoboClaw ensure the maximum BEC output rating is not exceeded. This can cause RoboClaw to suffer logic brown out which will cause erratic behavior. Some low quality encoders can cause excessive noise on the +5VDC rail of the RoboClaw. This excessive noise will cause unpredictable behavior. Encoders RoboClaw features dual channel quadrature/absolute decoding.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Getting Started Initial Setup RoboClaw offers several methods of control. Each control scheme has several configuration options. The following quick start guide covers the basic initialization of RoboClaw. Most control schemes require very little configuration. The control options are covered in detail in this manual. For model specific information please refer to the data sheet for each model of RoboClaw. The following is a basic setup procedure. 1.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers Hardware Overview I/O RoboClaw's I/O is setup to interface to both 5V and 3.3V logic. This is accomplished by internally current limiting and clipping any voltages over 3.3V. RoboClaw outputs 3.3V which will work with any 5V or 3.3V logic. This is also done to protect the I/O from damage. Headers RoboClaws share the same header and screw terminal pinouts across models in this user manual.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers Encoder Power (+ -) The pins labeled + and - are the source power pins for encoders. The positive (+) is located at the board edge and supplies +5VDC. The ground (-) pin is near the heatsink. On ST models all power must come from the 5V screw terminals and the GND screw terminals. Main Battery Screw Terminals The main power input can be from 6VDC to 34VDC on a standard RoboClaw and 10.5VDC to 60VDC on an HV (High Voltage) RoboClaw.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Motion Studio Overview Motion Studio The BasicMicro Motion Studio software suite is design to configure, monitor and maintain RoboClaw. It's used to configure all the available RoboClaw modes and options. Motion Studio can be used to monitor and control RoboClaw. It can be download from https://www.basicmicro. com. Once installed, each time Motion Studio is run it will check for the latest version online.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Device Status Once a RoboClaw is connected, the connection screen becomes active (1) and is now the Device Status screen. All status indicators (3,4) and monitored parameter fields (2) will update to reflect the current status and values of the connected RoboClaw. When a RoboClaw is connected the Stop All (5) button becomes active. There is a small check box to activate the Stop All function by using the space bar on the keyboard.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Status Indicator (4) The status indicators shown at the bottom of the screen are an abbreviated duplication of the main status indicators shown on the device status screen. Label Description M1OC Motor 1 over current. M2OC Motor 2 over current. MBHI Main battery over voltage. MBLO Main battery under voltage. LBHI Logic battery over voltage. LBLO Logic battery under voltage.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO General Settings The general settings screen can be used to configure RoboClaw. This includes modes, mode options and monitored parameters. For detailed explanations see the Configuration with Motion Studio section of this manual. 4 1 5 2 3 6 Configuration Options Each control mode will have several configuration options. Some options will appear grayed out to indicate the option is not available for the selected mode.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO PWM Settings The PWM settings screen is used to control RoboClaw for testing. Sliders are provided to control each motor channel. This screen can also be used to determine the QPPS of attached encoders. 1 4 3 2 (1) Graph Function Grid Description Displays channel data with 100mS update rate and one second horizontal divisions. (2) PWM/Torque Settings Function Description L MCP only. Motor Inductance in Henries. R MCP only.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO (3) Control Function Description Motor 1 Controls motor 1 duty percentage forward and reverse. Motor 2 Controls motor 2 duty percentage forward and reverse. Sync Motors Synchronises Motor 1 and Motor 2 Sliders. Accel Acceleration rate used when moving the sliders. Duty Displays the numberic value of the motor slider in 10ths of a Percent (0 to +/1000).
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Velocity Settings The Velocity settings screen is used to set the encoder and PID settings for speed control. The screen is also used for testing and plotting. 1 2 4 3 (1) Graph Function Grid Description Displays channel data with 100mS update rate and one second horizontal divisions. (2) Velocity Settings Function Description Velocity P Proportional setting for PID. Velocity I Integral setting for PID.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO (3) Control Function Description Motor 1 Motor 1 velocity control (0 to +/- maximum motor speed). Motor 2 Motor 2 velocity control (0 to +/- maximum motor speed). Sync Motors Synchronises Motor 1 and Motor 2 Sliders. On Release Will not update new speed until the slider is released. Accel Acceleration rate used when moving the sliders. Velocity Shows the numeric value for the sliders current position.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Position Settings The Position settings screen is used to set the encoder and PID settings for position control. The screen is also used for testing and plotting. 1 2 3 4 (1) Graph Function Grid RoboClaw Series User Manual Description Displays channel data with 100mS update rate and one second horizontal divisions.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO (2) Graph Channels Function Description Scale Sets vertical scale to fit the range of the specified Channel. Channels Select data to display on the channel. The channel is graphed in the color shown.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO (4) Control Function Description Motor 1 Motor 1 velocity control (0 to +/- maximum motor speed). Motor 2 Motor 2 velocity control (0 to +/- maximum motor speed). Sync Motors Synchronises Motor 1 and Motor 2 Sliders. On Release Will not update new speed until the slider is released. Accel Acceleration rate used when moving the sliders. Deccel Decceleration rate used when moving the sliders. Speed Speed to use with slide move.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Firmware Updates Motion Studio Setup Download and install the Motion Studio application. Win7 or newer is required. When opening Motion Studio, it will check for updates and search for a USB Windows Driver to verify installation. If the USB driver is not found, Ion Studio will install it. 1. Open the Motion Studio application. 2. Apply a reliable power source such as a fully charge battery to power the motor controller. 3.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 1. When a new version of firmware is shown click the update button (3) to start the process. 2. Motion Studio will begin to update the firmware. While the firmware update is in progress the onboard LEDs will begin to flash. The onboard flash memory will first be erased. 3. Once the firmware update is complete the motor controller will reset. Click the "Connect Selected Unit" button to re-connect.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Control Modes Setup RoboClaw has several functional control modes. There are two methods to configure these modes. Using the built-in buttons or Motion Studio. This manaul covers both methods of configuration. Motion Studio offers greater options for each mode and can be easier to configure the RoboClaw in several situations. However the built-in buttons are more than adequate in most all modes.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Configuration Using Motion Studio Mode Setup Download and install the Motion Studio application from https://www.basicmicro.com. A PC with Windows 7 or newer is required. Motion Studio will check for a newer version each time it is ran. It will then search for the USB RoboClaw Windows Driver to verify installation. If the USB driver is not found Ion Studio will install it. 1. Open the Motion Studio application. 2.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Control Mode Setup Select the Control Mode drop down (1). There are 4 main modes. See the Control Modes section of this manual for a detailed explanation of each available mode.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Control Mode Options The general settings screen is used to configure RoboClaw. Each control mode will have several configuration options. Grayed out options are not available for the selected mode. Once all settings are configured they must be saved to RoboClaw. This is done by selecting Write Settings from the Device menu in the menu bar.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO (1) Setup Main drop down for setting the control modes and confirguration options. Function Description Control Mode Drop down to set main control mode. Some options may grey out if not available in the selected mode. PWM Mode Drop down to set the main MOSFET driving scheme. This option should never be change but in rare circumstances. Bridge Channels Used to bridge motor channe 1 and 2.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers (3) Battery Main and logic battery voltage settings. Sets cut off and protection limits. Function Description Battery Cut Off Sets main battery cut off based on LiPo cell count. Can also be set to auto detect or User Settings for manual configuration. Auto detect requires a properly charged battery. User Settings allows editing of the voltage values manually. See Battery Settings. Max Main Battery Sets main battery maximum voltage.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers (5) Motors Motor current limit settings. The accel and deccel settings apply to RC, Analog and commands with no Accel and Deccel arugements. Function Description M1 Max Current Sets maximum motor current for channel 1. Can not exceed RoboClaw rated peak current. M2 Max Current Sets maximum motor current for channel 2. Can not exceed RoboClaw rated peak current. M1 Blanking Sets the PWM percentage of current readings that are blanked for noise.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO (6) I/O Set encoder input type. Set S3, S4 and S5 configuration options. Enabling output pins on certain models of RoboClaw. Set limit, homing, voltage clamp, E-stop options. Function Description Encoder 1 Mode Sets encoder type for encoder 1. Encoder 2 Mode Sets encoder type for encoder 2. S3 Mode Sets the default function for S3. S4 Mode Sets the default function for S4. S5 Mode Sets the default function for S5.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Configuration with Buttons Mode Setup The 3 buttons on RoboClaw are used to set the different configuration options. The MODE button sets the interface method such as Serial or RC modes. The SET button is used to configure the options for the mode. The LIPO button doubles as a save button and configuring the low battery voltage cut out function of RoboClaw. To set the desired mode follow the steps below. 1.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Mode Options Each mode will have several possible configuration settings. The settings need to be setup after the initial mode is selected. Follow the steps below. 1. After the desired mode is set and saved press and release the SET button for options setup. The STAT2 LED will begin to blink out the current option setting. 2. Press SET to increment to the next option. Press MODE to decrement to the previous option. 3.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Battery Cut Off Settings The RoboClaw is able to protect the main battery by utilizing a battery voltage cut off. The cut off voltage will vary depending on the size of battery used. The table below shows the battery option setting with the type of battery it will protect and at what voltage the cutoff will kick in. The battery settings can be set by following the steps below. 1. Press and release the LIPO button.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers Battery Settings Automatic Battery Detection on Startup Auto detect will sample the main battery voltage on power up or after a reset. All Lipo batteries, depending on cell count will have a minimum and maximum safe voltage range. The attached battery must be within this acceptable voltage range to be correctly detected. Undercharged or overcharged batteries will cause false readings and RoboClaw will not properly protect the battery.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Wiring Basic Wiring RoboClaw has many control modes and each mode may have unique wiring requirments to ensure safe and reliable operation. The diagram below illustrates a very basic wiring configuration used in a small motor system where safety concerns are minimal. This is the most basic wiring configuration possible. Any wiring of RoboClaw should include a main battery shut off switch, even when safety concerns are minimal.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Safety Wiring In all system with movement, safety is a concern. The wiring diagram below illustrates a system wired for minimum safety requirements. An external main power cut off is required for safety. When the RoboClaw is switched off or the fuse is blown, a high current diode (D1) is required to create a return path to the battery for any regenerative voltages.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Logic Battery Wiring An optional logic battery is supported. Under heavy loads the main power can suffer voltage drops, causing potential logic brown outs which may result in uncontrolled behavior. A separate power source for the motor controllers logic circuits, can remedy potential problems from main power voltage drops. The logic battery maximum input voltage is 34VDC with a minimum input voltage of 6VDC.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Status LEDs Status and Error LEDs RoboClaw includes 3 LEDs to indicate status. Two green status LEDs labeled STAT1 and STAT2 and one red error LED labeled ERR. When the motor controller is first powered on all 3 LEDs should blink briefly to indicate all LEDs are functional. The LEDs will behave differently depending on the mode.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO LED Blink Sequences When a warning or fault occurs RoboClaw will use the LEDs to blink a sequence. The below table details each sequence and the cause. LED Status Condition Type Description All three LEDs lit. E-Stop Fault Motors are stopped by braking. Error LED lit while condition is active. Over 85c Temperature Warning Motor current limit is recalculated based on temperature. Error LED blinks once with short delay. Other LEDs off.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Inputs S3, S4 and S5 Setup RoboClaw S3, S4 and S5 inputs support the use of home switches, limit switches, Voltage Clamping and E-Stops. A limit switch is used to detect the travel limits. Travel limits are typically used on a linear slide to detect when the assembly has reached the end of travel. A home switch is used to create a known start position. In some situations both may be required.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Limit / Home / E-Stop Wiring S4 controls motor channel 1 and S5 controls motor channel 2. A pull-up resistor to 5VDC or 3.3VDC should be used if wire lengths exceed 6” (150mm). The circuit below shows a NO (normally open) style switch. Connect the NO to S4 or S5 and the COM end to a power ground shared with RoboClaw. For model specific pinout information please refer to the data sheet for the model being used.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Regenerative Voltage Clamping Voltage Clamp When using power supplies regenerative voltage spikes will need to be dissipated. This can be done with a simple circuit shown below and using a V-Clamp pin to activate it. A solid state switch (Q1) and large wattage resistor (R3) are required. The regenerative voltage will be dissipated as heat.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers Voltage Clamp Setup and Testing Open Motion Studio and set S5 to the Voltage Clamp option in the drop down and save the setting before exiting the application (see user manual). The circuit shown will need to be tuned for each application to properly dissipate the regenerative voltages. Testing should consist of a running the motor up to 25% of its speed and then quickly slowing down without braking or e-stop while checking the voltage spike.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Bridge Mode Bridging Channels RoboClaw's dual channels can be bridge to run as one channel, effectively doubling its current capability for one motor. RoboClaw will be damaged if it is not set to bridged channel mode before wiring. Download and install Motion Studio application. Connect the motor controller to the computer using an available USB port. Run Motion Studio and in general settings check the option to "Bridge Channels".
RoboClaw Series Brushed DC Motor Controllers BASICMICRO USB Control USB Connection When RoboClaw is connected, it will automatically detect it has been connected to a powered USB master and will enable USB communications. USB can be connected in any mode. When the Roboclaw is not in packet serial mode USB packet serial commands can be used to read status information and set configuration settings, however motor movement commands will not function.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO RC Control RC Mode RC mode is typically used when controlling RoboClaw from a hobby RC radio. This mode can also be used to simplify driving RoboClaw from a microcontroller using servo pulses. In this mode S1 controls the direction and speed of motor 1 and S2 controls the direction and speed of motor 2. RC Mode With Mixing This mode is the same as RC mode with the exception of how S1 and S2 controls the attached motors.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO RC Wiring Example Connect the RoboClaw as shown below. Set mode 1 with option 1. Before powering up, center the control sticks on the radio transmitter, turn the radio on first, then the receiver, then RoboClaw. It will take RoboClaw about 1 second to calibrate the neutral positions of the RC controller.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Analog Control Analog Mode Analog mode is used when controlling RoboClaw from a potentiometer or a filtered PWM signal. In this mode S1 and S2 are set as analog inputs. The center points are calibrated at start up unless disabled by enabling MCU mode which sets the center at 1v. The RoboClaw will auto calibrate these ranges on the fly unless auto-calibration is disabled. If a voltage smaller than .5v or larger than 1.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Analog Wiring Example RoboClaw uses a high speed 12 bit analog converter. Its range is 0 to 2V. The analog pins are protected and 5V tolerant. The potentiometer range will be limited if 5V is utilized as the reference voltage. A simple resistor divider circuit can be used to reduce the on board 5V to 2V for use with a potentiometer(POT). See the below schematic. The POT acts as one half of the resistor divider.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Standard Serial Control Standard Serial Mode In this mode S1 accepts TTL level byte commands. Standard serial mode is one way serial data. RoboClaw can receive only. A standard 8N1 format is used. Which is 8 bits, no parity bits and 1 stop bit. If you are using a microcontroller you can interface directly to RoboClaw. If you are using a PC a level shifting circuit (eg: Max232) is required.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Standard Serial Wiring Example In standard serial mode the RoboClaw can only receive serial data. The below wiring diagram illustrates a basic setup of RoboClaw for use with standard serial. The diagram below shows the main battery as the only power source. Make sure the LB jumper is set correctly. The 5VDC shown connected is only required if your MCU needs a power source. This is the BEC feature of RoboClaw.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Standard Serial Mode With Slave Select Slave select is used when more than one RoboClaw is on the same serial bus. When slave select is set to ON the S2 pin becomes the select pin. Set S2 high (5V) and RoboClaw will execute the next set of commands sent to S1 pin. Set S2 low (0V) and RoboClaw will ignore all received commands. Any RoboClaw connected to a bus must share a common signal ground (GND) shown by the black wire.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Packet Serial Packet Serial Mode Packet serial is a buffered bidirectional serial mode. More sophisticated instructions can be sent to RoboClaw. The basic command structures consist of an address byte, command byte, data bytes and a CRC16 16bit checksum. The amount of data each command will send or receive can vary. Address Packet serial requires a unique address when used with TTL serial pins(S1 and S2).
BASICMICRO RoboClaw Series Brushed DC Motor Controllers Packet Timeout When sending a packet to RoboClaw, if there is a delay longer than 10ms between bytes being received in a packet, RoboClaw will discard the entire packet. This will allow the packet buffer to be cleared by simply adding a minimum 10ms delay before sending a new packet command in the case of a communications error. This can usually be accomodated by having a 10ms timeout when waiting for a reply from the RoboClaw.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Handling values larger than a byte Many Packet Serial commands require values larger than a byte can hold. In order to send or receive those values they need to be broken up into 2 or more bytes. There are two ways this can be done, high byte first or low byte first. Roboclaw expects the high byte first. All command arguments and values are either single bytes, words (2 bytes) or longs (4 bytes).
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Packet Serial Wiring In packet serial mode the RoboClaw can transmit and receive serial data. A microcontroller with a UART is recommended. The UART will buffer the data received from RoboClaw. When a request for data is made to RoboClaw the return data will have at least a 1ms delay after the command is received if the baud rate is set at or below 38400. This will allow slower processors and processors without UARTs to communicate with RoboClaw.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Multi-Unit Packet Serial Wiring In packet serial mode up to eight Roboclaw units can be controlled from a single serial port. The wiring diagram below illustrates how this is done. Each Roboclaw must have multi-unit mode enabled and have a unique packet serial address set. This can be configured using Motion Studio. Wire the S1 and S2 pins directly to the MCU TX and RX pins. Install a pull-up resistor (R1) on the MCU RX pin. A 1K to 4.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Commands 0 - 7 Compatibility Commands The following commands are used in packet serial mode.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 3 - Set Maximum Main Voltage (Command 57 Preferred) Sets main battery (B- / B+) maximum voltage level. The valid data range is 30 - 175 (6V 34V). During regenerative breaking a back voltage is applied to charge the battery. When using a power supply, by setting the maximum voltage level, RoboClaw will, before exceeding it, go into hard braking mode until the voltage drops below the maximum value set.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers Commands 8 - 13 Mixed Mode Compatibility Commands The following commands are mix mode commands used to control speed and turn for differential steering. Before a command is executed, both valid drive and turn data packets are required Once RoboClaw begins to operate the motors turn and speed can be updated independently. 8 - Drive Forward Drive forward in mix mode. Valid data range is 0 - 127. A value of 0 = full stop and 127 = full forward.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Advanced Packet Serial Commands The following commands are used to read RoboClaw status information, version information and to set or read configuration values. All commands sent to RoboClaw need to be signed with a CRC16 (Cyclic Redundancy Check of 2 bytes) to validate each packet it received. This is more complex than a simple checksum but prevents errors that could otherwise cause unexpected actions to execute on the Roboclaw.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Command Description 98 Set Standard Config Settings 99 Read Standard Config Settings 100 Set CTRL Modes 101 Read CTRL Modes 102 Set CTRL1 103 Set CTRL2 104 Read CTRLs 105 Set Auto Home Duty/Speed and Timeout M1 106 Set Auto Home Duty/Speed and Timeout M2 107 Read Auto Home Settings 109 Set Speed Error Limits 110 Read Speed Error Limits 112 Set Position Error Limits 113 Read Position Error Limits 115 Set Battery Voltage O
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 21 - Read Firmware Version Read RoboClaw firmware version. Returns up to 48 bytes(depending on the Roboclaw model) and is terminated by a line feed character and a null character. Send: [Address, 21] Receive: [“RoboClaw 10.2A v4.1.11”,10,0, CRC(2 bytes)] The command will return up to 48 bytes. The return string includes the product name and firmware version. The return string is terminated with a line feed (10) and null (0) character.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 48 - Read Motor PWM values Read the current PWM output values for the motor channels. The values returned are +/-32767. The duty cycle percent is calculated by dividing the Value by 327.67. Send: [Address, 48] Receive: [M1 PWM(2 bytes), M2 PWM(2 bytes), CRC(2 bytes)] 49 - Read Motor Currents Read the current draw from each motor in 10ma increments. The amps value is calculated by dividing the value by 100.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 69 - Set M2 Default Duty Acceleration Set the default acceleration for M2 when using duty cycle commands(Cmds 32,33 and 34) or when using Standard Serial, RC and Analog PWM modes. Send: [Address, 69, Accel(4 bytes), CRC(2 bytes)] Receive: [0xFF] 70 - Set Motor1 Default Speed Set M1 default speed for use with M1 position command and RC or analog modes when position control is enabled.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO 74 - Set S3, S4 and S5 Modes Set modes for S3,S4 and S5.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 77 - Read DeadBand for RC/Analog controls Read DeadBand settings in 10ths of a percent. Send: [Address, 77] Receive: [Reverse, SForward, CRC(2 bytes)] 80 - Restore Defaults Reset Settings to factory defaults. Send: [Address, 80] Receive: [0xFF] 81 - Read Default Duty Acceleration Settings Read M1 and M2 Duty Cycle Acceleration Settings.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO 90 - Read Status Read the current unit status.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 92 - Set Motor 1 Encoder Mode Set the Encoder Mode for motor 1. See command 91. Send: [Address, 92, Mode, CRC(2 bytes)] Receive: [0xFF] 93 - Set Motor 2 Encoder Mode Set the Encoder Mode for motor 2. See command 91. Send: [Address, 93, Mode, CRC(2 bytes)] Receive: [0xFF] 94 - Write Settings to EEPROM Writes all settings to non-volatile memory. Values will be loaded after each power up.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO 98 - Set Standard Config Settings Set config bits for standard settings.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO 99 - Read Standard Config Settings Read config bits for standard settings See Command 98. Send: [Address, 99] Receive: [Config(2 bytes), CRC(2 bytes)] 100 - Set CTRL Modes Set CTRL modes of CTRL1 and CTRL2 output pins(available on select models). Send: [Address, 20, CRC(2 bytes)] Receive: [0xFF] On select models of Roboclaw, two Open drain, high current output drivers are available, CTRL1 and CTRL2.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 103 - Set CTRL2 Set CTRL2 output value(available on select models) Send: [Address, 103, Value(2 bytes), CRC(2 bytes)] Receive: [0xFF] Set the output state value of CTRL2. See 100 - Set CTRL Modes for valid values. 104 - Read CTRL Settings Read CTRL1 and CTRL2 output values(available on select models) Send: [Address, 104] Receive: [CTRL1(2 bytes), CTRL2(2 bytes), CRC(2 bytes)] Reads currently set values for CTRL Settings.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 110 - Read Speed Error Limits Read the current speed error limit values. Send: [Address, 110] Receive: [M1Limit(4 bytes), M2Limit(4 bytes), CRC(2 bytes)] 112 - Set Position Error Limits Set motor position error limits in encoder counts. Send: [Address, 112, M1Limit(4 bytes), M2Limit(4 byes), CRC(2 bytes)] Receive: [0xFF] 113 - Read Position Error Limits Read the current motor position error limits.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 133 - Set M1 Max Current Limit Set Motor 1 Maximum Current Limit. Current value is in 10ma units. To calculate multiply current limit by 100. Send: [Address, 134, MaxCurrent(4 bytes), 0, 0, 0, 0, CRC(2 bytes)] Receive: [0xFF] 134 - Set M2 Max Current Limit Set Motor 2 Maximum Current Limit. Current value is in 10ma units. To calculate multiply current limit by 100.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 253 - Read User EEPROM Memory Location Read a 16 bit value from user EEPROM address. Memory address range is 0 to 255.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Encoders Closed Loop Modes RoboClaw supports a wide range of encoders for close loop modes. Encoders are used in velocity, position or a cascaded velocity with position control mode. This manual mainly deals with Quadrature and Absolute encoders. However additional types of encoders are supported. Encoder Tuning All encoders will require tuning to properly function.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Absolute Encoder Wiring RoboClaw is capable of reading absolute encoders that output an analog voltage. Like the Analog input modes for controlling the motors, the absolute encoder voltage must be between 0v and 2v. If using standard potentiometers as absolute encoders the 5v from the RoboClaw can be divided down to 2v at the potentiometer by adding a resistor from the 5v line on the RoboClaw to the potentiometer. For a 5k pot R1 / R2 = 7.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers Encoder Tuning To control motor speed and or position with an encoder the PID must be calibrated for the specific motor and encoder being used. Using Motion 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 Motion Studio window for Velocity Settings will auto tune for velocity.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers Manual Velocity Calibration Procedure 1. Determine the quadrature pulses per second(QPPS) value for your motor. The simplest method to do this is to run the Motor at 100% duty using Ion Studio and read back the speed value from the encoder attached to the motor. If you are unable to run the motor like this due to physical constraints you will need to estimate the maximum speed in encoder counts the motor can produce. 2.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 4. Once your position control is acting relatively smoothly and coming close to the set position you can think about adjusting the I setting. Adding I will help reach the exact set point specified but in most motor systems there is enough slop in the gears that instead you will end up causing an oscillation around the specified position. This is called hunting. The I setting causes this when there is any slop in the motor/encoder/gear train.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Encoder Commands The following commands are used with the encoders both quadrature and absolute. The Encoder Commands are used to read the register values for both encoder channels. Command Description 16 Read Encoder Count/Value for M1. 17 Read Encoder Count/Value for M2. 18 Read M1 Speed in Encoder Counts Per Second. 19 Read M2 Speed in Encoder Counts Per Second. 20 Resets Encoder Registers for M1 and M2(Quadrature only).
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 17 - Read Quadrature Encoder Count/Value M2 Read M2 encoder count/position. Send: [Address, 17] Receive: [EncCnt(4 bytes), Status, CRC(2 bytes)] Quadrature encoders have a range of 0 to 4,294,967,295. Absolute encoder values are converted from an analog voltage into a value from 0 to 2047 for the full 2v range. The Status byte tracks counter underflow, direction and overflow.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 22 - Set Quadrature Encoder 1 Value Set the value of the Encoder 1 register. Useful when homing motor 1. This command applies to quadrature encoders only. Send: [Address, 22, Value(4 bytes), CRC(2 bytes)] Receive: [0xFF] 23 - Set Quadrature Encoder 2 Value Set the value of the Encoder 2 register. Useful when homing motor 2. This command applies to quadrature encoders only.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 108 - Read Motor Average Speeds Read M1 and M2 average speeds. Return the speed in encoder counts per second for the last second for both encoder channels. Send: [Address, 108] Receive: [Speed1(4 bytes), Speed2(4 bytes), CRC(2 bytes)] 111 - Read Speed Errors Read current calculated speed error in encoder counts per second.
RoboClaw Series Brushed DC Motor Controllers BASICMICRO Advanced Motor Control Advanced Motor Control Commands The following commands are used to control motor speeds, acceleration distance and position using encoders. The PID can also be manually adjusted using Advanced Motor Control Commands. Command Description 28 Set Velocity PID Constants for M1. 29 Set Velocity PID Constants for M2. 32 Drive M1 With Signed Duty Cycle. (Encoders not required) 33 Drive M2 With Signed Duty Cycle.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 28 - Set Velocity PID Constants M1 Several motor and quadrature combinations can be used with RoboClaw. In some cases the default PID values will need to be tuned for the systems being driven. This gives greater flexibility in what motor and encoder combinations can be used. The RoboClaw PID system consist of four constants starting with QPPS, P = Proportional, I= Integral and D= Derivative.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 33 - Drive M2 With Signed Duty Cycle Drive M2 using a duty cycle value. The duty cycle is used to control the speed of the motor without a quadrature encoder. The command syntax: Send: [Address, 33, Duty(2 Bytes), CRC(2 bytes)] Receive: [0xFF] The duty value is signed and the range is -32768 to +32767 (eg. +-100% duty). 34 - Drive M1 / M2 With Signed Duty Cycle Drive both M1 and M2 using a duty cycle value.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 35 - Drive M1 With Signed Speed Drive M1 using a speed value. The sign indicates which direction the motor will turn. This command is used to drive the motor by quad pulses per second. Different quadrature encoders will have different rates at which they generate the incoming pulses. The values used will differ from one encoder to another. Once a value is sent the motor will begin to accelerate as fast as possible until the defined rate is reached.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 39 - Drive M2 With Signed Speed And Acceleration Drive M2 with a signed speed and acceleration value. The sign indicates which direction the motor will run. The acceleration value is not signed. This command is used to drive the motor by quad pulses per second and using an acceleration value for ramping. Different quadrature encoders will have different rates at which they generate the incoming pulses.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 42 - Buffered M2 Drive With Signed Speed And Distance Drive M2 with a speed and distance value. The sign indicates which direction the motor will run. The distance value is not signed. This command is buffered. Each motor channel M1 and M2 have separate buffers. This command will execute immediately if no other command for that channel is executing, otherwise the command will be buffered in the order it was sent.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 45 - Buffered M2 Drive With Signed Speed, Accel And Distance Drive M2 with a speed, acceleration and distance value. The sign indicates which direction the motor will run. The acceleration and distance values are not signed. This command is used to control the motors top speed, total distanced traveled and at what incremental acceleration value to use until the top speed is reached. Each motor channel M1 and M2 have separate buffers.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 50 - Drive M1 / M2 With Signed Speed And Individual Acceleration Drive M1 and M2 in the same command using one value for acceleration and two signed speed values for each motor. The sign indicates which direction the motor will run. The acceleration value is not signed. The motors are sync during acceleration. This command is used to drive the motor by quad pulses per second and using an acceleration value for ramping.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 53 - Drive M2 With Signed Duty And Acceleration Drive M1 with a signed duty and acceleration value. The sign indicates which direction the motor will run. The acceleration values are not signed. This command is used to drive the motor by PWM and using an acceleration value for ramping. Accel is the rate at which the duty changes from the current duty to the specified dury.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 62 - Set Motor 2 Position PID Constants The RoboClaw Position PID system consist of seven constants starting with P = Proportional, I= Integral and D= Derivative, MaxI = Maximum Integral windup, Deadzone in encoder counts, MinPos = Minimum Position and MaxPos = Maximum Position. The defaults values are all zero.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers 67 - Buffered Drive M1 & M2 with signed Speed, Accel, Deccel and Position Move M1 & M2 positions from their current positions to the specified new positions and hold the new positions. Accel sets the acceleration value and deccel the decceleration value. QSpeed sets the speed in quadrature pulses the motor will run at after acceleration and before decceleration.
BASICMICRO RoboClaw Series Brushed DC Motor Controllers Warranty Basicmicro warranties its products against defects in material and workmanship for a period of 1 year. If a defect is discovered, Basicmicro will, at our sole discretion, repair, replace, or refund the purchase price of the product in question. Contact us at sales@basicmicro.com. No returns will be accepted without proper authorization. Copyrights and Trademarks Copyright© 2015 by Basicmicro, Inc. All rights reserved.