Connect Sabertooth 2X12 R/C and Raspberry PI via GPIO?

Hi,

I recently got and assembled 4WD1 Rover Kit. Also I bought Sabertooth 2X12 R/C and batteries.
My idea is to build a robot around Raspberry PI, which is simply because I’m more to linux/python and other programming staff, but I have not much deep experience in electronics.

So my theory was to use Raspberry GPIO to connect to Sabertooth outputs (S1/S2), but after digging everywhere for information about what are exactly the output cables are doing, I assume, because there are 3 of them, one should be power and other two are about controlling two different controllers (forward/backwards)?

Is it something I’m doing right or should I use different controller, for example the Sabertooth, but without R/C?

Any help will be really appreciated!

The Sabortooth has three cables which each have three wires.

S1 - Controls Motor 1
S2 - Controls Motor 2
Flip - For reversing control of the Robot

Each cable has a Brown, Red, and Orange wire.

Brown - connect this to ground.
Red - the sabortooth has a 5v BEC for powering an RC Rx. You will need to remove this wire from the connector and take proper precautions to prevent shorts.
Orange - This is the channels signal wire.

The Sabortooth R/C take PWM pulses on the signal lines to control the motors, exactly like a servo. 1000uS is full reverse, 1500uS is stopped, and 2000uS is full forward. Depending on how the DIP switches are set will determine the behavior of the motors.

Hi,

Thank you very very very much!
It did actually work! The best thing I do not need to repeat the sequence, controller is doing this one on it’s own!
Now I’m moving to next steps! Thank you very much again!!!

Hello.
Is there any states between stopped and full forward or stopped and full reverse? To fluently control speed of the robot i just nead to change period of the PWM signal from 1500 to 2000 or 1000 to 1500? Speed characteristic is linear , if 2000 us is full speed ( i read abaut 12’’/s ) then 1750 is 6’’/s ?

Of course. Are you also using the Sabertooth? If yes, in which mode? The whole point of a motor controller is to allow you any speed between full speed in one direction to full speed in the opposite direction.

Yes i borrow A4WD from my college two days a go and I try to find how to control it. I got a basic atom pro chip but i want to use a raspberry pi with OpenCV library. Inside is a sabertooth v1.03. I don’t know anything about any modes(yet). I saw there is a 6 switches and I find what every position of switch mean but now i see i got different version (my is labeled “732” “cts” “on” “219” and find explanation of a “219” “on” “540”). So to control speed in forward mode I change frequency? Usually in PWM I change the lenght of signal to change the averange value of voltage or current.

Definitely need to read through the Sabertooth manual first before trying to use it. It’s likely configured for the old board and setup. The DIP switches need to be set according to your setup. Choose the communication protocol which you are most comfortable with.

Also would help to know for sure which Sabertooth you have. For example if it is a 2x12 R/C then there is only one way to control it and that is with RC signals. Does it look like the picture:

If so then it is an RC only version.

But if it looks more like:

Then it supports other ways to do input to control it, like Analog voltage, or a couple of serial interfaces.

But assuming RC, then you need to generate pulses about 50 times per second where the actual width of the pulse controls the speed of the motors, with a pulse width of about 1500us is stopped and somewhere around 1000us is full reverse and 2000us is full forward. Sometimes you have to experiment some as some controllers may be calibrated slightly differently where maybe 1503 will stop it and on another one it might be 1498…

Edit: As for which value RC values you need to output to get a specific speed, it depends on which motors you are using, you will probably need to experiment. As for linear, there is a dipswitch setting that says go linear versus go exponential.

Kurt

My sabertooth looks like these www.dimensionengineering.com/datasheets … 2x10RC.pdf i found diference. My switch is labeled 219, 732 and that in the datasheet is labeled 219, 540 what’s the difference between them, and what mean that numbers?

I don’t think it is anything, other than the part number of the switch they used for that batch of boards…

Kurt

I got problems with my “Sabertooth 2X12 R/C Regenerative Dual Channel Motor Controller”. I still don’t know how to control that. In one of my questions i asked about

and the response was

. But next responses confused me

so I think if i want to go forward I nead to generate pulses with period 2000us ( 500Hz) and backward 1000us ( 1000Hz) and control the speed using duty cycle (i.e with duty cycle about 50% the speed is Max/2). So I want to be 100% sure to change speed i change frequency of PWM signal or dutycycle of PWM signal? I’m using hardware PWM on atmega88 witch generate PWM signal on 2 ports ( same frequency I can only change duty cycle), I can also use 1 other pin to generete another PWM signal.
Configuration of dip switches are
1.Mixed mode - ON each pair of motors are controled by different PWM signal ( i can’t find information about how to turn using chanel2)
2. Expotential mode - OFF
3.Lithium Mode - I got NiMH batteries so it’s ON
4.Flip control - OFF
5. Auto calibrate - OFF
6. Timeout - OFF
When I turn power on the motor rotate for a less then 1 second and then stop, PWM signal are genereted all the time. I can’t just rotate motors backward, they don’t response when i tried to move forward.