This topic has 7 replies, 2 voices, and was last updated 8 months, 1 week ago by Aleksander.

  • Author
  • #8396

    I am about to build a mecanum robot. I have decided that I am initially is only going to drive it with a RC-controller.

    I intend to use an Arduino and Sabertooth motor controller to control it. I will try to use this [code]( as a basis.
    First, I need to ensure that I have all the components I need.

    I have four geared [motors]( with encoders. As I am going to controll with a RC controller. As I understand it will be no need for encoders for a RC controlled robot?. Would it be just fine to not connect the wires from the encoder and just drive it as a normal DC motor?

    Motor controllers:
    I am going to use two dual [Sabertooth 12A](

    Radio controller and transmitter.
    I have some RC controllers I have used for planes and multicopters. These does only have one spring centred stick. Will a controller like that be just fine? Will different controllers and receivers affect the code?

    Is there anything else I need?
    In line 29 in this [code]( ) it says, “Output signals for TTL Relays”. Do I need some relays or what?


    Hi Aleksandr,

    Your motors are intended to be operated using a Servo Motor Driver, which they mention in the link you posted ( It may be possible to bypass the servo part of it and operate as a basic DC motor but I don’t want to speculate on how to hack a motor we’ve never used before. If you can put a constant DC voltage on it and it spins continuously then it will work with DC motor controllers.

    That being said, I don’t recommend using the Sabertooth 2×12. We consistently encounter problems with this specific model and we try to avoid using them on our robots. However the 2×12 RC, 2×25, and all other Sabertooth models work great. The next cheaper option available to you is the Roboclaw 2×15 which is also good and has the option of reading encoders and doing closed loop speed control.

    For the RC controller you will need at least 3 axes to control a vectoring robot (drive, turn, and strafe).

    And no you don’t need relays. You can ignore that stuff.

    For lots more information take a look at our Vectoring Robot Support page:


    Thank you for your answer.

    I was not fully aware of the difference of servo motor and DC-motor, but I see now that I should have ordered plain DC-motors.

    When I was looking at your robots it seemed like that you were using Sabertooth 2×12.

    The problem right now is that I have ordered the Sabertooths, and do not have much time left, so I can most likely not wait for new motors and drivers to be delivered.

    I have some servodrivers like these It would probalby be hard to implement your code for these?


    You can use those Servo Drivers but you will have to modify the Arduino code to send commands to those instead of the Sabertooths. From the datasheet it sounds like you will need to put the drivers in Digital Speed Control mode and send it Modbus ASCII commands from the Arduino. I haven’t tried looking but I would expect you can find some Modbus ASCII Arduino libraries floating around online.

    If you can get the servo motors to act as plain DC motors then you can still use the 2×12 though.


    Thank you. It seems like I get the motor to run by just applying a 3s LiPo battery. Will try to use the Sabertooths. It would be fun to implement the servo drivers and make the robot programable, but righ now I have not time for that. I am doing a school project, and I am about to finsih it very soon. (this is outside my field of studt, and what I am expected to do, but I want to take this a little bit longer).


    I am a little bit confused regarding how I should hook the Sabertooth controllers to the Arduino, when I look at this code:

    How does the PWM pin defined in the code correspond with the outputs on the Sabertooth? As I see there is defined one PWM for each motor for controlling speed, and two pins for controlling the direction. When it comes to the Sabertooth I do not understand how to connect this.

    I am also wondering about what the LED pins defined are?

    • This reply was modified 8 months, 1 week ago by Aleksander. Reason: Spelling error

    That code is written for our PWM Motor Controllers, which take a PWM signal input. Take a look at the RC_Mecanum_Sabertooth sketch for the Sabertooth implementation.


    Thank you so much! I have to try to hook it up and see if I can get it up and running.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

Login Register

©2022 | All rights reserved.

Log in with your credentials


Forgot your details?

Create Account