Go Down

Topic: Useing the SaberTooth Dual 5A Controller with an Arduino (Read 1 time) previous topic - next topic

torqx

Hi there

I was useing some small moters with a Robots Bits shield but the power was to little for the application.

So i have upgraded to 2 x 12V Motors that have a stall amperage of 5A, hence the Saber-tooth dual 5A Controller seemed perfect.
You can see what i have here: http://robotbits.co.uk/motor-drivers/sabertooth-2x-5amp-motor-driver/prod_58.html

I have an issue though, I have read (after paying for it and having it arrive) that i cannot simple use the Outputs on the Arduino to control it as it requires a Voltage input from 0-5V, and the Arduino that i have only does PWM and does not output the Analog voltage i require.

Can anyone help me with how to get my Arduino to talk to the Saber-tooth so i will be able to move my nice new motors.

If its a hassle and not worth it, is there any other Driver's that will power my 2 motors (2 x 5A) using PWM Input?

Many thanks
james


dxw00d

You can use the R/C input option, and drive it using the servo library.

cyberteque

you could use the serial input on the sabertooth as well

torqx


You can use the R/C input option, and drive it using the servo library.


Hi
Ah i see, that seems very interesting.

What do most people use to write and upload there code to Arduino's?

I'm using the Arduino Software that is downloadable from Arduino's site.

To add the Library what exactly do i need to do?

many thanks
james


retrolefty



You can use the R/C input option, and drive it using the servo library.


Hi
Ah i see, that seems very interesting.

What do most people use to write and upload there code to Arduino's?

I'm using the Arduino Software that is downloadable from Arduino's site.

To add the Library what exactly do i need to do?

many thanks
james




In the IDE File/Examples/Servo menu there are two simple example sketches you can play with to see how one uses the servo library.

Lefty

torqx

Hiya

So i managed to get the robot built, and the servo functions working.

Unfortunately i cannot seem to find a way to code it to do the following:

Drive at a speed of 120 for 2 seconds
Stop
Wait for 2 seconds
Reverse at a speed of 60 for 1 second

I can get it to go forward and back but i cannot get it to drive for a set period of time.

is this an issue with using PWM? I did try using serial packets but it failed :(

anyone got any idea?

Here is my code

Code: [Select]

#include <Servo.h>


Servo motorR;
Servo motorL;
int speedo;


void setup()
{

  motorR.attach(9);
  motorL.attach(10);
}

void drive(int speedo)
{
  motorR.write(speedo);
  motorL.write(speedo);
  return;
}
void left()
{
  motorR.write(120);
  motorL.write(60);
}
void right()
{
  motorR.write(60);
  motorL.write(120);
}

void STOP()
{
  motorR.write(90);
  motorL.write(90);
  return;
}

void loop()
{
drive(1200);
delay(2000);
drive(1800);
//right();
//drive(105);
//left();

}



ash901226

well basicly if you can afford to use delay then

Code: [Select]

drive(1200);
delay(2000);
STOP();
delay(2000);
drive(1800);
delay(1000);
STOP();
delay(2000);

torqx

Hi
Thanks for the Reply.

I don't think i can use Delay as my aim is to make this a reactive program using a switch statement.

I tried with a delay to just test and it ignored the delay and just spazzed out haha.

The problem i have now is entirely separate than this thread was started with so i will make a new post in a separate part of the forum.

thanks :D


targettracker

I am a beginner with Sabertooth and Arduino Uno Circuit.
I am having a tough time getting started and this seems kind of complex, nothing I have tried from Sabertooth and Arduino library has worked I did upload the blink test and that worked between the computer and the UNO but other than that I feel stuck.
We are running a Sabertooth 2x25 with Arduino Uno Board.
Our system is operated with a remote controller currently and we wanted to add the functionality option of autonomous.

So what we are trying to do is drive our system with remote control to a given location and then start the program.

Right now I have not even got the UNO circuit to even control the motors yet.
Can anyone help?
I uploaded programs but all seem to error out one way or the other.

Has anyone have the programs and code that works for the Saber tooth - UNO intergration?
Thanks I appreciate any help I can get!

Go Up