In Part 2 of building our RC robot, we'll learn how to use a Sabertooth 2x32 motor controller and Arduino to modify an electric wheelchair into an RC robot.

In my first article, we used a Sabertooth 2x25 to create a functioning RC robot base. In this article, we'll configure joystick control, create a kill switch, and connect an Arduino and you can customize to your heart's content.  You can use any microcontroller-compatible analog or digital sensor to send information to your microcontroller, and have the microcontroller send information to the Sabertooth to control your robot's motion.


Wearable Game Controller by Nintendo

Wearable game controller by Nintendo


Parts Required

Note that instead of the Sabertooth 2x25 motor controller we worked with in Part 1, this time we will use a Sabertooth 2x32.


Sabertooth 2x25Sabertooth 2x32
Average Current Per Channel25 Amps32 Amps
Peak Current Per Channel50 Amps64 Amps
InputsRC, Analog, TTL SerialRC, Analog, TTL Serial, USB
Brake ControlNoYes
SteeringIndependent and Mixed ModeIndependent and Mixed Mode
ProgrammingUSB-Serial converter requiredMicro-USB on board
Arduino LibrariesYesYes
Input Voltage6-30V nominal; 33.6V max6-33.6V max
Designed forEase of UseMaximum Configurability

Parts Needed

Jumper WiresVarious F/F, F/M, and M/M terminal wiresLink$10Standard DuPont connectors on multi-strand wire
SabertoothDual 32A Motor ControllerLink$125
Electric WheelchairMerits P101 Folding Power ChairLink$1400 new (<$150 used)If more than $150, consider buying motors and batteries online.
E-stop switchPush Down, Twist Release SwitchLink$4
Arduino Uno R3Any Arduino compatible board should workLink$15

Purchase the Sabertooth motor controller from Dimension Engineering and try to find the electric wheelchair from the local used market. You do not need the entire chair—just the motors, wheels, batteries, and harness. If you cannot find a chair on the local used market, you can usually find the parts you need on eBay.


Creating a Kill Switch

When creating controls, make your first design consideration a way to safely bring the robot base to a stop. The preferred way to do this is with an e-stop switch. E-stops (emergency stops) are switches that typically have one normally-open and one normally-closed contact. These switches can be pushed closed, but must be twisted to reopen.

Sometimes reaching a single switch on a misbehaving robot can be difficult, so you'll have to introduce other mechanical means to activate it.


Two designs for an e-stop switch: pull style (left) and kick-bar style (right)


That might be a kick bar, or a fabric rope someone pulls or steps on. It is important to incorporate an actual e-stop switch in your design, though, because they are readily identified in case of emergencies.

If you come up with an idea that is too clever or takes any amount of time at all to figure out, there is a good chance that when your robot has you pinned on the edge of a cliff with its running buzz-saw, or in another emergency situation, someone in a panic will not know how to shut it off.


The Sabertooth 2x32

The Sabertooth 2x32 is slightly larger than the Sabertooth 2x25 used in the first part of the project for a robot controller. Both controllers are excellently designed and can be user programmed with Dimension Engineering's DEScribe software. Both controllers also accept analog, RC, and TTL serial input. The changes between the two come with the advanced configurability and additional outputs of the 2x32.


The Sabertooth 2x25 (left) and the Sabertooth 2x32 (right)


Along with greater current capacity, the Sabertooth 2x32 can be controlled directly by a computer or Raspberry Pi with the micro-USB connector or a combination of the previously mentioned inputs. Additionally, it can be programmed to activate the brakes on an electric wheelchair and respond to e-stops. Both options must be configured using the DEScribe software.


Sabretooth 2x32

The Sabertooth 2x32 motor controller


If you can imagine a remote control robot or wheelchair design, you can likely find a way to bring it to life with the Sabertooth 2x32.

For the Sabertooth to work in the mode that you want, you must set the DIP switches correctly. Use this tool to choose the correct settings.  


Sabertooth 2x32 User Guide & Joystick Holder Files

  Joystick Holder Pattern     Sabertooth 2x32 Manual     JoystickLaserFiles  

Repurposing the Joystick

We will reuse the joystick included in the wheelchair controller—it should be salvaged and used for future projects if you don't use it here. But note that you can create any analog or digital signal to feed into the Arduino and then interpret it for use in the Sabertooth. 

The headers on the wheelchair joysticks are quite small and something you might not want to work with without converting it into a larger pitch. The quickest way I found to move to a larger pitch is to simply clip the end off of the connector and crimp an RJ45 connector on the end of the wire, then from the RJ45 connector to either an RJ45 breakout or RJ45 Punchdown. The first four pins are all that are required for the easiest implementation.

