Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: tank on September 27, 2010, 08:12:21 AM
-
Any of your guys who have worked with the sabertooth 2x25 by using Arduino? particularly PPM signals or PWM... I need to get my 2 pcs 24 volt 250 watt scooter motors going to move my tank..
will this code work with sabertooth 2x25?:
My setup:
S1 to pulsing pin 9 of arduino and 0 V of saber to the GND of the arduino
S2 to pulsing pin 10 of arduino and 0 V of saber to the GND of the arduino
Battery to B+ and B- ( 24 volt 7-ah SLA )
Motors to M1/A and M1/B and M2/A and M2/B
Code below:
#include <Servo.h>
Servo myservo;
void setup()
{
myservo.attach(9);
myservo.write(180); // set motor 1 to max full speed forward
}
void loop() {}
DIP setting:
non-lithium mode,microcontroller R/C input, independent mode with linear control
Your reply would be of great help,
tank
-
I personally never had good results using PWM on the sabertooth 2x25. I eventually found a this site : http://www.hessmer.org/blog/tag/arduino/ (http://www.hessmer.org/blog/tag/arduino/) in which he is using serial commands much like Webbotlib does. I utilized his code in my arduino project.
BTW:::::
Has anyone tried implementing webbotlib's routines within the Arduino environment? If so, was it difficult? I've been wondering, but haven't tried it myself.
-
Thanks tmoney68!
So you used the Packetized Serial Mode to control the sabertooth 2x25 through arduino? I don't have any background on this Packetized Serial Mode..( I will read up) Is the wiring setup the same as using PPM ( servo) codes?? digital pins of arduino connected to the S1 or S2?
-
Check the sabertooth documentation to be sure. The DIP switch settings need to be changed and I believe its just S1 and GND (make sure its the same ground as your MCU!).
-
Tank, how did this work out for you. I am getting ready to order a sabertooth 2x25 to use with two wheelchair motors, R/C tx/rx, and an Arduino. Just wandered what someone who did their project a while ago would say about their experience.