Using Buttons to Configure a RoboClaw

Introduction

There may be times when you do not have a computer available to configure your RoboClaw. The onboard buttons of the RoboClaw let you set the control mode and options without having to use BasicMicro Motion Studio. In this Application Note we’ll cover how to configure several common configurations using only the onboard buttons.

Using the Buttons

For each setup we will be using the buttons labeled MODE, SET and LIPO. These are located on the side of the board opposite the USB connector. These buttons are used to enter the programming mode, select modes and options, and save the settings. While programming the mode and settings the STAT2 led will blink to indicate the mode or option selected.

Figure 1: The buttons used to set options on the RoboClaw.

Differential Drive RC Setup

A differential drive setup is best illustrated with a tank style robot. Forwards and backwards motion is done with both motors turning the same way, and turning is accomplished by slowing the motor on the side associated with the turning direction; for faster turns the appropriate motor is reversed. Next we will configure the RoboClaw to operate in this mode while being controlled by an RC radio system.

1. Press the Mode button and release it. The STAT2 led will blink a number of times to indicate the currently saved mode. Press Set until the STAT2 led blinks twice. This puts the RoboClaw into RC mode with mixing. The mixing setting is what allows the RoboClaw to operate both motors in a tank robot style. Press and release the LIPO button to save the setting.

Figure 2: Setting RC mode with mixing.

2. Now we will set the options for the RC mode that was set in the last step. Press and release the Set button. Once again the STAT2 led will blink to indicate the current option set selected. We’ll be setting the RC flip switch option with exponential enabled. Press the SET button until the STAT2 led flashes 6 times. With these options enabled you will be able to use an additional RC channel to change the control scheme if your robot is flipped over. This means that if your robot is flipped you will not need to mentally reverse the controls in your head. Instead, with the flip of a switch you can restore the control scheme you are used to using. The exponential option makes your robot easier to control by softening up the control stick reponse near the center of the stick’s travel. This will make your robot less sensitive to small control inputs.

Figure 3: Setting RC flip switch mode with exponetial enabled.

Arduino Control Setup

When using an Arduino to control a RoboClaw you have several methods availble for control. In this example we will configure the RoboClaw to operate in the packet serial mode.

1. Press the MODE button and release it. The STAT2 led will blink a number of times to indicate the currently saved mode. Press SET until the STAT2 led blinks 7 times. This puts the RoboClaw into packet serial mode with an address of 0x80. This allows the RoboClaw and the Arduino to communicate over a serial connection. Press and release the LIPO button to save the mode setting.

2. The baud rate can be set as an option. If you do not set this option the baud rate will be set to 38400bps. This is a sane value for the Arduino, however the Arduino can utilize a baud rate up to the 115200bps. To begin, press and release the Set button. Once again the Stat2 led will blink to indicate the current option set selected. Press the Set button until the led indicated you have reached the setting of your choice.

Option Baud Rate
1 2400bps
2 9600bps
3 19200bps
4 38400bps
5 57600bps
6 115200bps
7 230400bps
8 460800bps

Differential Drive Analog Setup

When used in analog mode the RoboClaw can use potentiometers or controllers that output an analog signal, like joysticks, to control the the RoboClaw. With a differential drive system two motors are used to control fowards and backwards motion as well as turning. Tank style robots are an example of robots that use this configuration.

1. Press the MODE button and release it. The STAT2 led will blink a number of times to indicate the currently saved mode. Press Set until the Stat2 led blinks four time. This puts the RoboClaw into analog mode with mixing. The mixing setting is what allows the RoboClaw to operate both motors in a tank robot manner. Press and release the LIPO button to save the mode setting.

2. Now we will set the options for the analog mode that was set in the last step. Press and release the SET button. Once again the STAT2 led will blink to indicate the current option set selected. We’ll be setting the TTL flip switch option with exponential enabled. Press the Set button until the STAT2 led flashes 2 times. With these optional enabled you will be able to use an external switch like a mercury switch to change the control scheme if your robot is flipped over. The exponential option makes your robot easier to control.

Battery Mode Configuration

Regardless of the mode the RoboClaw is put in you will need to configure your battery setting to protect the batteries from over and under voltage conditions. If you are using LiPO batteries we recommend that you use the cell count setting.

1. Press and release the LIPO button. As before, the STAT2 led will flash to indicate what option is currently set. Consult the table below and press the Set button until the led indicates you have reached the setting you’re looking for. Then press and release the LIPO button to save your battery setting.

Option Setting Description
1 Disabled 6VDC cutoff when disabled
2 Auto Detect Battery must not be under or overcharged
3 3 Cell 9VDC is the cutoff voltage
4 4 Cell 12VDC is the cutoff voltage
5 5 Cell 15VDC is the cutoff voltage
6 6 Cell 18VDC is the cutoff voltage
7 7 Cell 21VDC is the cutoff voltage
8 8 Cell 24VDC is the cutoff voltage

Conclusion

You’ve now seen how to configure the RoboClaw for a handful of the most common use cases without having to connect to BasicMicro Motion Studio. The settings you’ve set via the buttons will remain in memory as long as you remembered to save them via the LIPO button. See the manual for the full range of settings and options that can be configured through the onboard buttions.