If you are fortunate enough to have access to a laser-cutter/engraver, I have included a simple joystick holder you can cut out of 1/8" plywood that you can use for experimenting or as a jumping off point for further design in the attached .zip.


Pin IO / Ref Description Notes
1 In $$V_{s}=5 VDC$$ Connect to Arduino 5V
2 Out Left / Right 1 Connect to Arduino A1
3 Ref Gnd Connect to Arduino Gnd
4 Out Fore / Aft 1 Connect to Arduino A0
5 Out Fore / Aft 2 Unused in the sample program
6 Ref $$\frac{V_{s}}{2}$$
7 Out Left / Right 2
8 Unused



The joystick hooked up to the Arduino


                    //  Code to read contactless joystick outputs via Arduino.
int ForeAft_Pin = 1;        //Fore/Aft input is Arduino pin A1
int LeftRight_Pin = 0;     //Left/Right input is Arduino pin A0

float ForeAft_Input ;       // Expected Range 220-800
float LeftRight_Input ;    // Expected Range 220-800

void setup()               // Main Program Initialization
  Serial.begin(9600);      // Prepare debug information

void loop()
  ForeAft_Input = analogRead(ForeAft_Pin) ;
  LeftRight_Input = analogRead(LeftRight_Pin) ;


  delay( 100 );           // Just to slow down the output for debug

Hooking Up the Sabertooth

  Sabertooth 2x32 Manual     Download Code  

First, here are a couple of resources that you might find useful for these next sections:

Here's your checklist for connecting everything:

  1. Disconnect all power to all controllers and disconnect motors.
  2. Connect the Left Motor + and - wires to the M1A and M1B on the Sabertooth.
  3. Connect the Right Motor + and - wires to the M2A and M2B on the Sabertooth.
  4. Connect the positive brake lines from the left and right wheels to Battery + on the Sabertooth.
  5. Connect the battery wires to the Sabertooth (make sure the harness is not connected to the battery).
  6. Connect L Brake - to P1 and R Brake - to P2.
  7. Connect the Sabertooth S1 line to Arduino Digital pin 2.
  8. Connect the Sabertooth S2 line to Arduino Digital pin 3.
  9. Connect the Sabertooth 5V and 0V line to the Arduino 5V and Gnd lines.
  10. Connect the joystick's 5V and Gnd lines to the Arduino 5V and Gnd lines.
  11. Connect the joystick's output pins, Fore/Aft & Left/Right to Arduino analog 0 and 1.


Connection diagram. Click to enlarge.


L Motor +M1A
L Motor -M1B
L Brake +Bat +
L Brake -P1
R Motor +M2A
R Motor -M2B
R Brake +Bat +
R Brake -P2
S2Digital 3
S1Digital 2
5V5 V5 V
Analog input 0ForeAft
Analog input 1LeftRight

Using the Sabertooth with Arduino

Libraries and installers for Arduino can be found here.  

Click here for the Sabertooth "DIP switch wizard." DIP switch settings depend on the mode you wish to use. We will be starting with packetized serial mode and setting the Sabertooth to receive at address 128 

  1 2 3 4 5 6
Top row: joystick and e-stop
Bottom row: voltage regulators (left over from development), Arduino Uno clone, Sabertooth 2x32, and cable harness
  1. Connect the Sabertooth to the computer and download settings from DEScribe software.
  2. Connect the Arduino and download the code.
  3. Raise the wheels off the ground and connect the batteries—test it out.


                    // Software Serial Sample for Packet Serial
// Copyright (c) 2012 Dimension Engineering LLC
// Edited by Mark J. Hughes for AllAboutCircuits
// See license.txt for license details.

#include <SoftwareSerial.h>
#include <Sabertooth.h>

// Decide where you are going to plug the joystick into the circuitboard.
int ForeAft_Pin = 0;        // Plug Joystick Fore/Aft into Analog pin 1
int LeftRight_Pin = 1;      // Plug Joystick Left/Right into Analog pin 0

//Decide where you are going to plug in the Arduino
int Tx_pin = 2;             // Arduino Transmit Pin to Sabertooth S1
int Rx_pin = 3;             // Arduino Receive Pin to Sabertooth S2

// Create variables to read joystick values
float ForeAft_Input ;       // Variable to store data for Fore/Aft input from joystick
float LeftRight_Input ;     // Variable to store data for Left/Right input from joystick

// These variables allow for math conversions and later error checking as the program evolves.
int Fore_Limit = 800;       // High ADC Range of Joystick ForeAft
int Aft_Limit = 220;        // Low ADC Range of Joystick ForeAft
int Right_Limit = 800;      // High ADC Range of Joystick LeftRight
int Left_Limit = 226;       // Low ADC Range of Joystick LeftRight

