Welcome to Synthiam!

Program robots using technologies created by industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation, and artificial intelligence easy.

Get Started
Israel
Asked — Edited
Resolved Resolved by Rich!

Using A Sabertooth Motor Controller.

Hello.
I am using a Sabertooth 2x12 motor controller .
I like to controll the movement of the robot with speed controll like with an anlog joystick,
more you push the joystick the more speed to the wheels.
Can it be done ?
By the way I select the Sabertooth ,the numbers for turning in the Movement Panel is not correct.

Thanks
Meir.

AI Support Bot
Related Content
Synthiam
United Kingdom
#1  
Yes it can be done, and with the latest update (which I am yet to use) it has made it easier with left & right speed for slow wide turns etc. too.

This is a request that comes up often, I'll have a look to see if I can find where I left the best response. I am pretty sure I gave a detailed explanation of how to achieve it.

How do you mean the numbers for turning in the Movement Panel are not correct? What happens when you try turning with the default values?
United Kingdom
#2  
This topic has a method I posted in order to do this. The code in the post is not correct and has been shown for the idea only since I do not have a sabertooth to play around with (it's on the wishlist) but you should be able to use the information and adapt it to suit the sabertooth.
Israel
#3  
When I add a Sabertooth controller the numbers for the left turn is the same as the forward and the right turn is the same as reverse.
Israel
#4  
Thanks Rich.
I will try (I need to controll the motors from a panel with sliders).
United Kingdom
#5  
Sliders are easy. Just add the slider control under scripting. Set the variables and use those in the scripts.

If you look at the slider in the project I linked to it acts on change and changes a variable, this should point you in the right direction however if you need further help just ask and I'll throw something together for you.
United Kingdom
#6  
As for the numbers being different or wrong, to clarify this...

From the datasheet;

Quote:

Because Sabertooth controls two motors with one 8 byte character, when operating in Simplified Serial mode, each motor has 7 bits of resolution. Sending a character between 1 and 127 will control motor 1. 1 is full reverse, 64 is stop and 127 is full forward. Sending a character between 128 and 255 will control motor 2. 128 is full reverse, 192 is stop and 255 is full forward.
Character 0 (hex 0x00) is a special case. Sending this character will shut down both motors.


Motor 1
Reverse should be set as 1.
Stop should be set as 64.
Forward should be set as 127.

Motor 2
Reverse should be set as 128.
Stop should be set as 192.
Forward should be set as 255.

Analogue joystick control has been added in the latest update. I am yet to use it and yet to use the sabertooth but that would be the first thing to try. Just correct any incorrect numbers as the above and test.

If it doesn't work, I'll explain the scripts that may be needed.
Israel
#7  
Thanks Rich.

If you start a new Sabertooth control you will see that the default values for the turn left is the same as forward
and the turn right values is the same as the reverse.

Meir.
United Kingdom
#8  
You are right.

Forward should be
Left Motor: 127
Right Motor: 255

Left should be
Left Motor: 0
Right Motor: 255

Right should be
Left Motor: 127
Right Motor: 128

Reverse should be
Left Motor: 0
Right Motor: 128

At least I assume that is the case, I have no sabertooth to test it with and they are too expensive to justify purchasing just to test with. If you could confirm the above is correct it would be a great help, then I'm sure when DJ sees this he will adjust the default values for the next update of ARC.
Israel
#9  
I like to turn in place so one wheel is forward and one is in reverse.
the "0" is for shuting down the motors.

The values are :

127
255

1
255

127
128

1
128

Meir.
United Kingdom
#10  
You spotted my deliberate mistake:)

Thanks for the correction/confirmation, it'll help if someone else has issues with the sabertooth:)