I played around with this. Again I have the old Sabertooth (2x10) and I cheated and used TX3 to connect to Sabertooth and first made sure things worked with simple serial as you specify which baud rate you are using. I remember from before that in packet mode it was sometimes tricky with the timings to get it to recognize the correct baud rate. but I got that working as well and have the motor spinning up from slow to fast back to slow… I have it hooked up with 12v Lynxmotion NIMH battery and old 12v motor I replaced when I fried the one on the other side of the rover and ordered two newer ones to have a matched set… So only M1 hooked up.
If you tried with a 7.4v battery was it also lithium… if not did you disable the check (switch 3)…
For what it is worth here is the program that now appears to work for me…
P.S. - The newer Sabertooth 2x12 manual no longer talks about the special character that must be sent at the beginning to have it detect which baud rate. Instead It says defaults to 9600… If it were me, I would try the code out at all of the different baud rates specified in the manual to verify that the default value was not changed…
I went through each baud rate listed in the manual and I either get the red error led at 9600 or nothing at all. At this point I am starting to lean towards a bad board.
I noticed that for the 2x12 there is a command set. I have changed up my code to use the command set but still no luck. I even put the arduino gnd to the B- and still got nothing.
One thing I did notice is that if I use my meter and check all of the terminals at the battery and motor side I see:
Red probe on m1a black on B-: 3.69V
Red probe on m1b black on B-: 16.69V
Red probe on m2a black on B-: 0.0V
Red probe on m2b black on B-: 3.64V
Red probe on B+ black on B-: 16.69V
Red probe on m1a black on m1b: 0.0V
Red probe on m2a black on m2b: 0.0V
This seems a bit strange to me.
const int BAUDRATE = 19200;
const int ADDRESS = 135;
void setup()
{
//Hardware Serial
Serial.begin(BAUDRATE);
delay(2000);
// send the baud rate
/*
15: Baud Rate (decimal 15, binary 0b00001111, hex 0h0f)
This value remains until it is changed and does persist through a power cycle. The values are:
1: 2400 baud
2: 9600 baud (default)
3: 19200 baud
4: 38400 baud
*/
send(15, BAUDRATE);
//send(2, (12-6)*5); // min voltage
delay(2000);
}
/*
Send a command based on:
Void DriveForward(char address, char speed)
{
Putc(address);
Putc(0);
Putc(speed);
Putc((address + 0 + speed) & 0b01111111);
}
*/
void send(int command, int data)
{
Serial.print(ADDRESS, BYTE);
Serial.print(command, BYTE);
Serial.print(data, BYTE);
Serial.print ( ((ADDRESS + command + data) & 0b01111111), BYTE); //checksum
}
void loop()
{
int speed = 127;
int direction_m1 = 0; // command for motor 1 to go forward
int direction_m2 = 4; // command for motor 2 to go forward
send(direction_m1, speed);
send(direction_m2, speed);
digitalWrite(13, HIGH);
delay(10000);
digitalWrite(13, LOW);
delay(500);
}
Have you tried to contact DimensionEngineering? I believe one email address is: [email protected]
They may have a better idea what is going on.
From your last message it sort-of sounds like it is probably running at 9600 baud and when it gets you command, it does not like something on board, so hence the error light. At other baud rates, it does not see a valid command so it ignores it…
I did contact DimensionEngineering and had them take a look at this thread to see if they could figure out what the problem is. They said that they will look into the problem and will try to replicate what I am seeing.