Asked — Edited
Resolved Resolved by thetechguru!

Sabertooth 2X32 Operation

Hello Everyone,

I have been at my workbench reading all of the Sabertooth threads in the forum and for the life of me can not figure out how to get my sabertooth to do variable speed over the serial 9600 baud connection. Here's what I am trying to do.......

I am building an R2 unit and need him to drive in tank mode using a virtual joystick in my iPhone. The farthest I've gotten is connecting the Sabertooth per the tutorial and I did manage to get it to control the for directions but only in full speed. I guess what I'm trying to do is get the EZB to act like an RC controller. I ordered a kangaroo yesterday because I saw some of you have had success with it. I'm not a coder by any means, I'm much more mechanical in skill but I love working with the EZB and I don't want to take the easy way out and just go RC.

The threads I've seen so far are pretty fragmented because it looks like this has been figured out but not fully explained (dumbed down for someone like me. I am using the Sabertooth 2x32 at 24v powering two scooter motors for R2's foot drives and a Syren 10 for his dome drive also at 24v. I hate asking for help because I'm sure the answer is out there in another thread but for the life of me I can't seem to find it or understand it. stress

R2 is all aluminum weighing in at 160lbs so I don't want him flying into a crowd of people even though I do have a remote key fob kill switch. :D

Thanks for any help!

Douglas:)

User-inserted image


ARC Pro

Upgrade to ARC Pro

With ARC Pro, your robot is not just a machine; it's your creative partner in the journey of technological exploration.

#1  

I am answering from my phone on a train, so I can't provide links, but search for sabertooth speed ramping (may have better luck using google and specifying site:www.ez-robot.com before the search terms). There is a thread about a full size B9 from lost in space with sample scripts for a custom movement panel.

I also believe that speed ramping can be enabled on the sabertooth using describe software so that it works automatically but have not hooked up my sabertooth yet (project had a major delay due to basement flood) so haven't tested or able to give directions yet.

Alan

#2  

There are also 2 sample projects in EZ-Cloud called Sabertooth Speed Ramping, one by Rich and one by Rod. I believe the one by Rich is the first one and Rod may have done some modifications. Try downloading both and compare. The one by Rich will likely have built in documentation either in the scripts as comments or in a notepad object.

#3  

Thank you Alan! I'll check those out and post what happens. Thanks for taking the time while you were traveling. I appreciate it very much.

#4  

So... it looks like you can actually send a command in serial mode to engage ramping mode on the Sabertooth.

This is from the 2x25 manual, but should be the same on the 2x32:


16: Ramping (decimal 16, binary 0b00010000, hex 0h10)
This adjusts or disables the ramping feature found on the Sabertooth 2x25. This adjustment
applies to all modes, even R/C and analog mode. Values between 1 and 10 are Fast Ramp;
values between 11 and 20 are Slow Ramp; values between 21 and 80 are Intermediate Ramp.
Fast Ramping is a ramp time of 256/(~1000xCommand value). Ramp time is the delay between
full forward and full reverse speed.
1: 1/4 second ramp (default)
2: 1/8 second ramp
3: 1/12 second ramp
Slow and Intermediate Ramping are a ramp time of 256/[15.25x(Command value - 10)]
See Figures 8.1 and 8.2 in the Appendix for a graph of values.

So, should be able to send the command using a sendserial() script command. Too tired tonight to figure out any further, but this is certainly something to investigate.

Alan

#5  

I'll take a look! Thank you!

#6  

Alan, Rod's script worked ! Thank you!

Now I just need to figure out how to create a virtual joystick!:D

#7  

Are you using an on-board computer and just want the iPhone as a joystick, or are you running ARC mobile on the iPhone?

If the former, there is a control in the Misc controls called iPhone Sensor Stream Server. This pairs with an iPhone app called Sensor Stream and can read the position sensors of the iPhone, so you could have a script read the variables and use gestures/position information form the phone to direct the robot.

If the latter, also from Misc controls, you can add a WII controller to the project. The mobile app can use that control to emulate a Wii controller, again, using position information, but more directly act as a joystick.

There are simpler methods if you just want on-screen controls.

Alan

#8  

Hi Alan,

My friend and I are putting together a GUI for controlling R2 and all of his servos from the EZB iPhone App. My intention is to control everything from the EZB App. The intention is to have a page with movement controls and some buttons for common servo actions and sounds. Other pages will have even more servo controls for when R2 is stationary and showing off for kids. Essentially I need one joystick to control his foot drives and another to spin his dome. I've considered mounting the Laptop inside the droid but I'm rapidly running out of room as I mount various actuators and servos in the body. So, ultimately the EZB app is most likely the best solution for now. Not sure.

I can't thank you enough for the help! I can't wait to pay it forward someday when I'm more knowledgeable.

How would you suggest I create the joystick assuming I am using the EZB app?

Again, thank you!

Douglas