// Create variables for Sabertooth
int ForwardReverse_power = 0; // -127 for full reverse, 0 for stop, +127 for full forward.
int LeftRight_power = 0;      // -127 for full CounterClockwise, 0 for stop, +127 for full Clockwise

SoftwareSerial SWSerial(Rx_pin, Tx_pin); // RX, TX on pin 2 (to S1).
Sabertooth ST(128, SWSerial); // Address 128, and use SWSerial as the serial port.

/*  Sabertooth can be used in independent or mixed mode.  We're using mixed mode which controls the motion
of both motors with a single command.  Independent mode controls one motor with one command */

void setup()
{;              // Send command to stop transldational motion
  ST.turn(0);               // Send command to stop rotational motion
  SWSerial.begin(9600);     // Establish serial connection to Sabertooth
  Serial.begin(9600);       // Establish serial connection back to computer for debugging

void loop()                 // Main program loop
// Read the joystick values
  ForeAft_Input = analogRead(ForeAft_Pin) ;              // Read the Fore/Aft joystick value
  LeftRight_Input = analogRead(LeftRight_Pin) ;          // Read the Left/Right joystick value

// Convert the joystick values to Sabertooth values
  ForwardReverse_power=map(ForeAft_Input,Fore_Limit, Aft_Limit, 127,-127);  // Translate and scale joystick values to Sabertooth values
  LeftRight_power=map(LeftRight_Input,Left_Limit, Right_Limit, 127,-127);  // Translate and scale joystick values to Sabertooth values

// Command the Sabertooth to drive the motors.;  //Command the Sabertooth translational motion
  ST.turn(LeftRight_power);        //Command the Sabertooth rotational motion

// Create debug information

  Serial.print(ForwardReverse_power); Serial.print("\t"); Serial.println(LeftRight_power);  //Debug

  Sabertooth Commanded by Arduino  

Next Steps

  1. Test your e-stops!
  2. Open the example files that come with the Sabertooth software and test the various transmit/receive functions available to use.
  3. Create a wireless controller with an nRF24L01+.
  4. Mount your hardware in an enclosure for extended use.
  5. Create a speed setting by adjusting the limits of the map function. Instead of typing 127, create a variable that can be adjusted to change the speed.  Also note that you can create code to eliminate reverse by replacing the map function with an equivalent.


                    /* Code to control speed */
//Decide what speeds to use with 127 maximum

int fast = 127;
int slow = 40;
int inPin= 5; // toggle switch on pin5 between gnd/5V

// Create code to change speed with SPDT toggle input
void setup(){
pinMode(inPin, INPUT);
speed = slow;
// Map 
void loop(){
} else {
speed = slow

map(x, Left_Limit, Right_Limit, -speed, speed);
/* End Code to control speed */

                    /* Code to customize controller mapping */
// Map truncates data -- if you need a bit more control ,or for some reason
// need to eliminate reverse, these functions should give it to you.

 float convertForeAftToServo(float y) {                         // take joystick input
   float result;                                                // create output variable
   result = ((y - Aft_Limit) / (Fore_Limit - Aft_Limit) * 180); // adjust equation to adjust output
   return result;

 float convertLeftRightToServo(float x) {
   float result;
   result = ((x - Left_Limit) / (Right_Limit - Left_Limit) * 180);
   return result;

/* End Code to customize controller mapping */

Here's a video of me testing my directional controls:


It Works! Now What?

Several hundred dollars and several hours later, you have now created a new Sabertooth-powered, Arduino-controlled robot via the joystick that came with it.  Are you pondering what I'm pondering?  Now instead of using just a joystick from an old wheelchair to control the robot, we need to get a bit more creative with our controllers:

  1. Makey Makey can be used to create very novel controllers
  2. Head tracking cameras
  3. Voice recognition controllers
  4. Muscle sensors
  5. Brainwave scanners
  6. Surface sensors
  7. Flex sensors
  8. Object tracking sensors
  9. Break beam sensors
  10. Accelerometer/compass sensors
  11. Single-channel or multiple-channel capacitive touch functionality
  12. Gesture sensors
  13. 9-DOF sensors




  • Cecil Clontz 2016-07-22

    Thanks for the excellent tutorials. I have a Power chair capable of transporting 300lbs. I’m about to build a self balancing scooter and I’m curious why you are using the Sabertooth instead of the motor controller that came with the wheel chair. Was it not beefy enough. I have to assume that mine is as it has massive motors and dual 35Ah batteries. Am I missing something?

    • Mark Hughes 2016-07-22

      Hi Cecil, it really comes down to the fact that the Sabertooth is much easier to interface with a microcontroller.  The default programming that comes with the powerchairs I’ve played with all have exponential response curves that build to maximum speed over time, which means that by the time a self-balancing robot’s gyro indicated rotation and commanded the wheelchair’s motors to turn on to compensate, and the wheels began to move, the robot would have already fallen over.  This is great if you’re a user with a tremor, as quick hand movements don’t become quick chair movements.  Now sure you could reverse engineer and repurpose the circuitry that’s in the chair, whether it has mosfets or igbts, but how much time and money do you want to spend re-engineering something you can buy?

      • Cecil Clontz 2016-07-27

        Thanks for the reply. This makes sense. I was really hoping not to have to buy a Sabertooth and make something out of the parts that I have but maybe I need to re-think what I make from this mobility chair.

  • LebEngineer 2016-11-30

    Thanks for this excellent tutorial , i was looking for something like this ,i just want to ask if all this can be converted to a PCB , my target is to minimize the size of all this in a single board with predefined inputs outputs. thank you

    • Mark Hughes 2016-11-30

      Hi @LebEngineer,
          Yes, everything can be simplified for whatever purpose you desire.  Usually, though, the cost of miniaturization is overwhelming for all but large-scale projects.  What did you have in mind?

      • LebEngineer 2016-12-02

        hello , well i have a member in my family that is on wheel chair so i want to convert your project into a pcb and embed it in the wheel chair we have , i don’t care about the cost since it will be less than a new electric wheel chair in my country and it is fun to do (want to learn new stuff also). anyway i am familiar with arduino but never did a pcb before.
        1-Now i am trying to connect all the parts and make sure that everything is working.
        2- i have to draw the schematics of the connections in order to convert to pcb
        since i am never did it before i am finding some difculties and i am using fritzing software but could find the sabertooth component.

        Any help how can i start implementing the final pcb , thanks a lot

    • Mark Hughes 2016-12-02

      Hi @LebEngineer.  I don’t think there’s a need for you to create circuitboard for this project.  Get an aluminum project case large enough for the sabertooth and a cable gland(start searching for boxes herehere.  Drill a hole for the cable gland and feed through the cable harness from the wheelchair.  Once the wires have made their way inside the project case, terminate them with fork terminal flanged spade connectors.  Then attach and drill and tap holes to hold the Sabertooth 2x32 directly against the outside case (so it can dissipate its heat).  Add another, much smaller wire harness for your control mechanics.

      The only reason to create a circuitboard for this project, would be to combine the arduino and the sabertooth onto a single board, and you’d still have to find a way to feed the wires into and out of the case, and there are heat dissipation issues that arise with the Sabertooth that the Fritzting software will not be able to model.

      The smallest metal container I can easily secure the Sabertooth 2x25 in (based on things already in my shop) is the Hammond 1590BB  You’ll want to use the Sabertooth 2x32, which just barely won’t fit.  And if you want to use an Arduino, you’ll need to go a size up from there.

      We’re getting into technical aspects that are better discussed in the forums.  Please start a project there and ping me and I’ll try to assist as best I can.


  • Mister Dude 2016-11-30

    Does your code make use of a wireless controller or just the old joystick wired directly to the robot? I’d like to use your tutorial to build a remote control lawnmower.

    • Mark Hughes 2016-11-30

      Hi @Mister Dude—If you look around, you’ll find an article where I remoted the wheelchair with an nRF24L01.  However, I’d recommend that you use the Sabertooth with another transceiver I wrote about, the HC12 Transceiver

      On the transmitter side of things, you’ll interpret the signal from the joystick with a microcontroller and transmit with the HC12.  On the receiver, you might be able to wire the HC12 directly to the Sabertooth 2x32.

      If you post your project in the Forums Ping me and I’ll help out best I can.


  • captclearleft 2017-08-04

    Hello and Great Tutorial!
    I am working on a similar project, and am stuck on the “E-Brake”

    How did you program the DEScribe software to stop the robot when Sabertooth A1 or A2 was High.???

    Can you post an image of the DEScribe program.  Thanks!

    • Mark Hughes 2017-08-04

      Hi @captclearleft,
          Unfortunately, I cannot post images in article comments—but if you want to create a post in our forums, I can post photographs there. 
          First, I want to double check that you are using the Sabertooth 2x32 motor controller, and have selected the same in the DEScribe software (drop down is between the Disconnect and Undo buttons).
      The software GUI will reconfigure itself after you select the proper controller and present additional options.  Select the “Power Outputs” tab.  And change “Mode” to “Brakes” for P1 and P2.  Select your other settings and then “Upload Settings to Device.”
          Double check your brake electrical connections—the positive side of each brake should connect to the positive battery terminal (or the B+ connector).  The negative wire from each brake connects to P1 and P2 screw terminals.

      If you still have issues, create a forum post and ping me and I’ll post the screenshots or a video walkthrough for you.