Hi, I would like to build a rover without a steering servo but rather with 2 motors (left+right) for the steering, just like a tracked vehicle.

Is there an ArduRover firmware that supports that kind of setup.

If not, can someone tell me where in the ArduRover code I have to make the necessary changes.




Views: 4025

Replies to This Discussion


I just tested a 6WD skid steering rover with my APM1.4/Oilpan. The manual mode works fine. I have not tested the autonomous mode yet. I am using the APM throttle and steering PWM signals to control a Dimension Engineering Sabetooth dual motor controller. I have the controller operating in the R/C mode so the throttle input controls forward/backward motion and the steering controls the right/left skid steering. If you are using separate motor controllers for each motor then that complicates the steering process. You might want to investigate the APM elevon output mode to accomplish what you wish to do.



Sounds good. Thanks.

I'm using the Arduino Motor shield to control both motors. I hope that it brings the same functionality as the sabertooth. I will try it as soon as I have put everything together.



I'm using a second Arduino with 40 amp  4QD Motor Controllers. The signals can be read in using the PulseIn() function, adjusted as required and then outputed as PWM using AnalogueWrite().

It should be possible to alter the ArduRover code but its quite difficult to figure out where to put the code. Having a second Arduino also opens up the possibilities for adding further features without affecting the ArduRover code.



Seems that the sabertooth does the steering into differential steering translation.

Do you know an algorithm/source code that does that translation (for forward and backward movement).



This may help. Its the code I use to convert to PWM for the motor controllers.

// Remote control ......
#define CH1Max 1830
#define CH1Min 1040
#define CH2Max 1810
#define CH2Min 1055
unsigned long CH1val = 0, CH2val = 0;
int CH1adj_val = 0, CH2adj_val = 0, startup = 0, counter = 2;
int lSpeed = 0, rSpeed = 0;
byte IsAuto = 0, IsAutoDone = 0;
int lSensorValue = 0, rSensorValue = 0, SensorResult = 0;

void RemoteControl() {
// Get receiver pulses
CH1val = pulseIn(CH1, HIGH, 20000); // read RC channel 1
CH2val = pulseIn(CH2, HIGH, 20000); // read RC channel 2

// Allow pulses at startup to settle system
if (startup < 10) { // may reconsider this stategy
startup ++ ;
} else if (CH1val == 0 || CH2val == 0) { // ignore occasional bad pulses
if (counter >= 3) { // allow 2 bad signals then shutdown
counter = 0 ;
lSpeed = 0 ;
rSpeed = 0 ;
digitalWrite(lREV, LOW) ;
digitalWrite(rREV, LOW) ;
counter ++ ;
} else {
counter = 0 ;
// Map Ch1 pulse range - 255 to 255 - sets voltage at approx 3v - vary to change max voltage
CH1adj_val = map(CH1val, CH1Min, CH1Max, -255, 255); // Spectrum 5 RC values are between 1040-1830 RANGE MAY NEED ADJUSTMENT
// Map Ch2 pulse to -255, 255 (consider different range)
CH2adj_val = map(CH2val, CH2Min, CH2Max, -255, 255);

if(CH1adj_val >= -10){ // Forward
digitalWrite(lREV, LOW) ;
digitalWrite(rREV, LOW) ;
} else { // Reverse
digitalWrite(lREV, HIGH) ;
digitalWrite(rREV, HIGH) ;
lSpeed = abs(CH1adj_val) ;
rSpeed = abs(CH1adj_val) ;

// Check direction and adjust motor speed if required (turning left or right)
if (CH2adj_val < -10) { lSpeed = abs(CH1adj_val) + CH2adj_val ; }
if (CH2adj_val > 10) { rSpeed = abs(CH1adj_val) - CH2adj_val ; }

// stabalize speed if near centre
if (lSpeed <= 5) {lSpeed = 0 ; } // adjust as required
if (rSpeed <= 5) {rSpeed = 0 ; } // adjust as required

// Constrain Motor speeds
lSpeed = constrain(lSpeed,0,255) ;
rSpeed = constrain(rSpeed,0,255) ;

// Write PWM to Motor Controllers
analogWrite(lMOTOR,lSpeed) ;
analogWrite(rMOTOR,rSpeed) ;


Instead of a Sabertooth, I'm using a RoboClaw.  It is a dual motor driver board, and can convert from steering and throttle to left/right "tank" drive. 

But thanks for posting your code!


im.new to.the ardupilot. but project very similar. is there specific.outputs i need to run to signal sabertooth? and what parameters in mp do i need to.change ? oh one more thing is the code a must have or wil it work without ?

sorry to bother u again lol :P but i think ur the only one that can help . im still getin nothing from my outputs.even tho i hav its own power to the outputs now, my signal voltage tho is still the same .34vdc and i tried alot of different things. even played aorund with the dip switches so many times.i did a reset in the terminal then setup radio , then just to double check and edit, i did config.my dip switches are 1 is down and the rest are in the on position.i dont know wat else to do , ive checked everything.all fuses are good.

Your best best is to invest in a Arduino UNO ($30). Connect the outputs from the RC TX to digital inputs on the UNO and use pulsein to see the RC signals - midpoint 1500. Move the stciks around and see that the signals change. Now buy a Pololu arduino motor shield and get the library. Now the UNO can drive your motors using the RC input signals. You can write a small Arduino program to decode steer/throttle to differtial drive as shown in earlier posts. Now you can control your vehicle with RC. Next put the APM in the loop (download 2.30 as documented by TCIII). Use the UNO again to test the APM outputs. Should be good to go.

- Vijay


Since the output of the APM is PWM there is no way to measure the output pin voltage with a DMM. You need to get one of these: http://www.bphobbies.com/view.asp?id=A0320107&pid=D0736126

With this tool you can read the PWM output on each of the APM's pins and also the output of your R/C receiver. This will help you to troubleshoot your problem.




A few of us are attempting to do the same thing with boats that have 2 screws.  I've gone into the C++ code in several files, found references to elevators and changed them to copies of the throttle code.  But I'm not a programmer and can't find all the changes that need to be made.  And when I try to compile the changed code, I just get a load of errors.

If you are successful, please let me know.  I've about given up and am looking at driving the boat with just one screw.

Good luck!




The shortest route to accomplish what you want to do is for you is to use a motor controller, like the Sabertooth or the RoboClaw to control the two motors. Otherwise, there is a program for the Parallax BS2 that will take steering and throttle PWM and convert it to a left and right PWM outputs for motor ESCs for a form of skid steering. I am sure that there is an equivalent Arduino program available.

Just a thought


DIY Drones Monthly


Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2016   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service